org.biomoby.service.dashboard
Class AbstractPanel
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.biomoby.service.dashboard.AbstractPanel
- All Implemented Interfaces:
- ImageObserver, MenuContainer, Serializable, Accessible, DashboardPanel, DashboardProperties
- Direct Known Subclasses:
- DebuggingPanel, ExamplePanel, GeneratorPanel, MobyUnitTestingPanel, PerlMoSeSPanel, RegistrationPanel, RegistryPanel, ResultsPanel, SimpleClientPanel, StatisticsPanel, UnitTestingResultPanel
public abstract class AbstractPanel
- extends JPanel
- implements DashboardPanel, DashboardProperties
Parent of all panels of a Dashboard. For Dashboard panels, it is
not mandatory to extends this class, it is just often convenient,
- Version:
- $Id: AbstractPanel.java,v 1.27 2008/03/02 12:45:26 senger Exp $
- Author:
- Martin Senger
- See Also:
- Serialized Form
Fields inherited from interface org.biomoby.service.dashboard.DashboardProperties |
DP_ANT_MODEL, DP_AUTHENTICATION, DP_AXIS_ADMIN, DP_AXIS_IN_TOMCAT, DP_BGCOLOR, DP_CACHE_DIR, DP_CALL_SERVICE, DP_CBS_DEPLOY, DP_CONSOLE_FILE, DP_CONTACT, DP_CS_CLASS, DP_CS_NEWURL, DP_CS_NONE, DP_CS_REGISTRY, DP_CS_URL, DP_DATATYPE_NAME, DP_DEFAULT_REGISTRY, DP_DEPL_SERVICES, DP_DEPLOY_IN_TOMCAT, DP_DESCRIPTION, DP_DESCRIPTION_FILE, DP_DETACH_VIEW, DP_DOT_LOC, DP_ENDPOINT, DP_FL_BIOCASE, DP_FL_HIBERNATE, DP_FL_NONE, DP_FL_SOAPLAB, DP_HOSTNAME, DP_ICON, DP_IMPL_CLASS, DP_INP_ASBYTES, DP_INP_PING, DP_INP_SHOW, DP_INP_SHOWXML, DP_LOCAL_DEPLOY, DP_MOSES_FLAVOUR, DP_OUT_FILE, DP_OUT_SHOW, DP_OUT_SHOWXML, DP_OUT_VIEWER, DP_P_DESCRIPTION, DP_P_DESCRIPTION_FILE, DP_PASSWORD_AUTHENTICATION, DP_PATTERN, DP_PORT, DP_REG_DT_AUTH, DP_REG_DT_DESC, DP_REG_DT_EMAIL, DP_REG_DT_NAME, DP_REG_DT_TREE, DP_REG_INFO, DP_REG_NS_AUTH, DP_REG_NS_DESC, DP_REG_NS_EMAIL, DP_REG_NS_NAME, DP_REG_S_AUTH, DP_REG_S_CATEGORY, DP_REG_S_EMAIL, DP_REG_S_NAME, DP_REG_S_RDF_PATH, DP_REG_S_RDF_URL, DP_REG_S_TYPE, DP_REG_S_URL, DP_REG_S_XML_PATH, DP_REG_ST_AUTH, DP_REG_ST_DESC, DP_REG_ST_EMAIL, DP_REG_ST_ISA, DP_REG_ST_NAME, DP_REG_VERBOSE, DP_REGISTRY_CACHE_DIR, DP_REGISTRY_ENDPOINT, DP_REGISTRY_MODEL, DP_REGISTRY_NAMESPACE, DP_REGISTRY_SYNONYM, DP_RESULT_FILE, DP_S_SELECTED, DP_SC_IN_FILE, DP_SC_INPUT_FILE, DP_SC_SERVICE, DP_SC_SERVICE_NAME, DP_SC_SERVICES, DP_SEL_AUTHORITIES, DP_SEL_SERVICES, DP_SERVICE_NAME, DP_STATUS_MSG, DP_TITLE, DP_TITLE_ICON, DP_TOMCAT_HOME, DP_USE_AUTHORITATIVE, DP_USE_CACHE, DP_USE_DOT, DP_USE_DT_COMP, DP_USE_DT_DOC, DP_USE_DT_GEN, DP_USE_DT_JAR, DP_USE_S_COMP, DP_USE_S_DOC, DP_USE_S_GEN, DP_USE_S_JAR, DP_USE_SIGNATURE, DP_USE_SIMULATE, DP_USER_AUTHENTICATION, DP_USER_JARS, DP_WANTED_REGISTRIES, DP_WSDD_TEMPL |
Method Summary |
static boolean |
confirm(Component parent,
Object msg)
Return true if confirmation dialog passed. |
static boolean |
confirm(Object msg)
Return true if confirmation dialog passed. |
static JMenu |
createMenu(String name,
int mnemonic,
Icon icon,
Icon disabledIcon)
Create a submenu. |
static JMenuItem |
createMenuItem(AbstractAction action,
String actionCommand)
Create a menu item. |
static JMenuItem |
createMenuItem(AbstractAction action,
String actionCommand,
int mnemonic,
Icon icon,
Icon disabledIcon)
Create a menu item. |
static void |
error(Object msg)
Display an error message. |
static void |
error(String prologue,
Exception e)
Display an error message. |
abstract JComponent |
getComponent(PropertyChannel propertyChannel)
Return a graphical representation of this panel. |
String |
getDescription()
Return a short description (few lines only) of this panel. |
String |
getHelp()
The help system is centralized in Dashboard itself. |
URL |
getHelpURL()
Return a URL of this panel's help page. |
Icon |
getIcon()
Return an icon decorating this panel. |
URL |
getIconURL()
Return a URL of this panel's icon. |
abstract String |
getName()
A name identifies a panel in the dashboard's tabs. |
JLabel |
getTitle()
A title is a more-detailed description of a panel, possibly
including an image. |
boolean |
isMandatory()
Some panels can be selected by users as not-needed - so they do
not show at the start-up. |
static Icon |
loadIcon(String path)
Load shared icon. |
boolean |
loadOnlyOnDemand()
Some panels are less important for most users (e.g. debugging
panels) so they are shown only when a user specifically selects
them. |
static void |
setEnabledMenuItem(Container container,
String actionCommand,
boolean enabled)
Enable/disable a menu item (indicated by an 'actionCommand') in
the given container. |
Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
confirmIcon
public static Icon confirmIcon
warningIcon
public static Icon warningIcon
clearIcon
public static Icon clearIcon
getHelp
public String getHelp()
- Description copied from interface:
DashboardPanel
- The help system is centralized in Dashboard itself. The panels
are not supposed to have a Help button. The main panel help is
provided by this method. Which, however, does not preclude to
use help tool-tips, or some ways of context-sensitive help,
directly in panels.
The returned string will be treated as an HTML document (will
be displayed with "text/html" mime type).
TBD: we may change this later and use JavaHelp mechanism.
- Specified by:
getHelp
in interface DashboardPanel
- Returns:
- the main help document describing features provided by
a panel
getHelpURL
public URL getHelpURL()
- Description copied from interface:
DashboardPanel
- Return a URL of this panel's help page. Usually it is a link to
a local file, the same one that is often used by the
DashboardPanel.getHelp()
method. This URL (instead of direct help text) is
used in the dashboard summary page.
- Specified by:
getHelpURL
in interface DashboardPanel
- Returns:
- a URL of the panel help page, or null
getDescription
public String getDescription()
- Description copied from interface:
DashboardPanel
- Return a short description (few lines only) of this panel. It
may be used in some Dashboard summary, or in panel selection
settings.
- Specified by:
getDescription
in interface DashboardPanel
- Returns:
- a panel short description
getIcon
public Icon getIcon()
- Description copied from interface:
DashboardPanel
- Return an icon decorating this panel. The icon should be small
- it will be used in the panel tab (together with the name
returned by
DashboardPanel.getName()
). A dashboard may ignore too large
icons.
- Specified by:
getIcon
in interface DashboardPanel
- Returns:
- a panel icon, or null
getIconURL
public URL getIconURL()
- Description copied from interface:
DashboardPanel
- Return a URL of this panel's icon. Usually it is the same icon
as returned by the
DashboardPanel.getIcon()
. This URL (instead of
directly the icon) is used in the dashboard summary page.
- Specified by:
getIconURL
in interface DashboardPanel
- Returns:
- a URL (usualy pointing to a local file) of the panel
icon, or null
getTitle
public JLabel getTitle()
- Description copied from interface:
DashboardPanel
- A title is a more-detailed description of a panel, possibly
including an image. The dashboard will display it above this
panel.
- Specified by:
getTitle
in interface DashboardPanel
- Returns:
- a panel (possibly rich) title, or an empty label (but not null)
- See Also:
DashboardPanel.getName()
isMandatory
public boolean isMandatory()
- Description copied from interface:
DashboardPanel
- Some panels can be selected by users as not-needed - so they do
not show at the start-up. But some panels cannot be removed
because their functionality is crucial also for other
panels.
- Specified by:
isMandatory
in interface DashboardPanel
- Returns:
- true if this panel should be always shown in the dashboard
loadOnlyOnDemand
public boolean loadOnlyOnDemand()
- Description copied from interface:
DashboardPanel
- Some panels are less important for most users (e.g. debugging
panels) so they are shown only when a user specifically selects
them.
- Specified by:
loadOnlyOnDemand
in interface DashboardPanel
- Returns:
- true if this panel should not be loaded by deafult
getComponent
public abstract JComponent getComponent(PropertyChannel propertyChannel)
- Description copied from interface:
DashboardPanel
- Return a graphical representation of this panel.
- Specified by:
getComponent
in interface DashboardPanel
- Parameters:
propertyChannel
- is a shared storage for properties
- Returns:
- a GUI representing this panel
getName
public abstract String getName()
- Description copied from interface:
DashboardPanel
- A name identifies a panel in the dashboard's tabs. It should be
relatively short, without newlines, or any other special
characters.
- Specified by:
getName
in interface DashboardPanel
- Overrides:
getName
in class Component
- See Also:
DashboardPanel.getTitle()
loadIcon
public static Icon loadIcon(String path)
- Load shared icon.
createMenuItem
public static JMenuItem createMenuItem(AbstractAction action,
String actionCommand)
- Create a menu item.
createMenuItem
public static JMenuItem createMenuItem(AbstractAction action,
String actionCommand,
int mnemonic,
Icon icon,
Icon disabledIcon)
- Create a menu item.
createMenu
public static JMenu createMenu(String name,
int mnemonic,
Icon icon,
Icon disabledIcon)
- Create a submenu.
setEnabledMenuItem
public static void setEnabledMenuItem(Container container,
String actionCommand,
boolean enabled)
- Enable/disable a menu item (indicated by an 'actionCommand') in
the given container.
confirm
public static boolean confirm(Object msg)
- Return true if confirmation dialog passed.
confirm
public static boolean confirm(Component parent,
Object msg)
- Return true if confirmation dialog passed.
error
public static void error(Object msg)
- Display an error message.
error
public static void error(String prologue,
Exception e)
- Display an error message. Construct the message from
'prologue', some intermediate title, and a text area filled
from the exception 'e'.
Submit a bug or feature
Generated: Sat May 29 04:26:35 EDT 2010