|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.lenkaspace.creeper.view.CRComponentFactory
public class CRComponentFactory
Provides static functions for creating components. Use e.g. by CRControlPanel
| Constructor Summary | |
|---|---|
CRComponentFactory()
|
|
| Method Summary | |
|---|---|
static javax.swing.JPanel |
createDividerJPanel(int width_,
int spaceAround_,
java.awt.Container parent_)
Create a horizontal line to divide components |
static javax.swing.JPanel |
createFlowLayoutJPanel(int width_,
int height_,
java.awt.Container parent_)
Create a JPanel with FlowLayout.LEFT and optionally add it to a Container |
static javax.swing.JButton |
createJButton(java.lang.String buttonText_,
java.awt.event.ActionListener actionListener_,
java.awt.Container parent_)
Create a JButton that will resize with text and optionally add it to a Container |
static javax.swing.JCheckBox |
createJCheckBox(java.lang.String text_,
boolean isSelected_,
java.awt.event.ActionListener actionListener_,
java.awt.Container parent_)
Create a JCheckBox and optionally add it to a Container |
static javax.swing.JComboBox |
createJComboBox(int width_,
java.lang.String[] items_,
int selectedIndex_,
java.awt.event.ActionListener actionListener_,
java.awt.Container parent_)
Create a JComboBox and optionally add it to a Container |
static javax.swing.JLabel |
createJLabel(java.lang.String text_,
java.awt.Container parent_)
Create a JLabel and optionally add it to a Container |
static javax.swing.JSlider |
createJSlider(int width_,
int min_,
int max_,
int value_,
javax.swing.event.ChangeListener changeListener_,
java.awt.Container parent_)
Create a JSlider and optionally add it to a Container |
static javax.swing.JTextField |
createJTextField(java.lang.String defaultVal_,
int width_,
java.awt.Container parent_)
Create JTextField |
static javax.swing.JTextPane |
createJTextPane(java.lang.String text_,
int width_,
int height_,
java.awt.Container parent_)
Create a JTextPane (multiline output text) and optionally add it to a container |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CRComponentFactory()
| Method Detail |
|---|
public static javax.swing.JButton createJButton(java.lang.String buttonText_,
java.awt.event.ActionListener actionListener_,
java.awt.Container parent_)
buttonText_ - String text of the buttonactionListener_ - ActionListener action listener. Can be null.parent_ - Container instance to add the new component to. Can be null.
public static javax.swing.JTextField createJTextField(java.lang.String defaultVal_,
int width_,
java.awt.Container parent_)
defaultVal_ - String default value of the text fieldwidth_ - int widthparent_ - Container instance to add the new component to. Can be null.
public static javax.swing.JCheckBox createJCheckBox(java.lang.String text_,
boolean isSelected_,
java.awt.event.ActionListener actionListener_,
java.awt.Container parent_)
text_ - String text to the check boxisSelected_ - boolean set true to pre-selectactionListener_ - ActionListener action listener. Can be null.parent_ - Container instance to add the new component to. Can be null.
public static javax.swing.JSlider createJSlider(int width_,
int min_,
int max_,
int value_,
javax.swing.event.ChangeListener changeListener_,
java.awt.Container parent_)
width_ - int width of the panel. Set to < 0 to set the width according to the width of the parent Containermin_ - int minimum valuemax_ - int maximum valuevalue_ - int default valuechangeListener_ - ChangeListener listener object. Can be null.parent_ - Container instance to add the new component to. Can be null.
public static javax.swing.JComboBox createJComboBox(int width_,
java.lang.String[] items_,
int selectedIndex_,
java.awt.event.ActionListener actionListener_,
java.awt.Container parent_)
width_ - int width of the panel. Set to < 0 to set the width according to the width of the parent Containeritems_ - String[] items in the combo boxselectedIndex_ - int preselected item indexactionListener_ - ActionListener action listener. Can be null.parent_ - Container instance to add the new component to. Can be null.
public static javax.swing.JLabel createJLabel(java.lang.String text_,
java.awt.Container parent_)
text_ - String text for the labelparent_ - Container instance to add the new component to. Can be null.
public static javax.swing.JTextPane createJTextPane(java.lang.String text_,
int width_,
int height_,
java.awt.Container parent_)
text_ - String textwidth_ - int width of the panel. Set to < 0 to set the width according to the width of the parent Containerheight_ - int height of the panel. Set to < 0 to set the width according to the height of the parent Containerparent_ - Container instance to add the new component to. Can be null.
public static javax.swing.JPanel createFlowLayoutJPanel(int width_,
int height_,
java.awt.Container parent_)
width_ - int width of the panel. Set to < 0 to set the width according to the width of the parent Containerheight_ - int height of the panelparent_ - Container instance to add the new component to. Can be null.
public static javax.swing.JPanel createDividerJPanel(int width_,
int spaceAround_,
java.awt.Container parent_)
width_ - int width of the panel. Set to < 0 to set the width according to the width of the parent ContainerspaceAround_ - space above and under the lineparent_ - Container instance to add the new component to. Can be null.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||