|
||||||||||
| PREV CLASS 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
javax.swing.JPanel
ucar.unidata.ui.ChooserPanel
public class ChooserPanel
Common class for the chooser panels
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JPanel |
|---|
JPanel.AccessibleJPanel |
| 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 | |
|---|---|
protected JButton |
cancelButton
Cancel button |
static String |
CMD_LOAD
Text for the load button |
protected JComponent |
contents
Panel holding the contents |
protected static Insets |
GRID_INSETS
Used by derived classes when they do a GuiUtils.doLayout |
protected static int |
GRID_SPACING
The spacing used in the grid layout |
protected boolean |
haveData
Flag for whether data has been chosen or not |
protected String |
helpPath
Where can we find help for this panel |
protected JButton |
loadButton
Load button |
static Color |
MAP_COLOR
The color for station maps |
protected boolean |
simpleMode
_more_ |
| 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 | |
|---|---|
ChooserPanel()
Construct an object for selecting a data source from the current directory and from a default ADDE server |
|
| Method Summary | |
|---|---|
void |
actionPerformed(ActionEvent ae)
Receive the update,cancel, load commands and call: doUpdate, doCancel or doLoad. |
void |
addPropertyChangeListener(PropertyChangeListener listener)
Adds a PropertyChangeListener. |
void |
clearWaitCursor()
Clear any outstanding cursor waits |
void |
doCancel()
Gets called when the user presses Cancel in multipleSelect mode This can get overwritten by a derived class to do something. |
protected void |
doClose()
Gets called to close the panel |
void |
doHelp()
Gets called when the user presses the Help button. |
void |
doLoad()
Gets called when the user presses CMD_LOAD button. |
void |
doLoadInThread()
Gets called by doLoad in a thread when the user presses the load button. |
protected JComponent |
doMakeContents()
_more_ |
void |
doUpdate()
Gets called when the user presses the Update button. |
protected void |
firePropertyChange(String propertyName,
Object oldValue,
Object newValue)
Fires a PropertyChangeEvent. |
protected String[] |
getButtonLabels()
Get the names for the buttons. |
JComponent |
getContents()
Hides the fact that this is really a JPanel |
JComponent |
getDefaultButtons()
Get the default buttons for this chooser panel. |
JComponent |
getDefaultButtons(ActionListener listener)
_more_ |
boolean |
getHaveData()
|
protected String |
getLoadCommandName()
This allows for derived classes to define their own name for the "Add source" button. |
protected String |
getLoadToolTip()
Get the tooltip for the load button |
boolean |
getSimpleMode()
_more_ |
protected JComponent |
getStatusComponent()
_more_ |
protected JLabel |
getStatusLabel()
Create (if needed) and return the JLabel that shows the status messages. |
protected String |
getUpdateToolTip()
Get the tooltip for the update button |
void |
logException(String msg,
Exception exc)
Convenience method to LogUtil.logException(String, Throwable). |
protected JComponent |
registerStatusComp(String name,
JComponent comp)
_more_ |
void |
revalidate()
_more_ |
void |
setHaveData(boolean have)
Set whether the user has made a selection that contains data. |
void |
setHelpPath(String path)
Set the help path used for this chooser. |
void |
setStatus(String msg)
Set the status message. |
void |
setStatus(String msg,
String compId)
_more_ |
void |
showNormalCursor()
Set the normal cursor over this panel |
void |
showWaitCursor()
Set the wait cursor over this panel |
protected void |
updateStatus()
_more_ |
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static final int GRID_SPACING
protected static final Insets GRID_INSETS
public static final Color MAP_COLOR
public static final String CMD_LOAD
protected String helpPath
protected JComponent contents
protected JButton loadButton
protected JButton cancelButton
protected boolean haveData
protected boolean simpleMode
| Constructor Detail |
|---|
public ChooserPanel()
| Method Detail |
|---|
public void addPropertyChangeListener(PropertyChangeListener listener)
addPropertyChangeListener in class Containerlistener - The PropertyChangeListener to add.
protected void firePropertyChange(String propertyName,
Object oldValue,
Object newValue)
firePropertyChange in class ComponentpropertyName - The name of the property.oldValue - The old value of the property.newValue - The new Value of the property.public void revalidate()
revalidate in class JComponent
protected JComponent registerStatusComp(String name,
JComponent comp)
name - _more_comp - _more_
public void setStatus(String msg)
msg - The status messagepublic boolean getSimpleMode()
public void setStatus(String msg,
String compId)
msg - _more_compId - _more_protected JLabel getStatusLabel()
protected JComponent getStatusComponent()
public void actionPerformed(ActionEvent ae)
actionPerformed in interface ActionListenerae - ActionEvent to processprotected String getLoadCommandName()
public JComponent getDefaultButtons()
public JComponent getDefaultButtons(ActionListener listener)
listener - _more_
protected String[] getButtonLabels()
protected String getLoadToolTip()
protected String getUpdateToolTip()
public void setHaveData(boolean have)
have - true to set the haveData property. Enables the
loading buttonpublic boolean getHaveData()
public void clearWaitCursor()
public void showWaitCursor()
public void showNormalCursor()
public JComponent getContents()
protected JComponent doMakeContents()
protected void updateStatus()
public void doLoad()
CMD_LOAD button.
This can get overwritten by a derived class to do something.
By default this calls doLoadDataInThread in a separate thread
public void doLoadInThread()
public void doUpdate()
public void doHelp()
public void doCancel()
protected void doClose()
public void logException(String msg,
Exception exc)
LogUtil.logException(String, Throwable).
msg - message to logexc - Exception to logpublic void setHelpPath(String path)
path -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||