butler.swing.form
Class Form

java.lang.Object
  extended by butler.swing.form.Form
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener
Direct Known Subclasses:
DetailForm, ListForm, MultipleForm, TreeForm, Wizard

public abstract class Form
extends java.lang.Object
implements java.awt.event.ActionListener

Author:
Fredrik Bertilsson

Nested Class Summary
static class Form.XMLFactory
           
 
Field Summary
static double CENTER
           
static double ONE_THIRD
           
 
Constructor Summary
protected Form(DForm desc)
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent event)
           
protected  void askSave()
           
protected  void beforeClose()
           
 void cancel()
           
 void close()
           
static Form createForm(DForm form)
           
 DForm getDescriptor()
           
protected  javax.swing.JMenuItem getExitMenuItem()
           
protected  javax.swing.JMenu getFileMenu()
           
 javax.swing.JFrame getFrame()
           
protected  javax.swing.JMenuBar getMenuBar()
           
abstract  java.awt.Container getPanel()
           
protected  javax.swing.Action getSaveAction()
           
protected  java.lang.String getTitle()
           
 void init()
           
protected  boolean isDirty()
           
static void main(java.lang.String[] args)
           
 void populate(javax.swing.JDialog frame)
           
 void populate(javax.swing.JFrame frame)
           
static void registerFormFactory(butler.util.Factory factory)
           
 void run()
           
protected  void save()
           
protected  void setFrame(javax.swing.JFrame frame)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CENTER

public static double CENTER

ONE_THIRD

public static double ONE_THIRD
Constructor Detail

Form

protected Form(DForm desc)
        throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

init

public void init()
          throws java.lang.Exception
Throws:
java.lang.Exception

getPanel

public abstract java.awt.Container getPanel()
                                     throws java.lang.Exception
Throws:
java.lang.Exception

getMenuBar

protected javax.swing.JMenuBar getMenuBar()
                                   throws java.lang.Exception
Throws:
java.lang.Exception

populate

public void populate(javax.swing.JFrame frame)
              throws java.lang.Exception
Throws:
java.lang.Exception

createForm

public static Form createForm(DForm form)
                       throws java.lang.Exception
Throws:
java.lang.Exception

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception

run

public void run()
         throws java.lang.Exception
Throws:
java.lang.Exception

getFrame

public javax.swing.JFrame getFrame()

setFrame

protected void setFrame(javax.swing.JFrame frame)

getFileMenu

protected javax.swing.JMenu getFileMenu()
                                 throws java.lang.Exception
Throws:
java.lang.Exception

getExitMenuItem

protected javax.swing.JMenuItem getExitMenuItem()
                                         throws java.lang.Exception
Throws:
java.lang.Exception

getDescriptor

public DForm getDescriptor()

getTitle

protected java.lang.String getTitle()
                             throws java.lang.Exception
Throws:
java.lang.Exception

getSaveAction

protected javax.swing.Action getSaveAction()

registerFormFactory

public static void registerFormFactory(butler.util.Factory factory)

beforeClose

protected void beforeClose()
                    throws java.lang.Exception
Throws:
java.lang.Exception

askSave

protected void askSave()
                throws java.lang.Exception
Throws:
java.lang.Exception

close

public void close()
           throws java.lang.Exception
Throws:
java.lang.Exception

cancel

public void cancel()
            throws java.lang.Exception
Throws:
java.lang.Exception

isDirty

protected boolean isDirty()

save

protected void save()
             throws java.lang.Exception
Throws:
java.lang.Exception

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent event)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

populate

public void populate(javax.swing.JDialog frame)
              throws java.lang.Exception
Throws:
java.lang.Exception