CyclicNumberAxis cna = null;
if (plot.getDomainAxis() instanceof CyclicNumberAxis) cna = (CyclicNumberAxis)plot.getDomainAxis();
panel.add(cbcyclex = new ActionCheckBox(resources.getString("CyclicAxis"), cna!=null) {
public void actionPerformed(ActionEvent e) {
CardLayout cl = (CardLayout)(xcards.getLayout());
if (isSelected()) cl.show(xcards, "cyclic");
else cl.show(xcards, "normal");
}
});
panel.add(cbinvertx = new ActionCheckBox(resources.getString("Inverted"), plot.getDomainAxis().isInverted()) {
public void actionPerformed(ActionEvent e) {
}
});
section.add(panel);
xcards = new JPanel();
xcards.setLayout(new CardLayout());
Box hbox = Box.createHorizontalBox();
hbox.add(new JLabel(resources.getString("Period")));
hbox.add(nfperiodx = new NumberField(cna==null ? 0 : cna.getPeriod()));
hbox.add(Box.createHorizontalGlue());
hbox.add(new JLabel(resources.getString("Offset")));
hbox.add(nfoffsetx = new NumberField(cna==null ? 0 : cna.getOffset()));
xcards.add(hbox,"cyclic");
panel = new JPanel();
panel.setLayout(new FlowLayout(FlowLayout.LEFT));
double autorange = plot.getDomainAxis().getFixedAutoRange();
panel.add(cbfixedautox = new ActionCheckBox(resources.getString("FixedRange"),autorange!=0) {
public void actionPerformed(ActionEvent e) {
nffixedautox.setEnabled(isSelected() && isEnabled());
}
});
panel.add(nffixedautox = new NumberField(autorange,10));
xcards.add(panel,"normal");
section.add(xcards);
panel = new JPanel();
panel.setLayout(new FlowLayout(FlowLayout.LEFT));
panel.add(cbautox = new ActionCheckBox(resources.getString("Auto-update"), plot.getDomainAxis().isAutoRange()) {
public void actionPerformed(ActionEvent e) {
cbfixedautox.setEnabled(isSelected());
cbfixedautox.apply();
lpxmin.setEnabled(!isSelected());
lpxmax.setEnabled(!isSelected());
tfpxmin.setEnabled(!isSelected());
tfpxmax.setEnabled(!isSelected());
}
});
panel.add(lpxmin = new JLabel(resources.getString("minLabel")));
panel.add(tfpxmin = new NumberField(10));
tfpxmin.setValue(plot.getDomainAxis().getLowerBound());
panel.add(lpxmax = new JLabel(resources.getString("maxLabel")));
panel.add(tfpxmax = new NumberField(10));
tfpxmax.setValue(plot.getDomainAxis().getUpperBound());
cbautox.apply();
section.add(panel);
content.add(section);
// Now handle Y axis
section = new Box(BoxLayout.Y_AXIS);
section.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(),resources.getString("YAxis")));
panel = new JPanel();
panel.setLayout(new FlowLayout(FlowLayout.LEFT));
cna = null;
if (plot.getRangeAxis() instanceof CyclicNumberAxis) cna = (CyclicNumberAxis)plot.getRangeAxis();
panel.add(cbcycley = new ActionCheckBox(resources.getString("CyclicAxis"), cna!=null) {
public void actionPerformed(ActionEvent e) {
CardLayout cl = (CardLayout)(ycards.getLayout());
if (isSelected()) cl.show(ycards, "cyclic");
else cl.show(ycards, "normal");
}
});
panel.add(cbinverty = new ActionCheckBox(resources.getString("Inverted"), plot.getRangeAxis().isInverted()) {
public void actionPerformed(ActionEvent e) {
}
});
section.add(panel);
ycards = new JPanel();
ycards.setLayout(new CardLayout());
hbox = Box.createHorizontalBox();
hbox.add(new JLabel(resources.getString("Period")));
hbox.add(nfperiody = new NumberField(cna==null ? 0 : cna.getPeriod()));
hbox.add(Box.createHorizontalGlue());