public class IlvScaleBar extends Component
IlvManagerView
.
This component works only if the manager of the target view has an
IlvCoordinateSystemProperty
or an
IlvProjectionProperty
(for backward compatibility with JViews
versions previous to 5.0).
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Modifier and Type | Field and Description |
---|---|
static int |
DASH_SCALE_EVEN
Displays alternate color filled rectangles, starting with a foreground colored rectangle.
|
static int |
DASH_SCALE_ODD
Displays graduations with filled rectangles, starting with an alternate colored rectangle.
|
static int |
DOUBLE_DASH_SCALE_EVEN
Displays alternate filled and non filled rectangles.
|
static int |
DOUBLE_DASH_SCALE_ODD
Displays two lines of filled and non filled rectangles, starting with an alternate color filled rectangle.
|
static int |
DOUBLE_SCALE_EMPTY
Displays two lines of empty rectangles.
|
static int |
SCALE_EMPTY
Displays graduations with empty rectangles.
|
static int |
SIMPLE_SCALE_BOTTOM
Displays graduations on a bottom line.
|
static int |
SIMPLE_SCALE_CENTER
Displays graduations on a centered line.
|
static int |
THREE_LABELS
Three labels are drawn on the top of the scale bar.
|
static int |
UNIQUE_LABEL
A unique label is drawn on the top of the scale bar.
|
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
IlvScaleBar()
Creates a new instance of
IlvScaleBar . |
Modifier and Type | Method and Description |
---|---|
Color |
getAlternateScaleColor()
Gets the alternate scale color.
|
double |
getFarLimit()
Returns the switch limit between a text display of the scale in a small unit
(for instance, meters) and a text display in a large unit (for instance, kilometers).
|
IlvLinearUnit |
getFarUnit()
Returns the unit used to display the
length of the scale bar for small scales.
|
IlvGraphic |
getGraphic()
Returns the
IlvGraphic that represents the scale part of the IlvScaleBar . |
int |
getMarginHeight()
Returns the vertical margin that must be left between the scale
bar and the border of the component.
|
int |
getMarginWidth()
Returns the minimum margin that must be left between the scale
bar and the border of the component.
|
Dimension |
getMinimumSize()
Returns the minimum size of the component.
|
IlvLinearUnit |
getNearUnit()
Returns the unit used to display the
length of the scale bar for large scales.
|
Dimension |
getPreferredSize()
Returns the preferred size of the component.
|
int |
getScaleHeight()
Returns the height of the scale bar.
|
int |
getScaleStyle()
Returns the style used to draw the scale bar.
|
int |
getScaleTextMode()
Returns the text mode.
|
int |
getTextSpacing()
Returns the text spacing.
|
IlvManagerView |
getView()
Returns the view whose scale is displayed.
|
void |
paint(Graphics g)
Draws the component.
|
void |
setAlternateScaleColor(Color color)
Sets the alternate scale color.
|
void |
setFarLimit(double limit)
Sets the switch limit between a text display of the scale in a small unit
(for instance, meters) and a text display in a large unit (for instance, kilometers).
|
void |
setFarUnit(IlvLinearUnit unit)
Sets the unit used to display the
length of the scale bar for small scales.
|
void |
setGraphic(IlvGraphic graphic)
Sets the
IlvGraphic that represents the scale part of the IlvScaleBar . |
void |
setMarginHeight(int margin)
Specifies the vertical margin that must be left between the scale
bar and the border of the component.
|
void |
setMarginWidth(int margin)
Specifies the minimum horizontal margin that must be left between the scale
bar and the border of the component.
|
void |
setNearUnit(IlvLinearUnit unit)
Sets the unit used to display the
length of the scale bar for large scales.
|
void |
setScaleHeight(int scaleHeight)
Sets the height of the scale bar.
|
void |
setScaleStyle(int style)
Sets the style used to draw the scale bar.
|
void |
setScaleTextMode(int mode)
Sets the label displaying mode.
|
void |
setSize(int width,
int height)
Sets the size for this object.
|
void |
setTextSpacing(int spacing)
Specifies the text spacing.
|
void |
setView(IlvManagerView view)
Specifies the view that controls this component.
|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, revalidate, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update, validate
public static final int SIMPLE_SCALE_CENTER
public static final int DASH_SCALE_EVEN
public static final int DOUBLE_DASH_SCALE_EVEN
public static final int DASH_SCALE_ODD
public static final int DOUBLE_DASH_SCALE_ODD
public static final int SIMPLE_SCALE_BOTTOM
public static final int SCALE_EMPTY
public static final int DOUBLE_SCALE_EMPTY
public static final int UNIQUE_LABEL
public static final int THREE_LABELS
public IlvScaleBar()
IlvScaleBar
. The scale bar is not
active until an IlvManagerView
is set. The manager of the view should have an
IlvCoordinateSystemProperty
.setView(ilog.views.IlvManagerView)
public void setView(IlvManagerView view)
view
- The view.public IlvManagerView getView()
null
if the bean has no
attached view.public void setScaleStyle(int style)
style
- The scale style.SIMPLE_SCALE_CENTER
,
DASH_SCALE_EVEN
,
DOUBLE_DASH_SCALE_EVEN
,
DASH_SCALE_ODD
,
DOUBLE_DASH_SCALE_ODD
,
SIMPLE_SCALE_BOTTOM
,
SCALE_EMPTY
,
DOUBLE_SCALE_EMPTY
public int getScaleStyle()
public void setScaleTextMode(int mode)
mode
- The text displaying mode.UNIQUE_LABEL
,
THREE_LABELS
public int getScaleTextMode()
public void setMarginWidth(int margin)
0
.
The default value is 2 pixels.margin
- The margin width.public int getMarginWidth()
public void setMarginHeight(int margin)
0
.
The default value is 4 pixels.margin
- The margin height.public int getMarginHeight()
public void setTextSpacing(int spacing)
spacing
- The text spacing.public int getTextSpacing()
public void setScaleHeight(int scaleHeight)
1
.scaleHeight
- The height.public int getScaleHeight()
public void setAlternateScaleColor(Color color)
color
- The color.public Color getAlternateScaleColor()
public void setFarLimit(double limit)
limit
- The upper limit.setNearUnit(ilog.views.maps.IlvLinearUnit)
,
setFarUnit(ilog.views.maps.IlvLinearUnit)
public double getFarLimit()
public void setNearUnit(IlvLinearUnit unit)
unit
- The near unit converter.setFarLimit(double)
,
getNearUnit()
public IlvLinearUnit getNearUnit()
null
if there is no unit.public void setFarUnit(IlvLinearUnit unit)
unit
- The far unit.setFarLimit(double)
,
getFarUnit()
public IlvLinearUnit getFarUnit()
null
if there is no unit.public Dimension getPreferredSize()
getPreferredSize
in class Component
public Dimension getMinimumSize()
getMinimumSize
in class Component
public void setGraphic(IlvGraphic graphic)
IlvGraphic
that represents the scale part of the IlvScaleBar
.
If an IlvGraphic
is set, then the predefined scales drawings are not used.graphic
- The IlvGraphic
that represents the scale part of the IlvScaleBar
.public IlvGraphic getGraphic()
IlvGraphic
that represents the scale part of the IlvScaleBar
.setGraphic(ilog.views.IlvGraphic)
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.