Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.trapezium.chisel.gui
Class ComponentFactory  view ComponentFactory download ComponentFactory.java

java.lang.Object
  extended bycom.trapezium.chisel.gui.ComponentFactory
All Implemented Interfaces:
DisplayConstants

public class ComponentFactory
extends java.lang.Object
implements DisplayConstants

The ComponentFactory builds functional user interface components for Chisel. This isolates Chisel from any knowledge of JFC.


Field Summary
(package private) static java.util.Hashtable imageHash
          Preload button images for toolbar, since this seems related to jdk1.1.7a hang and possibly SGI & Solaris java hangs on startup
private static java.awt.MenuItem redoMenuItem
           
private static java.awt.MenuItem undoMenuItem
          keep track of undo/redo menu items
static boolean useJFC
          true if JFC was looked for and found
 
Fields inherited from interface com.trapezium.chisel.gui.DisplayConstants
BOTTOM_MARGIN, DEFAULT_ACTIVECOLOR, DEFAULT_BGCOLOR, DEFAULT_BORDERCOLOR, DEFAULT_CONTROLCOLOR, DEFAULT_DECAL, DEFAULT_FADEDTEXTCOLOR, DEFAULT_FRAMECOLOR, DEFAULT_GROOVECOLOR, DEFAULT_INACTIVECOLOR, DEFAULT_LITESHADOWCOLOR, DEFAULT_PANECOLOR, DEFAULT_POPUPCOLOR, DEFAULT_POPUPTEXTCOLOR, DEFAULT_PROGRESSBARCOLOR, DEFAULT_ROWHEADERCOLOR, DEFAULT_RULECOLOR, DEFAULT_SELECTEDCOLOR, DEFAULT_SELECTEDTEXTCOLOR, DEFAULT_SHADOWCOLOR, DEFAULT_STATUSBARCOLOR, DEFAULT_TABLECOLOR, DEFAULT_TEXTCOLOR, DEFAULT_TILE, DEFAULT_TILEX, DEFAULT_TILEY, DEFAULT_TITLETEXTCOLOR, DEFAULT_TOOLBARCOLOR, DEFAULT_TOOLTIPCOLOR, DEFAULT_TOPTABLECOLOR, DEFAULT_WORKSPACECOLOR, FRAMED_BORDER, HGAP, LEFT_MARGIN, LOWERED_BORDER, NO_BORDER, RAISED_BORDER, RIGHT_MARGIN, THICK_BORDER, THIN_BORDER, TOP_MARGIN, VGAP
 
Constructor Summary
ComponentFactory()
           
 
Method Summary
static ActionImpl createAction(java.awt.event.ActionListener owner, java.lang.String name)
           
static java.awt.Container createBufferedPane()
           
static java.awt.Component createButton(java.lang.String key)
          Create a button suitable for a toolbar.
static java.awt.Container createDividedPane(int align, java.awt.Component before, java.awt.Component after)
          Create a divided pane.
static java.awt.Frame createFrame(boolean tryJFC, java.lang.String title)
          Create the frame.
static java.awt.Container createMainPanel(java.awt.Frame frame)
          Create the main panel (parent of workspace)
static java.awt.Menu createMenu(java.lang.String key)
          Create a Menu for the app.
private static java.awt.MenuItem createMenuItem(java.lang.String cmd)
          Create the menu item for a command.
private static java.awt.Container createPane(boolean buffered, boolean opaque, boolean scrollable)
          Create a pane.
static java.awt.Container createScrollablePane()
           
static java.awt.Container createSimplePane()
           
static java.awt.Container createStatusBar(com.trapezium.chisel.Chisel app)
           
static java.awt.Container createToolBar(com.trapezium.chisel.Chisel app)
          Create a toolbar.
static com.trapezium.chisel.ProcessedFileViewer createViewer()
          Create the scene viewer panel.
static java.awt.MenuItem getRedoMenuItem()
           
static java.awt.MenuItem getUndoMenuItem()
           
static void preloadImages()
           
static void setPaneBorder(java.awt.Container pane, int border)
           
static void setPaneOpaque(java.awt.Container pane, boolean opaque)
           
private static java.lang.String[] tokenize(java.lang.String input)
          Take the given string and chop it up into a series of strings on whitespace boundries.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

useJFC

public static boolean useJFC
true if JFC was looked for and found


imageHash

static java.util.Hashtable imageHash
Preload button images for toolbar, since this seems related to jdk1.1.7a hang and possibly SGI & Solaris java hangs on startup


undoMenuItem

private static java.awt.MenuItem undoMenuItem
keep track of undo/redo menu items


redoMenuItem

private static java.awt.MenuItem redoMenuItem
Constructor Detail

ComponentFactory

public ComponentFactory()
Method Detail

createFrame

public static java.awt.Frame createFrame(boolean tryJFC,
                                         java.lang.String title)
Create the frame. If tryJFC is true, look for JFC and use if found.


createViewer

public static com.trapezium.chisel.ProcessedFileViewer createViewer()
Create the scene viewer panel.


createMainPanel

public static java.awt.Container createMainPanel(java.awt.Frame frame)
Create the main panel (parent of workspace)


createBufferedPane

public static java.awt.Container createBufferedPane()

createSimplePane

public static java.awt.Container createSimplePane()

createScrollablePane

public static java.awt.Container createScrollablePane()

createPane

private static java.awt.Container createPane(boolean buffered,
                                             boolean opaque,
                                             boolean scrollable)
Create a pane.


setPaneBorder

public static void setPaneBorder(java.awt.Container pane,
                                 int border)

setPaneOpaque

public static void setPaneOpaque(java.awt.Container pane,
                                 boolean opaque)

createDividedPane

public static java.awt.Container createDividedPane(int align,
                                                   java.awt.Component before,
                                                   java.awt.Component after)
Create a divided pane.


preloadImages

public static void preloadImages()

createToolBar

public static java.awt.Container createToolBar(com.trapezium.chisel.Chisel app)
Create a toolbar.


createStatusBar

public static java.awt.Container createStatusBar(com.trapezium.chisel.Chisel app)

tokenize

private static java.lang.String[] tokenize(java.lang.String input)
Take the given string and chop it up into a series of strings on whitespace boundries. This is useful for trying to get an array of strings out of the resource file.


getUndoMenuItem

public static java.awt.MenuItem getUndoMenuItem()

getRedoMenuItem

public static java.awt.MenuItem getRedoMenuItem()

createMenu

public static java.awt.Menu createMenu(java.lang.String key)
Create a Menu for the app. By default this pulls the definition of the menu from the associated resource file. This method is public so the app can add individual menus dynamically.


createMenuItem

private static java.awt.MenuItem createMenuItem(java.lang.String cmd)
Create the menu item for a command.


createButton

public static java.awt.Component createButton(java.lang.String key)
Create a button suitable for a toolbar.


createAction

public static ActionImpl createAction(java.awt.event.ActionListener owner,
                                      java.lang.String name)