Package com.iizigo.prop
Class DefinedButton
- All Implemented Interfaces:
- Drawable
The clear-button.
- Author:
- Christopher Mindus
- Field Summary
- Constructor SummaryConstructorsConstructorDescription- DefinedButton- (MultiPropLabel multiLabel, PropertyEditor resizer, Composite parent, boolean hideDefineButton) Create the clear button.
- Method SummaryModifier and TypeMethodDescription- computeSize- (int wHint, int hHint, boolean changed) Size is always 18x16 for others.- intGets the error level.- getLabel()Gets the label attached, perhaps null.- getNode()Gets the node.- booleanGets the defined state.- booleanChecks if extended.- booleanChecks if the main multi-prop item is expanded.- void- onExpand- (boolean isExpanded) Called when main multi-prop item is expanded or collapsed.- voidRefreshes the extended state.- void- registerPropLabel- (IPropertyEditorController controller, PropLabel label, PropertyEditor.Node node) Registers a property and label.- void- setDefined- (int errorLevel) Sets the state of the button: defined and error level.- voidSets the state of the button: defined and error.- voidSets the state of the button: defined and no error.- voidSets the label background.- voidSets a listener, can only be done once.- void- setUndefined- (int errorLevel) Sets the state of the button: undefined with potential severity.- Methods inherited from class org.eclipse.swt.widgets.Composite- changed, checkSubclass, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, redraw, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList, toString- Methods inherited from class org.eclipse.swt.widgets.Scrollable- computeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBar- Methods inherited from class org.eclipse.swt.widgets.Control- addControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getRegion, getShell, getSize, getTextDirection, getToolTipText, getTouchEnabled, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, requestLayout, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setTextDirection, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, update- Methods inherited from class org.eclipse.swt.widgets.Widget- addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getListeners, getStyle, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData- Methods inherited from class java.lang.Object- clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait- Methods inherited from interface org.eclipse.swt.graphics.Drawable- isAutoScalable
- Constructor Details- DefinedButtonpublic DefinedButton- (MultiPropLabel multiLabel, PropertyEditor resizer, Composite parent, boolean hideDefineButton) Create the clear button.
 
- Method Details- getNodeGets the node.
- setLabelBackgroundSets the label background.
- setListenerSets a listener, can only be done once.
- registerPropLabelpublic void registerPropLabel- (IPropertyEditorController controller, PropLabel label, PropertyEditor.Node node) Registers a property and label. The property is tracked for definition, and updates the label color accordingly.
- getLabelGets the label attached, perhaps null.
- refreshExtendedpublic void refreshExtended()Refreshes the extended state.
- isExtendedpublic boolean isExtended()Checks if extended.
- setUndefinedpublic void setUndefined- (int errorLevel) Sets the state of the button: undefined with potential severity.- Parameters:
- errorLevel- The error level, -1 or 0 for OK, 1=warning, 2=error.
 
- setDefinedOKpublic void setDefinedOK()Sets the state of the button: defined and no error.
- setDefinedErrorpublic void setDefinedError()Sets the state of the button: defined and error.
- setDefinedpublic void setDefined- (int errorLevel) Sets the state of the button: defined and error level.- Parameters:
- errorLevel- 0=OK, 1=warning, 2=error.
 
- isDefinedpublic boolean isDefined()Gets the defined state.
- getErrorLevelpublic int getErrorLevel()Gets the error level.
- computeSizeSize is always 18x16 for others.- Overrides:
- computeSizein class- Composite
 
- isMainMultiPropExpandedpublic boolean isMainMultiPropExpanded()Checks if the main multi-prop item is expanded.
- onExpandpublic void onExpand- (boolean isExpanded) Called when main multi-prop item is expanded or collapsed.