diva.gui
Interface AppContext

All Superinterfaces:
RootPaneContainer
All Known Subinterfaces:
MDIContext
All Known Implementing Classes:
AppContextDelegate, AppletContext, AppletTutorial, ApplicationContext, BasicFrame, BasicGraphDemoApplet, BubbleGraphDemoApplet, DesktopContext, GraphEditorApplet, SketchDemoApplet

public interface AppContext
extends RootPaneContainer

A context for either an application or an applet that wants to use the diva.gui infrastructure.

Version:
$Revision: 1.4 $
Author:
Steve Neuendorffer (neuendor@eecs.berkeley.edu), Michael Shilman (michaels@eecs.berkeley.edu)

Method Summary
 Action getExitAction()
          Return the action that is called back when the user exits the app.
 Image getIconImage()
          Get the image that represents this frame.
 JMenuBar getJMenuBar()
          Return the menu bar that the container uses.
 String getTitle()
          Return the title of the context.
 boolean isVisible()
          Return whether the context is visible.
 Component makeComponent()
          Make this into a component (since Component is not an interface.
 void setExitAction(Action exitAction)
          Set the action that is called back when the user exits the app.
 void setIconImage(Image image)
          Set the icon that represents this frame.
 void setJMenuBar(JMenuBar menu)
          Set the menu bar that the container uses.
 void setSize(int w, int h)
          Set the size of the context.
 void setTitle(String title)
          Set the title of the context.
 void setVisible(boolean visible)
          Set whether the context is visible.
 void showStatus(String status)
          Show the given status string at the bottom of the context.
 
Methods inherited from interface javax.swing.RootPaneContainer
getContentPane, getGlassPane, getLayeredPane, getRootPane, setContentPane, setGlassPane, setLayeredPane
 

Method Detail

getExitAction

Action getExitAction()
Return the action that is called back when the user exits the app.


getIconImage

Image getIconImage()
Get the image that represents this frame.


getJMenuBar

JMenuBar getJMenuBar()
Return the menu bar that the container uses.


getTitle

String getTitle()
Return the title of the context.


isVisible

boolean isVisible()
Return whether the context is visible.


makeComponent

Component makeComponent()
Make this into a component (since Component is not an interface.


setExitAction

void setExitAction(Action exitAction)
Set the action that is called back when the user exits the app.


setIconImage

void setIconImage(Image image)
Set the icon that represents this frame.


setJMenuBar

void setJMenuBar(JMenuBar menu)
Set the menu bar that the container uses.


setTitle

void setTitle(String title)
Set the title of the context.


setSize

void setSize(int w,
             int h)
Set the size of the context. Won't do anything for an applet.


setVisible

void setVisible(boolean visible)
Set whether the context is visible. May be meaningless if the context is always visible.


showStatus

void showStatus(String status)
Show the given status string at the bottom of the context. Note: application implementation may implement this as an empty method.



Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.