New Jide License
[indepmod/experimental.git] / IndependentModeler / src / cz / cvut / promod / services / componentFactoryService / ComponentFactoryServiceImpl.java
blobe91e17b16416b3e12668701fccfcb0f650da2773
1 package cz.cvut.promod.services.componentFactoryService;
3 import cz.cvut.promod.services.Service;
5 import javax.swing.*;
6 import javax.swing.tree.TreeNode;
7 import java.awt.*;
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;
18 /**
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{
25 /** {@inheritDoc} */
26 public boolean check() {
27 // no tests required for this service
28 return true;
31 /** {@inheritDoc} */
32 public JComboBox createComboBox(){
33 return new JComboBox();
36 /** {@inheritDoc} */
37 public JSpinner createSpinner(){
38 return new JSpinner();
41 /** {@inheritDoc} */
42 public JTextArea createTextArea(){
43 return new JTextArea();
46 /** {@inheritDoc} */
47 public JTextField createTextField(){
48 return new JTextField();
51 /** {@inheritDoc} */
52 public JTextField createTextField(final String text){
53 return new JTextField(text);
56 /** {@inheritDoc} */
57 public JSlider createSlider(){
58 return new JSlider();
61 /** {@inheritDoc} */
62 public JLabel createLabel(final String text){
63 return new JLabel(text);
66 /** {@inheritDoc} */
67 public JTree createTree(){
68 return new JTree();
71 /** {@inheritDoc} */
72 public JTree createTree(final TreeNode node) {
73 return new JTree(node);
76 /** {@inheritDoc} */
77 public JScrollPane createScrollPane(final Component component){
78 return new JScrollPane(component);
81 /** {@inheritDoc} */
82 public JCheckBox createCheckBox(){
83 return new JCheckBox();
86 /** {@inheritDoc} */
87 public JMenuBar createMenuBar(){
88 return new JMenuBar();
91 /** {@inheritDoc} */
92 public JToolBar createToolBar(){
93 return new JToolBar();
96 /** {@inheritDoc} */
97 public JMenu createMenu(final String text){
98 return new JMenu(text);
101 /** {@inheritDoc} */
102 public JPopupMenu createPopupMenu(){
103 return new JPopupMenu();
106 /** {@inheritDoc} */
107 public JMenuItem createMenuItem(final String text){
108 return new JMenuItem(text);
111 /** {@inheritDoc} */
112 public JButton createButton(final String text, final Icon icon){
113 return new JButton(text, icon);
116 /** {@inheritDoc} */
117 public JToggleButton createToggleButton(final String text, final Icon icon){
118 return new JToggleButton(text, icon);
121 /** {@inheritDoc} */
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);
127 return button;
130 /** {@inheritDoc} */
131 public JPanel createPanel(){
132 return new JPanel();
135 /** {@inheritDoc} */
136 public JList createList(){
137 return new JList();
140 /** {@inheritDoc} */
141 public JTable createTable(){
142 return new JTable();
145 /** {@inheritDoc} */
146 public PropertyTable createPropertyTable() {
147 return new PropertyTable();
150 public OutlookTabbedPane createOutlookTabbedPane() {
151 return new OutlookTabbedPane();
154 /** {@inheritDoc} */
155 public StatusBar createStatusBar() {
156 return new StatusBar();
159 /** {@inheritDoc} */
160 public LabelStatusBarItem createLabelStatusBarItem() {
161 return new LabelStatusBarItem();
164 /** {@inheritDoc} */
165 public ButtonStatusBarItem createButtonStatusBarItem() {
166 return new ButtonStatusBarItem();
169 /** {@inheritDoc} */
170 public JColorChooser createColorChooser() {
171 return new JColorChooser();
174 /** {@inheritDoc} */
175 public JRadioButton createRadioButton(final String text) {
176 return new JRadioButton(text);
179 /** {@inheritDoc} */
180 public JTabbedPane createTabbedPane() {
181 return new JTabbedPane();