|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
cdox.edit.CDDrawingPane
This class represents the Actual drawing Panel.
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 java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
CDDrawingPane(CDoxFrame c,
java.awt.Dimension dim,
Cover cover,
int template,
java.awt.Font theFont,
boolean bold,
boolean italic,
boolean underline,
java.awt.Color tColor)
Constructs new one with the given cover. |
|
CDDrawingPane(CDoxFrame c,
java.awt.Dimension dim,
int template,
java.awt.Font theFont,
boolean bold,
boolean italic,
boolean underline,
java.awt.Color tColor)
The Constructor sets the size, and the background Color. |
Method Summary | |
void |
addImage(java.lang.String id)
This method adds a normal Image to this pane. |
java.awt.Color |
getBackgroundColor()
This Method returns the current background color. |
Cover |
getCover()
This method returns this drawingPane's cover-Object. |
java.awt.Point |
getCurrentClickPoint()
Returns the point clicked by the user. |
Element |
getSelectedElement()
Returns the current selected element. |
TextPane |
getTextPane()
This Method returns the current TextPane. |
boolean |
isTextEnabled()
Returns true if this CDDrawingPane is in textMode. |
void |
paint(java.awt.Graphics g)
This Method is called when we need to (re)draw on this element. |
void |
reEditTextElement(Element e)
This method is called when a text element mus be re-edited. |
void |
setActive(boolean b)
This Method sets this panel active or Inactive, if inactive the backgroundImage is painted in grayscale. |
void |
setBackgroundColor(java.awt.Color bgc)
This Method sets the specified background color to this Panel. |
void |
setBackgroundImage(java.awt.image.BufferedImage bi,
java.lang.String id,
boolean mode)
This Method sets the specified image as background image to this panel. |
void |
setBackgroundImage(java.lang.String id,
boolean mode)
This Method sets the specified image as background image to this panel. |
void |
setBold(boolean b)
This Method sets whether to write in bold or not |
void |
setElementSelected(Element e)
This method keeps track of which Element is selected, should be selected, or should be not selected. |
void |
setFontSize(int fSize)
This Method sets the Size of the font in the TextPane |
void |
setItalic(boolean i)
This Method sets whether to write in italic or not |
void |
setScrollPaneDimension(int width,
int height)
This Method is called when the Window is resized, it can than check if it needs to scroll. |
void |
setTextColor(java.awt.Color tc)
This method sets the Color of the text. |
void |
setTextEnabled(boolean b)
This Method sets whether we're in textMode or not. |
void |
setTextFont(java.awt.Font f)
This Method sets the font to write with. |
void |
setUnderline(boolean u)
This Method sets whether to write in underline or not |
java.lang.String |
toString()
|
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, 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, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public CDDrawingPane(CDoxFrame c, java.awt.Dimension dim, int template, java.awt.Font theFont, boolean bold, boolean italic, boolean underline, java.awt.Color tColor)
c
- the CDoxFrame.dim
- the Dimension of this CDDrawingPane,template
- the sort of Cover it is,theFont
- the Font currently selected for the TextPane,bold
- true if bold is selected in the cdoxframe false otherwhiseitalic
- true if italic is selected in the cdoxframe false otherwhiseunderline
- true if underline is selected in the cdoxframe false otherwhisetColor
- the Color
value.public CDDrawingPane(CDoxFrame c, java.awt.Dimension dim, Cover cover, int template, java.awt.Font theFont, boolean bold, boolean italic, boolean underline, java.awt.Color tColor)
c
- the CDoxFrame.dim
- the Dimension of this CDDrawingPane,cover
- the cover.template
- the sort of Cover it is,theFont
- the Font currently selected for the TextPane,bold
- true if bold is selected in the cdoxframe false otherwhiseitalic
- true if italic is selected in the cdoxframe false otherwhiseunderline
- true if underline is selected in the cdoxframe false otherwhisetColor
- the Color
.Method Detail |
public java.lang.String toString()
public void setActive(boolean b)
b
- true for active (not grayscaled)public Cover getCover()
public void setScrollPaneDimension(int width, int height)
width
- the width of the visible part of the ScrollPaneheight
- the height of the visible part of the ScrollPanepublic void addImage(java.lang.String id) throws java.io.IOException
id
- the TempFiles id of the image.
java.io.IOException
- if an error occurs.CDoxFrame.setImage(java.lang.String)
,
EditAction.actionPerformed(java.awt.event.ActionEvent)
public void setBackgroundImage(java.lang.String id, boolean mode) throws java.io.IOException
id
- the TempFiles id.mode
- the mode.
java.io.IOException
- if an error occurs.Cover.setBackground(String,boolean)
public void setBackgroundImage(java.awt.image.BufferedImage bi, java.lang.String id, boolean mode)
bi
- the allready loaded BufferedImageid
- the TempFiles id.mode
- the mode.
java.io.IOException
- if an error occurs.Cover.setBackground(String,boolean)
public void setBackgroundColor(java.awt.Color bgc)
bgc
- the Background colorpublic java.awt.Color getBackgroundColor()
public void setTextEnabled(boolean b)
b
- true if in TextModepublic boolean isTextEnabled()
public TextPane getTextPane()
public void setTextFont(java.awt.Font f)
f
- the Font to write with.public void setFontSize(int fSize)
fSize
- the float value representing the size of the font.public void setBold(boolean b)
b
- true to write in bold false otherwhise.public void setItalic(boolean i)
i
- true to write in italic false otherwhise.public void setUnderline(boolean u)
u
- true to write in underline false otherwhise.public void setTextColor(java.awt.Color tc)
tc
- the new textColor.public void paint(java.awt.Graphics g)
g
- the Graphics object to draw withpublic void reEditTextElement(Element e)
e
- the textelement that must be re-editedpublic void setElementSelected(Element e)
e
- the element to be selected, if e == null the currently selected element,
will be deselected.public Element getSelectedElement()
public java.awt.Point getCurrentClickPoint()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |