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