Protege-2000 1.7

edu.stanford.smi.protege.util
Class ComponentFactory

java.lang.Object
  |
  +--edu.stanford.smi.protege.util.ComponentFactory

public class ComponentFactory
extends Object

Factory class for making swing components, and their varients. The use of this class is not required for Protege widgets. It is encouraged though. This allows for a single place to address swing bugs and look and feel issues.

Author:
Ray Fergerson

Field Summary
static int SMALL_BUTTON_HEIGHT
           
static Dimension SMALL_BUTTON_SIZE
           
static int SMALL_BUTTON_WIDTH
           
static int STANDARD_BUTTON_HEIGHT
           
static Dimension STANDARD_BUTTON_SIZE
           
static int STANDARD_BUTTON_WIDTH
           
static int STANDARD_FIELD_HEIGHT
           
 
Constructor Summary
ComponentFactory()
           
 
Method Summary
static void addMenuItem(JMenu menu, Action action)
           
static void addMenuItemNoIcon(JMenu menu, Action action)
           
static void addSubmenu(JMenu menu, JMenu submenu)
           
static JToggleButton addToggleToolBarButton(FakeToolBar toolBar, Action action)
           
static JButton addToolBarButton(FakeToolBar toolBar, Action action)
           
static void addToolBarButton(FakeToolBar toolBar, Action action, AbstractButton button)
           
static JButton addToolBarButton(JToolBar bar, Action action)
           
static void configureTree(JTree tree, Action action)
           
static JButton createButton(Action action)
           
static JPanel createButtonPreferredHeightPanel()
           
static JCheckBox createCheckBox()
           
static JCheckBox createCheckBox(String s)
           
static JComboBox createComboBox()
           
static FakeToolBar createFakeToolBar()
           
static FakeToolBar createFakeToolBar(Dimension d)
           
static JFileChooser createFileChooser(String description, String extension)
           
static JFrame createFrame()
           
static JLabel createLabel()
           
static JSplitPane createLeftRightSplitPane()
           
static JSplitPane createLeftRightSplitPane(boolean autoResize)
           
static JList createList(Action action)
           
static JList createList(Action action, boolean enableDragAndDrop)
           
static JFrame createMainFrame()
           
static JMenu createMenu()
           
static JPanel createPanel()
           
static JPasswordField createPasswordField()
           
static JRadioButtonMenuItem createRadioButtonMenuItem(Action action)
           
static JScrollPane createScrollPane(JComponent c)
           
static JScrollPane createScrollPane(JTable table)
           
static SelectableList createSelectableList(Action action)
           
static SelectableList createSelectableList(Action action, boolean enableDragAndDrop)
           
static SelectableTable createSelectableTable(Action action)
           
static SelectableTree createSelectableTree(Action action)
           
static SelectableTree createSelectableTree(Action action, LazyTreeRoot root)
           
static SelectableList createSingleItemList(Action action)
           
static Border createStandardBorder()
           
static JTabbedPane createTabbedPane(boolean addBorder)
           
static JTable createTable(Action action)
           
static JTextArea createTextArea()
           
static JTextField createTextField()
           
static JTextPane createTextPane()
           
static JToggleButton createToggleButton(Action action)
           
static JToolBar createToolBar()
           
static JSplitPane createTopBottomSplitPane()
           
static JSplitPane createTopBottomSplitPane(boolean autoResize)
           
static JTree createTree(Action action)
           
static JWindow createWindow()
           
static JComponent getCloseButtonPanel(JFrame frame)
           
static void removeToolBarButton(FakeToolBar toolBar, JButton button)
           
static JFrame showInFrame(Component panel, String title)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STANDARD_BUTTON_HEIGHT

public static final int STANDARD_BUTTON_HEIGHT

STANDARD_BUTTON_WIDTH

public static final int STANDARD_BUTTON_WIDTH

STANDARD_FIELD_HEIGHT

public static final int STANDARD_FIELD_HEIGHT

STANDARD_BUTTON_SIZE

public static final Dimension STANDARD_BUTTON_SIZE

SMALL_BUTTON_HEIGHT

public static final int SMALL_BUTTON_HEIGHT

