|
|
@ -52,6 +52,7 @@ public class FormatPane extends BasicPane { |
|
|
|
private UIRadioButton numberRadioButton; |
|
|
|
private UIRadioButton numberRadioButton; |
|
|
|
private UIRadioButton currencyRadioButton; |
|
|
|
private UIRadioButton currencyRadioButton; |
|
|
|
private UIRadioButton percentRadioButton; |
|
|
|
private UIRadioButton percentRadioButton; |
|
|
|
|
|
|
|
private UIRadioButton thousandthsRadioButton; |
|
|
|
private UIRadioButton scientificRadioButton; |
|
|
|
private UIRadioButton scientificRadioButton; |
|
|
|
private UIRadioButton dateRadioButton; |
|
|
|
private UIRadioButton dateRadioButton; |
|
|
|
private UIRadioButton timeRadioButton; |
|
|
|
private UIRadioButton timeRadioButton; |
|
|
@ -99,6 +100,7 @@ public class FormatPane extends BasicPane { |
|
|
|
categoryButtonGroup.add(numberRadioButton); |
|
|
|
categoryButtonGroup.add(numberRadioButton); |
|
|
|
categoryButtonGroup.add(currencyRadioButton); |
|
|
|
categoryButtonGroup.add(currencyRadioButton); |
|
|
|
categoryButtonGroup.add(percentRadioButton); |
|
|
|
categoryButtonGroup.add(percentRadioButton); |
|
|
|
|
|
|
|
categoryButtonGroup.add(thousandthsRadioButton); |
|
|
|
categoryButtonGroup.add(scientificRadioButton); |
|
|
|
categoryButtonGroup.add(scientificRadioButton); |
|
|
|
categoryButtonGroup.add(dateRadioButton); |
|
|
|
categoryButtonGroup.add(dateRadioButton); |
|
|
|
categoryButtonGroup.add(timeRadioButton); |
|
|
|
categoryButtonGroup.add(timeRadioButton); |
|
|
@ -108,6 +110,7 @@ public class FormatPane extends BasicPane { |
|
|
|
leftControlPane.add(this.createRadioCenterPane(numberRadioButton)); |
|
|
|
leftControlPane.add(this.createRadioCenterPane(numberRadioButton)); |
|
|
|
leftControlPane.add(this.createRadioCenterPane(currencyRadioButton)); |
|
|
|
leftControlPane.add(this.createRadioCenterPane(currencyRadioButton)); |
|
|
|
leftControlPane.add(this.createRadioCenterPane(percentRadioButton)); |
|
|
|
leftControlPane.add(this.createRadioCenterPane(percentRadioButton)); |
|
|
|
|
|
|
|
leftControlPane.add(this.createRadioCenterPane(thousandthsRadioButton)); |
|
|
|
leftControlPane.add(this.createRadioCenterPane(scientificRadioButton)); |
|
|
|
leftControlPane.add(this.createRadioCenterPane(scientificRadioButton)); |
|
|
|
leftControlPane.add(this.createRadioCenterPane(dateRadioButton)); |
|
|
|
leftControlPane.add(this.createRadioCenterPane(dateRadioButton)); |
|
|
|
leftControlPane.add(this.createRadioCenterPane(timeRadioButton)); |
|
|
|
leftControlPane.add(this.createRadioCenterPane(timeRadioButton)); |
|
|
@ -136,6 +139,8 @@ public class FormatPane extends BasicPane { |
|
|
|
currencyRadioButton.setMnemonic('C'); |
|
|
|
currencyRadioButton.setMnemonic('C'); |
|
|
|
percentRadioButton = new UIRadioButton(FormatField.getInstance().getName(FormatContents.PERCENT)); |
|
|
|
percentRadioButton = new UIRadioButton(FormatField.getInstance().getName(FormatContents.PERCENT)); |
|
|
|
percentRadioButton.setMnemonic('P'); |
|
|
|
percentRadioButton.setMnemonic('P'); |
|
|
|
|
|
|
|
thousandthsRadioButton = new UIRadioButton(FormatField.getInstance().getName(FormatContents.THOUSANDTHS)); |
|
|
|
|
|
|
|
thousandthsRadioButton.setMnemonic('Q'); |
|
|
|
scientificRadioButton = new UIRadioButton(FormatField.getInstance().getName(FormatContents.SCIENTIFIC)); |
|
|
|
scientificRadioButton = new UIRadioButton(FormatField.getInstance().getName(FormatContents.SCIENTIFIC)); |
|
|
|
scientificRadioButton.setMnemonic('S'); |
|
|
|
scientificRadioButton.setMnemonic('S'); |
|
|
|
dateRadioButton = new UIRadioButton(FormatField.getInstance().getName(FormatContents.DATE)); |
|
|
|
dateRadioButton = new UIRadioButton(FormatField.getInstance().getName(FormatContents.DATE)); |
|
|
@ -149,6 +154,7 @@ public class FormatPane extends BasicPane { |
|
|
|
numberRadioButton.addActionListener(radioActionListener); |
|
|
|
numberRadioButton.addActionListener(radioActionListener); |
|
|
|
currencyRadioButton.addActionListener(radioActionListener); |
|
|
|
currencyRadioButton.addActionListener(radioActionListener); |
|
|
|
percentRadioButton.addActionListener(radioActionListener); |
|
|
|
percentRadioButton.addActionListener(radioActionListener); |
|
|
|
|
|
|
|
thousandthsRadioButton.addActionListener(radioActionListener); |
|
|
|
scientificRadioButton.addActionListener(radioActionListener); |
|
|
|
scientificRadioButton.addActionListener(radioActionListener); |
|
|
|
dateRadioButton.addActionListener(radioActionListener); |
|
|
|
dateRadioButton.addActionListener(radioActionListener); |
|
|
|
timeRadioButton.addActionListener(radioActionListener); |
|
|
|
timeRadioButton.addActionListener(radioActionListener); |
|
|
@ -234,6 +240,9 @@ public class FormatPane extends BasicPane { |
|
|
|
} else if (pattern.endsWith("%")) { |
|
|
|
} else if (pattern.endsWith("%")) { |
|
|
|
this.percentRadioButton.setSelected(true); |
|
|
|
this.percentRadioButton.setSelected(true); |
|
|
|
this.applyRadioActionListener(this.percentRadioButton); |
|
|
|
this.applyRadioActionListener(this.percentRadioButton); |
|
|
|
|
|
|
|
} else if (pattern.equals("‰")){ |
|
|
|
|
|
|
|
this.thousandthsRadioButton.setSelected(true); |
|
|
|
|
|
|
|
this.applyRadioActionListener(this.thousandthsRadioButton); |
|
|
|
} else if (pattern.indexOf("E") > 0) { |
|
|
|
} else if (pattern.indexOf("E") > 0) { |
|
|
|
this.scientificRadioButton.setSelected(true); |
|
|
|
this.scientificRadioButton.setSelected(true); |
|
|
|
this.applyRadioActionListener(this.scientificRadioButton); |
|
|
|
this.applyRadioActionListener(this.scientificRadioButton); |
|
|
@ -259,6 +268,7 @@ public class FormatPane extends BasicPane { |
|
|
|
scientificRadioButton.setEnabled(false); |
|
|
|
scientificRadioButton.setEnabled(false); |
|
|
|
textRadioButton.setEnabled(false); |
|
|
|
textRadioButton.setEnabled(false); |
|
|
|
percentRadioButton.setEnabled(false); |
|
|
|
percentRadioButton.setEnabled(false); |
|
|
|
|
|
|
|
thousandthsRadioButton.setEnabled(false); |
|
|
|
nullRadioButton.setEnabled(false); |
|
|
|
nullRadioButton.setEnabled(false); |
|
|
|
dateRadioButton.setEnabled(false); |
|
|
|
dateRadioButton.setEnabled(false); |
|
|
|
timeRadioButton.setEnabled(false); |
|
|
|
timeRadioButton.setEnabled(false); |
|
|
@ -285,6 +295,7 @@ public class FormatPane extends BasicPane { |
|
|
|
numberRadioButton.setEnabled(false); |
|
|
|
numberRadioButton.setEnabled(false); |
|
|
|
currencyRadioButton.setEnabled(false); |
|
|
|
currencyRadioButton.setEnabled(false); |
|
|
|
percentRadioButton.addActionListener(radioActionListener); |
|
|
|
percentRadioButton.addActionListener(radioActionListener); |
|
|
|
|
|
|
|
thousandthsRadioButton.setEnabled(false); |
|
|
|
scientificRadioButton.setEnabled(false); |
|
|
|
scientificRadioButton.setEnabled(false); |
|
|
|
dateRadioButton.setEnabled(false); |
|
|
|
dateRadioButton.setEnabled(false); |
|
|
|
timeRadioButton.setEnabled(false); |
|
|
|
timeRadioButton.setEnabled(false); |
|
|
@ -333,6 +344,8 @@ public class FormatPane extends BasicPane { |
|
|
|
return FormatContents.CURRENCY; |
|
|
|
return FormatContents.CURRENCY; |
|
|
|
else if (percentRadioButton.isSelected()) |
|
|
|
else if (percentRadioButton.isSelected()) |
|
|
|
return FormatContents.PERCENT; |
|
|
|
return FormatContents.PERCENT; |
|
|
|
|
|
|
|
else if (thousandthsRadioButton.isSelected()) |
|
|
|
|
|
|
|
return FormatContents.THOUSANDTHS; |
|
|
|
else if (scientificRadioButton.isSelected()) |
|
|
|
else if (scientificRadioButton.isSelected()) |
|
|
|
return FormatContents.SCIENTIFIC; |
|
|
|
return FormatContents.SCIENTIFIC; |
|
|
|
else if (dateRadioButton.isSelected()) |
|
|
|
else if (dateRadioButton.isSelected()) |
|
|
@ -453,6 +466,8 @@ public class FormatPane extends BasicPane { |
|
|
|
contents = FormatContents.CURRENCY; |
|
|
|
contents = FormatContents.CURRENCY; |
|
|
|
} else if (ComparatorUtils.equals(source,percentRadioButton)) { |
|
|
|
} else if (ComparatorUtils.equals(source,percentRadioButton)) { |
|
|
|
contents = FormatContents.PERCENT; |
|
|
|
contents = FormatContents.PERCENT; |
|
|
|
|
|
|
|
}else if (ComparatorUtils.equals(source,thousandthsRadioButton)){ |
|
|
|
|
|
|
|
contents = FormatContents.THOUSANDTHS; |
|
|
|
} else if (ComparatorUtils.equals(source,scientificRadioButton)) { |
|
|
|
} else if (ComparatorUtils.equals(source,scientificRadioButton)) { |
|
|
|
contents = FormatContents.SCIENTIFIC; |
|
|
|
contents = FormatContents.SCIENTIFIC; |
|
|
|
} else if (ComparatorUtils.equals(source,dateRadioButton)) { |
|
|
|
} else if (ComparatorUtils.equals(source,dateRadioButton)) { |
|
|
|