Class LinearScaleTickLabels
java.lang.Object
org.eclipse.draw2d.Figure
org.eclipse.nebula.visualization.xygraph.linearscale.LinearScaleTickLabels
- All Implemented Interfaces:
org.eclipse.draw2d.IFigure
- Direct Known Subclasses:
LinearScaleTickLabels2
public class LinearScaleTickLabels
extends org.eclipse.draw2d.Figure
Linear Scale tick labels.
-
Nested Class Summary
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.String
MINUS
-
Constructor Summary
Constructors Constructor Description LinearScaleTickLabels(IScaleProvider linearScale)
Constructor.LinearScaleTickLabels(IScaleProvider linearScale, ITicksProvider ticks)
Constructor. -
Method Summary
Modifier and Type Method 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 scalevoid
setShowMaxLabel(boolean showMaxLabel)
set whether max label is shown or notvoid
setShowMinLabel(boolean showMinLabel)
sets whether min label is shown or notprotected void
setTicksProvider(ITicksProvider ticks)
Sets the ticks providerRange
update(int length)
Updates the tick labels.Methods inherited from class org.eclipse.draw2d.Figure
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
-
Field Details
-
MINUS
protected static final java.lang.String MINUS- See Also:
- Constant Field Values
-
-
Constructor Details
-
LinearScaleTickLabels
Constructor.- Parameters:
linearScale
- the scale
-
LinearScaleTickLabels
Constructor.- Parameters:
linearScale
- the scaleticks
- the tick provider
-
-
Method Details
-
getTicksProvider
- Returns:
- the ticks provider used
-
setTicksProvider
Sets the ticks provider- Parameters:
ticks
-
-
getGridStepInPixel
public int getGridStepInPixel()- Returns:
- the gridStepInPixel
-
getTickLabelPositions
public java.util.ArrayList<java.lang.Integer> getTickLabelPositions()Gets the tick label positions.- Returns:
- the tick label positions
-
getTickVisibilities
public java.util.ArrayList<java.lang.Boolean> getTickVisibilities()- Returns:
- the tickVisibilities
-
drawXTick
protected void drawXTick(org.eclipse.draw2d.Graphics graphics)Draw the X tick. To be overridden if needed.- Parameters:
graphics
- the graphics context
-
drawYTick
protected void drawYTick(org.eclipse.draw2d.Graphics graphics)Draw the Y tick. To be overridden if needed.- Parameters:
graphics
- the graphics context
-
paintClientArea
protected void paintClientArea(org.eclipse.draw2d.Graphics graphics)- Overrides:
paintClientArea
in classorg.eclipse.draw2d.Figure
-
isShowMinLabel
public boolean isShowMinLabel()- Returns:
- True is min label is shown
-
setShowMinLabel
public void setShowMinLabel(boolean showMinLabel)sets whether min label is shown or not- Parameters:
showMinLabel
-
-
isShowMaxLabel
public boolean isShowMaxLabel()- Returns:
- True if max label is shown
-
setShowMaxLabel
public void setShowMaxLabel(boolean showMaxLabel)set whether max label is shown or not- Parameters:
showMaxLabel
-
-
getTickLabelMaxLength
public int getTickLabelMaxLength()- Returns:
- the tickLabelMaxLength
-
getTickLabelMaxHeight
public int getTickLabelMaxHeight()- Returns:
- the tickLabelMaxHeight
-
getScale
- Returns:
- the scale
-
setScale
sets the type of scale- Parameters:
scale
-
-
update
Updates the tick labels.- Parameters:
length
- scale tick length (without margin)- Returns:
- returns a new axis Range if scale has changed and has ticks at ends and its size is > 1, null otherwise.
-