Static Public Member Functions | Static Public Attributes

cern.gp.windows.WindowUtils Class Reference

List of all members.

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

Detailed Description

Provides utility methods for windowing in NetBeans.

Author:
Katarina Sigerud
Version:
Revision:
1.2
Date:
2006/09/25 08:52:36

Member Function Documentation

static Workspace cern.gp.windows.WindowUtils.createWorkspace ( String  codeName,
String  displayName 
) [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.

Parameters:
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 
) [static]

Utility method: Returns the TopComponent with the given programmatic name in the given workspace, or null if there is no such TopComponent.

Parameters:
workspace the workspace in which to look for the TopComponent
componentName the programmatic name of the TopComponent
Returns:
Returns the TopComponent with the given programmatic name, or null if there is no such TopComponent
static TopComponent cern.gp.windows.WindowUtils.findTopComponent ( String  componentName  )  [static]

Utility method: Returns the TopComponent with the given programmatic name in the current workspace, or null if there is no such TopComponent.

Parameters:
componentName the programmatic name of the TopComponent
Returns:
Returns the TopComponent with the given programmatic name, or null if there is no such TopComponent
static void cern.gp.windows.WindowUtils.frameResidesInDesktop ( Mode  mode  )  [static]

Utility method: makes the given mode reside in the desktop instead of as a separate window.

Parameters:
mode the mode to make reside in the desktop

Referenced by cern.gp.windows.WindowUtils.openInMode().

static void cern.gp.windows.WindowUtils.frameResidesInDesktop ( Mode  mode,
int  frameType 
) [static]

Utility method: makes the given mode either reside in the desktop or display a separate window.

Parameters:
mode the mode to make reside in the desktop
frameType indicates the type of frame, MDI or SDI

References cern.gp.windows.WindowUtils.DESKTOP_FRAME, and cern.gp.windows.WindowUtils.INTERNAL_FRAME.

static int cern.gp.windows.WindowUtils.getPersistMode ( TopComponent  comp  )  [static]
static Mode cern.gp.windows.WindowUtils.openInMode ( Workspace  workspace,
TopComponent  component,
String  modeName 
) [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.

Parameters:
workspace the workspace top open the component in
component the component to open
modeName the (code) name of the mode
Returns:
the mode the topcomponent was opened in.

References cern.gp.windows.WindowUtils.openInMode().

static Mode cern.gp.windows.WindowUtils.openInMode ( TopComponent  component,
String  modeName,
int  frameType 
) [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

Parameters:
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
Returns:
the mode the topcomponent was opened in.

References cern.gp.windows.WindowUtils.openInMode().

static Mode cern.gp.windows.WindowUtils.openInMode ( Workspace  workspace,
TopComponent  component,
String  modeName,
int  frameType 
) [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.

Parameters:
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
Returns:
the mode the topcomponent was opened in.

References cern.gp.windows.WindowUtils.frameResidesInDesktop(), org.openide.windows.TopComponent.open(), cern.gp.windows.WindowUtils.PERSIST_NEVER, org.openide.windows.TopComponent.requestFocus(), and cern.gp.windows.WindowUtils.setPersistMode().

static Mode cern.gp.windows.WindowUtils.openInMode ( TopComponent  component,
String  modeName 
) [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.

Parameters:
component the component to open
modeName the (code) name of the mode
Returns:
the mode the topcomponent was opened in.

Referenced by cern.gp.windows.WindowUtils.openInMode().

static void cern.gp.windows.WindowUtils.setFrameType ( int  frameType  )  [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.

Parameters:
type indicates that the default windowing behavior, should be one of INTERNAL_FRAME, TOP_FRAME, or DESKTOP_FRAME
static void cern.gp.windows.WindowUtils.setPersistMode ( TopComponent  comp,
int  option 
) [static]

Determine under which conditions the TopComponent is persisted to the NetBeans system directory

Parameters:
comp the component
option one of PERSIST_NEVER or PERSIST_ONLY_OPENED

References cern.gp.windows.WindowUtils.PERSIST_ALWAYS, cern.gp.windows.WindowUtils.PERSIST_NEVER, and cern.gp.windows.WindowUtils.PERSIST_ONLY_OPENED.

Referenced by cern.gp.windows.WindowUtils.openInMode().


Member Data Documentation

The frame resides docked left, right, top, or bottom

Referenced by cern.gp.windows.WindowUtils.frameResidesInDesktop().

A frame that resides in the desktop

Referenced by cern.gp.windows.WindowUtils.frameResidesInDesktop().

persist a TopComponent only if it is opened

Referenced by cern.gp.windows.WindowUtils.getPersistMode(), and cern.gp.windows.WindowUtils.setPersistMode().

unkown persistence mode the TopComponent

Referenced by cern.gp.windows.WindowUtils.getPersistMode().

final int cern.gp.windows.WindowUtils.TOP_FRAME = 1 [static]

A frame that resides as a separate window


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties