Skip to content

Commit 3ab09b0

Browse files
author
kmustlinux
committed
1 parent 73f3f77 commit 3ab09b0

20 files changed

+3051
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
org.free.jshoc.Calculator

src/org/free/jshoc/AboutBox.form

Lines changed: 210 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,210 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
3+
<Form version="1.5" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JDialogFormInfo">
4+
<Properties>
5+
<Property name="defaultCloseOperation" type="int" value="2"/>
6+
<Property name="title" type="java.lang.String" resourceKey="title"/>
7+
<Property name="modal" type="boolean" value="true"/>
8+
<Property name="name" type="java.lang.String" value="aboutBox" noResource="true"/>
9+
<Property name="resizable" type="boolean" value="false"/>
10+
</Properties>
11+
<SyntheticProperties>
12+
<SyntheticProperty name="formSizePolicy" type="int" value="1"/>
13+
</SyntheticProperties>
14+
<AuxValues>
15+
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="2"/>
16+
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="true"/>
17+
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
18+
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
19+
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
20+
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
21+
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
22+
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
23+
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
24+
</AuxValues>
25+
26+
<Layout>
27+
<DimensionLayout dim="0">
28+
<Group type="103" groupAlignment="0" attributes="0">
29+
<Group type="102" alignment="0" attributes="0">
30+
<Component id="imageLabel" min="-2" max="-2" attributes="0"/>
31+
<EmptySpace type="separate" max="-2" attributes="0"/>
32+
<Group type="103" groupAlignment="0" attributes="0">
33+
<Group type="102" attributes="0">
34+
<Group type="103" groupAlignment="0" attributes="0">
35+
<Component id="appDescLabel" pref="316" max="32767" attributes="0"/>
36+
<Group type="102" alignment="0" attributes="0">
37+
<Group type="103" groupAlignment="0" attributes="0">
38+
<Component id="versionLabel" alignment="0" min="-2" max="-2" attributes="0"/>
39+
<Component id="vendorLabel" alignment="0" min="-2" max="-2" attributes="0"/>
40+
<Component id="homepageLabel" alignment="0" min="-2" max="-2" attributes="0"/>
41+
</Group>
42+
<EmptySpace min="-2" max="-2" attributes="0"/>
43+
<Group type="103" groupAlignment="0" attributes="0">
44+
<Component id="appVersionLabel" alignment="0" min="-2" max="-2" attributes="0"/>
45+
<Component id="appVendorLabel" alignment="0" min="-2" max="-2" attributes="0"/>
46+
<Component id="appHomepageLabel" alignment="0" min="-2" max="-2" attributes="0"/>
47+
</Group>
48+
</Group>
49+
<Component id="appTitleLabel" alignment="0" min="-2" max="-2" attributes="0"/>
50+
</Group>
51+
<EmptySpace min="-2" max="-2" attributes="0"/>
52+
</Group>
53+
<Group type="102" alignment="1" attributes="0">
54+
<Component id="closeButton" min="-2" max="-2" attributes="0"/>
55+
<EmptySpace min="-2" pref="36" max="-2" attributes="0"/>
56+
</Group>
57+
</Group>
58+
</Group>
59+
</Group>
60+
</DimensionLayout>
61+
<DimensionLayout dim="1">
62+
<Group type="103" groupAlignment="0" attributes="0">
63+
<Component id="imageLabel" min="-2" max="32767" attributes="0"/>
64+
<Group type="102" alignment="0" attributes="0">
65+
<EmptySpace max="-2" attributes="0"/>
66+
<Component id="appTitleLabel" min="-2" max="-2" attributes="0"/>
67+
<EmptySpace max="-2" attributes="0"/>
68+
<Component id="appDescLabel" min="-2" pref="23" max="-2" attributes="0"/>
69+
<EmptySpace max="-2" attributes="0"/>
70+
<Group type="103" groupAlignment="3" attributes="0">
71+
<Component id="versionLabel" alignment="3" min="-2" max="-2" attributes="0"/>
72+
<Component id="appVersionLabel" alignment="3" min="-2" max="-2" attributes="0"/>
73+
</Group>
74+
<EmptySpace min="-2" max="-2" attributes="0"/>
75+
<Group type="103" groupAlignment="3" attributes="0">
76+
<Component id="vendorLabel" alignment="3" min="-2" max="-2" attributes="0"/>
77+
<Component id="appVendorLabel" alignment="3" min="-2" max="-2" attributes="0"/>
78+
</Group>
79+
<EmptySpace max="-2" attributes="0"/>
80+
<Group type="103" groupAlignment="3" attributes="0">
81+
<Component id="homepageLabel" alignment="3" min="-2" max="-2" attributes="0"/>
82+
<Component id="appHomepageLabel" alignment="3" min="-2" max="-2" attributes="0"/>
83+
</Group>
84+
<EmptySpace pref="42" max="32767" attributes="0"/>
85+
<Component id="closeButton" min="-2" max="-2" attributes="0"/>
86+
<EmptySpace max="-2" attributes="0"/>
87+
</Group>
88+
</Group>
89+
</DimensionLayout>
90+
</Layout>
91+
<SubComponents>
92+
<Component class="javax.swing.JButton" name="closeButton">
93+
<Properties>
94+
<Property name="action" type="javax.swing.Action" editor="org.netbeans.modules.swingapp.ActionEditor">
95+
<action class="org.free.jshoc.MainAboutBox" id="closeAboutBox" methodName="closeAboutBox"/>
96+
</Property>
97+
<Property name="name" type="java.lang.String" value="closeButton" noResource="true"/>
98+
</Properties>
99+
<Events>
100+
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="closeButtonActionPerformed"/>
101+
</Events>
102+
</Component>
103+
<Component class="javax.swing.JLabel" name="appTitleLabel">
104+
<Properties>
105+
<Property name="font" type="java.awt.Font" noResource="true" editor="org.netbeans.modules.form.editors2.FontEditor">
106+
<FontInfo relative="true">
107+
<Font bold="true" component="appTitleLabel" property="font" relativeSize="true" size="4"/>
108+
</FontInfo>
109+
</Property>
110+
<Property name="name" type="java.lang.String" value="appTitleLabel" noResource="true"/>
111+
</Properties>
112+
<AuxValues>
113+
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
114+
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
115+
</AuxValues>
116+
</Component>
117+
<Component class="javax.swing.JLabel" name="versionLabel">
118+
<Properties>
119+
<Property name="font" type="java.awt.Font" noResource="true" editor="org.netbeans.modules.form.editors2.FontEditor">
120+
<FontInfo relative="true">
121+
<Font bold="true" component="versionLabel" property="font" relativeSize="true" size="0"/>
122+
</FontInfo>
123+
</Property>
124+
<Property name="text" type="java.lang.String" resourceKey="versionLabel.text"/>
125+
<Property name="name" type="java.lang.String" value="versionLabel" noResource="true"/>
126+
</Properties>
127+
<AuxValues>
128+
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
129+
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
130+
</AuxValues>
131+
</Component>
132+
<Component class="javax.swing.JLabel" name="appVersionLabel">
133+
<Properties>
134+
<Property name="name" type="java.lang.String" value="appVersionLabel" noResource="true"/>
135+
</Properties>
136+
<AuxValues>
137+
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
138+
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
139+
</AuxValues>
140+
</Component>
141+
<Component class="javax.swing.JLabel" name="vendorLabel">
142+
<Properties>
143+
<Property name="font" type="java.awt.Font" noResource="true" editor="org.netbeans.modules.form.editors2.FontEditor">
144+
<FontInfo relative="true">
145+
<Font bold="true" component="vendorLabel" property="font" relativeSize="true" size="0"/>
146+
</FontInfo>
147+
</Property>
148+
<Property name="text" type="java.lang.String" resourceKey="vendorLabel.text"/>
149+
<Property name="name" type="java.lang.String" value="vendorLabel" noResource="true"/>
150+
</Properties>
151+
<AuxValues>
152+
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
153+
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
154+
</AuxValues>
155+
</Component>
156+
<Component class="javax.swing.JLabel" name="appVendorLabel">
157+
<Properties>
158+
<Property name="name" type="java.lang.String" value="appVendorLabel" noResource="true"/>
159+
</Properties>
160+
<AuxValues>
161+
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
162+
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
163+
</AuxValues>
164+
</Component>
165+
<Component class="javax.swing.JLabel" name="homepageLabel">
166+
<Properties>
167+
<Property name="font" type="java.awt.Font" noResource="true" editor="org.netbeans.modules.form.editors2.FontEditor">
168+
<FontInfo relative="true">
169+
<Font bold="true" component="homepageLabel" property="font" relativeSize="true" size="0"/>
170+
</FontInfo>
171+
</Property>
172+
<Property name="text" type="java.lang.String" resourceKey="homepageLabel.text"/>
173+
<Property name="name" type="java.lang.String" value="homepageLabel" noResource="true"/>
174+
</Properties>
175+
<AuxValues>
176+
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
177+
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
178+
</AuxValues>
179+
</Component>
180+
<Component class="javax.swing.JLabel" name="appHomepageLabel">
181+
<Properties>
182+
<Property name="name" type="java.lang.String" value="appHomepageLabel" noResource="true"/>
183+
</Properties>
184+
<AuxValues>
185+
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
186+
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
187+
</AuxValues>
188+
</Component>
189+
<Component class="javax.swing.JLabel" name="appDescLabel">
190+
<Properties>
191+
<Property name="text" type="java.lang.String" resourceKey="appDescLabel.text"/>
192+
<Property name="name" type="java.lang.String" value="appDescLabel" noResource="true"/>
193+
</Properties>
194+
<AuxValues>
195+
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
196+
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
197+
</AuxValues>
198+
</Component>
199+
<Component class="javax.swing.JLabel" name="imageLabel">
200+
<Properties>
201+
<Property name="icon" type="javax.swing.Icon" resourceKey="imageLabel.icon"/>
202+
<Property name="name" type="java.lang.String" value="imageLabel" noResource="true"/>
203+
</Properties>
204+
<AuxValues>
205+
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
206+
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
207+
</AuxValues>
208+
</Component>
209+
</SubComponents>
210+
</Form>

