Permalink
Browse files

various small fixes

  • Loading branch information...
1 parent 02f17c0 commit aab78d9a8c91d87d05ed06a0dd00bee1da2a49da @anti43 committed Aug 24, 2013
@@ -138,7 +138,7 @@ public JComponent getView() {
// }
public synchronized String __getHierarchypath() {
- if (hierarchypath.contains(Group.GROUPSEPARATOR + Group.GROUPSEPARATOR)) {
+ if (hierarchypath!=null&&hierarchypath.contains(Group.GROUPSEPARATOR + Group.GROUPSEPARATOR)) {
hierarchypath = "";
}
if (hierarchypath == null || hierarchypath.equals("")) {
@@ -252,7 +252,10 @@ public synchronized void setModel(List<DatabaseObject> model, int fieldCount, St
public synchronized void reset() {
if (desiredColSizes != null) {
createDefaultColumnsFromModel();
- TableFormat.resizeCols(this, desiredColSizes, fixedCols);
+ try {
+ TableFormat.resizeCols(this, desiredColSizes, fixedCols);
+ } catch (Exception e) {
+ }
} else {
createDefaultColumnsFromModel();
}
@@ -4,6 +4,8 @@
<NonVisualComponents>
<Component class="javax.swing.ButtonGroup" name="buttonGroup1">
</Component>
+ <Component class="javax.swing.ButtonGroup" name="buttonGroup2">
+ </Component>
</NonVisualComponents>
<Properties>
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
@@ -138,14 +140,14 @@
<Component id="zip" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="city" alignment="2" min="-2" max="-2" attributes="0"/>
</Group>
- <EmptySpace type="unrelated" max="-2" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="2" attributes="0">
<Component id="jButton1" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="jButton2" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="dadress" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="badress" alignment="2" min="-2" max="-2" attributes="0"/>
</Group>
- <EmptySpace min="-2" pref="23" max="-2" attributes="0"/>
+ <EmptySpace min="-2" pref="29" max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
@@ -241,6 +243,9 @@
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
<Color blue="cc" green="cc" red="cc" type="rgb"/>
</Property>
+ <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
+ <ComponentRef name="buttonGroup2"/>
+ </Property>
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.editors2.FontEditor">
<FontInfo relative="true">
<Font bold="false" component="male" property="font" relativeSize="true" size="0"/>
@@ -258,6 +263,9 @@
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
<Color blue="cc" green="cc" red="cc" type="rgb"/>
</Property>
+ <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
+ <ComponentRef name="buttonGroup2"/>
+ </Property>
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.editors2.FontEditor">
<FontInfo relative="true">
<Font bold="false" component="female" property="font" relativeSize="true" size="0"/>
@@ -64,6 +64,7 @@ public AddressPanel() {
private void initComponents() {
buttonGroup1 = new javax.swing.ButtonGroup();
+ buttonGroup2 = new javax.swing.ButtonGroup();
jPanel2 = new javax.swing.JPanel();
mainaddress = new javax.swing.JPanel();
title = new mpv5.ui.beans.LabeledTextField();
@@ -94,7 +95,7 @@ private void initComponents() {
mainaddress.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1));
mainaddress.setName("mainaddress"); // NOI18N
- java.util.ResourceBundle bundle = mpv5.i18n.LanguageManager.getBundle(); // NOI18N
+ java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle("mpv5/resources/languages/Panels"); // NOI18N
title.set_Label(bundle.getString("AddressPanel.title._Label")); // NOI18N
title.setMaximumSize(new java.awt.Dimension(120, 21));
title.setMinimumSize(new java.awt.Dimension(120, 24));
@@ -126,12 +127,14 @@ private void initComponents() {
zip.setPreferredSize(new java.awt.Dimension(120, 24));
male.setBackground(new java.awt.Color(204, 204, 204));
+ buttonGroup2.add(male);
male.setFont(male.getFont().deriveFont(male.getFont().getStyle() & ~java.awt.Font.BOLD));
male.setSelected(true);
male.setText(bundle.getString("AddressPanel.male.text")); // NOI18N
male.setName("male"); // NOI18N
female.setBackground(new java.awt.Color(204, 204, 204));
+ buttonGroup2.add(female);
female.setFont(female.getFont().deriveFont(female.getFont().getStyle() & ~java.awt.Font.BOLD));
female.setText(bundle.getString("AddressPanel.female.text")); // NOI18N
female.setName("female"); // NOI18N
@@ -251,13 +254,13 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
.addComponent(street, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(zip, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(city, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(mainaddressLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
.addComponent(jButton1)
.addComponent(jButton2)
.addComponent(dadress)
.addComponent(badress))
- .addGap(23, 23, 23))
+ .addGap(29, 29, 29))
);
jPanel2.add(mainaddress, java.awt.BorderLayout.CENTER);
@@ -291,6 +294,7 @@ private void countryselectActionPerformed(java.awt.event.ActionEvent evt) {//GEN
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JCheckBox badress;
private javax.swing.ButtonGroup buttonGroup1;
+ private javax.swing.ButtonGroup buttonGroup2;
private mpv5.ui.beans.LabeledTextField city;
private mpv5.ui.beans.LabeledTextField cname;
private javax.swing.JComboBox countryselect;
@@ -0,0 +1,9 @@
+# To change this template, choose Tools | Templates
+# and open the template in the editor.
+
+Stockmanager.labeledTextField1._Label=Filter entries
+Stockmanager.jButton2.text=Stockup
+Stockmanager.jPanel1.border.title=Stockmanager
+Stockmanager.jLabel1.text=Scan or paste product ean into the field below
+Stockmanager.auto.text=Send automatically
+Stockmanager.jButton1.text=Save entries to database
@@ -282,8 +282,8 @@ private void fillFiles() {
c.addReference(Context.getFiles().getDbIdentity(), "cname", "filename");
Object[][] data = new DatabaseSearch(c).getValuesFor(Context.DETAILS_FILES_TO_CONTACTS, "contactsids", dataOwner.__getIDS());
- dataTable.setModel(new MPTableModel(data, Headers.FILE_REFERENCES.getValue()));
- TableFormat.stripFirstColumn(dataTable);
+ filetableN.setModel(new MPTableModel(data, Headers.FILE_REFERENCES.getValue()));
+ TableFormat.stripFirstColumn(filetableN);
}
/**
@@ -1207,7 +1207,10 @@ private void fillContactFields() {
private void preloadTemplates() {
Runnable runnable = new Runnable() {
public void run() {
- TemplateHandler.loadTemplate(dataOwner.templateGroupIds(), dataOwner.templateType());
+ try {
+ TemplateHandler.loadTemplate(dataOwner.templateGroupIds(), dataOwner.templateType());
+ } catch (Exception e) {
+ }
}
};
new Thread(runnable).start();
@@ -2039,7 +2039,7 @@ public void actionBeforeSave() throws ChangeNotApprovedException {
if (dataOwner.isExisting()) {
if ((dataOwner.__getIntstatus() != Item.STATUS_PAID && dataOwner.__getIntstatus() != Item.STATUS_CANCELLED) || Popup.Y_N_dialog(Messages.REALLY_CHANGE_DONE_ITEM)) {
- if (!mpv5.db.objects.User.getCurrentUser().getProperties().getProperty("org.openyabs.uiproperty", "nowarnings")) {
+ if (mpv5.db.objects.User.getCurrentUser().getProperties().getProperty("org.openyabs.uiproperty", "dowarnings")) {
if (!Popup.Y_N_dialog(Messages.REALLY_CHANGE)) {
throw new ChangeNotApprovedException(dataOwner);
@@ -1580,7 +1580,7 @@ public void actionBeforeSave() throws ChangeNotApprovedException {
if (dataOwner.isExisting()) {
if ((dataOwner.getIntstatus() != Item.STATUS_PAID && dataOwner.getIntstatus() != Item.STATUS_CANCELLED) || Popup.Y_N_dialog(Messages.REALLY_CHANGE_DONE_ITEM)) {
- if (!mpv5.db.objects.User.getCurrentUser().getProperties().getProperty("org.openyabs.uiproperty", "nowarnings")) {
+ if (mpv5.db.objects.User.getCurrentUser().getProperties().getProperty("org.openyabs.uiproperty", "dowarnings")) {
if (!Popup.Y_N_dialog(Messages.REALLY_CHANGE)) {
throw new ChangeNotApprovedException(dataOwner);
@@ -79,7 +79,6 @@
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
- <EmptySpace min="0" pref="0" max="-2" attributes="0"/>
<Component id="jPanel7" pref="0" max="32767" attributes="0"/>
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
@@ -99,15 +98,16 @@
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="jPanel1" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
- <Component id="jTabbedPane1" min="-2" pref="253" max="-2" attributes="0"/>
+ <Component id="jTabbedPane1" min="-2" pref="293" max="-2" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jPanel7" pref="0" max="32767" attributes="0"/>
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="addfile" min="-2" max="-2" attributes="1"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="removefile" min="-2" max="-2" attributes="1"/>
- <EmptySpace pref="46" max="32767" attributes="0"/>
+ <EmptySpace pref="29" max="32767" attributes="0"/>
</Group>
</Group>
</Group>
@@ -489,7 +489,7 @@
</Group>
</Group>
<EmptySpace max="-2" attributes="0"/>
- <Component id="jScrollPane3" pref="349" max="32767" attributes="0"/>
+ <Component id="jScrollPane3" pref="336" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
@@ -526,7 +526,7 @@
<Component id="calcFactor" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="calcResult" alignment="2" min="-2" max="-2" attributes="0"/>
</Group>
- <EmptySpace min="0" pref="0" max="32767" attributes="0"/>
+ <EmptySpace min="0" pref="16" max="32767" attributes="0"/>
</Group>
<Component id="jScrollPane3" max="32767" attributes="0"/>
</Group>
@@ -861,7 +861,7 @@
<Component id="jButton1" min="-2" max="-2" attributes="0"/>
<Component id="jButton2" min="-2" max="-2" attributes="0"/>
</Group>
- <EmptySpace pref="234" max="32767" attributes="0"/>
+ <EmptySpace pref="231" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
@@ -871,9 +871,9 @@
<Component id="jButton1" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="jButton2" min="-2" max="-2" attributes="0"/>
- <EmptySpace pref="165" max="32767" attributes="0"/>
+ <EmptySpace pref="179" max="32767" attributes="0"/>
</Group>
- <Component id="prizes" alignment="0" pref="225" max="32767" attributes="0"/>
+ <Component id="prizes" alignment="0" pref="246" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
</Layout>
Oops, something went wrong.

0 comments on commit aab78d9

Please sign in to comment.