Class CompPane

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--CompPane
All Implemented Interfaces:
java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, Scaleable, java.io.Serializable

public class CompPane
extends javax.swing.JComponent
implements Scaleable, java.awt.event.MouseListener, java.awt.event.MouseMotionListener

See Also:
Serialized Form

Field Summary
static int ADD
           
(package private)  int command
           
 Comp contents
           
static int COPY
           
(package private)  java.awt.Color defaultcolor
           
(package private)  Fill defaultfill
           
(package private)  java.awt.Color defaultlinecolor
           
(package private)  Size defaultlinesize
           
(package private)  LineType defaultlinetype
           
static int DELETE
           
(package private)  boolean dragged
           
(package private)  int dragheight
           
(package private)  java.awt.geom.Point2D dragpos
           
(package private)  int dragrx
           
(package private)  int dragry
           
(package private)  java.util.Set dragset
           
(package private)  int dragwidth
           
(package private)  int dragx
           
(package private)  int dragy
           
(package private)  CompEditor editor
           
static int FLIP
           
static int HAND
           
(package private) static java.awt.Color[] invcolors
           
static double margin
           
(package private)  int mode
           
static int MODES
           
static int NEW
           
(package private)  java.lang.Object newarg
           
(package private)  java.lang.Class newtype
           
static int PASTE
           
static double screenscale
           
(package private)  javax.swing.JScrollPane scrollpane
           
 Selection sel
           
(package private) static java.awt.Color[] selcolors
           
static int SELECT
           
 Selection[] selections
           
 int selindex
           
(package private)  java.awt.Dimension size
           
static int SMOOTH
           
static int SUBSELECT
           
(package private)  View view
           
(package private)  ViewTransform viewtrans
           
static int ZOOM
           
 
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.Container
 
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
CompPane(CompEditor editor)
           
 
Method Summary
 void addMargin(java.awt.geom.Rectangle2D dim)
           
 void adjustSize()
           
 double center()
           
 void cleanup()
           
 java.awt.geom.Point2D getCenter()
           
(package private)  java.awt.geom.Point2D getPos(java.awt.event.MouseEvent e)
           
 java.awt.Dimension getPreferredSize()
           
 javax.swing.JScrollPane getScrollPane()
           
 void mouseClicked(java.awt.event.MouseEvent e)
           
 void mouseDragged(java.awt.event.MouseEvent e)
           
 void mouseEntered(java.awt.event.MouseEvent e)
           
 void mouseExited(java.awt.event.MouseEvent e)
           
 void mouseMoved(java.awt.event.MouseEvent e)
           
 void mousePressed(java.awt.event.MouseEvent e)
           
 void mouseReleased(java.awt.event.MouseEvent e)
           
 void paintComponent(java.awt.Graphics g)
           
 void setFill(java.awt.Color newfill)
           
 void setFill(Fill newfill)
           
 void setLineType(LineType type, Size size, java.awt.Color color)
           
 void setMode(int mode)
           
 void setRotation(double newangle)
           
 void setScale(double newscale)
           
 Selection setSelection(int index)
           
 
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, getAccessibleContext, 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, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, 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, updateUI
 
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
 

Field Detail

NEW

public static int NEW

SELECT

public static int SELECT

SUBSELECT

public static int SUBSELECT

DELETE

public static int DELETE

ADD

public static int ADD

HAND

public static int HAND

ZOOM

public static int ZOOM

MODES

public static int MODES

SMOOTH

public static int SMOOTH

FLIP

public static int FLIP

COPY

public static int COPY

PASTE

public static int PASTE

margin

public static double margin

screenscale

public static double screenscale

contents

public Comp contents

selections

public Selection[] selections

sel

public Selection sel

selindex

public int selindex

dragpos

java.awt.geom.Point2D dragpos

dragset

java.util.Set dragset

dragx

int dragx

dragy

int dragy

dragrx

int dragrx

dragry

int dragry

dragwidth

int dragwidth

dragheight

int dragheight

dragged

boolean dragged

mode

int mode

command

int command

newtype

java.lang.Class newtype

newarg

java.lang.Object newarg

scrollpane

javax.swing.JScrollPane scrollpane

view

View view

viewtrans

ViewTransform viewtrans

editor

CompEditor editor

defaultfill

Fill defaultfill

defaultcolor

java.awt.Color defaultcolor

defaultlinetype

LineType defaultlinetype

defaultlinesize

Size defaultlinesize

defaultlinecolor

java.awt.Color defaultlinecolor

selcolors

static java.awt.Color[] selcolors

invcolors

static java.awt.Color[] invcolors

size

java.awt.Dimension size
Constructor Detail

CompPane

public CompPane(CompEditor editor)
Method Detail

setSelection

public Selection setSelection(int index)

cleanup

public void cleanup()

setLineType

public void setLineType(LineType type,
                        Size size,
                        java.awt.Color color)

setFill

public void setFill(Fill newfill)

setFill

public void setFill(java.awt.Color newfill)

getScrollPane

public javax.swing.JScrollPane getScrollPane()

getPreferredSize

public java.awt.Dimension getPreferredSize()
Overrides:
getPreferredSize in class javax.swing.JComponent

getCenter

public java.awt.geom.Point2D getCenter()

setScale

public void setScale(double newscale)
Specified by:
setScale in interface Scaleable

setRotation

public void setRotation(double newangle)
Specified by:
setRotation in interface Scaleable

adjustSize

public void adjustSize()

center

public double center()

paintComponent

public void paintComponent(java.awt.Graphics g)
Overrides:
paintComponent in class javax.swing.JComponent

addMargin

public void addMargin(java.awt.geom.Rectangle2D dim)

setMode

public void setMode(int mode)

getPos

java.awt.geom.Point2D getPos(java.awt.event.MouseEvent e)

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Specified by:
mouseClicked in interface java.awt.event.MouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
Specified by:
mouseExited in interface java.awt.event.MouseListener

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Specified by:
mouseReleased in interface java.awt.event.MouseListener

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent e)
Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent e)
Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener