org.biomoby.service.dashboard
Class Dashboard
java.lang.Object
org.biomoby.service.dashboard.Dashboard
- All Implemented Interfaces:
- EventListener, ChangeListener, DashboardPanel, DashboardProperties
public class Dashboard
- extends Object
- implements DashboardPanel, DashboardProperties, ChangeListener
Dasboard is a graphical user interface for Biomoby service
providers. It consists of several panels, and new panels can be
added by an extension mechanism, using Java SPI.
- Version:
- $Id: Dashboard.java,v 1.31 2008/03/02 12:45:26 senger Exp $
- Author:
- Martin Senger
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 |
Constructor Summary |
Dashboard()
Default constructor. |
Method Summary |
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. |
String |
getName()
A name identifies a panel in the dashboard's tabs. |
Dimension |
getPreferredSize()
|
static String |
getProperty(String propertyName)
Allow access to individual Dashboard properties that had been
loaded when Dashboard started, and that may contain properties
used also by individual panels. |
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. |
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. |
void |
loadPanels()
Load all available Dashboard panels... |
static void |
main(String[] args)
An entry point... |
void |
show()
Show the main frame. |
void |
stateChanged(ChangeEvent e)
Dashboard is listening to the changes of panels in order to
repaint the header with a label of a currently selected panel. |
String |
toString()
|
useLoadMonitor
public static boolean useLoadMonitor
Dashboard
public Dashboard()
- Default constructor. It loads all panels, connect them and
creates the GUI - but does not show it yet.
getProperty
public static String getProperty(String propertyName)
- Allow access to individual Dashboard properties that had been
loaded when Dashboard started, and that may contain properties
used also by individual panels.
- Parameters:
propertyName
- name of the property that is wanted
- Returns:
- wanted property value, or null if the property was not
found; if you want to get back a default value, use rather
DashboardConfig.getString
loadPanels
public void loadPanels()
- Load all available Dashboard panels...
show
public void show()
- Show the main frame.
getPreferredSize
public Dimension getPreferredSize()
toString
public String toString()
- Overrides:
toString
in class Object
getName
public 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
- See Also:
DashboardPanel.getTitle()
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()
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
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 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
stateChanged
public void stateChanged(ChangeEvent e)
- Dashboard is listening to the changes of panels in order to
repaint the header with a label of a currently selected panel.
- Specified by:
stateChanged
in interface ChangeListener
main
public static void main(String[] args)
- An entry point...
Submit a bug or feature
Generated: Sat May 29 04:26:35 EDT 2010