src/org/free/jshoc/AboutBox.java

Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
/*
2+
* MainAboutBox.java
3+
*/
4+
5+
package org.free.jshoc;
6+
7+
public class AboutBox extends javax.swing.JDialog {
8+
9+
public AboutBox(java.awt.Frame parent) {
10+
super(parent);
11+
initComponents();
12+
this.setDefaultCloseOperation(javax.swing.JFrame.DISPOSE_ON_CLOSE);
13+
//getRootPane().setDefaultButton(closeButton);
14+
}
15+
16+
/** This method is called from within the constructor to
17+
* initialize the form.
18+
* WARNING: Do NOT modify this code. The content of this method is
19+
* always regenerated by the Form Editor.
20+
*/
21+
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
22+
private void initComponents() {
23+
24+
closeButton = new javax.swing.JButton();
25+
javax.swing.JLabel appTitleLabel = new javax.swing.JLabel();
26+
javax.swing.JLabel versionLabel = new javax.swing.JLabel();
27+
javax.swing.JLabel appVersionLabel = new javax.swing.JLabel();
28+
javax.swing.JLabel vendorLabel = new javax.swing.JLabel();
29+
javax.swing.JLabel appVendorLabel = new javax.swing.JLabel();
30+
javax.swing.JLabel homepageLabel = new javax.swing.JLabel();
31+
javax.swing.JLabel appHomepageLabel = new javax.swing.JLabel();
32+
javax.swing.JLabel appDescLabel = new javax.swing.JLabel();
33+
javax.swing.JLabel imageLabel = new javax.swing.JLabel();
34+
35+
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
36+
org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance().getContext().getResourceMap(AboutBox.class);
37+
setTitle(resourceMap.getString("title")); // NOI18N
38+
setModal(true);
39+
setName("aboutBox"); // NOI18N
40+
setResizable(false);
41+
42+
//javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance().getContext().getActionMap(AboutBox.class, this);
43+
//closeButton.setAction(actionMap.get("closeAboutBox")); // NOI18N
44+
closeButton.setName("closeButton"); // NOI18N
45+
/*
46+
closeButton.addActionListener(new java.awt.event.ActionListener() {
47+
public void actionPerformed(java.awt.event.ActionEvent evt) {
48+
closeButtonActionPerformed(evt);
49+
}
50+
});
51+
*/
52+
appTitleLabel.setFont(appTitleLabel.getFont().deriveFont(appTitleLabel.getFont().getStyle() | java.awt.Font.BOLD, appTitleLabel.getFont().getSize()+4));
53+
appTitleLabel.setName("appTitleLabel"); // NOI18N
54+
55+
versionLabel.setFont(versionLabel.getFont().deriveFont(versionLabel.getFont().getStyle() | java.awt.Font.BOLD));
56+
versionLabel.setText(resourceMap.getString("versionLabel.text")); // NOI18N
57+
versionLabel.setName("versionLabel"); // NOI18N
58+
59+
appVersionLabel.setName("appVersionLabel"); // NOI18N
60+
61+
vendorLabel.setFont(vendorLabel.getFont().deriveFont(vendorLabel.getFont().getStyle() | java.awt.Font.BOLD));
62+
vendorLabel.setText(resourceMap.getString("vendorLabel.text")); // NOI18N
63+
vendorLabel.setName("vendorLabel"); // NOI18N
64+
65+
appVendorLabel.setName("appVendorLabel"); // NOI18N
66+
67+
homepageLabel.setFont(homepageLabel.getFont().deriveFont(homepageLabel.getFont().getStyle() | java.awt.Font.BOLD));
68+
homepageLabel.setText(resourceMap.getString("homepageLabel.text")); // NOI18N
69+
homepageLabel.setName("homepageLabel"); // NOI18N
70+
71+
appHomepageLabel.setName("appHomepageLabel"); // NOI18N
72+
73+
appDescLabel.setText(resourceMap.getString("appDescLabel.text")); // NOI18N
74+
appDescLabel.setName("appDescLabel"); // NOI18N
75+
76+
imageLabel.setIcon(resourceMap.getIcon("imageLabel.icon")); // NOI18N
77+
imageLabel.setName("imageLabel"); // NOI18N
78+
79+
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
80+
getContentPane().setLayout(layout);
81+
layout.setHorizontalGroup(
82+
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
83+
.addGroup(layout.createSequentialGroup()
84+
.addComponent(imageLabel)
85+
.addGap(18, 18, 18)
86+
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
87+
.addGroup(layout.createSequentialGroup()
88+
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
89+
.addComponent(appDescLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 316, Short.MAX_VALUE)
90+
.addGroup(layout.createSequentialGroup()
91+
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
92+
.addComponent(versionLabel)
93+
.addComponent(vendorLabel)
94+
.addComponent(homepageLabel))
95+
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
96+
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
97+
.addComponent(appVersionLabel)
98+
.addComponent(appVendorLabel)
99+
.addComponent(appHomepageLabel)))
100+
.addComponent(appTitleLabel))
101+
.addContainerGap())
102+
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
103+
.addComponent(closeButton)
104+
.addGap(36, 36, 36))))
105+
);
106+
layout.setVerticalGroup(
107+
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
108+
.addComponent(imageLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
109+
.addGroup(layout.createSequentialGroup()
110+
.addContainerGap()
111+
.addComponent(appTitleLabel)
112+
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
113+
.addComponent(appDescLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
114+
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
115+
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
116+
.addComponent(versionLabel)
117+
.addComponent(appVersionLabel))
118+
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
119+
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
120+
.addComponent(vendorLabel)
121+
.addComponent(appVendorLabel))
122+
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
123+
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
124+
.addComponent(homepageLabel)
125+
.addComponent(appHomepageLabel))
126+
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 42, Short.MAX_VALUE)
127+
.addComponent(closeButton)
128+
.addContainerGap())
129+
);
130+
131+
pack();
132+
}// </editor-fold>//GEN-END:initComponents
133+
134+
private void closeButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_closeButtonActionPerformed
135+
// TODO add your handling code here:
136+
this.dispose();
137+
}//GEN-LAST:event_closeButtonActionPerformed
138+
139+
// Variables declaration - do not modify//GEN-BEGIN:variables
140+
private javax.swing.JButton closeButton;
141+
// End of variables declaration//GEN-END:variables
142+
143+
}

0 commit comments

Comments
 (0)