org.freehep.application.studio
Class Studio
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.freehep.application.Application
org.freehep.application.mdi.MDIApplication
org.freehep.application.studio.Studio
- All Implemented Interfaces:
- ImageObserver, MenuContainer, Serializable, Accessible
public class Studio
- extends MDIApplication
Swing application that supports plugins.
- Version:
- $Id: Studio.java 15975 2014-05-08 21:08:33Z onoprien $
- Author:
- tonyj
- See Also:
- Serialized Form
Methods inherited from class org.freehep.application.mdi.MDIApplication |
addToolBar, addToolBar, getConsoleManager, getControlManager, getPageManager, removeToolBar, selectedPageManager, setConsoleManager, setControlManager, setPageManager, setSelectedPageManager |
Methods inherited from class org.freehep.application.Application |
about, addApplicationListener, createFrame, createPrintPreview, error, error, error, error, error, error, exit, getApplication, getAppName, getAppProperties, getCommandLine, getCommandProcessor, getCommandTargetManager, getFullVersion, getMenuBar, getRecentFileList, getServiceManager, getShowStatusBar, getShowToolBar, getStatusBar, getToolBarHolder, getUserProperties, getVersion, getXMLMenuBuilder, removeApplicationListener, restart, setLookAndFeel, setShowStatusBar, setShowToolBar, setStatusMessage, showDialog, showHelpContents, showHelpIndex, showHelpSearch, showHelpTopic, showHelpTopic, updateComponentTreeUI, updateUI, versionNumberCompare, whenAvailable |
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, getName, 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 |
LOADDIR
public static final String LOADDIR
- See Also:
- Constant Field Values
main
public static void main(String[] args)
isBlacklisted
public boolean isBlacklisted(PluginInfo plugin)
- Returns true if the specified plugin is blacklisted and should be ignored by this application.
isLoaded
public boolean isLoaded(File file)
- Returns true if the specified file is on the extension loader classpath.
getEventSender
public EventSender getEventSender()
getLookup
public final org.freehep.util.FreeHEPLookup getLookup()
getUserExtensionsDir
@Deprecated
public String getUserExtensionsDir()
- Deprecated.
getGroupExtensionsDir
@Deprecated
public String getGroupExtensionsDir()
- Deprecated.
getSystemExtensionsDir
@Deprecated
public String getSystemExtensionsDir()
- Deprecated.
getExtensionsDir
public String getExtensionsDir(PluginDir dir)
- Returns a path to the specified extension directory.
We look for extensions:
- USER: In the directory specified by the org.freehep.application.studio.user.extensions property
- GROUP: In the directory specified by the org.freehep.application.studio.group.extensions property
- SYSTEM: In the directory specified by the org.freehep.application.studio.system.extensions property
The following defaults apply if the property is not specified
- USER: {user.home}/.FreeHEPPlugins
- GROUP: none
- SYSTEM: {java.home}/.FreeHEPPlugins
getExtensionLoader
public ExtensionClassLoader getExtensionLoader()
getPlugins
public List<PluginInfo> getPlugins()
- Return a list of loaded plugins.
getPlugin
public PluginInfo getPlugin(String name)
- Returns plugin descriptor from the list of loaded plugins with the specified name.
Returns null if there is no loaded plugin with matching name.
getPluginMap
public PluginMap getPluginMap()
- Returns a map of installed plugins.
reportPluginException
public void reportPluginException()
- Reports the latest exception thrown while loading plugins, if any.
Clears stored exception so subsequent calls to this method will do nothing unless
new plugin loading failures happen.
stopPlugin
public void stopPlugin(PluginInfo plugin)
- Stops a plugin.
Calls stop() method on the specified plugin and removes a reference
to a
Plugin
object from the PluginInfo.
The PluginInfo object supplied as an argument is used to identify a loaded
plugin with the same name. If no matching loaded plugin is found, this method returns
immediately without doing anything.
- Throws:
IllegalArgumentException
- if the plugin cannot be shut down.
startPlugin
public void startPlugin(PluginInfo plugin)
throws Throwable
- Starts and initializes a plugin.
Loads the plugin class with the extension class loader, creates an instance,
and calls its initialization methods
The PluginInfo object supplied as an argument is used to identify a loaded
plugin with the same name. If no matching loaded plugin is found, this method returns
immediately without doing anything.
- Throws:
Throwable
- Re-throws any exceptions thrown by the plugin class code.
loadPlugins
public boolean loadPlugins(Collection<PluginInfo> plugins)
- Loads and initializes the specified plugins using the default extensions class loader.
- Returns:
- True if at least one plugin was not loaded due to presence of an identically named loaded plugin.
loadPlugins
public boolean loadPlugins(Collection<PluginInfo> plugins,
ExtensionClassLoader loader)
- Loads and initializes the specified plugins.
- Returns:
- True if at least one plugin was not loaded due to presence of an identically named loaded plugin.
Copyright © 2000-2014 FreeHEP. All Rights Reserved.