|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
edu.brook.ascape.view.ViewFrameBridge
A class allowing Frame, JFrame, and JInternalFrame to be used interchangebly, and providing general support for frame management. This class also ends up mediating and centralizing all swing/non-swong deployment issues. All Swing related environment calls are sent to this class so that all swing functionality can be removed in one place. This will change once the majority of browsers support Swing.
| Field Summary | |
protected static ModelApplet |
applet
The applet the scape is running within, if any. |
static int |
APPLET_VIEW_MODE
Symbol indicating the manager is supporting an applet view. |
protected static PanelImp |
appletModelPanel
The applet panel this scape will be displayed within. |
protected static ViewFrameBridge |
controlBarFrame
Store the last control bar (there should really only be one) so that we can make sure its always sent to the front when another view is added. |
static int |
DEBUG_RUNTIME_MODE
Symbol indicating the current runtime viewMode is setup for debug. |
protected static edu.brook.ascape.view.Desktop |
desktop
The applet the scape is running within, if any. |
java.awt.Container |
frameImp
The backing frame providing the frame implementation. |
protected static java.util.Vector |
frames
|
static int |
GRID_MULTIVIEW_MODE
Symbol indicating that views added should be put into a grid layout. |
static int |
INTERNAL_VIEW_MODE
Symbol indicating the manager is supporting a swing internal frames view, using javax.swing.JIntenralFrame; [Internal frames are not quite ready for prime time.] |
protected static int |
multiViewMode
Multiview mode. |
static int |
NON_SWING_VIEW_MODE
Symbol indicating the manager is supporting a non-swing external frames view, using java.awt.Frame; |
static int |
RELEASE_RUNTIME_MODE
Symbol indicating the current viewMode is setup for release. |
protected static int |
runtimeMode
Runtime viewMode; one of debug or release. |
protected static java.awt.Dimension |
screenBuffer
The extra space used in the screen. |
protected boolean |
showBar
Should the control bar be displayed? (No longer supported.) |
static int |
STANDARD_VIEW_MODE
Symbol indicating the manager is supporting a swing external frames view, using javax.swing.JFrame; |
static int |
TABBED_MULTIVIEW_MODE
Symbol indicating that views added should be put into a tabbed layout. |
protected static int |
viewMode
The mode the manager is currently supporting, standard by default. |
| Constructor Summary | |
ViewFrameBridge()
Construct a frame bridge. |
|
ViewFrameBridge(ComponentView view)
Construct a frame bridge. |
|
ViewFrameBridge(ComponentView[] views)
Construct a frame bridge. |
|
| Method Summary | |
static CellCustomizer |
createCellCustomizer(BaseCellView view)
Returns a new CellCustomizer. |
static ViewCustomizer |
createViewCustomizer(BaseCellView view)
Returns a new ViewCustomizer. |
static void |
defaultSetup(Scape model)
Setup up a basic interactive run time environment for a model application. |
void |
displayAboutDialog(Scape scape)
Displays a standard about dialog. |
void |
dispose()
Closes and frees the frame. |
static java.util.Vector |
getAllFrames()
Returns the actual frame implementation. |
static ModelApplet |
getApplet()
If model is running in an applet vm context, returns the applet. |
static PanelImp |
getAppletModelPanel()
If model is running in an applet vm context, returns the applet. |
java.awt.Container |
getContentPane()
Returns the contentPane object for the frame. |
java.awt.Container |
getFrameImp()
Returns the actual frame implementation. |
static javax.swing.ImageIcon |
getIcon(java.lang.String imageName)
Utility method to return an image icon. |
static java.awt.Image |
getImage(java.lang.String string)
Utility method to return an image resource as specified according to the rules of Class.getResource. |
static int |
getMultiViewMode()
Returns the multi view mode that will be used when adding any new windows. |
static int |
getRuntimeMode()
Returns the run time mode being used. |
java.lang.String |
getTitle()
Gets the title of the frame. |
static int |
getViewMode()
Returns the view viewMode being used. |
ComponentView[] |
getViews()
Returns the views displayed in this window. |
static boolean |
isInApplet()
Are we in an applet vm context? returns true if this scape is viewed in an applet, false otherwise |
boolean |
isVisible()
Is the frame currently visible? |
void |
newSizeNotified(edu.brook.ascape.view.QTImageDrawer drawer,
java.awt.Dimension d)
|
static void |
onNewModel()
|
static java.lang.String |
openDialog()
Gets the users models name from a dialog and validates that it is a legitimate class name. |
void |
pack()
Packs the delegate frame. |
java.awt.Rectangle[] |
paint(java.awt.Graphics g)
|
void |
placeRandomLocation()
Places the window in a random location. |
static void |
placeRandomLocation(java.lang.Object frameImp)
Places the window in a random location. |
protected void |
selectFrameImp()
An internal method that picks the approriate frame for the applet mode. |
static void |
setApplet(ModelApplet _applet)
Sets the applet scape views are to be displayed within, indicating that we are in an applet vm context. |
void |
setDefaultCloseOperation(int closeOp)
|
static void |
setMultiViewMode(int _multiViewMode)
Sets the multi view to use when adding a new window. |
static void |
setRuntimeMode(int _runtimeMode)
Sets the runtime to use. |
void |
setTitle(java.lang.String title)
Sets the title for this frame to the specified string. |
void |
setView(ComponentView view)
Sets the view to display in this window. |
static void |
setViewMode(int _viewMode)
Sets the viewMode to use. |
void |
setViews(ComponentView[] views)
Sets the view to display in this window. |
void |
setVisible(boolean b)
Makes the frame visible or invisible. |
static void |
showErrorDialog(Scape scape,
java.lang.RuntimeException e)
|
static boolean |
supportsSwing()
Returns the view viewMode being used. |
void |
toFront()
Brings the frame to the front. |
java.lang.String |
toString()
Returns a string represenetation of the view frame. |
| Field Detail |
public static final int APPLET_VIEW_MODE
public static final int STANDARD_VIEW_MODE
public static final int NON_SWING_VIEW_MODE
public static final int INTERNAL_VIEW_MODE
protected static int viewMode
public static final int DEBUG_RUNTIME_MODE
public static final int RELEASE_RUNTIME_MODE
protected static int runtimeMode
public static final int TABBED_MULTIVIEW_MODE
public static final int GRID_MULTIVIEW_MODE
protected static int multiViewMode
protected static ModelApplet applet
protected static PanelImp appletModelPanel
protected static edu.brook.ascape.view.Desktop desktop
protected static ViewFrameBridge controlBarFrame
public java.awt.Container frameImp
protected static java.awt.Dimension screenBuffer
protected boolean showBar
protected static java.util.Vector frames
| Constructor Detail |
public ViewFrameBridge()
public ViewFrameBridge(ComponentView[] views)
public ViewFrameBridge(ComponentView view)
| Method Detail |
protected void selectFrameImp()
public void setDefaultCloseOperation(int closeOp)
public void setView(ComponentView view)
public ComponentView[] getViews()
public void setViews(ComponentView[] views)
public void placeRandomLocation()
public static void placeRandomLocation(java.lang.Object frameImp)
public static ModelApplet getApplet()
public static void setApplet(ModelApplet _applet)
public static PanelImp getAppletModelPanel()
public static void onNewModel()
public static void showErrorDialog(Scape scape,
java.lang.RuntimeException e)
public static java.lang.String openDialog()
public static ViewCustomizer createViewCustomizer(BaseCellView view)
public static CellCustomizer createCellCustomizer(BaseCellView view)
public void displayAboutDialog(Scape scape)
public static void defaultSetup(Scape model)
public static boolean isInApplet()
public static boolean supportsSwing()
public static int getViewMode()
public static void setViewMode(int _viewMode)
public static int getRuntimeMode()
public static void setRuntimeMode(int _runtimeMode)
public static int getMultiViewMode()
public static void setMultiViewMode(int _multiViewMode)
public java.awt.Container getFrameImp()
public static java.util.Vector getAllFrames()
public static java.awt.Image getImage(java.lang.String string)
String - the resource reference of the image to loadpublic static javax.swing.ImageIcon getIcon(java.lang.String imageName)
String - the name (without extension) specifiying the image icon to returnpublic java.awt.Container getContentPane()
public java.lang.String getTitle()
public void setTitle(java.lang.String title)
title - the title to be displayed in the frame's borderpublic void setVisible(boolean b)
public boolean isVisible()
public void toFront()
public void pack()
public void newSizeNotified(edu.brook.ascape.view.QTImageDrawer drawer,
java.awt.Dimension d)
public java.awt.Rectangle[] paint(java.awt.Graphics g)
public void dispose()
public java.lang.String toString()
|
(c) 1998-2000 The Brookings Insitution Webpage |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||