1 package cz
.cvut
.promod
.services
.componentFactoryService
;
3 import cz
.cvut
.promod
.services
.Service
;
6 import javax
.swing
.tree
.TreeNode
;
9 import com
.jidesoft
.swing
.JideButton
;
10 import com
.jidesoft
.swing
.JideToggleButton
;
11 import com
.jidesoft
.swing
.ButtonStyle
;
12 import com
.jidesoft
.grid
.PropertyTable
;
13 import com
.jidesoft
.pane
.OutlookTabbedPane
;
14 import com
.jidesoft
.status
.StatusBar
;
15 import com
.jidesoft
.status
.LabelStatusBarItem
;
16 import com
.jidesoft
.status
.ButtonStatusBarItem
;
19 * ProMod, master thesis project
20 * User: Petr Zverina, petr.zverina@gmail.com
21 * Date: 16:21:11, 10.10.2009
23 public class ComponentFactoryServiceImpl
implements Service
, ComponentFactoryService
{
26 public boolean check() {
27 // no tests required for this service
32 public JComboBox
createComboBox(){
33 return new JComboBox();
37 public JSpinner
createSpinner(){
38 return new JSpinner();
42 public JTextArea
createTextArea(){
43 return new JTextArea();
47 public JTextField
createTextField(){
48 return new JTextField();
52 public JTextField
createTextField(final String text
){
53 return new JTextField(text
);
57 public JSlider
createSlider(){
62 public JLabel
createLabel(final String text
){
63 return new JLabel(text
);
67 public JTree
createTree(){
72 public JTree
createTree(final TreeNode node
) {
73 return new JTree(node
);
77 public JScrollPane
createScrollPane(final Component component
){
78 return new JScrollPane(component
);
82 public JCheckBox
createCheckBox(){
83 return new JCheckBox();
87 public JMenuBar
createMenuBar(){
88 return new JMenuBar();
92 public JToolBar
createToolBar(){
93 return new JToolBar();
97 public JMenu
createMenu(final String text
){
98 return new JMenu(text
);
102 public JPopupMenu
createPopupMenu(){
103 return new JPopupMenu();
107 public JMenuItem
createMenuItem(final String text
){
108 return new JMenuItem(text
);
112 public JButton
createButton(final String text
, final Icon icon
){
113 return new JButton(text
, icon
);
117 public JToggleButton
createToggleButton(final String text
, final Icon icon
){
118 return new JToggleButton(text
, icon
);
122 public JideButton
createJideButton( final String text
, final Icon icon
, int orientation
){
123 JideToggleButton button
= new JideToggleButton(text
, icon
);
124 button
.setButtonStyle(ButtonStyle
.TOOLBOX_STYLE
);
125 button
.setOrientation(orientation
);
131 public JPanel
createPanel(){
136 public JList
createList(){
141 public JTable
createTable(){
146 public PropertyTable
createPropertyTable() {
147 return new PropertyTable();
150 public OutlookTabbedPane
createOutlookTabbedPane() {
151 return new OutlookTabbedPane();
155 public StatusBar
createStatusBar() {
156 return new StatusBar();
160 public LabelStatusBarItem
createLabelStatusBarItem() {
161 return new LabelStatusBarItem();
165 public ButtonStatusBarItem
createButtonStatusBarItem() {
166 return new ButtonStatusBarItem();
170 public JColorChooser
createColorChooser() {
171 return new JColorChooser();
175 public JRadioButton
createRadioButton(final String text
) {
176 return new JRadioButton(text
);
180 public JTabbedPane
createTabbedPane() {
181 return new JTabbedPane();