cdox.edit
Class CDCover

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JPanel
                  extended bycdox.edit.CDCover
All Implemented Interfaces:
javax.accessibility.Accessible, CDCoverStandards, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class CDCover
extends javax.swing.JPanel
implements CDCoverStandards

This class Creates a Panel in which the actual CDCover Panel will be added. It uses the CDCoverStadards interface to determine the size of each Component

Version:
May 22nd 2002
Author:
Rutger Bezema, Andreas Schmitz
See Also:
EditPane, CDDrawingPane, Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
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
 
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 cdox.edit.CDCoverStandards
ALL, CDBACK_SIDE, CDBACK_SIDE_SIZE, CDBACK_SIZE, CDBOOKLET, CDBOOKLET_SIZE, CDFRONT, CDFRONT_SIZE, CDSIDE_SIZE, CDX, GIF, JPG, PNG
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
CDCover(CDoxFrame cdoxFrame, Cover cover, int cdKonst, java.awt.Font f, boolean bold, boolean italic, boolean underline, java.awt.Color tColor)
          Constructs new one with a given cover.
CDCover(CDoxFrame cdoxFrame, int cdKonst, java.awt.Font f, boolean bold, boolean italic, boolean underline, java.awt.Color tColor)
          The constructor is called to do all the work.
 
Method Summary
 java.awt.Dimension getDrawingDimension()
          Returns the drawing size.
 CDDrawingPane getDrawingPane()
          Returns the drawing pane of this CDCover.
 boolean hasBackground()
          Returns whether it has a background.
 boolean isActive()
          Returns whether the CDCover is active.
 void replaceCover(Cover cover)
           
 void setActive(boolean flag)
          This Method sets the selected component active-deactivated.
 void setBackgroundColor(java.awt.Color bc)
          Here you set the backgroundColor flag.
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, 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, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, 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, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, 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
 

Constructor Detail

CDCover

public CDCover(CDoxFrame cdoxFrame,
               int cdKonst,
               java.awt.Font f,
               boolean bold,
               boolean italic,
               boolean underline,
               java.awt.Color tColor)
The constructor is called to do all the work. It Checks which cdCover is to be made, and defines the Size of itself by adding 12 (Pixels-width)and 30(Pixels-height) to the coverSize.

Parameters:
cdoxFrame - the CDoxFrame.
cdKonst - the konst (defined in CDCoverStandards) defining which cover to make,
f - The font standardly used for a textPane in the CDDrawingPane,
bold - true if bold is selected in the cdoxframe false otherwhise,
italic - true if italic is selected in the cdoxframe false otherwhise,
underline - true if underline is selected in the cdoxframe false otherwhise.
tColor - the Color.

CDCover

public CDCover(CDoxFrame cdoxFrame,
               Cover cover,
               int cdKonst,
               java.awt.Font f,
               boolean bold,
               boolean italic,
               boolean underline,
               java.awt.Color tColor)
Constructs new one with a given cover. If cover is null, the cdKonst will be used to generate a new empty cover.

Parameters:
cdoxFrame - the CDoxFrame.
cover - the cover.
cdKonst - the konst (defined in CDCoverStandards) defining which cover to make,
f - The font standardly used for a textPane in the CDDrawingPane,
bold - true if bold is selected in the cdoxframe false otherwhise,
italic - true if italic is selected in the cdoxframe false otherwhise,
underline - true if underline is selected in the cdoxframe false otherwhise.
tColor - the Color.
Method Detail

replaceCover

public void replaceCover(Cover cover)

setActive

public void setActive(boolean flag)
This Method sets the selected component active-deactivated.

Parameters:
flag - the activation flag, true = activated.

getDrawingPane

public CDDrawingPane getDrawingPane()
Returns the drawing pane of this CDCover.

Returns:
the CDDrawingPane.

isActive

public boolean isActive()
Returns whether the CDCover is active.

Returns:
true, if it is.

getDrawingDimension

public java.awt.Dimension getDrawingDimension()
Returns the drawing size.

Returns:
a Dimension value.

hasBackground

public boolean hasBackground()
Returns whether it has a background.

Returns:
true, if yes.

setBackgroundColor

public void setBackgroundColor(java.awt.Color bc)
Here you set the backgroundColor flag.

Parameters:
bc - the Color.