public interface ViewerInitData
Modifier and Type | Method and Description |
---|---|
boolean |
getAutoUpdate()
Determines if the viewer is in auto-update mode.
|
String |
getExpression()
Retrieves an expression identifying the value.
|
JComponent |
getMainPanel()
Gets the main panel.
|
String |
getName()
Retrieves the name of the value.
|
boolean |
getNeedParen()
Determines if the expression can stand alone anywhere in source code.
|
Scope |
getScope()
Retrieves the valid scope for the viewer.
|
boolean |
isIndexable()
Determines if the viewer is indexable.
|
void |
setAnchor(Anchor anchor,
boolean rotated)
Sets the anchor point.
|
void |
setAutoUpdate(boolean autoUpdate)
Sets the auto-update mode for the viewer.
|
void |
setControls(JComponent controls)
Called by the viewer to declare its controls, or to change the controls.
|
void |
setIndexable(boolean indexable)
Sets the indexable state.
|
void |
setLabelPos(Point location,
LabelHorzPosition hPos,
LabelVertPosition vPos,
Point tLocation,
LabelHorzPosition thPos,
LabelVertPosition tvPos)
Called by the viewer to set the label location.
|
void |
setMainPanel(JComponent panel,
int index)
Called by the viewer to declare its main panel, or to change the main
panel.
|
void |
setPanels(JComponent mainPanelIn,
JComponent rowHeaderIn,
JComponent columnHeaderIn,
int index)
Called by the viewer to set its main panel, row header, and column
header, or to change those panels.
|
void |
setSubviewPanel(JComponent panel,
SubviewerPosition sp)
Called by the viewer to declare its subviewer panel, or to change the
subviewer panel.
|
void |
stateChanged()
Called when the viewer XML state data has changed.
|
void |
update()
Forces the viewer to update.
|
boolean getAutoUpdate()
String getExpression()
JComponent getMainPanel()
String getName()
boolean getNeedParen()
Scope getScope()
boolean isIndexable()
void setAnchor(Anchor anchor, boolean rotated)
anchor
- the new anchor point.rotated
- true if the viewer was just rotated, so that the first
resize should use the top left anchor, false otherwise.void setAutoUpdate(boolean autoUpdate)
autoUpdate
- true if the viewer should automatically update
periodically, false otherwise.void setControls(JComponent controls)
controls
- the controls for the viewer, or null if there are
none.void setIndexable(boolean indexable)
indexable
- true if the viewer displays index variables, false
otherwise.void setLabelPos(Point location, LabelHorzPosition hPos, LabelVertPosition vPos, Point tLocation, LabelHorzPosition thPos, LabelVertPosition tvPos)
location
- the label location reference point relative to the main
panel when opaque.hPos
- the horizontal alignment for the label when opaque.vPos
- the vertical alignment for the label when opaque.tLocation
- the label location reference point relative to the main
panel when transparent.thPos
- the horizontal alignment for the label when transparent.tvPos
- the vertical alignment for the label when transparent.void setMainPanel(JComponent panel, int index)
panel
- the main panel for the viewer.index
- an index for identifying the main panel. The same index
should be used for different main panels if they should all be the same
size when the panel is sized by the user, otherwise, they should be
different.void setPanels(JComponent mainPanelIn, JComponent rowHeaderIn, JComponent columnHeaderIn, int index)
mainPanelIn
- the main panel for the viewer.rowHeaderIn
- the row header for the viewer, or null if there should
be no row header.columnHeaderIn
- the column header for the viewer, or null if there
should be no column header.index
- an index for identifying the main panel. The same index
should be used for different main panels if they should all be the same
size when the panel is sized by the user, otherwise, they should be
different.void setSubviewPanel(JComponent panel, SubviewerPosition sp)
panel
- the subviewer panel, or null if the viewer does not have an
associated subviewer.sp
- the subviewer panel position.void stateChanged()
void update()