edu.sc.seis.fissuresUtil.display
Class BorderedDisplay

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by edu.sc.seis.fissuresUtil.display.BorderedDisplay
All Implemented Interfaces:
Graphics2DRenderer, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible
Direct Known Subclasses:
SeismogramDisplay

public class BorderedDisplay
extends javax.swing.JPanel
implements Graphics2DRenderer

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
static int BOTTOM_CENTER
          The positions are of the form ROW_COLUMN
static int BOTTOM_LEFT
          The positions are of the form ROW_COLUMN
static int BOTTOM_RIGHT
          The positions are of the form ROW_COLUMN
static int CENTER
          The positions are of the form ROW_COLUMN
static int CENTER_LEFT
          The positions are of the form ROW_COLUMN
static int CENTER_RIGHT
          The positions are of the form ROW_COLUMN
static int TOP_CENTER
          The positions are of the form ROW_COLUMN
static int TOP_LEFT
          The positions are of the form ROW_COLUMN
static int TOP_RIGHT
          The positions are of the form ROW_COLUMN
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
BorderedDisplay()
           
BorderedDisplay(javax.swing.JComponent centerPanel)
           
 
Method Summary
 java.awt.Component add(java.awt.Component comp)
           
 java.awt.Component add(java.awt.Component comp, int position)
           
 void add(java.awt.Component comp, java.lang.Object obj)
           
 void add(javax.swing.JComponent comp, int position)
          Adds the given component in the passed in position.
 void clear(int position)
           
 void clearBorders()
           
 javax.swing.JComponent get(int position)
           
 boolean isFilled(int position)
           
 void outputToPNG(java.io.File f)
           
 void outputToPNG(java.io.File loc, java.awt.Dimension size)
           
 void outputToPNG(java.io.OutputStream loc, java.awt.Dimension size)
           
 void outputToPNG(java.lang.String filename)
           
 void removeAll()
           
 void renderToGraphics(java.awt.Graphics2D g)
           
 void renderToGraphics(java.awt.Graphics2D g, java.awt.Dimension size)
           
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, 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, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TOP_LEFT

public static final int TOP_LEFT
The positions are of the form ROW_COLUMN

See Also:
Constant Field Values

TOP_CENTER

public static final int TOP_CENTER
The positions are of the form ROW_COLUMN

See Also:
Constant Field Values

TOP_RIGHT

public static final int TOP_RIGHT
The positions are of the form ROW_COLUMN

See Also:
Constant Field Values

CENTER_LEFT

public static final int CENTER_LEFT
The positions are of the form ROW_COLUMN

See Also:
Constant Field Values

CENTER

public static final int CENTER
The positions are of the form ROW_COLUMN

See Also:
Constant Field Values

CENTER_RIGHT

public static final int CENTER_RIGHT
The positions are of the form ROW_COLUMN

See Also:
Constant Field Values

BOTTOM_LEFT

public static final int BOTTOM_LEFT
The positions are of the form ROW_COLUMN

See Also:
Constant Field Values

BOTTOM_CENTER

public static final int BOTTOM_CENTER
The positions are of the form ROW_COLUMN

See Also:
Constant Field Values

BOTTOM_RIGHT

public static final int BOTTOM_RIGHT
The positions are of the form ROW_COLUMN

See Also:
Constant Field Values
Constructor Detail

BorderedDisplay

public BorderedDisplay()

BorderedDisplay

public BorderedDisplay(javax.swing.JComponent centerPanel)
Method Detail

get

public javax.swing.JComponent get(int position)

outputToPNG

public void outputToPNG(java.lang.String filename)
                 throws java.io.IOException
Throws:
java.io.IOException

outputToPNG

public void outputToPNG(java.io.File f)
                 throws java.io.IOException
Throws:
java.io.IOException

outputToPNG

public void outputToPNG(java.io.File loc,
                        java.awt.Dimension size)
                 throws java.io.IOException
Throws:
java.io.IOException

outputToPNG

public void outputToPNG(java.io.OutputStream loc,
                        java.awt.Dimension size)
                 throws java.io.IOException
Throws:
java.io.IOException

renderToGraphics

public void renderToGraphics(java.awt.Graphics2D g)
Specified by:
renderToGraphics in interface Graphics2DRenderer

renderToGraphics

public void renderToGraphics(java.awt.Graphics2D g,
                             java.awt.Dimension size)
Specified by:
renderToGraphics in interface Graphics2DRenderer

add

public java.awt.Component add(java.awt.Component comp)
Overrides:
add in class java.awt.Container

add

public void add(java.awt.Component comp,
                java.lang.Object obj)
Overrides:
add in class java.awt.Container

add

public java.awt.Component add(java.awt.Component comp,
                              int position)
Overrides:
add in class java.awt.Container

add

public void add(javax.swing.JComponent comp,
                int position)
Adds the given component in the passed in position. The position must be one of the nine position ints defined in this class


clearBorders

public void clearBorders()

clear

public void clear(int position)

removeAll

public void removeAll()
Overrides:
removeAll in class java.awt.Container

isFilled

public boolean isFilled(int position)