Class LauncherLabel
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
org.eclipse.nebula.widgets.opal.launcher.LauncherLabel
- All Implemented Interfaces:
org.eclipse.swt.graphics.Drawable
class LauncherLabel
extends org.eclipse.swt.widgets.Canvas
Instance of this class are a button with text, image and a nice animation
effect
-
Field Summary
Fields Modifier and Type Field Description (package private) static int
GAP
-
Constructor Summary
Constructors Constructor Description LauncherLabel(org.eclipse.swt.widgets.Composite parent, int style)
Constructs a new instance of this class given its parent and a style value describing its behavior and appearance. -
Method Summary
Modifier and Type Method Description org.eclipse.swt.graphics.Point
computeSize(int wHint, int hHint, boolean changed)
int
getBottomMargin()
org.eclipse.swt.graphics.Font
getFont()
(package private) org.eclipse.swt.graphics.Image
getImage()
int
getLeftMargin()
int
getRightMargin()
(package private) java.lang.String
getText()
int
getTopMargin()
(package private) boolean
incrementAnimation()
Increment the steps of the animationvoid
setBottomMargin(int bottomMargin)
void
setFont(org.eclipse.swt.graphics.Font font)
(package private) void
setImage(org.eclipse.swt.graphics.Image image)
void
setLeftMargin(int leftMargin)
void
setRightMargin(int rightMargin)
(package private) void
setText(java.lang.String text)
void
setTopMargin(int topMargin)
Methods inherited from class org.eclipse.swt.widgets.Canvas
drawBackground, getCaret, getIME, scroll, setCaret, 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, 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, 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
-
Field Details
-
GAP
static final int GAP- See Also:
- Constant Field Values
-
-
Constructor Details
-
LauncherLabel
LauncherLabel(org.eclipse.swt.widgets.Composite parent, int style)Constructs a new instance of this class given its parent and a style value describing its behavior and appearance.The style value is either one of the style constants defined in class
SWT
which is applicable to instances of this class, or must be built by bitwise OR'ing together (that is, using theint
"|" operator) two or more of thoseSWT
style constants. The class description lists the style constants that are applicable to the class. Style bits are also inherited from superclasses.- Parameters:
parent
- a composite control which will be the parent of the new instance (cannot be null)style
- the style of control to construct- Throws:
java.lang.IllegalArgumentException
-- ERROR_NULL_ARGUMENT - if the parent is null
org.eclipse.swt.SWTException
-- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent
-
-
Method Details
-
computeSize
public org.eclipse.swt.graphics.Point computeSize(int wHint, int hHint, boolean changed)- Overrides:
computeSize
in classorg.eclipse.swt.widgets.Control
- See Also:
Control.computeSize(int, int, boolean)
-
getText
java.lang.String getText()- Returns:
- the text
-
setText
void setText(java.lang.String text)- Parameters:
text
- the text to set
-
getImage
org.eclipse.swt.graphics.Image getImage()- Returns:
- the image
-
setImage
void setImage(org.eclipse.swt.graphics.Image image)- Parameters:
image
- the image to set
-
getFont
public org.eclipse.swt.graphics.Font getFont()- Overrides:
getFont
in classorg.eclipse.swt.widgets.Control
- Returns:
- the font
-
setFont
public void setFont(org.eclipse.swt.graphics.Font font)- Overrides:
setFont
in classorg.eclipse.swt.widgets.Canvas
- Parameters:
font
- the font to set
-
incrementAnimation
boolean incrementAnimation()Increment the steps of the animation- Returns:
- true if animation keeps running, false otherwise
-
getLeftMargin
public int getLeftMargin()- Returns:
- the left margin
-
setLeftMargin
public void setLeftMargin(int leftMargin)- Parameters:
leftMargin
- the left margin to set
-
getTopMargin
public int getTopMargin()- Returns:
- the top margin
-
setTopMargin
public void setTopMargin(int topMargin)- Parameters:
topMargin
- the top margin to set
-
getRightMargin
public int getRightMargin()- Returns:
- the right margin
-
setRightMargin
public void setRightMargin(int rightMargin)- Parameters:
rightMargin
- the right margin to set
-
getBottomMargin
public int getBottomMargin()- Returns:
- the bottom margin
-
setBottomMargin
public void setBottomMargin(int bottomMargin)- Parameters:
bottomMargin
- the bottom margin to set
-