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 , Monica Crubezy
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 JToggleButton |
addToolBarToggleButton(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 JEditorPane |
createEditorPane()
|
static FakeToolBar |
createFakeToolBar()
|
static FakeToolBar |
createFakeToolBar(Dimension d)
|
static JFileChooser |
createFileChooser(String description,
String extension)
|
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,
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(JComponent left,
JComponent right)
|
static JList |
createList(Action action)
|
static JList |
createList(Action action,
boolean enableDragAndDrop)
|
static JFrame |
createMainFrame()
|
static JMenu |
createMenu()
|
static JMenu |
createMenu(String text)
|
static JMenuItem |
createMenuItem(String s)
|
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 JSplitPane |
createTopBottomSplitPane(JComponent top,
JComponent bottom)
|
static JTree |
createTree(Action action)
|
static JWindow |
createWindow()
|
static JComponent |
getCloseButtonPanel(JFrame frame)
|
static void |
removeToolBarButton(FakeToolBar toolBar,
JButton button)
|
static void |
setPage(JEditorPane pane,
URL url)
|
static void |
setToolbarButtonBorder(AbstractButton 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 |
STANDARD_BUTTON_HEIGHT
public static final int STANDARD_BUTTON_HEIGHT
- See Also:
- Constant Field Values
STANDARD_BUTTON_WIDTH
public static final int STANDARD_BUTTON_WIDTH
- See Also:
- Constant Field Values
STANDARD_FIELD_HEIGHT
public static final int STANDARD_FIELD_HEIGHT
- See Also:
- Constant Field Values
STANDARD_BUTTON_SIZE
public static final Dimension STANDARD_BUTTON_SIZE
SMALL_BUTTON_HEIGHT
public static final int SMALL_BUTTON_HEIGHT
- See Also:
- Constant Field Values
SMALL_BUTTON_WIDTH
public static final int SMALL_BUTTON_WIDTH
- See Also:
- Constant Field Values
SMALL_BUTTON_SIZE
public static final Dimension SMALL_BUTTON_SIZE
ComponentFactory
public ComponentFactory()
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)
addToolBarToggleButton
public static JToggleButton addToolBarToggleButton(JToolBar bar,
Action action)
setToolbarButtonBorder
public static void setToolbarButtonBorder(AbstractButton button)
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)
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)
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)
createTopBottomSplitPane
public static JSplitPane createTopBottomSplitPane(JComponent top,
JComponent bottom)
createLeftRightSplitPane
public static JSplitPane createLeftRightSplitPane(JComponent left,
JComponent right)
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)
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)
createEditorPane
public static JEditorPane createEditorPane()
createHTMLBrowser
public static JEditorPane createHTMLBrowser(URL url)
setPage
public static void setPage(JEditorPane pane,
URL url)
Submit a bug report or feature request
Protégé is a trademark of Stanford University.
Copyright (c) 1998-2004 Stanford University.