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

Quick Search    Search Deep

com.eireneh.bible.control.map.swing
Class Mapper  view Mapper download Mapper.java

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Window
              extended byjava.awt.Frame
                  extended byjavax.swing.JFrame
                      extended bycom.eireneh.bible.control.map.swing.Mapper
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, javax.swing.RootPaneContainer, java.io.Serializable, javax.swing.WindowConstants

public class Mapper
extends javax.swing.JFrame

Mapper is GUI wrapper around Map to allow it to be run standalone.
Distribution Licence:
Project B is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
The License is available on the internet here, by writing to Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA, Or locally at the Licence link below.
The copyright to this program is held by it's authors.

Version:
D0.I0.T0

Nested Class Summary
(package private)  class Mapper.AutoLayoutRunnable
          A Layout Thread Runnable
 
Nested classes inherited from class javax.swing.JFrame
javax.swing.JFrame.AccessibleJFrame
 
Nested classes inherited from class java.awt.Frame
java.awt.Frame.AccessibleAWTFrame
 
Nested classes inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
private  Mapper.AutoLayoutRunnable alr
          The Layout Runnable
private  java.lang.Thread autolayout
          The thread that does background updates
private  com.eireneh.swing.ExtensionFileFilter bas_filter
          File filter for VB files
private  com.eireneh.swing.ExtensionFileFilter bmap_filter
          File filter for map files
private  javax.swing.JComboBox cbo_color
           
private  javax.swing.JButton cmd_zoom_in
           
private  javax.swing.JButton cmd_zoom_out
           
private  com.eireneh.config.Config config
          The Configuration options
private  java.net.URL config_url
          Where is this config info stored
private  java.lang.String filename
          The current file name
private  javax.swing.JMenuItem item_about
           
private  javax.swing.JMenuItem item_close
           
private  javax.swing.JMenuItem item_contents
           
private  javax.swing.JMenuItem item_exit
           
private  javax.swing.JMenuItem item_initial
           
private  javax.swing.JMenuItem item_link
           
private  javax.swing.JMenuItem item_new
           
private  javax.swing.JMenuItem item_open
           
private  javax.swing.JMenuItem item_print
           
private  javax.swing.JMenuItem item_random
           
private  javax.swing.JMenuItem item_save
           
private  javax.swing.JMenuItem item_saveas
           
private  javax.swing.JMenuItem item_start
           
private  javax.swing.JMenuItem item_word
           
private  java.awt.FlowLayout lay_zoom
           
private  com.eireneh.bible.control.map.Map map
          The thing that does the real work
