[Buix-commits] r1515 - in trunk/guix-test-swing: . src/main/java/org/nuiton/guix
Author: kmorin Date: 2009-07-23 12:51:30 +0200 (Thu, 23 Jul 2009) New Revision: 1515 Removed: trunk/guix-test-swing/src/main/java/org/nuiton/guix/GuixDemoAbstract.java Modified: trunk/guix-test-swing/pom.xml Log: Update the example Modified: trunk/guix-test-swing/pom.xml =================================================================== --- trunk/guix-test-swing/pom.xml 2009-07-23 10:51:11 UTC (rev 1514) +++ trunk/guix-test-swing/pom.xml 2009-07-23 10:51:30 UTC (rev 1515) @@ -30,10 +30,6 @@ <groupId>org.springframework</groupId> <artifactId>spring-beans</artifactId> </dependency> - <dependency> - <groupId>net.java.dev.beansbinding</groupId> - <artifactId>beansbinding</artifactId> - </dependency> <dependency> <groupId>junit</groupId> @@ -72,9 +68,23 @@ <!-- *** Build Environment ************************************** --> <!-- ************************************************************* --> - - <build> + <resources> + <resource> + <directory>src/main/java</directory> + <includes> + <include>**/*.guix</include> + <include>**/*.jaxx</include> + </includes> + </resource> + <resource> + <directory>src/main/resources</directory> + <includes> + <include>**/*</include> + </includes> + </resource> + </resources> + <pluginManagement> <plugins> @@ -100,8 +110,8 @@ <artifactId>maven-guix-plugin</artifactId> <version>${project.version}</version> <configuration> - <guixFilesDir>guix-test-swing/src/main/java/org/nuiton/guix/demo/</guixFilesDir> - <targetDirectory>guix-test-swing/target/generatedFiles/</targetDirectory> + <guixFilesDir>${project.basedir}/src/main/java/org/nuiton/guix/demo/</guixFilesDir> + <targetDirectory>${project.basedir}/target/generatedFiles/</targetDirectory> <rootPackage>org.nuiton.guix</rootPackage> <mainClass>org.nuiton.guix.GuixDemo</mainClass> <launcherName>Main</launcherName> @@ -109,9 +119,8 @@ </configuration> <executions> <execution> - <phase>compile</phase> <goals> - <goal>testMojo</goal> + <goal>generate</goal> </goals> </execution> </executions> Deleted: trunk/guix-test-swing/src/main/java/org/nuiton/guix/GuixDemoAbstract.java =================================================================== --- trunk/guix-test-swing/src/main/java/org/nuiton/guix/GuixDemoAbstract.java 2009-07-23 10:51:11 UTC (rev 1514) +++ trunk/guix-test-swing/src/main/java/org/nuiton/guix/GuixDemoAbstract.java 2009-07-23 10:51:30 UTC (rev 1515) @@ -1,806 +0,0 @@ -package org.nuiton.guix; - -import java.util.ArrayList; -import javax.swing.JMenuBar; -import javax.swing.JMenu; -import javax.swing.JMenuItem; -import javax.swing.JToolBar; -import javax.swing.JButton; -import javax.swing.JTabbedPane; -import javax.swing.JPanel; -import javax.swing.JTextField; -import javax.swing.JLabel; -import org.nuiton.guix.GuixDemo3Abstract; -import org.nuiton.guix.GuixDemo2Abstract; -import java.awt.Button; -import java.awt.event.ActionListener; -import java.awt.event.ActionEvent; -import java.awt.BorderLayout; - -/** - * test javadoc Application - */ -public abstract class GuixDemoAbstract extends javax.swing.JFrame implements GuixDemo { - private javax.swing.JButton $Button6; - private javax.swing.JButton $Button7; - private javax.swing.JToolBar $JToolBar5; - private javax.swing.JMenu $Menu2; - private javax.swing.JMenu $Menu4; - private javax.swing.JMenuBar $MenuBar1; - private javax.swing.JMenuItem $MenuItem3; - /** - * List of the active bindings - */ - private java.util.List<String> activeBindings = new java.util.ArrayList<String>(); - private javax.swing.JButton bouton1; - private org.nuiton.guix.GuixDemo3Abstract bt3; - private org.nuiton.guix.GuixDemo3Abstract bt31; - private org.nuiton.guix.GuixDemo3Abstract bt32; - private org.nuiton.guix.GuixDemo3Abstract bt34; - private java.util.ArrayList controller; - private org.nuiton.guix.GuixDemo2Abstract gd2; - private org.nuiton.guix.GuixDemo2Abstract gd22; - /** - * test javadoc Application - */ - private org.nuiton.guix.GuixDemoAbstract guixdemo = this; - private javax.swing.JMenuItem item1; - private javax.swing.JLabel label; - private javax.swing.JLabel label2; - private javax.swing.JLabel label3; - private javax.swing.JTabbedPane tabPanel; - private javax.swing.JPanel table; - /** - * javadoc textfield - */ - private javax.swing.JTextField textfield; - - /* begin raw body code */ - - private Button b = new Button("test"); - public enum Day { - SUNDAY, MONDAY, TUESDAY, WEDNESDAY, - THURSDAY, FRIDAY, SATURDAY - } - - /* end raw body code */ - - /*---------------------------------------------------------------------------------*/ - /*-- Statics methods --------------------------------------------------------------*/ - /*---------------------------------------------------------------------------------*/ - - public static void testSameName() { - System.out.println("load the script file with the same name"); - } - - /*---------------------------------------------------------------------------------*/ - /*-- Constructors -----------------------------------------------------------------*/ - /*---------------------------------------------------------------------------------*/ - - /** - * Constructor - */ - public GuixDemoAbstract() { - initialize(); - } - - /*---------------------------------------------------------------------------------*/ - /*-- JAXXObject implementation ----------------------------------------------------*/ - /*---------------------------------------------------------------------------------*/ - - public void applyDataBinding(String _binding) { - if("textfield.enabled".equals(_binding)) { - if(getGd2() != null) { - getGd2().addPropertyChangeListener(new java.beans.PropertyChangeListener() { - public void propertyChange(java.beans.PropertyChangeEvent arg0) { - onChangeFromgetGd2getButtonisSelected(); - } - }); - } - if(getGd2() != null && getGd2().getButton() != null) { - getGd2().getButton().addPropertyChangeListener(new java.beans.PropertyChangeListener() { - public void propertyChange(java.beans.PropertyChangeEvent arg0) { - onChangeFromgetGd2getButtonisSelected(); - } - }); - } - if(getGd2() != null && getGd2().getButton() != null) { - getGd2().getButton().getModel().addChangeListener(new javax.swing.event.ChangeListener() { - public void stateChanged(javax.swing.event.ChangeEvent arg0) { - onChangeFromgetGd2getButtonisSelected(); - } - }); - } - if(getGd22() != null) { - getGd22().addPropertyChangeListener(new java.beans.PropertyChangeListener() { - public void propertyChange(java.beans.PropertyChangeEvent arg0) { - onChangeFromgetGd22getButtonisSelected(); - } - }); - } - if(getGd22() != null && getGd22().getButton() != null) { - getGd22().getButton().addPropertyChangeListener(new java.beans.PropertyChangeListener() { - public void propertyChange(java.beans.PropertyChangeEvent arg0) { - onChangeFromgetGd22getButtonisSelected(); - } - }); - } - if(getGd22() != null && getGd22().getButton() != null) { - getGd22().getButton().getModel().addChangeListener(new javax.swing.event.ChangeListener() { - public void stateChanged(javax.swing.event.ChangeEvent arg0) { - onChangeFromgetGd22getButtonisSelected(); - } - }); - } - } - else if("label.text".equals(_binding)) { - if(getTextfield() != null) { - getTextfield().addPropertyChangeListener(new java.beans.PropertyChangeListener() { - public void propertyChange(java.beans.PropertyChangeEvent arg0) { - onChangeFromtextfieldgetText(); - } - }); - } - if(getTextfield() != null) { - getTextfield().getDocument().addDocumentListener(new javax.swing.event.DocumentListener() { - public void insertUpdate(javax.swing.event.DocumentEvent arg0) { - onChangeFromtextfieldgetText(); - } - public void removeUpdate(javax.swing.event.DocumentEvent arg0) { - onChangeFromtextfieldgetText(); - } - public void changedUpdate(javax.swing.event.DocumentEvent arg0) { - onChangeFromtextfieldgetText(); - } - }); - } - } - - processDataBinding(_binding); - } - - public void firePropertyChange(String name, Object oldValue, Object newValue) { - super.firePropertyChange(name, oldValue, newValue); - } - - public void processDataBinding(String _binding) { - if (activeBindings.contains(_binding)) { - return; - } - activeBindings.add(_binding); - try{ - if("textfield.enabled".equals(_binding)) { - textfield.setEnabled(getGd2().getButton().isSelected() && getGd22().getButton().isSelected()); - } - else if("label.text".equals(_binding)) { - label.setText("label : " + textfield.getText()); - } - - } finally { - activeBindings.remove(_binding); - } - } - - public void removeDataBinding(String _binding) { - if("textfield.enabled".equals(_binding)) { - if(getGd2() != null) { - getGd2().removePropertyChangeListener(new java.beans.PropertyChangeListener() { - public void propertyChange(java.beans.PropertyChangeEvent arg0) { - onChangeFromgetGd2getButtonisSelected(); - } - }); - } - if(getGd2() != null && getGd2().getButton() != null) { - getGd2().getButton().removePropertyChangeListener(new java.beans.PropertyChangeListener() { - public void propertyChange(java.beans.PropertyChangeEvent arg0) { - onChangeFromgetGd2getButtonisSelected(); - } - }); - } - if(getGd2() != null && getGd2().getButton() != null) { - getGd2().getButton().getModel().removeChangeListener(new javax.swing.event.ChangeListener() { - public void stateChanged(javax.swing.event.ChangeEvent arg0) { - onChangeFromgetGd2getButtonisSelected(); - } - }); - } - if(getGd22() != null) { - getGd22().removePropertyChangeListener(new java.beans.PropertyChangeListener() { - public void propertyChange(java.beans.PropertyChangeEvent arg0) { - onChangeFromgetGd22getButtonisSelected(); - } - }); - } - if(getGd22() != null && getGd22().getButton() != null) { - getGd22().getButton().removePropertyChangeListener(new java.beans.PropertyChangeListener() { - public void propertyChange(java.beans.PropertyChangeEvent arg0) { - onChangeFromgetGd22getButtonisSelected(); - } - }); - } - if(getGd22() != null && getGd22().getButton() != null) { - getGd22().getButton().getModel().removeChangeListener(new javax.swing.event.ChangeListener() { - public void stateChanged(javax.swing.event.ChangeEvent arg0) { - onChangeFromgetGd22getButtonisSelected(); - } - }); - } - } - else if("label.text".equals(_binding)) { - if(getTextfield() != null) { - getTextfield().removePropertyChangeListener(new java.beans.PropertyChangeListener() { - public void propertyChange(java.beans.PropertyChangeEvent arg0) { - onChangeFromtextfieldgetText(); - } - }); - } - if(getTextfield() != null) { - getTextfield().getDocument().removeDocumentListener(new javax.swing.event.DocumentListener() { - public void insertUpdate(javax.swing.event.DocumentEvent arg0) { - onChangeFromtextfieldgetText(); - } - public void removeUpdate(javax.swing.event.DocumentEvent arg0) { - onChangeFromtextfieldgetText(); - } - public void changedUpdate(javax.swing.event.DocumentEvent arg0) { - onChangeFromtextfieldgetText(); - } - }); - } - } - } - - /*---------------------------------------------------------------------------------*/ - /*-- public acessor methods -------------------------------------------------------*/ - /*---------------------------------------------------------------------------------*/ - - public javax.swing.JButton get$Button6() { - return $Button6; - } - - public javax.swing.JButton get$Button7() { - return $Button7; - } - - public javax.swing.JToolBar get$JToolBar5() { - return $JToolBar5; - } - - public javax.swing.JMenu get$Menu2() { - return $Menu2; - } - - public javax.swing.JMenu get$Menu4() { - return $Menu4; - } - - public javax.swing.JMenuBar get$MenuBar1() { - return $MenuBar1; - } - - public javax.swing.JMenuItem get$MenuItem3() { - return $MenuItem3; - } - - public java.util.List<String> getActiveBindings() { - return activeBindings; - } - - public javax.swing.JButton getBouton1() { - return bouton1; - } - - public org.nuiton.guix.GuixDemo3Abstract getBt3() { - return bt3; - } - - public org.nuiton.guix.GuixDemo3Abstract getBt31() { - return bt31; - } - - public org.nuiton.guix.GuixDemo3Abstract getBt32() { - return bt32; - } - - public org.nuiton.guix.GuixDemo3Abstract getBt34() { - return bt34; - } - - public java.util.ArrayList getController() { - return controller; - } - - public org.nuiton.guix.GuixDemo2Abstract getGd2() { - return gd2; - } - - public org.nuiton.guix.GuixDemo2Abstract getGd22() { - return gd22; - } - - public org.nuiton.guix.GuixDemoAbstract getGuixdemo() { - return guixdemo; - } - - public javax.swing.JMenuItem getItem1() { - return item1; - } - - public javax.swing.JLabel getLabel() { - return label; - } - - public javax.swing.JLabel getLabel2() { - return label2; - } - - public javax.swing.JLabel getLabel3() { - return label3; - } - - public javax.swing.JTabbedPane getTabPanel() { - return tabPanel; - } - - public javax.swing.JPanel getTable() { - return table; - } - - public javax.swing.JTextField getTextfield() { - return textfield; - } - - /*---------------------------------------------------------------------------------*/ - /*-- public mutator methods -------------------------------------------------------*/ - /*---------------------------------------------------------------------------------*/ - - public void set$Button6(javax.swing.JButton newValue) { - this.$Button6 = newValue; - } - - public void set$Button7(javax.swing.JButton newValue) { - this.$Button7 = newValue; - } - - public void set$JToolBar5(javax.swing.JToolBar newValue) { - this.$JToolBar5 = newValue; - } - - public void set$Menu2(javax.swing.JMenu newValue) { - this.$Menu2 = newValue; - } - - public void set$Menu4(javax.swing.JMenu newValue) { - this.$Menu4 = newValue; - } - - public void set$MenuBar1(javax.swing.JMenuBar newValue) { - this.$MenuBar1 = newValue; - } - - public void set$MenuItem3(javax.swing.JMenuItem newValue) { - this.$MenuItem3 = newValue; - } - - public void setBouton1(javax.swing.JButton newValue) { - this.bouton1 = newValue; - } - - public void setBt3(org.nuiton.guix.GuixDemo3Abstract newValue) { - this.bt3 = newValue; - } - - public void setBt31(org.nuiton.guix.GuixDemo3Abstract newValue) { - this.bt31 = newValue; - } - - public void setBt32(org.nuiton.guix.GuixDemo3Abstract newValue) { - this.bt32 = newValue; - } - - public void setBt34(org.nuiton.guix.GuixDemo3Abstract newValue) { - this.bt34 = newValue; - } - - public void setController(java.util.ArrayList newValue) { - this.controller = newValue; - } - - public void setGd2(org.nuiton.guix.GuixDemo2Abstract newValue) { - this.gd2 = newValue; - } - - public void setGd22(org.nuiton.guix.GuixDemo2Abstract newValue) { - this.gd22 = newValue; - } - - public void setGuixdemo(org.nuiton.guix.GuixDemoAbstract newValue) { - this.guixdemo = newValue; - } - - public void setItem1(javax.swing.JMenuItem newValue) { - this.item1 = newValue; - } - - public void setLabel(javax.swing.JLabel newValue) { - this.label = newValue; - } - - public void setLabel2(javax.swing.JLabel newValue) { - this.label2 = newValue; - } - - public void setLabel3(javax.swing.JLabel newValue) { - this.label3 = newValue; - } - - public void setTabPanel(javax.swing.JTabbedPane newValue) { - this.tabPanel = newValue; - } - - public void setTable(javax.swing.JPanel newValue) { - this.table = newValue; - } - - public void setTextfield(javax.swing.JTextField newValue) { - this.textfield = newValue; - } - - /*---------------------------------------------------------------------------------*/ - /*-- public mutator methods -------------------------------------------------------*/ - /*---------------------------------------------------------------------------------*/ - - public void beforeBinding() { - this.add(b, BorderLayout.SOUTH); - } - - public void beforeCreation() { - System.out.println("before Creation"); - } - - public void beforeInitialization() { - - } - - /** - * Components creation - */ - public void componentsCreation() { - createController(); - create$Menu2(); - createItem1(); - create$MenuItem3(); - create$Menu4(); - create$MenuBar1(); - create$JToolBar5(); - createBouton1(); - create$Button6(); - create$Button7(); - createTabPanel(); - createTextfield(); - createLabel(); - createLabel2(); - createBt3(); - createBt31(); - createBt32(); - createBt34(); - createLabel3(); - createTable(); - createGd2(); - createGd22(); - } - - /** - * components layout - */ - public void componentsTree() { - this.setTitle("Guix Swing Demo"); - this.setSize(800,600); - this.setLayout(new BorderLayout()); - this.setJMenuBar($MenuBar1); - $MenuBar1.add($Menu2); - $Menu2.add(item1); - $Menu2.add($MenuItem3); - $MenuBar1.add($Menu4); - this.add($JToolBar5,BorderLayout.NORTH); - $JToolBar5.add(bouton1); - $JToolBar5.add($Button6); - $JToolBar5.add($Button7); - this.add(tabPanel,BorderLayout.CENTER); - tabPanel.add(table); - table.add(textfield, new java.awt.GridBagConstraints (0,0,1,1,0.0,0.0,java.awt.GridBagConstraints.FIRST_LINE_START,java.awt.GridBagConstraints.BOTH, new java.awt.Insets(1,1,1,1),1,1)); - table.add(label, new java.awt.GridBagConstraints (1,0,1,1,0.0,0.0,java.awt.GridBagConstraints.FIRST_LINE_START,java.awt.GridBagConstraints.BOTH, new java.awt.Insets(1,1,1,1),1,1)); - table.add(label2, new java.awt.GridBagConstraints (2,0,1,3,0.0,0.0,java.awt.GridBagConstraints.FIRST_LINE_START,java.awt.GridBagConstraints.BOTH, new java.awt.Insets(1,1,1,1),1,1)); - table.add(bt3, new java.awt.GridBagConstraints (3,1,3,1,0.0,0.0,java.awt.GridBagConstraints.FIRST_LINE_START,java.awt.GridBagConstraints.BOTH, new java.awt.Insets(0,0,0,0),1,1)); - table.add(bt31, new java.awt.GridBagConstraints (0,2,2,1,0.0,0.0,java.awt.GridBagConstraints.FIRST_LINE_START,java.awt.GridBagConstraints.BOTH, new java.awt.Insets(0,0,0,0),1,1)); - table.add(bt32, new java.awt.GridBagConstraints (3,2,1,1,0.0,0.0,java.awt.GridBagConstraints.FIRST_LINE_START,java.awt.GridBagConstraints.BOTH, new java.awt.Insets(2,2,2,2),1,1)); - table.add(bt34, new java.awt.GridBagConstraints (0,3,3,1,0.0,0.0,java.awt.GridBagConstraints.FIRST_LINE_START,java.awt.GridBagConstraints.BOTH, new java.awt.Insets(1,1,1,1),1,1)); - table.add(label3, new java.awt.GridBagConstraints (0,4,2,1,0.0,0.0,java.awt.GridBagConstraints.FIRST_LINE_START,java.awt.GridBagConstraints.BOTH, new java.awt.Insets(1,1,1,1),1,1)); - tabPanel.add(gd2); - tabPanel.add(gd22); - } - - public void inTheEnd() { - - } - - /** - * initilization of databinding - */ - public void initDataBinding() { - applyDataBinding("textfield.enabled"); - applyDataBinding("label.text"); - } - - /** - * initialization - */ - public void initialize() { - beforeCreation(); - componentsCreation(); - b.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent arg0) { - if(gd2.getButton().isSelected()) { - java.util.Random r = new java.util.Random(); - table.setBackground(new java.awt.Color(r.nextInt(255), r.nextInt(255), r.nextInt(255))); - } - } - }); - beforeInitialization(); - componentsTree(); - beforeBinding(); - initDataBinding(); - inTheEnd(); - } - - public void onChangeFromgetGd22getButtonisSelected() { - processDataBinding("textfield.enabled"); - } - - public void onChangeFromgetGd2getButtonisSelected() { - processDataBinding("textfield.enabled"); - } - - public void onChangeFromtextfieldgetText() { - processDataBinding("label.text"); - } - - /** - * - * test - * @since 0.0.1 - * - */ - public void test2(String test) throws NullPointerException, ArrayIndexOutOfBoundsException { - System.out.println(test); - } - - /*---------------------------------------------------------------------------------*/ - /*-- ui creation methods ----------------------------------------------------------*/ - /*---------------------------------------------------------------------------------*/ - - /** - * $Button6 creation - */ - private void create$Button6() { - $Button6 = new javax.swing.JButton(); - $Button6.setText("bouton2"); - $Button6.setForeground(new java.awt.Color(120,255,0)); - $Button6.setSize(80,35); - $Button6.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent actionEvent){ - $Button6.setText("click !"); - ;System.out.println("Action [" + actionEvent.getActionCommand() + "] performed!"); - } - }); - } - - /** - * $Button7 creation - */ - private void create$Button7() { - $Button7 = new javax.swing.JButton(); - $Button7.setText("bouton3"); - $Button7.setForeground(new java.awt.Color(120,255,0)); - $Button7.setSize(80,35); - $Button7.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent actionEvent){ - $Button7.setText("click !"); - ;System.out.println("Action [" + actionEvent.getActionCommand() + "] performed!"); - } - }); - } - - /** - * $JToolBar5 creation - */ - private void create$JToolBar5() { - $JToolBar5 = new javax.swing.JToolBar(); - $JToolBar5.setBorder(new javax.swing.border.EtchedBorder()); - } - - /** - * $Menu2 creation - */ - private void create$Menu2() { - $Menu2 = new javax.swing.JMenu("menu 1"); - } - - /** - * $Menu4 creation - */ - private void create$Menu4() { - $Menu4 = new javax.swing.JMenu("menu 2"); - } - - /** - * $MenuBar1 creation - */ - private void create$MenuBar1() { - $MenuBar1 = new javax.swing.JMenuBar(); - $MenuBar1.setBorder(new javax.swing.border.BevelBorder(javax.swing.border.BevelBorder.RAISED)); - } - - /** - * $MenuItem3 creation - */ - private void create$MenuItem3() { - $MenuItem3 = new javax.swing.JMenuItem(); - $MenuItem3.setText("item2"); - $MenuItem3.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent actionEvent){ - System.out.println("Action [" + actionEvent.getActionCommand() + "] performed!"); - } - }); - } - - /** - * bouton1 creation - */ - private void createBouton1() { - bouton1 = new javax.swing.JButton(); - bouton1.setText("bouton1"); - bouton1.setSize(100,35); - bouton1.setForeground(new java.awt.Color(120,255,0)); - bouton1.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent actionEvent){ - bouton1.setText("click !"); - ;System.out.println("Action [" + actionEvent.getActionCommand() + "] performed!"); - } - }); - } - - /** - * bt3 creation - */ - private void createBt3() { - bt3 = new org.nuiton.guix.GuixDemo3Impl(); - bt3.setText("bt3"); - bt3.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent actionEvent){ - System.out.println("beau gosse"); - } - }); - } - - /** - * bt31 creation - */ - private void createBt31() { - bt31 = new org.nuiton.guix.GuixDemo3Impl(); - bt31.setText("bt31"); - } - - /** - * bt32 creation - */ - private void createBt32() { - bt32 = new org.nuiton.guix.GuixDemo3Impl(); - bt32.setText("bt32"); - } - - /** - * bt34 creation - */ - private void createBt34() { - bt34 = new org.nuiton.guix.GuixDemo3Impl(); - bt34.setText("bt34"); - } - - /** - * controller creation - */ - private void createController() { - controller = new java.util.ArrayList(); - } - - /** - * gd2 creation - */ - private void createGd2() { - gd2 = new org.nuiton.guix.GuixDemo2Impl(); - gd2.setName("GD2"); - } - - /** - * gd22 creation - */ - private void createGd22() { - gd22 = new org.nuiton.guix.GuixDemo2Impl(); - gd22.setName("GD22"); - } - - /** - * item1 creation - */ - private void createItem1() { - item1 = new javax.swing.JMenuItem(); - item1.setText("item1"); - } - - /** - * label creation - */ - private void createLabel() { - label = new javax.swing.JLabel(); - label.setForeground(new java.awt.Color(0,120,255)); - label.addMouseListener(new java.awt.event.MouseAdapter() { - public void mouseEntered(java.awt.event.MouseEvent mouseEvent){ - label.setForeground(new java.awt.Color(255,120,0)); - ; - } - public void mouseExited(java.awt.event.MouseEvent mouseEvent){ - label.setForeground(new java.awt.Color(0,120,255)); - ; - } - }); - } - - /** - * label2 creation - */ - private void createLabel2() { - label2 = new javax.swing.JLabel(); - label2.setText("color"); - label2.setBackground(java.awt.Color.BLUE); - } - - /** - * label3 creation - */ - private void createLabel3() { - label3 = new javax.swing.JLabel(); - label3.setText("color"); - label3.setForeground(java.awt.Color.YELLOW); - } - - /** - * tabPanel creation - */ - private void createTabPanel() { - tabPanel = new javax.swing.JTabbedPane(); - tabPanel.setSize(800,400); - } - - /** - * table creation - */ - private void createTable() { - table = new javax.swing.JPanel(new java.awt.GridBagLayout()); - table.setName("Table"); - } - - /** - * textfield creation - */ - private void createTextfield() { - textfield = new javax.swing.JTextField("test"); - textfield.setSize(100,35); - textfield.addFocusListener(new java.awt.event.FocusAdapter() { - public void focusGained(java.awt.event.FocusEvent focusEvent){ - System.out.println("dude !"); - } - }); - } - - } \ No newline at end of file
participants (1)
-
kmorin@users.labs.libre-entreprise.org