|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ascape.model.event.DefaultScapeListener
org.ascape.runtime.RuntimeEnvironment
org.ascape.runtime.AbstractUIEnvironment
org.ascape.runtime.swing.SwingEnvironment
org.ascape.runtime.swing.DesktopEnvironment
public class DesktopEnvironment
Suppots all user environment ascapet of a running ascape app in a vm, including user frame, etc.
Field Summary | |
---|---|
protected static java.awt.Color |
ACCENT_COLOR
The Constant ACCENT_COLOR. |
static int |
APPLET_VIEW_MODE
Symbol indicating the manager is supporting an applet view. |
protected static java.awt.Color |
BUTTON_ROLLOVER_COLOR
The Constant BUTTON_ROLLOVER_COLOR. |
static int |
CLASSIC_VIEW_MODE
Symbol indicating the manager is supporting a swing external frames view, using javax.swing.JFrame; |
static DesktopEnvironment |
DEFAULT_ENVIRONMENT
|
static int |
GRID_MULTIVIEW_LABEL_MODE
Symbol indicating that views added should be put into a grid layout, with a name appearing above each panel.. |
static int |
GRID_MULTIVIEW_MODE
Symbol indicating that views added should be put into a grid layout. |
static int |
MDI_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.] |
static int |
NON_SWING_VIEW_MODE
Symbol indicating the manager is supporting a non-swing external frames view, using java.awt.Frame; |
static int |
TABBED_MULTIVIEW_MODE
Symbol indicating that views added should be put into a tabbed layout. |
Fields inherited from class org.ascape.runtime.swing.SwingEnvironment |
---|
controlBarView, modelNameField |
Fields inherited from class org.ascape.runtime.AbstractUIEnvironment |
---|
DEBUG_RUNTIME_MODE, RELEASE_RUNTIME_MODE, runtimeMode |
Fields inherited from class org.ascape.model.event.DefaultScapeListener |
---|
listeningToScape, name, scape |
Constructor Summary | |
---|---|
DesktopEnvironment()
Instantiates a new user environment. |
Method Summary | |
---|---|
static javax.swing.JButton |
addToolBarButton(javax.swing.JToolBar toolBar)
A helper method to add a button to the provided toolbar for the specified action. |
static javax.swing.JButton |
addToolBarButton(javax.swing.JToolBar toolBar,
javax.swing.Action action)
A helper method to add a button to the provided toolbar for the specified action. |
static void |
checkForLicenseAgreement()
Check for license agreement. |
void |
createFrame(ComponentView[] views)
Creates the frame. |
protected static javax.swing.JLabel |
createLabel()
Creates the label. |
static javax.swing.JLabel |
createLabel(int width)
Creates the label. |
static javax.swing.JToolBar |
createToolbar()
Creates the toolbar. |
static void |
displayAboutDialog(Scape scape)
Displays a standard about dialog. |
void |
environmentQuiting(ScapeEvent scapeEvent)
Setup up a basic interactive controlBar time userEnvironment for a model application. |
ModelApplet |
getApplet()
If model is running in an applet vm context, returns the applet. |
javax.swing.JPanel |
getAppletModelPanel()
If model is running in an applet vm context, returns the applet. |
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 javax.swing.border.Border |
getInfoAreaBorder()
Gets the info area border. |
int |
getMultiViewMode()
Returns the multi view mode that will be used when adding any new windows. |
java.beans.PropertyChangeSupport |
getPropertySupportForObject(java.lang.Object object)
Returns PropertyChangeSupport for the object provided. |
AgentSelectionManager |
getSelectionManager()
Gets the selection manager. |
UserFrame |
getUserFrame()
Gets the user frame. |
int |
getViewMode()
Returns the view viewMode being used. |
boolean |
isFullScreen()
Checks if is full screen. |
boolean |
isInApplet()
Are we in an applet vm context? returns true if this scape is viewed in an applet, false otherwise. |
void |
placeRandomLocation(java.awt.Container frameImp)
Places the window in a random location. |
protected void |
registerViewFrame(ViewFrameBridge v)
Register view frame. |
static void |
removeToolBarButton(javax.swing.JToolBar toolbar,
javax.swing.Action action)
A helper method to remove a button from the provided toolbar for the specified action. |
void |
scapeAdded(ScapeEvent scapeEvent)
When a scape is added add any persiten views to it and set frame title. |
void |
scapeRemoved(ScapeEvent scapeEvent)
When a scape is removed reset frame title. |
void |
setApplet(java.lang.Object _applet,
Scape parent)
Sets the applet scape views are to be displayed within, indicating that we are in an applet vm context. |
void |
setFullScreen(boolean fullScreen)
Sets the full screen. |
void |
setMultiViewMode(int _multiViewMode)
Sets the multi view to use when adding a new window. |
protected static void |
setupLabel(javax.swing.JLabel label)
Sets the up label. |
void |
setUserFrame(UserFrame userFrame)
Sets the user frame. |
void |
setViewMode(int _viewMode)
Sets the viewMode to use. |
boolean |
supportsSwing()
Returns the view viewMode being used. |
Methods inherited from class org.ascape.runtime.swing.SwingEnvironment |
---|
addView, addViews, createFrame, getAllFrames, getControlBarView, getRootPane, openDialog, removeView, setControlBarView, setRootPane, showErrorDialog, showSplashScreenNotice |
Methods inherited from class org.ascape.runtime.AbstractUIEnvironment |
---|
getCustomizer, getRuntimeMode, isRedirectConsole, isShowNavigator, setCustomizer, setRedirectConsole, setRuntimeMode, setShowNavigator |
Methods inherited from class org.ascape.runtime.RuntimeEnvironment |
---|
addView, addViews, exit, getConsole, getEnvironmentViews, quit, removeViews, setConsole |
Methods inherited from class org.ascape.model.event.DefaultScapeListener |
---|
clone, getName, getScape, isGraphic, isLifeOfScape, isNotifyScapeAutomatically, notifyScapeUpdated, scapeClosing, scapeDeserialized, scapeInitialized, scapeIterated, scapeNotification, scapeSetup, scapeStarted, scapeStopped, setName, setNotifyScapeAutomatically, toString |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static DesktopEnvironment DEFAULT_ENVIRONMENT
public static final int APPLET_VIEW_MODE
public static final int CLASSIC_VIEW_MODE
public static final int NON_SWING_VIEW_MODE
public static final int MDI_VIEW_MODE
public static final int TABBED_MULTIVIEW_MODE
public static final int GRID_MULTIVIEW_MODE
public static final int GRID_MULTIVIEW_LABEL_MODE
protected static final java.awt.Color BUTTON_ROLLOVER_COLOR
protected static final java.awt.Color ACCENT_COLOR
Constructor Detail |
---|
public DesktopEnvironment()
Method Detail |
---|
public void environmentQuiting(ScapeEvent scapeEvent)
environmentQuiting
in interface ScapeListener
environmentQuiting
in class RuntimeEnvironment
scapeEvent
- the scape eventpublic void scapeAdded(ScapeEvent scapeEvent) throws java.util.TooManyListenersException
scapeAdded
in interface ScapeListener
scapeAdded
in class RuntimeEnvironment
scapeEvent
- the scape event
java.util.TooManyListenersException
- the too many listeners exceptionpublic void scapeRemoved(ScapeEvent scapeEvent)
scapeRemoved
in interface ScapeListener
scapeRemoved
in class DefaultScapeListener
scapeEvent
- the scape eventscapeAdded
protected void registerViewFrame(ViewFrameBridge v)
v
- the vpublic void createFrame(ComponentView[] views)
SwingEnvironment
createFrame
in class SwingEnvironment
views
- the viewspublic void placeRandomLocation(java.awt.Container frameImp)
frameImp
- the frame imppublic ModelApplet getApplet()
public void setApplet(java.lang.Object _applet, Scape parent)
setApplet
in class AbstractUIEnvironment
_applet
- the _appletpublic javax.swing.JPanel getAppletModelPanel()
public static void displayAboutDialog(Scape scape)
scape
- the scapepublic static void checkForLicenseAgreement()
public boolean isInApplet()
isInApplet
in class AbstractUIEnvironment
public boolean supportsSwing()
public int getViewMode()
public void setViewMode(int _viewMode)
_viewMode
- the _view modepublic int getMultiViewMode()
public void setMultiViewMode(int _multiViewMode)
_multiViewMode
- the _multi view modepublic static java.awt.Image getImage(java.lang.String string)
string
- the resource reference of the image to load
public static javax.swing.ImageIcon getIcon(java.lang.String imageName)
imageName
- the name (without extension) specifiying the image icon to
return
public void setFullScreen(boolean fullScreen)
fullScreen
- the new full screenpublic boolean isFullScreen()
public static javax.swing.JToolBar createToolbar()
public static javax.swing.JButton addToolBarButton(javax.swing.JToolBar toolBar, javax.swing.Action action)
toolBar
- the tool baraction
- the action
public static void removeToolBarButton(javax.swing.JToolBar toolbar, javax.swing.Action action)
toolbar
- the toolbaraction
- the actionpublic static javax.swing.JButton addToolBarButton(javax.swing.JToolBar toolBar)
toolBar
- the tool bar
protected static void setupLabel(javax.swing.JLabel label)
label
- the new up labelprotected static javax.swing.JLabel createLabel()
public static javax.swing.JLabel createLabel(int width)
width
- the width
public java.beans.PropertyChangeSupport getPropertySupportForObject(java.lang.Object object)
object
- an object of relevance to user
public static javax.swing.border.Border getInfoAreaBorder()
public AgentSelectionManager getSelectionManager()
public UserFrame getUserFrame()
public void setUserFrame(UserFrame userFrame)
userFrame
- the new user frame
|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |