Overview | Package | Class | Tree | Deprecated | Index | Help
| Protege 3.5 alpha
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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 variants. 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 , Monica Crubezy

Field Summary
`static int` | `LARGE_BUTTON_HEIGHT`
`static int` | `STANDARD_BUTTON_HEIGHT`
`static Dimension` | `STANDARD_BUTTON_SIZE`
`static int` | `STANDARD_FIELD_HEIGHT`

Constructor Summary
`ComponentFactory()`

Method Summary
`static JCheckBoxMenuItem` | `addCheckBoxMenuItem(JMenu menu, Action action, boolean selected)`
`static JToggleButton` | `addLargeToggleToolBarButton(JToolBar toolBar, Action action)`
`static JButton` | `addLargeToolBarButton(JToolBar bar, Action action)`
`static void` | `addMenuItem(JMenu menu, Action action)`
`static void` | `addMenuItemNoIcon(JMenu menu, Action action)`
`static void` | `addSubmenu(JMenu menu, JMenu submenu)`
`static JToggleButton` | `addToggleToolBarButton(JToolBar toolBar, Action action)`
`static JToggleButton` | `addToggleToolBarButton(JToolBar toolBar, Action action, int width)`
`static JButton` | `addToolBarButton(JToolBar bar, Action action)`
`static void` | `addToolBarButton(JToolBar toolBar, Action action, AbstractButton button)`
`static JButton` | `addToolBarButton(JToolBar bar, Action action, int width)`
`static void` | `configureTable(JTable table)`
`static void` | `configureTree(JTree tree, Action action)`
`static JButton` | `createButton(Action action)`
`static JCheckBox` | `createCheckBox()`
`static JCheckBox` | `createCheckBox(String s)`
`static JCheckBoxMenuItem` | `createCheckBoxMenuItem(Action action, boolean selected)`
`static JComboBox` | `createComboBox()`
`static JEditorPane` | `createEditorPane()`
`static JFileChooser` | `createFileChooser(String title, ExtensionFilter extensionFilter)`
`static JFileChooser` | `createFileChooser(String description, String extension)`
`static JFileChooser` | `createFileChooser(String title, String fileDescription, String fileExtension)`
`static JFrame` | `createFrame()`
`static JEditorPane` | `createHTMLBrowser(URL url)`
`static JLabel` | `createLabel()`
`static JLabel` | `createLabel(Icon icon)`
`static JLabel` | `createLabel(Icon icon, int alignment)`
`static JLabel` | `createLabel(String s)`
`static JLabel` | `createLabel(String s, Icon icon, int alignment)`
`static JLabel` | `createLabel(String s, int alignment)`
`static LabeledComponent` | `createLabeledScrollComponent(String label, JComponent basicComponent, Dimension preferredSize)`
`static LabeledComponent` | `createLabeledScrollComponent(String label, JComponent basicComponent, Dimension preferredSize, JComponent headerComponent, Collection headerButtons, JComponent footerComponent)`
`static JSplitPane` | `createLeftRightSplitPane()`
`static JSplitPane` | `createLeftRightSplitPane(boolean autoResize)`
`static JSplitPane` | `createLeftRightSplitPane(Component left, Component right)`
`static JSplitPane` | `createLeftRightSplitPane(Component left, Component right, boolean autoResize)`
`static JList` | `createList(Action action)`
`static JList` | `createList(Action action, boolean enableDragAndDrop)`
`static JFrame` | `createMainFrame()`
`static JMenu` | `createMenu()`
`static JMenu` | `createMenu(ResourceKey key)`
`static JMenu` | `createMenu(String text)`
`static JMenu` | `createMenu(String text, int mnemonic)`
`static JMenuItem` | `createMenuItem(String s)`
`static JPanel` | `createPanel()`
`static JPasswordField` | `createPasswordField()`
`static JRadioButton` | `createRadioButton(Action action)`
`static JRadioButton` | `createRadioButton(String string)`
`static JRadioButtonMenuItem` | `createRadioButtonMenuItem(Action action)`
`static JFileChooser` | `createSaveFileChooser(String title, String fileDescription, String fileExtension, boolean overwrite)`
`static JScrollPane` | `createScrollPane()`
`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 JLabel` | `createSmallFontLabel(String text)`
`static Border` | `createStandardBorder()`
`static JTabbedPane` | `createTabbedPane(boolean addBorder)`
`static JTable` | `createTable(Action action)`
`static JTextArea` | `createTextArea()`
`static JTextField` | `createTextField()`
`static JTextField` | `createTextField(String s)`
`static JTextPane` | `createTextPane()`
`static Border` | `createThinStandardBorder()`
`static JLabel` | `createTitleFontLabel(String text)`
`static JToggleButton` | `createToggleButton(Action action)`
`static JToolBar` | `createToolBar()`
`static JSplitPane` | `createTopBottomSplitPane()`
`static JSplitPane` | `createTopBottomSplitPane(boolean autoResize)`
`static JSplitPane` | `createTopBottomSplitPane(Component top, Component bottom)`
`static JSplitPane` | `createTopBottomSplitPane(Component top, Component bottom, boolean autoResize)`
`static JTree` | `createTree(Action action)`
`static JWindow` | `createWindow()`
`static JComponent` | `getCloseButtonPanel(JFrame frame)`
`static void` | `setPage(JEditorPane pane, URL url)`
`static JFrame` | `showInFrame(Component panel, String title)`
`static JFrame` | `showMessageInFrame(String message, String title)`
`static void` | `showTableRowInDialog(TableModel tableModel, int row, Component parentComp)`

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

See Also:
  Constant Field Values

### STANDARD_BUTTON_SIZE

    public static final Dimension STANDARD_BUTTON_SIZE

### LARGE_BUTTON_HEIGHT

    public static final int LARGE_BUTTON_HEIGHT

See Also:
  Constant Field Values

### STANDARD_FIELD_HEIGHT

    public static final int STANDARD_FIELD_HEIGHT

See Also:
  Constant Field Values

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(JToolBar toolBar,
                                                       Action action)

### addLargeToggleToolBarButton

    public static JToggleButton addLargeToggleToolBarButton(JToolBar toolBar,
                                                            Action action)

### addToggleToolBarButton

    public static JToggleButton addToggleToolBarButton(JToolBar toolBar,
                                                       Action action,
                                                       int width)

### addToolBarButton

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

### addToolBarButton

    public static JButton addToolBarButton(JToolBar bar,
                                           Action action)

### addLargeToolBarButton

    public static JButton addLargeToolBarButton(JToolBar bar,
                                                Action action)

### addToolBarButton

    public static JButton addToolBarButton(JToolBar bar,
                                           Action action,
                                           int width)

### configureTable

    public static void configureTable(JTable table)

### configureTree

    public static void configureTree(JTree tree,
                                     Action action)

### createButton

    public static JButton createButton(Action action)

### createCheckBox

    public static JCheckBox createCheckBox()

### createCheckBox

    public static JCheckBox createCheckBox(String s)

### createComboBox

    public static JComboBox createComboBox()

### createFileChooser

    public static JFileChooser createFileChooser(String description,
                                                 String extension)

### createFileChooser

    public static JFileChooser createFileChooser(String title,
                                                 String fileDescription,
                                                 String fileExtension)

### createFileChooser

    public static JFileChooser createFileChooser(String title,
                                                 ExtensionFilter extensionFilter)

### createSaveFileChooser

    public static JFileChooser createSaveFileChooser(String title,
                                                     String fileDescription,
                                                     String fileExtension,
                                                     boolean overwrite)

### createMainFrame

    public static JFrame createMainFrame()

### createFrame

    public static JFrame createFrame()

### createLabel

    public static JLabel createLabel()

### createLabel

    public static JLabel createLabel(String s)

### createLabel

    public static JLabel createLabel(Icon icon)

### createLabel

    public static JLabel createLabel(Icon icon,
                                     int alignment)

### createLabel

    public static JLabel createLabel(String s,
                                     int alignment)

### createLabel

    public static JLabel createLabel(String s,
                                     Icon icon,
                                     int alignment)

### createLabeledScrollComponent

    public static LabeledComponent createLabeledScrollComponent(String label,
                                                                JComponent basicComponent,
                                                                Dimension preferredSize)

### createLabeledScrollComponent

    public static LabeledComponent createLabeledScrollComponent(String label,
                                                                JComponent basicComponent,
                                                                Dimension preferredSize,
                                                                JComponent headerComponent,
                                                                Collection headerButtons,
                                                                JComponent footerComponent)

### createLeftRightSplitPane

    public static JSplitPane createLeftRightSplitPane()

### createLeftRightSplitPane

    public static JSplitPane createLeftRightSplitPane(boolean autoResize)

### createLeftRightSplitPane

    public static JSplitPane createLeftRightSplitPane(Component left,
                                                      Component right)

### createLeftRightSplitPane

    public static JSplitPane createLeftRightSplitPane(Component left,
                                                      Component right,
                                                      boolean autoResize)

### createList

    public static JList createList(Action action)

### createList

    public static JList createList(Action action,
                                   boolean enableDragAndDrop)

### createMenuItem

    public static JMenuItem createMenuItem(String s)

### createMenu

    public static JMenu createMenu()

### createMenu

    public static JMenu createMenu(String text)

### createMenu

    public static JMenu createMenu(ResourceKey key)

### createMenu

    public static JMenu createMenu(String text,
                                   int mnemonic)

### createPanel

    public static JPanel createPanel()

### createPasswordField

    public static JPasswordField createPasswordField()

### createRadioButton

    public static JRadioButton createRadioButton(String string)

### createRadioButton

    public static JRadioButton createRadioButton(Action action)

### createRadioButtonMenuItem

    public static JRadioButtonMenuItem createRadioButtonMenuItem(Action action)

### createCheckBoxMenuItem

    public static JCheckBoxMenuItem createCheckBoxMenuItem(Action action,
                                                           boolean selected)

### addCheckBoxMenuItem

    public static JCheckBoxMenuItem addCheckBoxMenuItem(JMenu menu,
                                                        Action action,
                                                        boolean selected)

### createScrollPane

    public static JScrollPane createScrollPane()

### 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()

### createThinStandardBorder

    public static Border createThinStandardBorder()

### createTabbedPane

    public static JTabbedPane createTabbedPane(boolean addBorder)

### createTable

    public static JTable createTable(Action action)

### createTextArea

    public static JTextArea createTextArea()

### createTextField

    public static JTextField createTextField(String s)

### 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(boolean autoResize)

### createTopBottomSplitPane

    public static JSplitPane createTopBottomSplitPane()

### createTopBottomSplitPane

    public static JSplitPane createTopBottomSplitPane(Component top,
                                                      Component bottom)

### createTopBottomSplitPane

    public static JSplitPane createTopBottomSplitPane(Component top,
                                                      Component bottom,
                                                      boolean autoResize)

### createTree

    public static JTree createTree(Action action)

### createWindow

    public static JWindow createWindow()

### getCloseButtonPanel

    public static JComponent getCloseButtonPanel(JFrame frame)

### showInFrame

    public static JFrame showInFrame(Component panel,
                                     String title)

### showMessageInFrame

    public static JFrame showMessageInFrame(String message,
                                            String title)

### showTableRowInDialog

    public static void showTableRowInDialog(TableModel tableModel,
                                            int row,
                                            Component parentComp)

### createEditorPane

    public static JEditorPane createEditorPane()

### createHTMLBrowser

    public static JEditorPane createHTMLBrowser(URL url)

### setPage

    public static void setPage(JEditorPane pane,
                               URL url)

### createSmallFontLabel

    public static JLabel createSmallFontLabel(String text)

### createTitleFontLabel

    public static JLabel createTitleFontLabel(String text)

Overview | Package | Class | Tree | Deprecated | Index | Help
| Protege 3.5 alpha
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Submit a bug report or feature request
Protégé is a trademark of Stanford University.
Copyright (c) 1998-2012 Stanford University.