[Jiemamy-notify:2432] commit [3430] コンフィグ用のパネルを追加したものの、資料が英語しか無く(ry

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2009年 6月 20日 (土) 14:44:04 JST


Revision: 3430
          http://sourceforge.jp/projects/jiemamy/svn/view?view=rev&revision=3430
Author:   happy_ryo
Date:     2009-06-20 14:44:04 +0900 (Sat, 20 Jun 2009)

Log Message:
-----------
コンフィグ用のパネルを追加したものの、資料が英語しか無く(ry
調べながら作業する

Modified Paths:
--------------
    sandbox/nekotter/nbactions.xml
    sandbox/nekotter/pom.xml
    sandbox/nekotter/src/main/java/org/jiemamy/nekotter/window/MainWindowAction.java
    sandbox/nekotter/src/main/java/org/jiemamy/nekotter/window/MainWindowTopComponent.form
    sandbox/nekotter/src/main/java/org/jiemamy/nekotter/window/MainWindowTopComponent.java
    sandbox/nekotter/src/main/resources/org/jiemamy/nekotter/layer.xml
    sandbox/nekotter/src/main/resources/org/jiemamy/nekotter/window/Bundle.properties

Added Paths:
-----------
    sandbox/nekotter/src/main/java/org/jiemamy/nekotter/action/mainwindow/
    sandbox/nekotter/src/main/java/org/jiemamy/nekotter/window/config/
    sandbox/nekotter/src/main/java/org/jiemamy/nekotter/window/config/NekotterConfigOptionsPanelController.java
    sandbox/nekotter/src/main/java/org/jiemamy/nekotter/window/config/NekotterConfigPanel.form
    sandbox/nekotter/src/main/java/org/jiemamy/nekotter/window/config/NekotterConfigPanel.java
    sandbox/nekotter/src/main/resources/org/jiemamy/nekotter/window/config/
    sandbox/nekotter/src/main/resources/org/jiemamy/nekotter/window/config/Bundle.properties


-------------- next part --------------
Modified: sandbox/nekotter/nbactions.xml
===================================================================
--- sandbox/nekotter/nbactions.xml	2009-06-17 13:28:18 UTC (rev 3429)
+++ sandbox/nekotter/nbactions.xml	2009-06-20 05:44:04 UTC (rev 3430)
@@ -10,4 +10,14 @@
                 <netbeans.installation>/Applications/NetBeans/NetBeans 6.7 RC2.app/Contents/Resources/NetBeans</netbeans.installation>
             </properties>
         </action>
+        <action>
+            <actionName>build-with-dependencies</actionName>
+            <basedir>..</basedir>
+            <goals>
+                <goal>reactor:make</goal>
+            </goals>
+            <properties>
+                <make.artifacts>${groupId}:${artifactId}</make.artifacts>
+            </properties>
+        </action>
     </actions>

Modified: sandbox/nekotter/pom.xml
===================================================================
--- sandbox/nekotter/pom.xml	2009-06-17 13:28:18 UTC (rev 3429)
+++ sandbox/nekotter/pom.xml	2009-06-20 05:44:04 UTC (rev 3430)
@@ -5,7 +5,7 @@
     <groupId>org.jiemamy</groupId>
     <artifactId>nekotter</artifactId>
     <packaging>nbm</packaging>
-    <version>1.0-SNAPSHOT</version>
+    <version>0.1-SNAPSHOT</version>
     <name>Netbeans Module nekotter</name>
     
     <repositories>
@@ -36,19 +36,34 @@
             <artifactId>twitter4j</artifactId>
             <version>1.1.7</version>
         </dependency>
+        <dependency>
+            <groupId>org.netbeans.api</groupId>
+            <artifactId>org-netbeans-modules-options-api</artifactId>
+            <version>RELEASE65</version>
+        </dependency>
+        <dependency>
+            <groupId>org.netbeans.api</groupId>
+            <artifactId>org-openide-awt</artifactId>
+            <version>RELEASE65</version>
+        </dependency>
+        <dependency>
+            <groupId>org.netbeans.api</groupId>
+            <artifactId>org-jdesktop-layout</artifactId>
+            <version>RELEASE65</version>
+        </dependency>
     </dependencies>
     <build>
         <plugins>
             <plugin>
                 <groupId>org.codehaus.mojo</groupId>
                 <artifactId>nbm-maven-plugin</artifactId>
-                <version>2.6.2</version>
+                <version>3.0</version>
                 <extensions>true</extensions>
                 <configuration>
                     <descriptor>src/main/nbm/module.xml</descriptor>
                 </configuration>
             </plugin>
-            
+
             <!-- netbeans modules in 5.5+ are 1.5 compatible -->
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
@@ -83,5 +98,22 @@
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     </properties>
+    <developers>
+        <developer>
+            <name>happy_ryo</name>
+            <email>iwama****@gmail*****</email>
+            <url>http://d.hatena.ne.jp/happy_ryo/</url>
+            <timezone>+9</timezone>
+        </developer>
+    </developers>
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
 </project>
 
+

Modified: sandbox/nekotter/src/main/java/org/jiemamy/nekotter/window/MainWindowAction.java
===================================================================
--- sandbox/nekotter/src/main/java/org/jiemamy/nekotter/window/MainWindowAction.java	2009-06-17 13:28:18 UTC (rev 3429)
+++ sandbox/nekotter/src/main/java/org/jiemamy/nekotter/window/MainWindowAction.java	2009-06-20 05:44:04 UTC (rev 3430)
@@ -16,14 +16,21 @@
  */
 public class MainWindowAction extends AbstractAction {
 
+    static final long serialVersionUID = 1L;
+
     /**
-     * ƒRƒ“ƒXƒgƒ‰ƒNƒ^
+     * コンストラクタ、コメントアウトされてるがアイコンへのパス等を渡してやる。
      */
     public MainWindowAction() {
         super(NbBundle.getMessage(MainWindowAction.class, "CTL_MainWindowAction"));
 //        putValue(SMALL_ICON, new ImageIcon(Utilities.loadImage(MainWindowTopComponent.ICON_PATH, true)));
     }
 
+    /**
+     * @param evt アクションイベント
+     * @see org.openide.windows.TopComponent
+     */
+    @Override
     public void actionPerformed(ActionEvent evt) {
         TopComponent win = MainWindowTopComponent.findInstance();
         win.open();

Modified: sandbox/nekotter/src/main/java/org/jiemamy/nekotter/window/MainWindowTopComponent.form
===================================================================
--- sandbox/nekotter/src/main/java/org/jiemamy/nekotter/window/MainWindowTopComponent.form	2009-06-17 13:28:18 UTC (rev 3429)
+++ sandbox/nekotter/src/main/java/org/jiemamy/nekotter/window/MainWindowTopComponent.form	2009-06-20 05:44:04 UTC (rev 3430)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 
-<Form version="1.3" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
+<Form version="1.4" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
   <AuxValues>
     <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
     <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
@@ -16,13 +16,80 @@
   <Layout>
     <DimensionLayout dim="0">
       <Group type="103" groupAlignment="0" attributes="0">
-          <EmptySpace min="0" pref="400" max="32767" attributes="0"/>
+          <Component id="mainPanel" alignment="0" max="32767" attributes="0"/>
       </Group>
     </DimensionLayout>
     <DimensionLayout dim="1">
       <Group type="103" groupAlignment="0" attributes="0">
-          <EmptySpace min="0" pref="300" max="32767" attributes="0"/>
+          <Component id="mainPanel" alignment="0" max="32767" attributes="0"/>
       </Group>
     </DimensionLayout>
   </Layout>
+  <SubComponents>
+    <Container class="javax.swing.JPanel" name="mainPanel">
+
+      <Layout>
+        <DimensionLayout dim="0">
+          <Group type="103" groupAlignment="0" attributes="0">
+              <Group type="102" alignment="0" attributes="0">
+                  <EmptySpace min="-2" max="-2" attributes="0"/>
+                  <Component id="jScrollPane1" min="-2" pref="313" max="-2" attributes="0"/>
+                  <EmptySpace max="-2" attributes="0"/>
+                  <Component id="btnPost" pref="89" max="32767" attributes="1"/>
+                  <EmptySpace max="-2" attributes="0"/>
+              </Group>
+          </Group>
+        </DimensionLayout>
+        <DimensionLayout dim="1">
+          <Group type="103" groupAlignment="0" attributes="0">
+              <Group type="102" attributes="0">
+                  <Group type="103" groupAlignment="0" attributes="0">
+                      <Group type="102" attributes="0">
+                          <EmptySpace max="-2" attributes="0"/>
+                          <Component id="jScrollPane1" min="-2" pref="88" max="-2" attributes="0"/>
+                      </Group>
+                      <Group type="102" alignment="0" attributes="0">
+                          <EmptySpace min="-2" pref="38" max="-2" attributes="0"/>
+                          <Component id="btnPost" min="-2" max="-2" attributes="0"/>
+                      </Group>
+                  </Group>
+                  <EmptySpace max="32767" attributes="0"/>
+              </Group>
+          </Group>
+        </DimensionLayout>
+      </Layout>
+      <SubComponents>
+        <Container class="javax.swing.JScrollPane" name="jScrollPane1">
+          <AuxValues>
+            <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
+          </AuxValues>
+
+          <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
+          <SubComponents>
+            <Component class="javax.swing.JTextArea" name="mainTextArea">
+              <Properties>
+                <Property name="columns" type="int" value="20"/>
+                <Property name="rows" type="int" value="5"/>
+              </Properties>
+            </Component>
+          </SubComponents>
+        </Container>
+        <Component class="java.awt.Button" name="btnPost">
+          <Properties>
+            <Property name="actionCommand" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+              <ResourceString bundle="org/jiemamy/nekotter/window/Bundle.properties" key="MainWindowTopComponent.btnPost.actionCommand" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+            </Property>
+            <Property name="label" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+              <ResourceString bundle="org/jiemamy/nekotter/window/Bundle.properties" key="MainWindowTopComponent.btnPost.label" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+            </Property>
+          </Properties>
+          <AccessibilityProperties>
+            <Property name="AccessibleContext.accessibleName" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+              <ResourceString bundle="org/jiemamy/nekotter/window/Bundle.properties" key="MainWindowTopComponent.btnPost.AccessibleContext.accessibleName" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+            </Property>
+          </AccessibilityProperties>
+        </Component>
+      </SubComponents>
+    </Container>
+  </SubComponents>
 </Form>

Modified: sandbox/nekotter/src/main/java/org/jiemamy/nekotter/window/MainWindowTopComponent.java
===================================================================
--- sandbox/nekotter/src/main/java/org/jiemamy/nekotter/window/MainWindowTopComponent.java	2009-06-17 13:28:18 UTC (rev 3429)
+++ sandbox/nekotter/src/main/java/org/jiemamy/nekotter/window/MainWindowTopComponent.java	2009-06-20 05:44:04 UTC (rev 3430)
@@ -39,19 +39,61 @@
     // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
     private void initComponents() {
 
+        mainPanel = new javax.swing.JPanel();
+        jScrollPane1 = new javax.swing.JScrollPane();
+        mainTextArea = new javax.swing.JTextArea();
+        btnPost = new java.awt.Button();
+
+        mainTextArea.setColumns(20);
+        mainTextArea.setRows(5);
+        jScrollPane1.setViewportView(mainTextArea);
+
+        btnPost.setActionCommand(org.openide.util.NbBundle.getMessage(MainWindowTopComponent.class, "MainWindowTopComponent.btnPost.actionCommand")); // NOI18N
+        btnPost.setLabel(org.openide.util.NbBundle.getMessage(MainWindowTopComponent.class, "MainWindowTopComponent.btnPost.label")); // NOI18N
+
+        javax.swing.GroupLayout mainPanelLayout = new javax.swing.GroupLayout(mainPanel);
+        mainPanel.setLayout(mainPanelLayout);
+        mainPanelLayout.setHorizontalGroup(
+            mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGroup(mainPanelLayout.createSequentialGroup()
+                .addContainerGap()
+                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 313, javax.swing.GroupLayout.PREFERRED_SIZE)
+                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                .addComponent(btnPost, javax.swing.GroupLayout.DEFAULT_SIZE, 89, Short.MAX_VALUE)
+                .addContainerGap())
+        );
+        mainPanelLayout.setVerticalGroup(
+            mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGroup(mainPanelLayout.createSequentialGroup()
+                .addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                    .addGroup(mainPanelLayout.createSequentialGroup()
+                        .addContainerGap()
+                        .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE))
+                    .addGroup(mainPanelLayout.createSequentialGroup()
+                        .addGap(38, 38, 38)
+                        .addComponent(btnPost, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
+                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+        );
+
+        btnPost.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(MainWindowTopComponent.class, "MainWindowTopComponent.btnPost.AccessibleContext.accessibleName")); // NOI18N
+
         javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
         this.setLayout(layout);
         layout.setHorizontalGroup(
             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGap(0, 400, Short.MAX_VALUE)
+            .addComponent(mainPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
         );
         layout.setVerticalGroup(
             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGap(0, 300, Short.MAX_VALUE)
+            .addComponent(mainPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
         );
     }// </editor-fold>//GEN-END:initComponents
 
     // Variables declaration - do not modify//GEN-BEGIN:variables
+    private java.awt.Button btnPost;
+    private javax.swing.JScrollPane jScrollPane1;
+    private javax.swing.JPanel mainPanel;
+    private javax.swing.JTextArea mainTextArea;
     // End of variables declaration//GEN-END:variables
     /**
      * Gets default instance. Do not use directly: reserved for *.settings files only,
@@ -89,16 +131,16 @@
         return TopComponent.PERSISTENCE_ALWAYS;
     }
 
-    @Override
-    public void componentOpened() {
-        // TODO add custom code on component opening
-    }
+//    @Override
+//    public void componentOpened() {
+//        // TODO add custom code on component opening
+//    }
+//
+//    @Override
+//    public void componentClosed() {
+//        // TODO add custom code on component closing
+//    }
 
-    @Override
-    public void componentClosed() {
-        // TODO add custom code on component closing
-    }
-
     /** replaces this in object stream */
     @Override
     public Object writeReplace() {

Added: sandbox/nekotter/src/main/java/org/jiemamy/nekotter/window/config/NekotterConfigOptionsPanelController.java
===================================================================
--- sandbox/nekotter/src/main/java/org/jiemamy/nekotter/window/config/NekotterConfigOptionsPanelController.java	                        (rev 0)
+++ sandbox/nekotter/src/main/java/org/jiemamy/nekotter/window/config/NekotterConfigOptionsPanelController.java	2009-06-20 05:44:04 UTC (rev 3430)
@@ -0,0 +1,84 @@
+/*
+ *  Copyright 2009 happy_ryo.
+ * 
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ * 
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  under the License.
+ */
+package org.jiemamy.nekotter.window.config;
+
+import java.beans.PropertyChangeListener;
+import java.beans.PropertyChangeSupport;
+import javax.swing.JComponent;
+import org.netbeans.spi.options.OptionsPanelController;
+import org.openide.util.HelpCtx;
+import org.openide.util.Lookup;
+
+public final class NekotterConfigOptionsPanelController extends OptionsPanelController {
+
+    private NekotterConfigPanel panel;
+    private final PropertyChangeSupport pcs = new PropertyChangeSupport(this);
+    private boolean changed;
+
+    public void update() {
+        getPanel().load();
+        changed = false;
+    }
+
+    public void applyChanges() {
+        getPanel().store();
+        changed = false;
+    }
+
+    public void cancel() {
+        // need not do anything special, if no changes have been persisted yet
+    }
+
+    public boolean isValid() {
+        return getPanel().valid();
+    }
+
+    public boolean isChanged() {
+        return changed;
+    }
+
+    public HelpCtx getHelpCtx() {
+        return null; // new HelpCtx("...ID") if you have a help set
+    }
+
+    public JComponent getComponent(Lookup masterLookup) {
+        return getPanel();
+    }
+
+    public void addPropertyChangeListener(PropertyChangeListener l) {
+        pcs.addPropertyChangeListener(l);
+    }
+
+    public void removePropertyChangeListener(PropertyChangeListener l) {
+        pcs.removePropertyChangeListener(l);
+    }
+
+    private NekotterConfigPanel getPanel() {
+        if (panel == null) {
+            panel = new NekotterConfigPanel(this);
+        }
+        return panel;
+    }
+
+    void changed() {
+        if (!changed) {
+            changed = true;
+            pcs.firePropertyChange(OptionsPanelController.PROP_CHANGED, false, true);
+        }
+        pcs.firePropertyChange(OptionsPanelController.PROP_VALID, null, null);
+    }
+}

Added: sandbox/nekotter/src/main/java/org/jiemamy/nekotter/window/config/NekotterConfigPanel.form
===================================================================
--- sandbox/nekotter/src/main/java/org/jiemamy/nekotter/window/config/NekotterConfigPanel.form	                        (rev 0)
+++ sandbox/nekotter/src/main/java/org/jiemamy/nekotter/window/config/NekotterConfigPanel.form	2009-06-20 05:44:04 UTC (rev 3430)
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<Form version="1.5" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
+  <AuxValues>
+    <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
+    <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
+    <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
+    <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
+    <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="true"/>
+    <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
+    <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
+    <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
+    <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
+  </AuxValues>
+
+  <Layout>
+    <DimensionLayout dim="0">
+      <Group type="103" groupAlignment="0" attributes="0">
+          <Group type="102" attributes="0">
+              <EmptySpace max="-2" attributes="0"/>
+              <Group type="103" groupAlignment="0" max="-2" attributes="0">
+                  <Component id="jLabel1" alignment="0" max="32767" attributes="1"/>
+                  <Component id="jLabel2" alignment="0" max="32767" attributes="1"/>
+              </Group>
+              <EmptySpace max="-2" attributes="0"/>
+              <Group type="103" groupAlignment="0" max="-2" attributes="0">
+                  <Component id="jTextField1" max="32767" attributes="1"/>
+                  <Component id="jPasswordField1" alignment="0" max="32767" attributes="1"/>
+              </Group>
+              <EmptySpace pref="99" max="32767" attributes="0"/>
+          </Group>
+      </Group>
+    </DimensionLayout>
+    <DimensionLayout dim="1">
+      <Group type="103" groupAlignment="0" attributes="0">
+          <Group type="102" attributes="0">
+              <Group type="103" groupAlignment="0" attributes="0">
+                  <Group type="102" alignment="0" attributes="0">
+                      <EmptySpace min="-2" pref="66" max="-2" attributes="0"/>
+                      <Group type="103" groupAlignment="3" attributes="0">
+                          <Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/>
+                          <Component id="jPasswordField1" alignment="3" min="-2" max="-2" attributes="0"/>
+                      </Group>
+                  </Group>
+                  <Group type="102" alignment="0" attributes="0">
+                      <EmptySpace min="-2" pref="19" max="-2" attributes="0"/>
+                      <Group type="103" groupAlignment="3" attributes="0">
+                          <Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/>
+                          <Component id="jTextField1" alignment="3" min="-2" max="-2" attributes="0"/>
+                      </Group>
+                  </Group>
+              </Group>
+              <EmptySpace pref="83" max="32767" attributes="0"/>
+          </Group>
+      </Group>
+    </DimensionLayout>
+  </Layout>
+  <SubComponents>
+    <Component class="javax.swing.JLabel" name="jLabel1">
+      <Properties>
+        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+          <ResourceString bundle="org/jiemamy/nekotter/window/config/Bundle.properties" key="NekotterConfigPanel.jLabel1.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+        </Property>
+      </Properties>
+    </Component>
+    <Component class="javax.swing.JLabel" name="jLabel2">
+      <Properties>
+        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+          <ResourceString bundle="org/jiemamy/nekotter/window/config/Bundle.properties" key="NekotterConfigPanel.jLabel2.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+        </Property>
+      </Properties>
+    </Component>
+    <Component class="javax.swing.JTextField" name="jTextField1">
+      <Properties>
+        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+          <ResourceString bundle="org/jiemamy/nekotter/window/config/Bundle.properties" key="NekotterConfigPanel.jTextField1.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+        </Property>
+      </Properties>
+    </Component>
+    <Component class="javax.swing.JPasswordField" name="jPasswordField1">
+      <Properties>
+        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+          <ResourceString bundle="org/jiemamy/nekotter/window/config/Bundle.properties" key="NekotterConfigPanel.jPasswordField1.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+        </Property>
+      </Properties>
+      <AuxValues>
+        <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="1"/>
+      </AuxValues>
+    </Component>
+  </SubComponents>
+</Form>

Added: sandbox/nekotter/src/main/java/org/jiemamy/nekotter/window/config/NekotterConfigPanel.java
===================================================================
--- sandbox/nekotter/src/main/java/org/jiemamy/nekotter/window/config/NekotterConfigPanel.java	                        (rev 0)
+++ sandbox/nekotter/src/main/java/org/jiemamy/nekotter/window/config/NekotterConfigPanel.java	2009-06-20 05:44:04 UTC (rev 3430)
@@ -0,0 +1,114 @@
+/*
+ *  Copyright 2009 happy_ryo.
+ * 
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ * 
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  under the License.
+ */
+
+package org.jiemamy.nekotter.window.config;
+
+final class NekotterConfigPanel extends javax.swing.JPanel {
+
+    private final NekotterConfigOptionsPanelController controller;
+
+    NekotterConfigPanel(NekotterConfigOptionsPanelController controller) {
+        this.controller = controller;
+        initComponents();
+        // TODO listen to changes in form fields and call controller.changed()
+    }
+
+    /** This method is called from within the constructor to
+     * initialize the form.
+     * WARNING: Do NOT modify this code. The content of this method is
+     * always regenerated by the Form Editor.
+     */
+    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
+    private void initComponents() {
+
+        jLabel1 = new javax.swing.JLabel();
+        jLabel2 = new javax.swing.JLabel();
+        jTextField1 = new javax.swing.JTextField();
+        jPasswordField1 = new javax.swing.JPasswordField();
+
+        org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getMessage(NekotterConfigPanel.class, "NekotterConfigPanel.jLabel1.text")); // NOI18N
+
+        org.openide.awt.Mnemonics.setLocalizedText(jLabel2, org.openide.util.NbBundle.getMessage(NekotterConfigPanel.class, "NekotterConfigPanel.jLabel2.text")); // NOI18N
+
+        jTextField1.setText(org.openide.util.NbBundle.getMessage(NekotterConfigPanel.class, "NekotterConfigPanel.jTextField1.text")); // NOI18N
+
+        jPasswordField1.setText(org.openide.util.NbBundle.getMessage(NekotterConfigPanel.class, "NekotterConfigPanel.jPasswordField1.text")); // NOI18N
+
+        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
+        this.setLayout(layout);
+        layout.setHorizontalGroup(
+            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGroup(layout.createSequentialGroup()
+                .addContainerGap()
+                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
+                    .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+                    .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
+                    .addComponent(jTextField1)
+                    .addComponent(jPasswordField1))
+                .addContainerGap(99, Short.MAX_VALUE))
+        );
+        layout.setVerticalGroup(
+            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGroup(layout.createSequentialGroup()
+                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                    .addGroup(layout.createSequentialGroup()
+                        .addGap(66, 66, 66)
+                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+                            .addComponent(jLabel2)
+                            .addComponent(jPasswordField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
+                    .addGroup(layout.createSequentialGroup()
+                        .addGap(19, 19, 19)
+                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+                            .addComponent(jLabel1)
+                            .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
+                .addContainerGap(83, Short.MAX_VALUE))
+        );
+    }// </editor-fold>//GEN-END:initComponents
+
+    void load() {
+        // TODO read settings and initialize GUI
+        // Example:        
+        // someCheckBox.setSelected(Preferences.userNodeForPackage(NekotterConfigPanel.class).getBoolean("someFlag", false));
+        // or for org.openide.util with API spec. version >= 7.4:
+        // someCheckBox.setSelected(NbPreferences.forModule(NekotterConfigPanel.class).getBoolean("someFlag", false));
+        // or:
+        // someTextField.setText(SomeSystemOption.getDefault().getSomeStringProperty());
+    }
+
+    void store() {
+        // TODO store modified settings
+        // Example:
+        // Preferences.userNodeForPackage(NekotterConfigPanel.class).putBoolean("someFlag", someCheckBox.isSelected());
+        // or for org.openide.util with API spec. version >= 7.4:
+        // NbPreferences.forModule(NekotterConfigPanel.class).putBoolean("someFlag", someCheckBox.isSelected());
+        // or:
+        // SomeSystemOption.getDefault().setSomeStringProperty(someTextField.getText());
+    }
+
+    boolean valid() {
+        // TODO check whether form is consistent and complete
+        return true;
+    }
+    // Variables declaration - do not modify//GEN-BEGIN:variables
+    private javax.swing.JLabel jLabel1;
+    private javax.swing.JLabel jLabel2;
+    public javax.swing.JPasswordField jPasswordField1;
+    private javax.swing.JTextField jTextField1;
+    // End of variables declaration//GEN-END:variables
+}

Modified: sandbox/nekotter/src/main/resources/org/jiemamy/nekotter/layer.xml
===================================================================
--- sandbox/nekotter/src/main/resources/org/jiemamy/nekotter/layer.xml	2009-06-17 13:28:18 UTC (rev 3429)
+++ sandbox/nekotter/src/main/resources/org/jiemamy/nekotter/layer.xml	2009-06-20 05:44:04 UTC (rev 3430)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.0//EN" "http://www.netbeans.org/dtds/filesystem-1_0.dtd">
+<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.2//EN" "http://www.netbeans.org/dtds/filesystem-1_2.dtd">
 <filesystem>
     <folder name="Actions">
         <folder name="Window">
@@ -13,6 +13,25 @@
             </file>
         </folder>
     </folder>
+    <folder name="OptionsDialog">
+        <folder name="Advanced">
+            <file name="org-jiemamy-nekotter-window-config-ConfigAdvancedOption.instance">
+                <attr name="displayName" bundlevalue="org.jiemamy.nekotter.window.config.Bundle#AdvancedOption_DisplayName_Config"/>
+                <attr name="instanceCreate" methodvalue="org.netbeans.spi.options.AdvancedOption.createSubCategory"/>
+                <attr name="keywords" bundlevalue="org.jiemamy.nekotter.window.config.Bundle#AdvancedOption_Keywords_Config"/>
+                <attr name="keywordsCategory" stringvalue="Advanced/ねこった〜"/>
+                <attr name="toolTip" bundlevalue="org.jiemamy.nekotter.window.config.Bundle#AdvancedOption_Tooltip_Config"/>
+            </file>
+            <file name="org-jiemamy-nekotter-window-config-NekotterConfigAdvancedOption.instance">
+                <attr name="controller" newvalue="org.jiemamy.nekotter.window.config.NekotterConfigOptionsPanelController"/>
+                <attr name="displayName" bundlevalue="org.jiemamy.nekotter.window.config.Bundle#AdvancedOption_DisplayName_NekotterConfig"/>
+                <attr name="instanceCreate" methodvalue="org.netbeans.spi.options.AdvancedOption.createSubCategory"/>
+                <attr name="keywords" bundlevalue="org.jiemamy.nekotter.window.config.Bundle#AdvancedOption_Keywords_NekotterConfig"/>
+                <attr name="keywordsCategory" stringvalue="Advanced/Tools"/>
+                <attr name="toolTip" bundlevalue="org.jiemamy.nekotter.window.config.Bundle#AdvancedOption_Tooltip_NekotterConfig"/>
+            </file>
+        </folder>
+    </folder>
     <folder name="Windows2">
         <folder name="Components">
             <file name="MainWindowTopComponent.settings" url="MainWindowTopComponentSettings.xml"/>

Modified: sandbox/nekotter/src/main/resources/org/jiemamy/nekotter/window/Bundle.properties
===================================================================
--- sandbox/nekotter/src/main/resources/org/jiemamy/nekotter/window/Bundle.properties	2009-06-17 13:28:18 UTC (rev 3429)
+++ sandbox/nekotter/src/main/resources/org/jiemamy/nekotter/window/Bundle.properties	2009-06-20 05:44:04 UTC (rev 3430)
@@ -1,3 +1,6 @@
 CTL_MainWindowAction=\u306D\u3053\u3063\u305F\u301C
 CTL_MainWindowTopComponent=\u306D\u3053\u3063\u305F\u301C
 HINT_MainWindowTopComponent=\u3053\u308C\u306F \u306D\u3053\u3063\u305F\u301C \u30A6\u30A3\u30F3\u30C9\u30A6\u3067\u3059
+MainWindowTopComponent.btnPost.label=POST
+MainWindowTopComponent.btnPost.actionCommand=button1
+MainWindowTopComponent.btnPost.AccessibleContext.accessibleName=button1

Added: sandbox/nekotter/src/main/resources/org/jiemamy/nekotter/window/config/Bundle.properties
===================================================================
--- sandbox/nekotter/src/main/resources/org/jiemamy/nekotter/window/config/Bundle.properties	                        (rev 0)
+++ sandbox/nekotter/src/main/resources/org/jiemamy/nekotter/window/config/Bundle.properties	2009-06-20 05:44:04 UTC (rev 3430)
@@ -0,0 +1,7 @@
+AdvancedOption_DisplayName_NekotterConfig=\u306D\u3053\u3063\u305F\u301C
+AdvancedOption_Keywords_NekotterConfig=twitter
+AdvancedOption_Tooltip_NekotterConfig=\u306D\u3053\u3063\u305F\u301C
+NekotterConfigPanel.jLabel1.text=ID
+NekotterConfigPanel.jLabel2.text=Pass
+NekotterConfigPanel.jTextField1.text=jTextField1
+NekotterConfigPanel.jPasswordField1.text=jPasswordField1



Jiemamy-notify メーリングリストの案内
Back to archive index