
Static Public Member Functions | |
| static void | setFrameType (int frameType) |
| static Mode | openInMode (TopComponent component, String modeName) |
| static Mode | openInMode (Workspace workspace, TopComponent component, String modeName) |
| static Mode | openInMode (TopComponent component, String modeName, int frameType) |
| static Mode | openInMode (Workspace workspace, TopComponent component, String modeName, int frameType) |
| static void | setPersistMode (TopComponent comp, int option) |
| static int | getPersistMode (TopComponent comp) |
| static void | frameResidesInDesktop (Mode mode) |
| static void | frameResidesInDesktop (Mode mode, int frameType) |
| static TopComponent | findTopComponent (String componentName) |
| static TopComponent | findTopComponent (Workspace workspace, String componentName) |
| static Workspace | createWorkspace (String codeName, String displayName) |
Static Public Attributes | |
| static final int | INTERNAL_FRAME = 0 |
| static final int | TOP_FRAME = 1 |
| static final int | DESKTOP_FRAME = 2 |
| static final int | PERSIST_ONLY_OPENED = 1 |
| static final int | PERSIST_NEVER = 0 |
| static final int | PERSIST_ALWAYS = 2 |
| static final int | PERSIST_UNKNOWN = -1 |
Private Member Functions | |
| WindowUtils () | |
Static Private Member Functions | |
| static boolean | performDesktopFrameAction (Mode mode, TopComponent comp, ClassLoader classLoader, Class modeImplClass, Class windowUtilsClass) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, ClassNotFoundException |
Static Private Attributes | |
| static final String | INTERNAL_FRAME_STRING = "INTERNAL_FRAME" |
| static final String | TOP_FRAME_STRING = "TOP_FRAME" |
| static final String | DESKTOP_FRAME_STRING = "DESKTOP_FRAME" |
| static final String | CONSTRAINT_WEST = "WEST" |
| static final String | PERSISTENCE_TYPE = "PersistenceType" |
| static final String | PERSIST_NEVER_STR = "Never" |
| static final String | PERSIST_ONLY_OPENED_STR = "OnlyOpened" |
| static final String | PERSIST_ALWAYS_STR = null |
| static int | defaultFrameType = INTERNAL_FRAME |
| static String[] | possibleFrameTypes = { INTERNAL_FRAME_STRING, TOP_FRAME_STRING, DESKTOP_FRAME_STRING } |
| static Log | log = LogFactory.getLog(WindowUtils.class) |
Provides utility methods for windowing in NetBeans.
| cern::gp::windows::WindowUtils::WindowUtils | ( | ) | [inline, private] |
do not instantiate
| static Workspace cern::gp::windows::WindowUtils::createWorkspace | ( | String | codeName, | |
| String | displayName | |||
| ) | [inline, static] |
Utility method: creates a workspace and adds it to the WindowManager's list of workspaces. The new workspace will appear as the last one in the list.
| codeName | the code name of the new workspace | |
| displayName | the display name of the new workspace |
| static TopComponent cern::gp::windows::WindowUtils::findTopComponent | ( | Workspace | workspace, | |
| String | componentName | |||
| ) | [inline, static] |
Utility method: Returns the TopComponent with the given programmatic name in the given workspace, or null if there is no such TopComponent.
| workspace | the workspace in which to look for the TopComponent | |
| componentName | the programmatic name of the TopComponent |
null if there is no such TopComponent | static TopComponent cern::gp::windows::WindowUtils::findTopComponent | ( | String | componentName | ) | [inline, static] |
Utility method: Returns the TopComponent with the given programmatic name in the current workspace, or null if there is no such TopComponent.
| componentName | the programmatic name of the TopComponent |
null if there is no such TopComponent | static void cern::gp::windows::WindowUtils::frameResidesInDesktop | ( | Mode | mode, | |
| int | frameType | |||
| ) | [inline, static] |
Utility method: makes the given mode either reside in the desktop or display a separate window.
| mode | the mode to make reside in the desktop | |
| frameType | indicates the type of frame, MDI or SDI |
References CONSTRAINT_WEST, DESKTOP_FRAME, INTERNAL_FRAME, and possibleFrameTypes.
| static void cern::gp::windows::WindowUtils::frameResidesInDesktop | ( | Mode | mode | ) | [inline, static] |
Utility method: makes the given mode reside in the desktop instead of as a separate window.
| mode | the mode to make reside in the desktop |
References defaultFrameType.
Referenced by openInMode().
| static int cern::gp::windows::WindowUtils::getPersistMode | ( | TopComponent | comp | ) | [inline, static] |
Get the persistence mode of the given TopComponent
| comp | the component |
References PERSIST_ALWAYS, PERSIST_ALWAYS_STR, PERSIST_NEVER, PERSIST_NEVER_STR, PERSIST_ONLY_OPENED, PERSIST_ONLY_OPENED_STR, PERSIST_UNKNOWN, and PERSISTENCE_TYPE.
| static Mode cern::gp::windows::WindowUtils::openInMode | ( | Workspace | workspace, | |
| TopComponent | component, | |||
| String | modeName, | |||
| int | frameType | |||
| ) | [inline, static] |
Utility method: opens a topcomponent in the given workspace in a mode with the indicated name. This method first looks if the mode already exists, or else creates it.
| workspace | the workspace top open the component in | |
| component | the component to open | |
| modeName | the (code) name of the mode | |
| frameType | indicates the type of the window frame, should be one of INTERNAL_FRAME, TOP_FRAME, or DESKTOP_FRAME |
References frameResidesInDesktop(), org::openide::windows::TopComponent::open(), PERSIST_NEVER, org::openide::windows::TopComponent::requestFocus(), and setPersistMode().
| static Mode cern::gp::windows::WindowUtils::openInMode | ( | TopComponent | component, | |
| String | modeName, | |||
| int | frameType | |||
| ) | [inline, static] |
Utility method: opens a topcomponent in the current workspace in a mode with the indicated name. This method first looks if the mode already exists, or else creates it
| component | the component to open | |
| modeName | the (code) name of the mode | |
| frameType | indicates the type of the window frame, should be one of INTERNAL_FRAME, TOP_FRAME, or DESKTOP_FRAME |
References openInMode().
| static Mode cern::gp::windows::WindowUtils::openInMode | ( | Workspace | workspace, | |
| TopComponent | component, | |||
| String | modeName | |||
| ) | [inline, static] |
Utility method: opens a topcomponent in the given workspace in a mode with the indicated name. This method first looks if the mode already exists, or else creates it. Opens the topcomponent in the desktop.
| workspace | the workspace top open the component in | |
| component | the component to open | |
| modeName | the (code) name of the mode |
References defaultFrameType, and openInMode().
| static Mode cern::gp::windows::WindowUtils::openInMode | ( | TopComponent | component, | |
| String | modeName | |||
| ) | [inline, static] |
Utility method: opens a topcomponent in the current workspace in a mode with the indicated name. This method first looks if the mode already exists, or else creates it. Opens the topcomponent in the desktop.
| component | the component to open | |
| modeName | the (code) name of the mode |
References defaultFrameType.
Referenced by openInMode().
| static boolean cern::gp::windows::WindowUtils::performDesktopFrameAction | ( | Mode | mode, | |
| TopComponent | comp, | |||
| ClassLoader | classLoader, | |||
| Class | modeImplClass, | |||
| Class | windowUtilsClass | |||
| ) | throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, ClassNotFoundException [inline, static, private] |
References CONSTRAINT_WEST.
| static void cern::gp::windows::WindowUtils::setFrameType | ( | int | frameType | ) | [inline, static] |
Utility method: Sets the default windowing behavior, MDI or SDI. If set to true the default behavior for new windows is to reside in the desktop.
| type | indicates that the default windowing behavior, should be one of INTERNAL_FRAME, TOP_FRAME, or DESKTOP_FRAME |
References defaultFrameType.
| static void cern::gp::windows::WindowUtils::setPersistMode | ( | TopComponent | comp, | |
| int | option | |||
| ) | [inline, static] |
Determine under which conditions the TopComponent is persisted to the NetBeans system directory
| comp | the component | |
| option | one of PERSIST_NEVER or PERSIST_ONLY_OPENED |
References PERSIST_ALWAYS, PERSIST_ALWAYS_STR, PERSIST_NEVER, PERSIST_NEVER_STR, PERSIST_ONLY_OPENED, PERSIST_ONLY_OPENED_STR, and PERSISTENCE_TYPE.
Referenced by openInMode().
final String cern::gp::windows::WindowUtils::CONSTRAINT_WEST = "WEST" [static, private] |
Referenced by frameResidesInDesktop(), and performDesktopFrameAction().
int cern::gp::windows::WindowUtils::defaultFrameType = INTERNAL_FRAME [static, private] |
Indicates the default behavior for windows, MDI or SDI. Default is MDI.
Referenced by frameResidesInDesktop(), openInMode(), and setFrameType().
final int cern::gp::windows::WindowUtils::DESKTOP_FRAME = 2 [static] |
The frame resides docked left, right, top, or bottom
Referenced by frameResidesInDesktop().
final String cern::gp::windows::WindowUtils::DESKTOP_FRAME_STRING = "DESKTOP_FRAME" [static, private] |
final int cern::gp::windows::WindowUtils::INTERNAL_FRAME = 0 [static] |
A frame that resides in the desktop
Referenced by frameResidesInDesktop().
final String cern::gp::windows::WindowUtils::INTERNAL_FRAME_STRING = "INTERNAL_FRAME" [static, private] |
Log cern::gp::windows::WindowUtils::log = LogFactory.getLog(WindowUtils.class) [static, private] |
final int cern::gp::windows::WindowUtils::PERSIST_ALWAYS = 2 [static] |
always persist the TopComponent
Referenced by getPersistMode(), and setPersistMode().
final String cern::gp::windows::WindowUtils::PERSIST_ALWAYS_STR = null [static, private] |
Referenced by getPersistMode(), and setPersistMode().
final int cern::gp::windows::WindowUtils::PERSIST_NEVER = 0 [static] |
dont persist the TopComponent
Referenced by getPersistMode(), openInMode(), and setPersistMode().
final String cern::gp::windows::WindowUtils::PERSIST_NEVER_STR = "Never" [static, private] |
Referenced by getPersistMode(), and setPersistMode().
final int cern::gp::windows::WindowUtils::PERSIST_ONLY_OPENED = 1 [static] |
persist a TopComponent only if it is opened
Referenced by getPersistMode(), and setPersistMode().
final String cern::gp::windows::WindowUtils::PERSIST_ONLY_OPENED_STR = "OnlyOpened" [static, private] |
Referenced by getPersistMode(), and setPersistMode().
final int cern::gp::windows::WindowUtils::PERSIST_UNKNOWN = -1 [static] |
unkown persistence mode the TopComponent
Referenced by getPersistMode().
final String cern::gp::windows::WindowUtils::PERSISTENCE_TYPE = "PersistenceType" [static, private] |
Referenced by getPersistMode(), and setPersistMode().
String [] cern::gp::windows::WindowUtils::possibleFrameTypes = { INTERNAL_FRAME_STRING, TOP_FRAME_STRING, DESKTOP_FRAME_STRING } [static, private] |
Referenced by frameResidesInDesktop().
final int cern::gp::windows::WindowUtils::TOP_FRAME = 1 [static] |
A frame that resides as a separate window
final String cern::gp::windows::WindowUtils::TOP_FRAME_STRING = "TOP_FRAME" [static, private] |
1.6.2