private  int map_size
          The size (int pixels of the map canvas
private  MapTableModel mdl_map
          The table view of the map
private  javax.swing.JMenu menu_edit
           
private  javax.swing.JMenu menu_file
           
private  javax.swing.JMenu menu_help
           
private  javax.swing.JMenuBar menubar
           
private  MapperPane pnl_canvas
           
private  javax.swing.JPanel pnl_color
           
private  javax.swing.JPanel pnl_mapper
           
private  RulesPane pnl_rules
           
private  javax.swing.JPanel pnl_table
           
private  javax.swing.JPanel pnl_tools
           
private  javax.swing.JPanel pnl_zoom
           
private  com.eireneh.bible.control.map.Rule[] rules
          The Rules
private  boolean saved
          Have the map been changed?
private  javax.swing.JScrollPane scr_map
           
private  javax.swing.JScrollPane scr_table
           
private  javax.swing.JTabbedPane tab_main
           
private  javax.swing.JTable tbl_table
           
private  com.eireneh.bible.control.map.VBAExport vba
          The VBA export routine
private  VerseColor[] vcols
          The Verse colorizers
 
Fields inherited from class javax.swing.JFrame
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
 
Fields inherited from class java.awt.Window
 
Fields inherited from class java.awt.Container
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
Mapper(java.lang.String[] args)
          Basic constructor
 
Method Summary
protected  void about()
          Not implemented
protected  void close()
          Kill the current file
protected  void create()
          Select a Bible and create the link info
protected  void exit()
          Action from clicking on the exit button.
private  com.eireneh.bible.control.map.LinkArray getLinkArray()
          Load the default link array from disk
 com.eireneh.bible.control.map.Map getMap()
          Get the currently used Map
protected  void help()
          Not implemented
private  void jbInit()
          Initialize the GUI, and display it.
protected  void link()
          Create the set of links
protected  boolean okToClose()
          Have we made changes or can we abandon them
protected  void open()
          Open a saved map file
protected  void print()
          Print the map
protected  void random()
          Set the random layout
protected  void save()
          Save a map file to disk
protected  void saveas()
          Save a map file to disk
 void setFilename(java.lang.String filename)
          The name of the file that we are saving under
 void setMap(com.eireneh.bible.control.map.Map map)
          Set everything to use the given map
protected  void simple()
          Set the simple layout
protected  void start()
          Start an layout thread
protected  void verseColor()
          Set the verse colourizer
protected  void word()
          Create a Word Macro file
protected  void zoom(int change)
          Zoom in or out of the map
 
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getPreferredSize, getRootPane, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processKeyEvent, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update
 
Methods inherited from class java.awt.Frame
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setIconImage, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated
 
Methods inherited from class java.awt.Window
addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getGraphicsConfiguration, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, hide, isActive, isFocusableWindow, isFocusCycleRoot, isFocused, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationRelativeTo, show, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Field Detail

map_size

private int map_size
The size (int pixels of the map canvas


filename

private java.lang.String filename
The current file name


map

private com.eireneh.bible.control.map.Map map
The thing that does the real work


mdl_map

private MapTableModel mdl_map
The table view of the map


autolayout

private java.lang.Thread autolayout
The thread that does background updates


alr

private Mapper.AutoLayoutRunnable alr
The Layout Runnable


saved

private boolean saved
Have the map been changed?


bmap_filter

private com.eireneh.swing.ExtensionFileFilter bmap_filter
File filter for map files


bas_filter

private com.eireneh.swing.ExtensionFileFilter bas_filter
File filter for VB files


config_url

private java.net.URL config_url
Where is this config info stored


config

private com.eireneh.config.Config config
The Configuration options


vba

private com.eireneh.bible.control.map.VBAExport vba
The VBA export routine


rules

private com.eireneh.bible.control.map.Rule[] rules
The Rules


vcols

private VerseColor[] vcols
The Verse colorizers


pnl_tools

private javax.swing.JPanel pnl_tools

pnl_rules

private RulesPane pnl_rules

tab_main

private javax.swing.JTabbedPane tab_main

tbl_table

private javax.swing.JTable tbl_table

scr_table

private javax.swing.JScrollPane scr_table

pnl_table

private javax.swing.JPanel pnl_table

pnl_canvas

private MapperPane pnl_canvas

scr_map

private javax.swing.JScrollPane scr_map

pnl_mapper

private javax.swing.JPanel pnl_mapper

cmd_zoom_in

private javax.swing.JButton cmd_zoom_in

cmd_zoom_out

private javax.swing.JButton cmd_zoom_out

lay_zoom

private java.awt.FlowLayout lay_zoom

pnl_zoom

private javax.swing.JPanel pnl_zoom

pnl_color

private javax.swing.JPanel pnl_color

cbo_color

private javax.swing.JComboBox cbo_color

menubar

private javax.swing.JMenuBar menubar

menu_file

private javax.swing.JMenu menu_file

menu_edit

private javax.swing.JMenu menu_edit

menu_help

private javax.swing.JMenu menu_help

item_new

private javax.swing.JMenuItem item_new

item_open

private javax.swing.JMenuItem item_open

item_save

private javax.swing.JMenuItem item_save

item_saveas

private javax.swing.JMenuItem item_saveas

item_close

private javax.swing.JMenuItem item_close

item_word

private javax.swing.JMenuItem item_word

item_print

private javax.swing.JMenuItem item_print

item_exit

private javax.swing.JMenuItem item_exit

item_link

private javax.swing.JMenuItem item_link

item_start

private javax.swing.JMenuItem item_start

item_initial

private javax.swing.JMenuItem item_initial

item_random

private javax.swing.JMenuItem item_random

item_contents

private javax.swing.JMenuItem item_contents

item_about

private javax.swing.JMenuItem item_about
Constructor Detail

Mapper

public Mapper(java.lang.String[] args)
Basic constructor

Method Detail

jbInit

private void jbInit()
Initialize the GUI, and display it.


setFilename

public void setFilename(java.lang.String filename)
The name of the file that we are saving under


setMap

public void setMap(com.eireneh.bible.control.map.Map map)
Set everything to use the given map


getMap

public com.eireneh.bible.control.map.Map getMap()
Get the currently used Map


okToClose

protected boolean okToClose()
Have we made changes or can we abandon them


close

protected void close()
Kill the current file


create

protected void create()
Select a Bible and create the link info


open

protected void open()
Open a saved map file


save

protected void save()
Save a map file to disk


saveas

protected void saveas()
Save a map file to disk


word

protected void word()
Create a Word Macro file


print

protected void print()
Print the map


exit

protected void exit()
Action from clicking on the exit button. Exits the VM.


link

protected void link()
Create the set of links


start

protected void start()
Start an layout thread


simple

protected void simple()
Set the simple layout


random

protected void random()
Set the random layout


verseColor

protected void verseColor()
Set the verse colourizer


help

protected void help()
Not implemented


about

protected void about()
Not implemented


zoom

protected void zoom(int change)
Zoom in or out of the map


getLinkArray

private com.eireneh.bible.control.map.LinkArray getLinkArray()
Load the default link array from disk