gov.nasa.worldwindx.applications.worldwindow.core
Class InfoPanelController
java.lang.Object
javax.swing.AbstractAction
gov.nasa.worldwindx.applications.worldwindow.features.AbstractFeature
gov.nasa.worldwindx.applications.worldwindow.core.InfoPanelController
- All Implemented Interfaces:
- SelectListener, Initializable, Feature, ActionListener, PropertyChangeListener, Serializable, Cloneable, EventListener, Action
public class InfoPanelController
- extends AbstractFeature
- implements SelectListener
- See Also:
- Serialized Form
| Fields inherited from interface javax.swing.Action |
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON |
| Methods inherited from class gov.nasa.worldwindx.applications.worldwindow.features.AbstractFeature |
actionPerformed, addToToolBar, doActionPerformed, doPropertyChange, getController, getFeatureID, getName, getStringValue, isInitialized, isOn, isTwoState, propertyChange, register, setMenuAccellerator, turnOn |
annotationLayer
protected AnnotationLayer annotationLayer
annotationPanel
protected ScreenAnnotation annotationPanel
HARD_SPACE
protected static final String HARD_SPACE
- See Also:
- Constant Field Values
INDENT
protected static final String INDENT
- See Also:
- Constant Field Values
lastSelectedObject
protected AVList lastSelectedObject
maxLineLength
protected int maxLineLength
InfoPanelController
public InfoPanelController(Registry registry)
computeLengths
protected Dimension computeLengths(String annoText)
- Determine the number of lines in the annotation text and the length of the longest line.
- Parameters:
annoText - the annotation text.
- Returns:
- the length of the longest line (width) and number of lines (height).
computePanelSize
protected Dimension computePanelSize(String annoText)
- Determine the panel size needed to display the full annotation.
- Parameters:
annoText - the annotation text.
- Returns:
- the required panel size.
getAnnotationPanelAttributes
protected AnnotationAttributes getAnnotationPanelAttributes(String annoText)
hideAnnotationPanel
protected void hideAnnotationPanel()
initialize
public void initialize(Controller controller)
- Specified by:
initialize in interface Initializable- Overrides:
initialize in class AbstractFeature
selected
public void selected(SelectEvent event)
- Specified by:
selected in interface SelectListener
showAnnotationPanel
protected void showAnnotationPanel(String annoText)
splitLine
protected String splitLine(String origLine)
- Split a long line into several lines.
- Parameters:
origLine - the original line
- Returns:
- a string with new-line characters at the line-split locations.
splitLines
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.
- Parameters:
origText - the original lines.
- Returns:
- the new lines.