Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

dtk.gui
Class TKStandardDebatesBox  view TKStandardDebatesBox download TKStandardDebatesBox.java

java.lang.Object
  extended bydtk.gui.TKAddressEntryBox
      extended bydtk.gui.TKStandardDebatesBox
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener

public class TKStandardDebatesBox
extends TKAddressEntryBox
implements java.awt.event.ActionListener

This class extends the TKAddressEntryBox to create a panel that adds and deletes debate topics. It uses the same basic structure as TKAddressEntryBox, only it uses the "firstName" variable to store, render and edit the debate topic.


Nested Class Summary
 class TKStandardDebatesBox.HelpButtonListener
          Listen and respond to the help buttons.
 
Nested classes inherited from class dtk.gui.TKAddressEntryBox
TKAddressEntryBox.AddressBookEntryComparator, TKAddressEntryBox.MyListCellRenderer, TKAddressEntryBox.MyListSelectionListener, TKAddressEntryBox.MyMouseListener
 
Field Summary
(package private)  javax.swing.JButton helpButton
           
(package private)  java.lang.String variable
           
(package private)  TKWidgetMaker wm
           
 
Fields inherited from class dtk.gui.TKAddressEntryBox
addNewEntryButton, addNewEntryLabel, addressJList, addressListScrollPane, box1, box2, buttonH, buttonW, comparitor, confirm, downButton, downButtonLabel, editEntryButton, editEntryButtonLabel, entryList, eTextBox, helpWindow, identifier, jLabel, label, listModel, mainPanel, newEntryButton, newEntryButtonLabel, numButtons, panel, params, removeEntryButton, removeEntryButtonLabel, textBox, textBoxLength, upButton, upButtonLabel
 
Constructor Summary
TKStandardDebatesBox()
          Constructor.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          Handle button clicking events.
 void addNewEntry(TKAddressBookEntry entry)
          Override the method so that you can save to the parameterSet when a new entry is added.
protected  void editCurrentItem(int index)
          Pop up an entry box to allow editing of the entry.
protected  void fillListModel()
          Create the listModel of debate topics.
 javax.swing.JPanel getPanel()
          Return the JPanel that holds this entry box.
 void init(java.lang.String varName, java.lang.String label1, dtk.core.ParameterSet p, javax.swing.JTextField textBox, int textBoxLength, javax.swing.JPanel _panel)
          Initialize and set up this entry box.
private  javax.swing.JPanel leftButtonBar()
          Creates the button bar on the left.
private  javax.swing.JPanel leftLabelBar()
          Creates the label bar on the left.
 void readPersistentEntries()
          Reads saved entries from the parameterSet.
 void registerChange()
          Register that a change has been made in the dabates entryList.
 
Methods inherited from class dtk.gui.TKAddressEntryBox
addNewEntry, getLocationOnScreen, init, moveEntry, printList, removeEntryAt, removeSelectedItems, rightButtonBar, setSize, sortEntryList, updateButtons
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

wm

TKWidgetMaker wm

helpButton

javax.swing.JButton helpButton

variable

java.lang.String variable
Constructor Detail

TKStandardDebatesBox

public TKStandardDebatesBox()
Constructor.

Method Detail

getPanel

public javax.swing.JPanel getPanel()
Return the JPanel that holds this entry box.


init

public void init(java.lang.String varName,
                 java.lang.String label1,
                 dtk.core.ParameterSet p,
                 javax.swing.JTextField textBox,
                 int textBoxLength,
                 javax.swing.JPanel _panel)
Initialize and set up this entry box.


readPersistentEntries

public void readPersistentEntries()
Reads saved entries from the parameterSet.

Specified by:
readPersistentEntries in class TKAddressEntryBox

registerChange

public void registerChange()
Register that a change has been made in the dabates entryList. This ensures that the change will be displayed in the GUI the next time it is visible.

Specified by:
registerChange in class TKAddressEntryBox

leftLabelBar

private javax.swing.JPanel leftLabelBar()
Creates the label bar on the left.


leftButtonBar

private javax.swing.JPanel leftButtonBar()
Creates the button bar on the left.


actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Handle button clicking events.

Specified by:
actionPerformed in interface java.awt.event.ActionListener

editCurrentItem

protected void editCurrentItem(int index)
Pop up an entry box to allow editing of the entry.

Overrides:
editCurrentItem in class TKAddressEntryBox

fillListModel

protected void fillListModel()
Create the listModel of debate topics. Override the super class by only using the firstName variable which is where the debate topic is stored.

Overrides:
fillListModel in class TKAddressEntryBox

addNewEntry

public void addNewEntry(TKAddressBookEntry entry)
Override the method so that you can save to the parameterSet when a new entry is added.

Overrides:
addNewEntry in class TKAddressEntryBox