public class InfoPanelController extends AbstractFeature implements SelectListener
Modifier and Type | Field and Description |
---|---|
protected AnnotationLayer |
annotationLayer |
protected ScreenAnnotation |
annotationPanel |
protected static String |
HARD_SPACE |
protected static String |
INDENT |
protected AVList |
lastSelectedObject |
protected int |
maxLineLength |
controller, featureID
changeSupport, enabled
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
Constructor and Description |
---|
InfoPanelController(Registry registry) |
Modifier and Type | Method and Description |
---|---|
protected Dimension |
computeLengths(String annoText)
Determine the number of lines in the annotation text and the length of the longest line.
|
protected Dimension |
computePanelSize(String annoText)
Determine the panel size needed to display the full annotation.
|
protected AnnotationAttributes |
getAnnotationPanelAttributes(String annoText) |
protected void |
hideAnnotationPanel() |
void |
initialize(Controller controller) |
void |
selected(SelectEvent event) |
protected void |
showAnnotationPanel(String annoText) |
protected String |
splitLine(String origLine)
Split a long line into several lines.
|
protected String |
splitLines(String origText)
Split a collection of lines into a new collection whose lines are all less than the maximum allowed line length.
|
actionPerformed, addToToolBar, doActionPerformed, doPropertyChange, getController, getFeatureID, getName, getStringValue, isInitialized, isOn, isTwoState, propertyChange, register, setMenuAccellerator, turnOn
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addPropertyChangeListener, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
protected AnnotationLayer annotationLayer
protected ScreenAnnotation annotationPanel
protected static final String HARD_SPACE
protected static final String INDENT
protected AVList lastSelectedObject
protected int maxLineLength
public InfoPanelController(Registry registry)
protected Dimension computeLengths(String annoText)
annoText
- the annotation text.protected Dimension computePanelSize(String annoText)
annoText
- the annotation text.protected AnnotationAttributes getAnnotationPanelAttributes(String annoText)
protected void hideAnnotationPanel()
public void initialize(Controller controller)
initialize
in interface Initializable
initialize
in class AbstractFeature
public void selected(SelectEvent event)
selected
in interface SelectListener
protected void showAnnotationPanel(String annoText)
protected String splitLine(String origLine)
origLine
- the original line