Main Page | Packages | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

org.objectweb.cjdbc.console.gui.frames.GuiInputBackupFrame Class Reference

Collaboration diagram for org.objectweb.cjdbc.console.gui.frames.GuiInputBackupFrame:

Collaboration graph
[legend]
List of all members.

Public Member Functions

void windowActivated (WindowEvent e)
void windowClosed (WindowEvent e)
void windowClosing (WindowEvent e)
void windowDeactivated (WindowEvent e)
void windowDeiconified (WindowEvent e)
void windowIconified (WindowEvent e)
void windowOpened (WindowEvent e)
void windowStateChanged (WindowEvent e)
 GuiInputBackupFrame (Frame owner, String[] entries, ActionListener listener) throws HeadlessException
JTextField getValueField ()
final void setValue (String value)

Detailed Description

This class defines a GuiSelectCheckpoint

Author:
Nicolas Modrzyk
Version:
1.0

Definition at line 63 of file GuiInputBackupFrame.java.


Constructor & Destructor Documentation

org.objectweb.cjdbc.console.gui.frames.GuiInputBackupFrame.GuiInputBackupFrame Frame  owner,
String[]  entries,
ActionListener  listener
throws HeadlessException
 

Creates a new GuiSelectCheckpoint object

Parameters:
owner frame owner
entries choices for selection
listener to receive events
Exceptions:
java.awt.HeadlessException if fails

Definition at line 145 of file GuiInputBackupFrame.java.

00147   {
00148     super(owner, GuiTranslate.get("frame.backup.title"), true);
00149 
00150     // Center
00151     Toolkit toolkit = Toolkit.getDefaultToolkit();
00152     Dimension dim = toolkit.getScreenSize();
00153     int screenHeight = dim.height;
00154     int screenWidth = dim.width;
00155     int frameWidth = 550;
00156     int frameHeight = 50;
00157     this.setBounds((screenWidth - frameWidth) / 2,
00158         (screenHeight - frameHeight) / 2, frameWidth, frameHeight);
00159 
00160     this.addWindowListener(this);
00161     this.addWindowStateListener(this);
00162 
00163     JButton optionConfirm = new JButton(GuiTranslate.get("frame.ok"));
00164     optionConfirm.setActionCommand(GuiCommands.COMMAND_HIDE_BACKUP_FRAME);
00165     optionConfirm.addActionListener(listener);
00166     
00167     keyListener = new FrameConfirmKeyListener(optionConfirm);
00168     this.addKeyListener(keyListener);
00169     
00170     Container content = getContentPane();
00171     sampleJList = new JList(entries);
00172     sampleJList.setVisibleRowCount(4);
00173     Font displayFont = new Font("Serif", Font.BOLD, 10);
00174     sampleJList.setFont(displayFont);
00175     sampleJList.addListSelectionListener(new ValueReporter());
00176     sampleJList.addKeyListener(keyListener);
00177     JScrollPane listPane = new JScrollPane(sampleJList);
00178 
00179     JPanel listPanel = new JPanel();
00180     listPanel.setEnabled(false);
00181     listPanel.setBackground(Color.white);
00182     Border listPanelBorder = BorderFactory.createTitledBorder(GuiTranslate
00183         .get("frame.backup.list"));
00184     listPanel.setBorder(listPanelBorder);
00185     listPanel.add(listPane);
00186     content.add(listPanel, BorderLayout.CENTER);
00187     JLabel valueLabel = new JLabel(GuiTranslate.get("frame.backup.selection"));
00188     valueLabel.setFont(displayFont);
00189     valueField = new JTextField(GuiConstants.BACKEND_NO_CHECKPOINT, 7);
00190     valueField.setFont(displayFont);
00191     valueField.addKeyListener(keyListener);
00192 
00193     JPanel valuePanel = new JPanel();
00194     valuePanel.setBackground(Color.white);
00195     Border valuePanelBorder = BorderFactory.createTitledBorder(GuiTranslate
00196         .get("frame.backup"));
00197     valuePanel.setBorder(valuePanelBorder);
00198     valuePanel.add(valueLabel);
00199     valuePanel.add(valueField);
00200     content.add(valuePanel, BorderLayout.NORTH);
00201 
00202     JPanel selectPanel = new JPanel();
00203     selectPanel.setBackground(Color.white);
00204     Border selectPanelBorder = BorderFactory.createTitledBorder(GuiTranslate
00205         .get("frame.select"));
00206     selectPanel.setBorder(selectPanelBorder);
00207     
00208     
00209     selectPanel.add(optionConfirm);
00210     content.add(selectPanel, BorderLayout.SOUTH);
00211     pack();
00212   }


