|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
ilog.views.maps.beans.IlvJScaleBar
public class IlvJScaleBar
This class defines a Swing component that displays the scale of an 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).
This property defines the coordinate system of the manager
and its units.
IlvProjectionProperty,
IlvCoordinateSystemProperty,
Serialized Form| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
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. |
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
IlvJScaleBar()
Creates a new instance of IlvScaleBar. |
|
| Method Summary | |
|---|---|
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 |
setBounds(int x,
int y,
int width,
int height)
Sets the bounds for this component and updates the scale bar when component is resized. |
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 component. |
void |
setTextSpacing(int spacing)
Specifies the text spacing. |
void |
setView(IlvManagerView view)
Specifies the view that controls this component. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
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
| Constructor Detail |
|---|
public IlvJScaleBar()
IlvScaleBar. The scale bar is not
active until an IlvManagerView
is set. The manager of the view should have an
IlvCoordinateSystemProperty.
IlvScaleBar.setView(ilog.views.IlvManagerView)| Method Detail |
|---|
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.IlvScaleBar.SIMPLE_SCALE_CENTER,
IlvScaleBar.DASH_SCALE_EVEN,
IlvScaleBar.DOUBLE_DASH_SCALE_EVEN,
IlvScaleBar.DASH_SCALE_ODD,
IlvScaleBar.DOUBLE_DASH_SCALE_ODD,
IlvScaleBar.SIMPLE_SCALE_BOTTOM,
IlvScaleBar.SCALE_EMPTY,
IlvScaleBar.DOUBLE_SCALE_EMPTYpublic int getScaleStyle()
public void setScaleTextMode(int mode)
mode - The text displaying mode.IlvScaleBar.UNIQUE_LABEL,
IlvScaleBar.THREE_LABELSpublic 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.IlvScaleBar.setNearUnit(ilog.views.maps.IlvLinearUnit),
IlvScaleBar.setFarUnit(ilog.views.maps.IlvLinearUnit)public double getFarLimit()
public void setNearUnit(IlvLinearUnit unit)
unit - The near unit converter.IlvScaleBar.setFarLimit(double),
getNearUnit()public IlvLinearUnit getNearUnit()
null if there is no unit.public void setFarUnit(IlvLinearUnit unit)
unit - The far unit.IlvScaleBar.setFarLimit(double),
getFarUnit()public IlvLinearUnit getFarUnit()
null if there is no unit.public Dimension getPreferredSize()
getPreferredSize in class JComponentpublic Dimension getMinimumSize()
getMinimumSize in class JComponentpublic 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)public void paint(Graphics g)
paint in class JComponent
public void setSize(int width,
int height)
setSize in class Component
public void setBounds(int x,
int y,
int width,
int height)
setBounds in class Componentx - the new x-coordinate of this componenty - the new y-coordinate of this componentwidth - the new width of this componentheight - the new height of this component
|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||