public class DefaultWidgetFactory extends Object implements WidgetFactory
DefaultWidgetFactory
and override the "create"-methods for each element.Constructor and Description |
---|
DefaultWidgetFactory() |
Modifier and Type | Method and Description |
---|---|
Container |
create(String pWidgetTypeName,
org.jdom2.Element pElement,
Container pParent)
Called be the
VisualBuilderDelegate in order to
create a specific Swing-Element |
protected JButton |
createButton(org.jdom2.Element pElement) |
protected JCheckBox |
createCheckBox(org.jdom2.Element pElement) |
protected JMenuItem |
createCheckBoxMenuItem(org.jdom2.Element pElement) |
protected JComboBox |
createComboBox(org.jdom2.Element pElement) |
protected JDialog |
createDialog(org.jdom2.Element pElement,
Container pParent) |
protected JFrame |
createFrame(org.jdom2.Element pElement) |
protected JLabel |
createLabel(org.jdom2.Element pElement) |
protected JList |
createList(org.jdom2.Element pElement) |
protected JMenu |
createMenu(org.jdom2.Element pElement) |
protected JMenuBar |
createMenubar(org.jdom2.Element pElement) |
protected JMenuItem |
createMenuItem(org.jdom2.Element pElement) |
protected JPanel |
createPanel(org.jdom2.Element pElement) |
protected JPasswordField |
createPasswordField(org.jdom2.Element pElement) |
protected JPopupMenu |
createPopup(org.jdom2.Element pElement) |
protected JRadioButton |
createRadioButton(org.jdom2.Element pElement) |
protected JScrollPane |
createScrollPane(org.jdom2.Element pElement) |
protected JSeparator |
createSeparator(org.jdom2.Element pElement) |
protected TitledSeparator |
createSeparatorPanel(org.jdom2.Element pElement) |
protected JSlider |
createSlider(org.jdom2.Element pElement) |
protected JSpinner |
createSpinner(org.jdom2.Element pElement) |
protected JSplitPane |
createSplitPane(org.jdom2.Element pElement) |
protected JTabbedPane |
createTabbedPane(org.jdom2.Element pElement) |
protected JTable |
createTable(org.jdom2.Element pElement) |
protected JTextArea |
createTextArea(org.jdom2.Element pElement) |
protected JTextField |
createTextField(org.jdom2.Element pElement) |
protected JToggleButton |
createToggleButton(org.jdom2.Element pElement) |
protected JToolBar |
createToolbar(org.jdom2.Element pElement) |
protected JTree |
createTree(org.jdom2.Element pElement) |
void |
notifyWidgetComplete(String pType,
org.jdom2.Element pElement,
Container pCurrentWidget)
Called when the creation process of the widget is completed.
|
public Container create(String pWidgetTypeName, org.jdom2.Element pElement, Container pParent)
WidgetFactory
VisualBuilderDelegate
in order to
create a specific Swing-Elementcreate
in interface WidgetFactory
pWidgetTypeName
- the type of the Swing-Element that should be created. The name of
the Swing-class ist used as the type-argument. F.i., for the creation of
a JTable
-Elememnt, the pType-argument would be "javax.swing.JTable"pElement
- the XML-element in which the declaration of the Swing element is
included.pParent
- the parent container to the element that should be created.public void notifyWidgetComplete(String pType, org.jdom2.Element pElement, Container pCurrentWidget)
WidgetFactory
notifyWidgetComplete
in interface WidgetFactory
pType
- the type of the Swing-Element that was created.pElement
- the XML-element in which the declaration of the Swing element is
included.pCurrentWidget
- the widget that was completed.protected JFrame createFrame(org.jdom2.Element pElement)
protected JPanel createPanel(org.jdom2.Element pElement)
protected JButton createButton(org.jdom2.Element pElement)
protected JLabel createLabel(org.jdom2.Element pElement)
protected JRadioButton createRadioButton(org.jdom2.Element pElement)
protected JToggleButton createToggleButton(org.jdom2.Element pElement)
protected JCheckBox createCheckBox(org.jdom2.Element pElement)
protected JTextField createTextField(org.jdom2.Element pElement)
protected JPasswordField createPasswordField(org.jdom2.Element pElement)
protected JTextArea createTextArea(org.jdom2.Element pElement)
protected JComboBox createComboBox(org.jdom2.Element pElement)
protected JSlider createSlider(org.jdom2.Element pElement)
protected JSplitPane createSplitPane(org.jdom2.Element pElement)
protected JScrollPane createScrollPane(org.jdom2.Element pElement)
protected JTabbedPane createTabbedPane(org.jdom2.Element pElement)
protected JList createList(org.jdom2.Element pElement)
protected JTable createTable(org.jdom2.Element pElement)
protected JTree createTree(org.jdom2.Element pElement)
protected JSeparator createSeparator(org.jdom2.Element pElement)
protected TitledSeparator createSeparatorPanel(org.jdom2.Element pElement)
protected JMenuBar createMenubar(org.jdom2.Element pElement)
protected JMenu createMenu(org.jdom2.Element pElement)
protected JMenuItem createMenuItem(org.jdom2.Element pElement)
protected JMenuItem createCheckBoxMenuItem(org.jdom2.Element pElement)
protected JToolBar createToolbar(org.jdom2.Element pElement)
protected JPopupMenu createPopup(org.jdom2.Element pElement)
protected JSpinner createSpinner(org.jdom2.Element pElement)
Copyright © 2017 Jürgen Zeller (privat). All rights reserved.