Member Function Documentation

JTextField org.objectweb.cjdbc.console.gui.frames.GuiInputBackupFrame.getValueField  ) 
 

Returns the valueField value.

Returns:
Returns the valueField.

Definition at line 231 of file GuiInputBackupFrame.java.

00232   {
00233     return valueField;
00234   }

final void org.objectweb.cjdbc.console.gui.frames.GuiInputBackupFrame.setValue String  value  ) 
 

Sets the value value.

Parameters:
value The value to set.

Definition at line 241 of file GuiInputBackupFrame.java.

00242   {
00243     valueField.setText(value);
00244     valueField.repaint();
00245   }

void org.objectweb.cjdbc.console.gui.frames.GuiInputBackupFrame.windowActivated WindowEvent  e  ) 
 

See also:
java.awt.event.WindowListener#windowActivated(java.awt.event.WindowEvent)

Definition at line 75 of file GuiInputBackupFrame.java.

00076   {
00077 
00078   }

void org.objectweb.cjdbc.console.gui.frames.GuiInputBackupFrame.windowClosed WindowEvent  e  ) 
 

See also:
java.awt.event.WindowListener#windowClosed(java.awt.event.WindowEvent)

Definition at line 83 of file GuiInputBackupFrame.java.

00084   {
00085     this.setVisible(false);
00086     valueField = null;
00087   }

void org.objectweb.cjdbc.console.gui.frames.GuiInputBackupFrame.windowClosing WindowEvent  e  ) 
 

See also:
java.awt.event.WindowListener#windowClosing(java.awt.event.WindowEvent)

Definition at line 92 of file GuiInputBackupFrame.java.

00093   {
00094     valueField = null;
00095   }

void org.objectweb.cjdbc.console.gui.frames.GuiInputBackupFrame.windowDeactivated WindowEvent  e  ) 
 

See also:
java.awt.event.WindowListener#windowDeactivated(java.awt.event.WindowEvent)

Definition at line 100 of file GuiInputBackupFrame.java.

00101   {
00102 
00103   }

void org.objectweb.cjdbc.console.gui.frames.GuiInputBackupFrame.windowDeiconified WindowEvent  e  ) 
 

See also:
java.awt.event.WindowListener#windowDeiconified(java.awt.event.WindowEvent)

Definition at line 108 of file GuiInputBackupFrame.java.

00109   {
00110 
00111   }

void org.objectweb.cjdbc.console.gui.frames.GuiInputBackupFrame.windowIconified WindowEvent  e  ) 
 

See also:
java.awt.event.WindowListener#windowIconified(java.awt.event.WindowEvent)

Definition at line 116 of file GuiInputBackupFrame.java.

00117   {
00118 
00119   }

void org.objectweb.cjdbc.console.gui.frames.GuiInputBackupFrame.windowOpened WindowEvent  e  ) 
 

See also:
java.awt.event.WindowListener#windowOpened(java.awt.event.WindowEvent)

Definition at line 124 of file GuiInputBackupFrame.java.

00125   {
00126 
00127   }

void org.objectweb.cjdbc.console.gui.frames.GuiInputBackupFrame.windowStateChanged WindowEvent  e  ) 
 

See also:
java.awt.event.WindowStateListener#windowStateChanged(java.awt.event.WindowEvent)

Definition at line 132 of file GuiInputBackupFrame.java.

00133   {
00134 
00135   }


The documentation for this class was generated from the following file:
Generated on Mon Apr 11 22:02:22 2005 for C-JDBC by  doxygen 1.3.9.1