Class LinearScaledMarker
java.lang.Object
org.eclipse.draw2d.Figure
org.eclipse.nebula.visualization.xygraph.linearscale.LinearScaledMarker
- All Implemented Interfaces:
org.eclipse.draw2d.IFigure
public class LinearScaledMarker
extends org.eclipse.draw2d.Figure
A linear scale related marker, whose orientation, range, mark position etc.
are determined by the scale. It must have the same length and bounds.x(for
horizontal) or bounds.y(for vertical) with the scale.
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
Constructors Constructor Description LinearScaledMarker(LinearScale scale)
Constructor -
Method Summary
Modifier and Type Method Description void
addMarkerElement(java.lang.String label, double value)
Add (if the marker does not exist) or change a marker element.void
addMarkerElement(java.lang.String label, double value, org.eclipse.swt.graphics.RGB color)
Add (if the marker does not exist) or change a marker element.java.lang.String[]
getLabels()
AbstractScale.LabelSide
getMakerLabelsPosition()
AbstractScale.LabelSide
getMakerLablesPosition()
Deprecated.use correctly spelledgetMakerLabelsPosition()
org.eclipse.draw2d.geometry.Dimension
getPreferredSize(int wHint, int hHint)
LinearScale
getScale()
boolean
isMarkerLabelVisible()
boolean
isMarkerLableVisible()
Deprecated.use correctly spelledisMarkerLabelVisible()
boolean
isMarkerLineVisible()
protected void
paintClientArea(org.eclipse.draw2d.Graphics graphics)
void
removeMarkerElement(java.lang.String label)
Removes the marker element with the given labelvoid
setBounds(org.eclipse.draw2d.geometry.Rectangle rect)
void
setDirty(boolean dirty)
void
setLabelSide(AbstractScale.LabelSide labelSide)
void
setMarkerElementColor(java.lang.String label, org.eclipse.swt.graphics.RGB color)
If the marker exists, set its color.void
setMarkerElementValue(java.lang.String label, double value)
If the marker exists, set its value.void
setMarkerLabelVisible(boolean markerLabelVisible)
void
setMarkerLableVisible(boolean markerLabelVisible)
Deprecated.use correctly spelledsetMarkerLabelVisible(boolean)
void
setMarkerLineVisible(boolean markerLineVisible)
void
setScale(LinearScale scale)
void
updateMarkerElements()
updates marker elements of ticksvoid
updateMarkerElments()
Deprecated.void
updateTick()
Updates the tick, recalculate all inner parametersMethods 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, 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, 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
-
Constructor Details
-
LinearScaledMarker
Constructor- Parameters:
scale
-
-
-
Method Details
-
setDirty
public void setDirty(boolean dirty)- Parameters:
dirty
- the dirty to set
-
setMarkerElementValue
public void setMarkerElementValue(java.lang.String label, double value)If the marker exists, set its value.- Parameters:
label
- the label of the marker element, it must be unique.value
- the value to be set
-
setMarkerElementColor
public void setMarkerElementColor(java.lang.String label, org.eclipse.swt.graphics.RGB color)If the marker exists, set its color.- Parameters:
label
- the label of the marker element, it must be unique.color
- the color to be set
-
addMarkerElement
public void addMarkerElement(java.lang.String label, double value, org.eclipse.swt.graphics.RGB color)Add (if the marker does not exist) or change a marker element.- Parameters:
label
- the label of the marker element, it must be unique.value
- the value of the marker elementcolor
- the color of the marker element
-
addMarkerElement
public void addMarkerElement(java.lang.String label, double value)Add (if the marker does not exist) or change a marker element.- Parameters:
label
- the label of the marker element, it must be unique.value
- the value of the marker element
-
removeMarkerElement
public void removeMarkerElement(java.lang.String label)Removes the marker element with the given label- Parameters:
label
-
-
paintClientArea
protected void paintClientArea(org.eclipse.draw2d.Graphics graphics)- Overrides:
paintClientArea
in classorg.eclipse.draw2d.Figure
-
setBounds
public void setBounds(org.eclipse.draw2d.geometry.Rectangle rect)- Specified by:
setBounds
in interfaceorg.eclipse.draw2d.IFigure
- Overrides:
setBounds
in classorg.eclipse.draw2d.Figure
-
updateTick
public void updateTick()Updates the tick, recalculate all inner parameters -
getLabels
public java.lang.String[] getLabels()- Returns:
- the labels
-
updateMarkerElments
@Deprecated public void updateMarkerElments()Deprecated.Use correctly spelledupdateMarkerElements()
instead. -
updateMarkerElements
public void updateMarkerElements()updates marker elements of ticks -
setScale
- Parameters:
scale
- the scale to set
-
getScale
- Returns:
- the scale
-
setLabelSide
- Parameters:
labelSide
- the makerLabelsPosition to set
-
getMakerLabelsPosition
- Returns:
- the makerLabelsPosition
-
getMakerLablesPosition
Deprecated.use correctly spelledgetMakerLabelsPosition()
-
setMarkerLineVisible
public void setMarkerLineVisible(boolean markerLineVisible)- Parameters:
markerLineVisible
- the markerLineVisible to set
-
isMarkerLineVisible
public boolean isMarkerLineVisible()- Returns:
- the markerLineVisible
-
setMarkerLabelVisible
public void setMarkerLabelVisible(boolean markerLabelVisible)- Parameters:
markerLabelVisible
- the markerLabelVisible to set
-
setMarkerLableVisible
@Deprecated public void setMarkerLableVisible(boolean markerLabelVisible)Deprecated.use correctly spelledsetMarkerLabelVisible(boolean)
-
isMarkerLabelVisible
public boolean isMarkerLabelVisible()- Returns:
- the markerLabelVisible
-
isMarkerLableVisible
@Deprecated public boolean isMarkerLableVisible()Deprecated.use correctly spelledisMarkerLabelVisible()
-
getPreferredSize
public org.eclipse.draw2d.geometry.Dimension getPreferredSize(int wHint, int hHint)- Specified by:
getPreferredSize
in interfaceorg.eclipse.draw2d.IFigure
- Overrides:
getPreferredSize
in classorg.eclipse.draw2d.Figure
-