Class ScalableImageLabel
- java.lang.Object
-
- org.eclipse.swt.widgets.Widget
-
- org.eclipse.swt.widgets.Control
-
- org.eclipse.swt.widgets.Label
-
- de.gebit.integrity.eclipse.controls.ScalableImageLabel
-
- All Implemented Interfaces:
org.eclipse.swt.graphics.Drawable
public class ScalableImageLabel extends org.eclipse.swt.widgets.Label
A label containing an image that can toggle between two sizes: a smaller one limited to a given width, and the original sized one.- Author:
- Rene Schneider - initial API and implementation
-
-
Constructor Summary
Constructors Constructor Description ScalableImageLabel(org.eclipse.swt.widgets.Composite aParent, int aStyle, org.eclipse.swt.graphics.Image anImage, int aMaxWidth)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
checkSubclass()
int
getHeight()
int
getMinimumHeight()
int
getWidth()
void
toggleImageSize()
Toggles between the sizes.-
Methods inherited from class org.eclipse.swt.widgets.Label
getAlignment, getImage, getText, setAlignment, setEnabled, setImage, setText
-
Methods inherited from class org.eclipse.swt.widgets.Control
addControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, computeSize, 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, setFocus, 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, toString
-
-
-
-
Method Detail
-
getMinimumHeight
public int getMinimumHeight()
-
toggleImageSize
public void toggleImageSize()
Toggles between the sizes.
-
getWidth
public int getWidth()
-
getHeight
public int getHeight()
-
checkSubclass
protected void checkSubclass()
- Overrides:
checkSubclass
in classorg.eclipse.swt.widgets.Widget
-
-