public class LinearScaleTickLabels
extends org.eclipse.draw2d.Figure
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
MINUS |
Constructor and Description |
---|
LinearScaleTickLabels(IScaleProvider linearScale)
Constructor.
|
LinearScaleTickLabels(IScaleProvider linearScale,
ITicksProvider ticks)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
drawXTick(org.eclipse.draw2d.Graphics graphics)
Draw the X tick.
|
protected void |
drawYTick(org.eclipse.draw2d.Graphics graphics)
Draw the Y tick.
|
int |
getGridStepInPixel() |
IScaleProvider |
getScale() |
int |
getTickLabelMaxHeight() |
int |
getTickLabelMaxLength() |
java.util.ArrayList<java.lang.Integer> |
getTickLabelPositions()
Gets the tick label positions.
|
ITicksProvider |
getTicksProvider() |
java.util.ArrayList<java.lang.Boolean> |
getTickVisibilities() |
boolean |
isShowMaxLabel() |
boolean |
isShowMinLabel() |
protected void |
paintClientArea(org.eclipse.draw2d.Graphics graphics) |
void |
setScale(IScaleProvider scale)
sets the type of scale
|
void |
setShowMaxLabel(boolean showMaxLabel)
set whether max label is shown or not
|
void |
setShowMinLabel(boolean showMinLabel)
sets whether min label is shown or not
|
protected void |
setTicksProvider(ITicksProvider ticks)
Sets the ticks provider
|
Range |
update(int length)
Updates the tick labels.
|
add, add, add, add, addAncestorListener, addCoordinateListener, addFigureListener, addFocusListener, addKeyListener, addLayoutListener, addListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, containsPoint, containsPoint, erase, findDescendantAtExcluding, findFigureAt, findFigureAt, findFigureAt, findFigureAtExcluding, findMouseEventTargetAt, findMouseEventTargetInDescendantsAt, fireCoordinateSystemChanged, fireFigureMoved, fireMoved, firePropertyChange, firePropertyChange, firePropertyChange, getBackgroundColor, getBorder, getBounds, getChildren, getClientArea, getClientArea, getClippingStrategy, getCursor, getFlag, getFont, getForegroundColor, getInsets, getLayoutManager, getListeners, getLocalBackgroundColor, getLocalFont, getLocalForegroundColor, getLocation, getMaximumSize, getMinimumSize, getMinimumSize, getParent, getPreferredSize, getPreferredSize, getSize, getToolTip, getUpdateManager, handleFocusGained, handleFocusLost, handleKeyPressed, handleKeyReleased, handleMouseDoubleClicked, handleMouseDragged, handleMouseEntered, handleMouseExited, handleMouseHover, handleMouseMoved, handleMousePressed, handleMouseReleased, hasFocus, internalGetEventDispatcher, intersects, invalidate, invalidateTree, isCoordinateSystem, isEnabled, isFocusTraversable, isMirrored, isMouseEventTarget, isOpaque, isRequestFocusEnabled, isShowing, isValid, isValidationRoot, isVisible, layout, paint, paintBorder, paintChildren, paintFigure, primTranslate, remove, removeAll, removeAncestorListener, removeCoordinateListener, removeFigureListener, removeFocusListener, removeKeyListener, removeLayoutListener, removeListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, revalidate, setBackgroundColor, setBorder, setBounds, setChildrenDirection, setChildrenEnabled, setChildrenOrientation, setClippingStrategy, setConstraint, setCursor, setEnabled, setFlag, setFocusTraversable, setFont, setForegroundColor, setLayoutManager, setLocation, setMaximumSize, setMinimumSize, setOpaque, setParent, setPreferredSize, setPreferredSize, setRequestFocusEnabled, setSize, setSize, setToolTip, setValid, setVisible, translate, translateFromParent, translateToAbsolute, translateToParent, translateToRelative, useLocalCoordinates, validate
protected static final java.lang.String MINUS
public LinearScaleTickLabels(IScaleProvider linearScale)
linearScale
- the scalepublic LinearScaleTickLabels(IScaleProvider linearScale, ITicksProvider ticks)
linearScale
- the scaleticks
- the tick providerpublic ITicksProvider getTicksProvider()
protected void setTicksProvider(ITicksProvider ticks)
ticks
- public int getGridStepInPixel()
public java.util.ArrayList<java.lang.Integer> getTickLabelPositions()
public java.util.ArrayList<java.lang.Boolean> getTickVisibilities()
protected void drawXTick(org.eclipse.draw2d.Graphics graphics)
graphics
- the graphics contextprotected void drawYTick(org.eclipse.draw2d.Graphics graphics)
graphics
- the graphics contextprotected void paintClientArea(org.eclipse.draw2d.Graphics graphics)
paintClientArea
in class org.eclipse.draw2d.Figure
public boolean isShowMinLabel()
public void setShowMinLabel(boolean showMinLabel)
showMinLabel
- public boolean isShowMaxLabel()
public void setShowMaxLabel(boolean showMaxLabel)
showMaxLabel
- public int getTickLabelMaxLength()
public int getTickLabelMaxHeight()
public IScaleProvider getScale()
public void setScale(IScaleProvider scale)
scale
- public Range update(int length)
length
- scale tick length (without margin)