*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
private Action previousAction;
private Action nextAction;
private Action quitAction;
private Action previousAction;
private Action nextAction;
private Action quitAction;
private JPanel pagePanel;
private JLabel pageHeading;
private JLabel pageDescription;
private JPanel pagePanel;
private JLabel pageHeading;
private JLabel pageDescription;
pageIcon = new JLabel();
pageIcon.setVerticalAlignment(SwingConstants.TOP);
pageHeading = new JLabel();
pageHeading.setFont(pageHeading.getFont().deriveFont(pageHeading.getFont().getSize() * 2.0f).deriveFont(Font.BOLD));
pageDescription = new JLabel();
pageIcon = new JLabel();
pageIcon.setVerticalAlignment(SwingConstants.TOP);
pageHeading = new JLabel();
pageHeading.setFont(pageHeading.getFont().deriveFont(pageHeading.getFont().getSize() * 2.0f).deriveFont(Font.BOLD));
pageDescription = new JLabel();
JPanel contentPane = new JPanel(new BorderLayout(12, 12));
contentPane.setBorder(new EmptyBorder(12, 12, 12, 12));
JPanel contentPane = new JPanel(new BorderLayout(12, 12));
contentPane.setBorder(new EmptyBorder(12, 12, 12, 12));
JPanel topPanel = new JPanel(new BorderLayout(12, 12));
contentPane.add(topPanel, BorderLayout.PAGE_START);
JPanel topPanel = new JPanel(new BorderLayout(12, 12));
contentPane.add(topPanel, BorderLayout.PAGE_START);
JPanel textPanel = new JPanel(new BorderLayout(12, 12));
topPanel.add(textPanel, BorderLayout.CENTER);
textPanel.add(pageHeading, BorderLayout.PAGE_START);
textPanel.add(pageDescription, BorderLayout.CENTER);
JPanel textPanel = new JPanel(new BorderLayout(12, 12));
topPanel.add(textPanel, BorderLayout.CENTER);
textPanel.add(pageHeading, BorderLayout.PAGE_START);
textPanel.add(pageDescription, BorderLayout.CENTER);
pagePanel = new JPanel(new BorderLayout(12, 12));
contentPane.add(pagePanel, BorderLayout.CENTER);
pagePanel = new JPanel(new BorderLayout(12, 12));
contentPane.add(pagePanel, BorderLayout.CENTER);
JPanel buttonPanel = new JPanel(new FlowLayout(FlowLayout.TRAILING, 12, 12));
buttonPanel.setBorder(new EmptyBorder(-12, -12, -12, -12));
buttonPanel.add(new JButton(previousAction));
buttonPanel.add(new JButton(nextAction));
buttonPanel.add(new JButton(quitAction));
contentPane.add(buttonPanel, BorderLayout.PAGE_END);
JPanel buttonPanel = new JPanel(new FlowLayout(FlowLayout.TRAILING, 12, 12));
buttonPanel.setBorder(new EmptyBorder(-12, -12, -12, -12));
buttonPanel.add(new JButton(previousAction));
buttonPanel.add(new JButton(nextAction));
buttonPanel.add(new JButton(quitAction));
contentPane.add(buttonPanel, BorderLayout.PAGE_END);
setLocation((screenSize.width - getWidth()) / 2, (screenSize.height - getHeight()) / 2);
// System.out.println("resized to: " + getWidth() + "x" + getHeight());
}
setLocation((screenSize.width - getWidth()) / 2, (screenSize.height - getHeight()) / 2);
// System.out.println("resized to: " + getWidth() + "x" + getHeight());
}
private void createActions() {
previousAction = new AbstractAction("Previous") {
public void actionPerformed(ActionEvent actionEvent) {
actionPrevious();
}
};
private void createActions() {
previousAction = new AbstractAction("Previous") {
public void actionPerformed(ActionEvent actionEvent) {
actionPrevious();
}
};
public void removeWizardListener(WizardListener wizardListener) {
wizardListeners.remove(wizardListener);
}
public void removeWizardListener(WizardListener wizardListener) {
wizardListeners.remove(wizardListener);
}
protected void fireWizardPreviousPressed() {
for (WizardListener wizardListener: wizardListeners) {
wizardListener.wizardPreviousPressed(this);
}
}
protected void fireWizardPreviousPressed() {
for (WizardListener wizardListener: wizardListeners) {
wizardListener.wizardPreviousPressed(this);
}
}
protected void fireWizardNextPressed() {
for (WizardListener wizardListener: wizardListeners) {
wizardListener.wizardNextPressed(this);
}
}
protected void fireWizardNextPressed() {
for (WizardListener wizardListener: wizardListeners) {
wizardListener.wizardNextPressed(this);
}
}
protected void fireWizardQuitPressed() {
for (WizardListener wizardListener: wizardListeners) {
wizardListener.wizardQuitPressed(this);
}
}
protected void fireWizardQuitPressed() {
for (WizardListener wizardListener: wizardListeners) {
wizardListener.wizardQuitPressed(this);
}
}
public void setPreviousEnabled(boolean previousEnabled) {
previousAction.setEnabled(previousEnabled);
}
public void setPreviousEnabled(boolean previousEnabled) {
previousAction.setEnabled(previousEnabled);
}
public void setPreviousName(String previousName) {
previousAction.putValue(Action.NAME, previousName);
}
public void setPreviousName(String previousName) {
previousAction.putValue(Action.NAME, previousName);
}
public void setNextName(String nextName) {
nextAction.putValue(Action.NAME, nextName);
}
public void setNextName(String nextName) {
nextAction.putValue(Action.NAME, nextName);
}
public void setQuitName(String quitName) {
quitAction.putValue(Action.NAME, quitName);
}
public void setQuitName(String quitName) {
quitAction.putValue(Action.NAME, quitName);
}