SMALL_BUTTON_WIDTH

public static final int SMALL_BUTTON_WIDTH

SMALL_BUTTON_SIZE

public static final Dimension SMALL_BUTTON_SIZE
Constructor Detail

ComponentFactory

public ComponentFactory()
Method Detail

addMenuItem

public static void addMenuItem(JMenu menu,
                               Action action)

addMenuItemNoIcon

public static void addMenuItemNoIcon(JMenu menu,
                                     Action action)

addSubmenu

public static void addSubmenu(JMenu menu,
                              JMenu submenu)

addToggleToolBarButton

public static JToggleButton addToggleToolBarButton(FakeToolBar toolBar,
                                                   Action action)

addToolBarButton

public static JButton addToolBarButton(FakeToolBar toolBar,
                                       Action action)

addToolBarButton

public static void addToolBarButton(FakeToolBar toolBar,
                                    Action action,
                                    AbstractButton button)

addToolBarButton

public static JButton addToolBarButton(JToolBar bar,
                                       Action action)

configureTree

public static void configureTree(JTree tree,
                                 Action action)

createButton

public static JButton createButton(Action action)

createButtonPreferredHeightPanel

public static JPanel createButtonPreferredHeightPanel()

createCheckBox

public static JCheckBox createCheckBox()

createCheckBox

public static JCheckBox createCheckBox(String s)

createComboBox

public static JComboBox createComboBox()

createFakeToolBar

public static FakeToolBar createFakeToolBar()

createFakeToolBar

public static FakeToolBar createFakeToolBar(Dimension d)

createFileChooser

public static JFileChooser createFileChooser(String description,
                                             String extension)

createFrame

public static JFrame createFrame()

createLabel

public static JLabel createLabel()

createLeftRightSplitPane

public static JSplitPane createLeftRightSplitPane()

createLeftRightSplitPane

public static JSplitPane createLeftRightSplitPane(boolean autoResize)

createList

public static JList createList(Action action)

createList

public static JList createList(Action action,
                               boolean enableDragAndDrop)

createMainFrame

public static JFrame createMainFrame()

createMenu

public static JMenu createMenu()

createPanel

public static JPanel createPanel()

createPasswordField

public static JPasswordField createPasswordField()

createRadioButtonMenuItem

public static JRadioButtonMenuItem createRadioButtonMenuItem(Action action)

createScrollPane

public static JScrollPane createScrollPane(JComponent c)

createScrollPane

public static JScrollPane createScrollPane(JTable table)

createSelectableList

public static SelectableList createSelectableList(Action action)

createSelectableList

public static SelectableList createSelectableList(Action action,
                                                  boolean enableDragAndDrop)

createSelectableTable

public static SelectableTable createSelectableTable(Action action)

createSelectableTree

public static SelectableTree createSelectableTree(Action action)

createSelectableTree

public static SelectableTree createSelectableTree(Action action,
                                                  LazyTreeRoot root)

createSingleItemList

public static SelectableList createSingleItemList(Action action)

createStandardBorder

public static Border createStandardBorder()

createTabbedPane

public static JTabbedPane createTabbedPane(boolean addBorder)

createTable

public static JTable createTable(Action action)

createTextArea

public static JTextArea createTextArea()

createTextField

public static JTextField createTextField()

createTextPane

public static JTextPane createTextPane()

createToggleButton

public static JToggleButton createToggleButton(Action action)

createToolBar

public static JToolBar createToolBar()

createTopBottomSplitPane

public static JSplitPane createTopBottomSplitPane()

createTopBottomSplitPane

public static JSplitPane createTopBottomSplitPane(boolean autoResize)

createTree

public static JTree createTree(Action action)

createWindow

public static JWindow createWindow()

getCloseButtonPanel

public static JComponent getCloseButtonPanel(JFrame frame)

removeToolBarButton

public static void removeToolBarButton(FakeToolBar toolBar,
                                       JButton button)

showInFrame

public static JFrame showInFrame(Component panel,
                                 String title)

Protege-2000 1.7

Submit a bug report or feature request
Protege-2000 is a trademark of Stanford University.
Copyright (c) 1998-2002 Stanford University.