Changeset 26 for trunk/Swing


Ignore:
Timestamp:
07/31/08 22:51:52 (11 years ago)
Author:
kuo.chaoyi
Message:

Add jTextField1 及首次測試 methods.

Location:
trunk/Swing/NetbeansIMBug
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Swing/NetbeansIMBug/nbproject/project.properties

    r25 r26  
    11application.desc=A simple java desktop application based on Swing Application Framework 
    22application.homepage=http://appframework.dev.java.net 
     3application.splash=E:\\svn\\trunk\\Swing\\NetbeansIMBug\\src\\netbeansimbug\\resources\\splash.png 
    34application.title=Basic Application Example 
    45application.vendor=Sun Microsystems Inc. 
  • trunk/Swing/NetbeansIMBug/src/netbeansimbug/NetbeansIMBugApp.java

    r24 r26  
    22 * NetbeansIMBugApp.java 
    33 */ 
    4  
    54package netbeansimbug; 
    65 
     6import java.awt.Window; 
    77import org.jdesktop.application.Application; 
    88import org.jdesktop.application.SingleFrameApplication; 
     
    1616     * At startup create and show the main frame of the application. 
    1717     */ 
    18     @Override protected void startup() { 
     18    @Override 
     19    protected void startup() { 
    1920        show(new NetbeansIMBugView(this)); 
    2021    } 
     
    2526     * builder, so this additional configuration is not needed. 
    2627     */ 
    27     @Override protected void configureWindow(java.awt.Window root) { 
     28    @Override 
     29    protected void configureWindow(java.awt.Window root) { 
    2830    } 
    2931 
     
    4143    public static void main(String[] args) { 
    4244        launch(NetbeansIMBugApp.class, args); 
     45 
     46    /* Kuo: 無差異. 
     47    去除輸入漢字時彈出討厭的java自帶的輸入窗口 
     48    去在運行程序時加入:-Djava.awt.im.style=on-the-spot 參數 
     49    或在類中加入  System.setProperty("java.awt.im.style","on-the-spot"); 
     50    System.setProperty("java.awt.im.style","on-the-spot"); 
     51     */ 
    4352    } 
    4453} 
  • trunk/Swing/NetbeansIMBug/src/netbeansimbug/NetbeansIMBugView.form

    r24 r26  
    1111        <DimensionLayout dim="0"> 
    1212          <Group type="103" groupAlignment="0" attributes="0"> 
    13               <EmptySpace min="0" pref="400" max="32767" attributes="0"/> 
     13              <Group type="102" alignment="0" attributes="0"> 
     14                  <EmptySpace min="-2" pref="54" max="-2" attributes="0"/> 
     15                  <Component id="jTextField1" min="-2" pref="295" max="-2" attributes="0"/> 
     16                  <EmptySpace pref="143" max="32767" attributes="0"/> 
     17              </Group> 
    1418          </Group> 
    1519        </DimensionLayout> 
    1620        <DimensionLayout dim="1"> 
    1721          <Group type="103" groupAlignment="0" attributes="0"> 
    18               <EmptySpace min="0" pref="252" max="32767" attributes="0"/> 
     22              <Group type="102" alignment="0" attributes="0"> 
     23                  <EmptySpace min="-2" pref="49" max="-2" attributes="0"/> 
     24                  <Component id="jTextField1" min="-2" pref="43" max="-2" attributes="0"/> 
     25                  <EmptySpace pref="207" max="32767" attributes="0"/> 
     26              </Group> 
    1927          </Group> 
    2028        </DimensionLayout> 
    2129      </Layout> 
     30      <SubComponents> 
     31        <Component class="javax.swing.JTextField" name="jTextField1"> 
     32          <Properties> 
     33            <Property name="font" type="java.awt.Font" resourceKey="jTextField1.font"/> 
     34            <Property name="text" type="java.lang.String" resourceKey="jTextField1.text"/> 
     35            <Property name="name" type="java.lang.String" value="jTextField1" noResource="true"/> 
     36          </Properties> 
     37          <AuxValues> 
     38            <AuxValue name="JavaCodeGenerator_InitCodePost" type="java.lang.String" value="jTextField1.enableInputMethods(false);"/> 
     39          </AuxValues> 
     40        </Component> 
     41      </SubComponents> 
    2242    </Container> 
    2343    <Container class="javax.swing.JMenuBar" name="menuBar"> 
     
    88108        <DimensionLayout dim="0"> 
    89109          <Group type="103" groupAlignment="0" attributes="0"> 
    90               <Component id="statusPanelSeparator" alignment="0" pref="400" max="32767" attributes="0"/> 
     110              <Component id="statusPanelSeparator" alignment="0" pref="492" max="32767" attributes="0"/> 
    91111              <Group type="102" alignment="0" attributes="0"> 
    92112                  <EmptySpace max="-2" attributes="0"/> 
    93113                  <Component id="statusMessageLabel" min="-2" max="-2" attributes="0"/> 
    94                   <EmptySpace pref="226" max="32767" attributes="0"/> 
     114                  <EmptySpace pref="322" max="32767" attributes="0"/> 
    95115                  <Component id="progressBar" min="-2" max="-2" attributes="0"/> 
    96116                  <EmptySpace max="-2" attributes="0"/> 
     
    165185    <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> 
    166186    <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> 
    167     <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,44,0,0,1,-112"/> 
     187    <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,96,0,0,1,-20"/> 
    168188  </AuxValues> 
    169189</Form> 
  • trunk/Swing/NetbeansIMBug/src/netbeansimbug/NetbeansIMBugView.java

    r24 r26  
    102102 
    103103        mainPanel = new javax.swing.JPanel(); 
     104        jTextField1 = new javax.swing.JTextField(); 
    104105        menuBar = new javax.swing.JMenuBar(); 
    105106        javax.swing.JMenu fileMenu = new javax.swing.JMenu(); 
     
    115116        mainPanel.setName("mainPanel"); // NOI18N 
    116117 
     118        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(netbeansimbug.NetbeansIMBugApp.class).getContext().getResourceMap(NetbeansIMBugView.class); 
     119        jTextField1.setFont(resourceMap.getFont("jTextField1.font")); // NOI18N 
     120        jTextField1.setText(resourceMap.getString("jTextField1.text")); // NOI18N 
     121        jTextField1.setName("jTextField1"); // NOI18N 
     122        jTextField1.enableInputMethods(false); 
     123 
    117124        javax.swing.GroupLayout mainPanelLayout = new javax.swing.GroupLayout(mainPanel); 
    118125        mainPanel.setLayout(mainPanelLayout); 
    119126        mainPanelLayout.setHorizontalGroup( 
    120127            mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    121             .addGap(0, 400, Short.MAX_VALUE) 
     128            .addGroup(mainPanelLayout.createSequentialGroup() 
     129                .addGap(54, 54, 54) 
     130                .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 295, javax.swing.GroupLayout.PREFERRED_SIZE) 
     131                .addContainerGap(143, Short.MAX_VALUE)) 
    122132        ); 
    123133        mainPanelLayout.setVerticalGroup( 
    124134            mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    125             .addGap(0, 252, Short.MAX_VALUE) 
     135            .addGroup(mainPanelLayout.createSequentialGroup() 
     136                .addGap(49, 49, 49) 
     137                .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE) 
     138                .addContainerGap(207, Short.MAX_VALUE)) 
    126139        ); 
    127140 
    128141        menuBar.setName("menuBar"); // NOI18N 
    129142 
    130         org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(netbeansimbug.NetbeansIMBugApp.class).getContext().getResourceMap(NetbeansIMBugView.class); 
    131143        fileMenu.setText(resourceMap.getString("fileMenu.text")); // NOI18N 
    132144        fileMenu.setName("fileMenu"); // NOI18N 
     
    163175        statusPanelLayout.setHorizontalGroup( 
    164176            statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    165             .addComponent(statusPanelSeparator, javax.swing.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE) 
     177            .addComponent(statusPanelSeparator, javax.swing.GroupLayout.DEFAULT_SIZE, 492, Short.MAX_VALUE) 
    166178            .addGroup(statusPanelLayout.createSequentialGroup() 
    167179                .addContainerGap() 
    168180                .addComponent(statusMessageLabel) 
    169                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 226, Short.MAX_VALUE) 
     181                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 322, Short.MAX_VALUE) 
    170182                .addComponent(progressBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
    171183                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
     
    191203 
    192204    // Variables declaration - do not modify//GEN-BEGIN:variables 
     205    private javax.swing.JTextField jTextField1; 
    193206    private javax.swing.JPanel mainPanel; 
    194207    private javax.swing.JMenuBar menuBar; 
  • trunk/Swing/NetbeansIMBug/src/netbeansimbug/resources/NetbeansIMBugView.properties

    r24 r26  
    3131StatusBar.busyIcons[13] = busyicons/busy-icon13.png 
    3232StatusBar.busyIcons[14] = busyicons/busy-icon14.png 
     33jTextField1.text=jTextField1 
     34#NOI18N 
     35jTextField1.font=\u65B0\u7D30\u660E\u9AD4-Bold-18 
Note: See TracChangeset for help on using the changeset viewer.