public class Jas3Console extends Console
Console.PropertyListener| Constructor and Description |
|---|
Jas3Console() |
| Modifier and Type | Method and Description |
|---|---|
void |
addMenu(Action action,
String owner,
String... locations)
Adds an item to the graphical console menu bar.
|
void |
addPreference(String[] path,
String group,
String format)
Adds a setter for one or more previously defined properties to the preferences menu.
|
Object |
addProperty(String key,
Object defaultValue)
Defines a console property with the specified default value.
|
void |
addPropertyListener(Console.PropertyListener listener,
String filter)
Registers a listener that will be notified of property changes.
|
void |
error(String message)
Notifies the user of an application error.
|
void |
error(String message,
Exception x)
Notifies the user of an application error.
|
ConsoleApplication |
getApplication() |
org.freehep.util.FreeHEPLookup |
getConsoleLookup()
Returns a lookup instance that can be used objects registered by various
components of the graphical console.
|
Path |
getHomeDirectory()
Returns the path to the graphical console home directory.
|
PanelManager |
getPanelManager()
Returns the instance of
PanelManager that can be used to create and manage GUI panels. |
Object |
getProperty(String key)
Returns the value of the property with the specified key.
|
Window |
getWindow()
Returns the root component for the main Graphical Console window.
|
void |
insertStatusBarComponent(JComponent component,
int position) |
void |
insertToolbarAction(Action action,
int position)
Inserts an action to the LSST CCS tool bar.
|
Map<String,ComponentDescriptor> |
readDescriptors(Path path)
Reads component descriptors from the specified XML file.
|
boolean |
removeMenu(String... locations)
Removes the specified menu item and its descendents.
|
Object |
removeProperty(String key)
Removes a console property.
|
boolean |
removePropertyListener(Console.PropertyListener listener)
Removes the specified property listener.
|
void |
removeStatusBarComponent(JComponent component) |
void |
restore()
Restores console session from the default location.
|
void |
restoreFrom()
Restores console session, prompting the user to specify location.
|
void |
save()
Saves current session to the default location.
|
void |
saveAs()
Saves current session, prompting the user to specify location.
|
void |
setBlockInput(boolean blocked)
Blocks and unblocks mouse and key input to the console.
|
void |
setProperties(Map<String,Object> properties)
Sets values of a set of properties.
|
Object |
setProperty(String key,
Object value)
Sets the value of the specified property.
|
void |
setStatusMessage(String message)
Sets the message in the graphical console status bar.
|
void |
showInBrowser(String url)
Display the specified web site in a browser.
|
Object |
shutdownAgent() |
void |
superShutdownAgent() |
afterStart, getConsole, getLoggerUI, getOptionalPageService, getSingleton, getStatusAggregator, preShutdown, preStart, setStatusMessagegetLogHandler, getNumberCommandThreads, ping, printRunningCommands, setLogFormat, setLogHandlerLevel, setLogLevel, setStackTraceDepthcreateHelper, executeCommandRequest, getAgentInfo, getAgentPersistenceService, getAgentService, getAgentServices, getCommandCount, getComponentConfigurationEnvironment, getComponentConfigurationEnvironmentByName, getComponentLookup, getCurrentAction, getDescription, getEnvironmentLockService, getEnvironmentMessagingAccess, getLogger, getMessagingAccess, getName, getScheduler, helper, initAgent, initLogBusHandler, isInEngineeringMode, populateComponentLookup, preInit, printComponentNodeTree, publishSubsystemDataOnStatusBus, sendAck, sendNack, sendStatusMessage, setAgentName, shutdownAgent, startAgent, vetoTransitionToNormalModepublic Object shutdownAgent() throws Exception
shutdownAgent in class org.lsst.ccs.AgentExceptionpublic void superShutdownAgent()
public org.freehep.util.FreeHEPLookup getConsoleLookup()
ConsolegetConsoleLookup in class Consolepublic Window getWindow()
Consolepublic final ConsoleApplication getApplication()
public Path getHomeDirectory()
ConsolegetHomeDirectory in class Consolepublic PanelManager getPanelManager()
ConsolePanelManager that can be used to create and manage GUI panels.getPanelManager in class Consolepublic void error(String message)
Consolepublic void error(String message, Exception x)
Consolepublic void showInBrowser(String url)
ConsoleshowInBrowser in class Consoleurl - URL of the site to be displayed.public void setStatusMessage(String message)
ConsoleConsole.setStatusMessage(String, int) method.setStatusMessage in class Consolemessage - The message to display; if null, the current message is cleared.public void setBlockInput(boolean blocked)
ConsolesetBlockInput in class Consoleblocked - true if input should be blocked.public Object addProperty(String key, Object defaultValue)
ConsoleConsole.setProperty(String, Object) method.
Properties that have been modified from their default values are saved between the graphical console sessions.
If a property with the specified key already exists:
String but can be converted to the type of the newly specified
default value, the existing default value is retained but the type of object returned by subsequent calls to
Console.getProperty(String) method is modified;
IllegalArgumentException is thrown;
Console.getProperty(String) method, the type of the
returned object is determined by the type of the default value supplied when the property was defined.addProperty in class Consolekey - Property key. Can be used to retrieve the property value.defaultValue - Default value for the property.
Must be of type Boolean, Enum, Integer, Long, Double, String,
or an array containing objects of these types.public Object removeProperty(String key)
ConsoleremoveProperty in class Consolekey - Property key.null if there was no such property.public void addPreference(String[] path, String group, String format)
Consoleformat string contains one or more property references in the ${key#qualifiers} form.
Qualifiers are separated by "#". At the moment, the only supported qualifier is "history=N".addPreference in class Consolepath - Path in the preferences tree to the page where the property setter should be displayed.group - Group inside the preferences page. If null, the property setter is displayed in the default group.format - Specifies the format of the property setter.public Object getProperty(String key)
ConsoleConsole.addProperty(String, Object)
but exists in the console storage, it will be returned as a String.getProperty in class Consolekey - Property key.null if the property does not exist.public Object setProperty(String key, Object value)
ConsoleConsole.addProperty(String, Object) method, the value will be converted
to a String and stored. Such keys cannot be used in setter format
strings passed to Console.addPreference(String[], String, String) method.
If the property value is set to null, it is removed from storage, so
subsequent calls to Console.getProperty(String) will return the default
value, if it has been set.
setProperty in class Consolekey - Property key.value - Property value, or null if the property is being reset to its default value.null if the property did not exist.public void setProperties(Map<String,Object> properties)
ConsoleConsole.setProperty(String, Object) for details on setting properties.setProperties in class Consolepublic void addPropertyListener(Console.PropertyListener listener, String filter)
ConsoleaddPropertyListener in class Consolelistener - The listener to be notified.filter - Regular expression the property key has to match to trigger notification.public boolean removePropertyListener(Console.PropertyListener listener)
ConsoleremovePropertyListener in class Consolelistener - Listener to be removed.True if the specified listener was registered with this console.public void addMenu(Action action, String owner, String... locations)
Console
The location strings specify a hierarchy of menus above the added item. Each
string should be in the name[[:group]:position] format, where
name is the text label of the menu the item should be added to,
group is the ordinal number of the item group inside the menu, and
position is the position inside the group.
The first location string can also be prefixed with the desired location
on the menu bar: [barPosition:]name[[:group]:position].
The menu is divided into groups by separators.
If the group number is negative, items added with the same group number but
different owners are put into the same group. If the group is not specified
or is equal to 0, the item is added to the default group. The default group
is shared by all owners. Items added with the same non-zero position to the
same group are sorted alphabetically.
public boolean removeMenu(String... locations)
ConsoleremoveMenu in class Consolelocations - Hierarchy of menu item names, starting from the top level menu.true is some items have been removed.public void insertToolbarAction(Action action, int position)
ConsoleinsertToolbarAction in class Consoleaction - Action to insert.position - Buttons are inserted in the increasing position order.public void insertStatusBarComponent(JComponent component, int position)
insertStatusBarComponent in class Consolepublic void removeStatusBarComponent(JComponent component)
removeStatusBarComponent in class Consolepublic void restore()
Consolepublic void restoreFrom()
ConsolerestoreFrom in class Consolepublic void save()
Consolepublic void saveAs()
Consolepublic Map<String,ComponentDescriptor> readDescriptors(Path path)
path - Path to the file that contains descriptors; if null, getDefaultPath() is called to obtain the path.Copyright © 2023 LSST. All rights reserved.