Class CustomTileBoardWidget
- java.lang.Object
-
- org.eclipse.swt.widgets.Widget
-
- org.eclipse.swt.widgets.Control
-
- org.eclipse.swt.widgets.Scrollable
-
- org.eclipse.swt.widgets.Composite
-
- org.eclipse.swt.widgets.Canvas
-
- com._1c.g5.v8.dt.common.ui.widgets.color.BaseTileBoard
-
- com._1c.g5.v8.dt.common.ui.widgets.color.CustomTileBoardWidget
-
- All Implemented Interfaces:
IColorPicker
,org.eclipse.swt.graphics.Drawable
public class CustomTileBoardWidget extends BaseTileBoard
The class is a widget showing a board of custom color tiles.
-
-
Field Summary
-
Fields inherited from class com._1c.g5.v8.dt.common.ui.widgets.color.BaseTileBoard
rgbColors, selectedIdx
-
-
Constructor Summary
Constructors Constructor Description CustomTileBoardWidget(org.eclipse.swt.widgets.Composite parent, int style)
Constructs an instance ofCustomTileBoardWidget
with 24 color tiles ordered into 8 columns.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addCustomColor(org.eclipse.swt.graphics.RGB rgb)
This method provides addition of a color to user custom colors.void
saveCustomColors()
The method tries to store the array of custom colorsvoid
setValue(org.eclipse.swt.graphics.RGB rgb)
Overrides the super-class method so that changes from the outside won't change current selection.-
Methods inherited from class com._1c.g5.v8.dt.common.ui.widgets.color.BaseTileBoard
addColorChangedEventListener, computeSize, createColorChangedEvent, fillColorArray, getValue, removeColorChangedEventListener, select
-
Methods inherited from class org.eclipse.swt.widgets.Canvas
drawBackground, getCaret, getIME, scroll, setCaret, setFont, setIME
-
Methods inherited from class org.eclipse.swt.widgets.Composite
changed, checkSubclass, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList
-
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, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, requestLayout, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, 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, toString
-
-
-
-
Constructor Detail
-
CustomTileBoardWidget
public CustomTileBoardWidget(org.eclipse.swt.widgets.Composite parent, int style)
Constructs an instance ofCustomTileBoardWidget
with 24 color tiles ordered into 8 columns. Fills theBaseTileBoard.rgbColors
with values from user preferences.- Parameters:
parent
-style
-
-
-
Method Detail
-
setValue
public void setValue(org.eclipse.swt.graphics.RGB rgb)
Overrides the super-class method so that changes from the outside won't change current selection.- Specified by:
setValue
in interfaceIColorPicker
- Overrides:
setValue
in classBaseTileBoard
-
addCustomColor
public void addCustomColor(org.eclipse.swt.graphics.RGB rgb)
This method provides addition of a color to user custom colors. Addition is performed into the selected tileBaseTileBoard.selectedIdx
.- Parameters:
rgb
- the color to add
-
saveCustomColors
public void saveCustomColors() throws org.osgi.service.prefs.BackingStoreException
The method tries to store the array of custom colors- Throws:
org.osgi.service.prefs.BackingStoreException
- in case of failure
-
-