|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.unidata.collab.SharableImpl
ucar.unidata.idv.control.DisplayControlBase
ucar.unidata.idv.control.DisplayControlImpl
ucar.unidata.idv.control.DrawingControl
public class DrawingControl
A MetApps Display Control for drawing lines on a navigated display.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class ucar.unidata.idv.control.DisplayControlImpl |
|---|
DisplayControlImpl.SideLegendLabel |
| Field Summary | |
|---|---|
static String |
ATTR_EDITABLE
Xml attribute for the editable property |
static String |
ATTR_TITLE
Xml attribute for the title property |
static String |
ATTR_USETIMESINANIMATION
xgrf xml attribute |
static DrawingCommand |
CMD_MOVE
command |
static DrawingCommand |
CMD_SELECT
Select command |
static DrawingCommand |
CMD_STRETCH
command |
protected DrawingCommand |
currentCmd
Current command |
protected JCheckBox |
enabledCbx
Controls the disabled state |
static PatternFileFilter |
FILTER_XGRF
File filter used for the xgrf files |
static int |
FLAG_FILLED
Filled capable flag for the command object |
static int |
FLAG_FULLLATLON
Full lat/lon capable flag for the command object |
protected List |
glyphs
List of all glyphs |
protected List |
selectedGlyphs
List of selected glyphs |
static String |
SHARE_LINES
property for sharing lines |
static String |
SUFFIX_XGRF
File suffix used for the xgrfg files |
static String |
TAG_EDITOR
Xml tag for the editor settings in the import/export format |
| Fields inherited from class ucar.unidata.idv.control.DisplayControlImpl |
|---|
categories, colorScaleInfo, colorScales, contourInfo, contourInfoParams, controlContext, ctw, cw, dataSelection, defaultView, defaultViewManager, DISPLAY_LIST_NAME, displayListTable, displayMasters, displayUnit, helpUrl, initNoteText, instantiatedWithNoData, noteTextArea, noteWrapper, paramName, requestProperties, settingVisibility, sharables, showNoteText, skipSlider, srw, version, viewManagers |
| Fields inherited from interface ucar.unidata.idv.DisplayControl |
|---|
BOTTOM_LEGEND, DEFAULT_PROBEFORMAT, PREF_PREFIX, PREF_PROBEFORMAT, PREF_REMOVEONWINDOWCLOSE, PREF_SAMPLING_MODE, PREF_STANDALONE_REMOVEONCLOSE, PREF_STANDALONE_REMOVEONCLOSE_ASK, PROP_LEGENDICON, SIDE_LEGEND |
| Constructor Summary | |
|---|---|
DrawingControl()
Create a new Drawing Control; set attributes. |
|
| Method Summary | |
|---|---|
protected void |
addControlWidgets(List widgets)
Add the widgets into the controls panel |
protected void |
addFileMenuItems(List items,
boolean forMenuBar)
Add to the file menu |
protected boolean |
addGlyph(DrawingGlyph glyph)
Add the glyph into the list of glyphs |
void |
applyColorToAll()
Apply the current color to all glyphs |
void |
applyZPosition(List glyphs)
Apply the current z position to all glyphs |
protected boolean |
canHandleEvents()
Should we handle display events |
protected void |
checkZSliderEnabled()
Enable/disable the z slider |
void |
close()
Clear the selection when we minisze the window |
DrawingGlyph |
closestGlyph(DisplayEvent event)
Find the glyph that is closest to the x/y point of the given event |
DrawingGlyph |
closestGlyph(DisplayEvent event,
boolean forMove)
Find the glyph that is closest to the x/y point of the given event |
protected DrawingGlyph |
createGlyph(DisplayEvent event,
boolean mousePress)
Create a glyph |
protected void |
doCut()
Remove the glyphs in the selection set |
protected Container |
doMakeContents()
Make the gui |
protected JComponent |
doMakeControlsPanel()
Make the main tabbed pane |
static JComboBox |
doMakeLineWidthBox(int lineWidth)
Make a component to change the width of the lines. |
protected JComponent |
doMakeStylePanel()
Make the style panel |
protected JComponent |
doMakeTablePanel()
Make the jtable panel |
protected void |
doneMovingGlyph(DrawingGlyph glyph)
Done moving glyph |
void |
doProperties(List glyphs)
Show the properties dialog for the glyphs in the list |
void |
doRemove()
Remove this DisplayControl from the system. |
void |
evaluateGlyphJython(DrawingGlyph glyph,
String jython)
Evalue the given jython for the glyph |
String |
formatDistance(Real distance)
Utility |
DateTime[] |
getAllTimes()
Get an array of all the current times in the display |
Set |
getAnimationSet()
Get the animation set |
protected long |
getControlChangeSleepTime()
How long do we sleep until we act on the control changed event |
int |
getCoordType()
Get the coord type (e.g., LATLON, XYZ) |
Real |
getCurrentTime()
Get the current time in the animation |
boolean |
getEditable()
Get the Editable property. |
protected void |
getEditMenuItems(List items,
boolean forMenuBar)
Add the relevant edit menu items into the list |
String |
getEditorTitle()
Get the Editor Title property. |
boolean |
getEnabled()
Get the Enabled property. |
protected void |
getFileMenuItems(List items,
boolean forMenuBar)
Add to the file menu. |
boolean |
getFilled()
Get the Filled property. |
Font |
getFont()
Get the font from the ui widget |
boolean |
getFullLatLon()
Get the FullLatLon property. |
String |
getGlyphJython()
Get the GlyphJython property. |
protected String |
getGlyphNameDefault(DrawingGlyph glyph)
Get the default name to use |
List |
getGlyphs()
Get the Glyphs property. |
boolean |
getIgnoreTime()
Get the IgnoreTime property. |
protected double |
getInitialZPosition()
Get default z position to use |
String |
getJustification()
Get the text justification value |
protected void |
getLegendLabels(List labels,
int legendType)
Overwrite the legend labels method to use the editor title if there is one. |
int |
getLineWidth()
Get the line width |
ColorTable |
getRGBColorTable()
Get the color table to use for the image glyphs |
protected List |
getShapeCommands()
Get the lsit of shape commands the user can draw with. |
boolean |
getShowFronts()
Get the ShowFronts property. |
Real |
getTimeForGlyph()
If we are not drawing in the current time then return null. |
boolean |
getUseTime()
Get the UseTime property. |
String |
getVerticalJustification()
Get the vert text justification value |
void |
glyphChanged(DrawingGlyph glyph)
The given glyph has changed somehow. |
void |
handleDisplayChanged(DisplayEvent event)
Listen for DisplayEvents |
protected void |
handleWindowClosing()
Handle the window closing. |
boolean |
init(DataChoice dataChoice)
Call to help make this kind of Display Control; also calls code to made the Displayable (empty of data thus far). |
boolean |
isSelected(DrawingGlyph glyph)
Is the given glyph selected |
protected JPanel |
makeButtonPanel(List commands,
ButtonGroup bg)
Utility to make a panel holding the icon buttons. |
protected void |
makeModePanel(List widgets)
Makes the model panel. |
void |
projectionChanged()
Respond to the projection changing event |
void |
receiveShareData(Sharable from,
Object dataId,
Object[] data)
Method called by other classes that share the the state. |
void |
removeAllGlyphs()
Remove em all. |
void |
removeGlyph(DrawingGlyph glyph)
Remove the glyph from the drawing |
protected void |
selectionChanged()
The selection set changed. |
void |
setActive(boolean b)
Deprecated. |
protected void |
setCoordType(int c)
Get the coord type (e.g., LATLON, XYZ) |
protected void |
setCurrentCommand(DrawingCommand command)
Set the current active command |
void |
setDisplayVisibility(boolean on)
TUrn on the visibility of this display |
void |
setEditable(boolean value)
Set the Editable property. |
void |
setEditorTitle(String value)
Set the editorTitle property. |
void |
setEnabled(boolean value)
Set the Enabled property. |
void |
setFilled(boolean value)
Set the Filled property. |
void |
setFullLatLon(boolean value)
Set the FullLatLon property. |
void |
setGlyphJython(String value)
Set the GlyphJython property. |
void |
setGlyphs(List value)
Set the DrawingGlyphs property. |
void |
setIgnoreTime(boolean value)
Set the IgnoreTime property. |
void |
setLines(UnionSet lines)
Deprecated. |
void |
setLineWidth(int width)
Set the width of the lines. |
void |
setSelection(DrawingGlyph glyph)
Clear the selection and add the given glyph to the selection |
void |
setSelection(List newSelection,
boolean addTo)
Set the selection. |
void |
setShowFronts(boolean value)
Set the ShowFronts property. |
void |
setUseTime(boolean value)
Set the UseTime property. |
protected boolean |
shouldAddControlListener()
Signal base class to add this as a control listener |
protected boolean |
shouldAddDisplayListener()
Signal base class to add this as a display listener |
boolean |
shouldBeVisible(DrawingGlyph tg)
Should this glyph be visible |
protected boolean |
showFilledCbx()
Should we show the filled cbx |
protected boolean |
showLocationWidgets()
Should we show the locatio widgets |
protected boolean |
showTimeWidgets()
Should we show the time widgets |
protected void |
timeChanged(Real time)
Respond to a timeChange event |
void |
viewpointChanged()
Respond to control changed events from the view manager |
void |
zSliderChanged(int value)
Handle the z position slider changed |
| Methods inherited from class ucar.unidata.idv.control.DisplayControlBase |
|---|
boxToEarth, boxToEarth, boxToEarth, boxToEarth, boxToEarth, boxToScreen, calculateRectangle, createStationTfo, earthToBox, earthToBox, earthToBoxTuple, earthToScreen, formatLevels, getScreenCenter, < |