public class FormDesign extends JFrame
| Modifier and Type | Class and Description |
|---|---|
protected class |
FormDesign.GPMouseListener
Mouse listener for the
glass pane. |
protected class |
FormDesign.HandleSet
Class collecting together the eight resize handle, and one move handle
belonging to a bean.
|
protected static class |
FormDesign.StatusBar
Status bar for the FormDesign window.
|
JFrame.AccessibleJFrameFrame.AccessibleAWTFrameWindow.AccessibleAWTWindow, Window.TypeContainer.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy| Modifier and Type | Field and Description |
|---|---|
protected ActionMap |
actionMap
The actions provided by the user interface in this window.
|
protected PropertyChangeListener |
beanNameChangeListener |
protected JPanel |
beanPane
The bean pane is used to contain the form being designed, and any beans
(wrapped) that do not visually appear within the form.
|
protected EventListenerList |
beanSelectedListeners |
protected Object |
currentBean
The currently selected bean.
|
protected Component |
currentComponent |
protected net.sourceforge.czt.animation.gui.design.ToolWindow.Tool |
currentTool
The currently selected tool.
|
protected boolean |
eventLinkHighlightingOverride |
protected Vector<BeanLink> |
eventLinks |
protected Form |
form
The form being designed by this window.
|
protected JPanel |
glassPane
Glass pane to catch mouse events.
|
protected Map<Object,FormDesign.HandleSet> |
handles
Mapping from beans in the design to their set of handles.
|
protected InputMap |
inputMap
A map from key strokes to action keys for this window.
|
protected FormDesign.StatusBar |
statusBar |
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabledCROSSHAIR_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_CURSORBOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTDISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSEABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH| Constructor and Description |
|---|
FormDesign(ActionMap am,
InputMap im,
JMenu wm,
DesignerCore dc)
Creates a new Form designer.
|
FormDesign(Form _form,
ActionMap am,
InputMap im,
JMenu windowMenu,
DesignerCore desCore) |
FormDesign(String name,
ActionMap am,
InputMap im,
JMenu windowMenu,
DesignerCore desCore) |
| Modifier and Type | Method and Description |
|---|---|
Component |
addBean(Object bean,
Point location) |
void |
addBeanSelectedListener(BeanSelectedListener l) |
void |
addEventLink(Component source,
Component listener,
Class<?> listenerType) |
Point |
componentLocationInBeanPaneSpace(Component component)
Uses
translateCoordinateFromCSpace to give the location of a
component in the beanPane's coordinate space. |
protected void |
fireBeanSelected(Object bean) |
JPanel |
getBeanPane() |
BeanSelectedListener[] |
getBeanSelectedListeners() |
Object |
getCurrentBean()
Getter method for the currentBean property.
|
Component |
getCurrentBeanComponent()
Getter method for the currentComponent property.
|
net.sourceforge.czt.animation.gui.design.ToolWindow.Tool |
getCurrentTool()
Getter method for the currentTool property.
|
Vector<BeanLink> |
getEventLinks() |
Form |
getForm() |
Action |
getRaiseAction() |
Line2D |
getVisualLine(BeanLink l) |
static FormDesign |
loadDesign(XMLDecoder decoder,
ActionMap am,
InputMap im,
JMenu windowMenu,
DesignerCore desCore) |
Component |
lowestComponentAt(Point p) |
boolean |
placementAllowed(Point location,
Class<?> type) |
boolean |
removeBean(Component beanComponent) |
void |
removeBeanSelectedListener(BeanSelectedListener l) |
boolean |
removeCurrentBean() |
void |
removeEventLink(BeanLink bl) |
void |
removeEventLinksFrom(Object source) |
void |
removeEventLinksFrom(Object source,
Class<?> listenerType) |
void |
removeEventLinksTo(Object listener) |
void |
removeEventLinksTo(Object listener,
Class<?> listenerType) |
void |
removeEventLinksToFrom(Object obj) |
void |
saveDesign(XMLEncoder encoder) |
void |
setCurrentBeanComponent(Component t)
Setter method for the currentBean property.
|
void |
setCursor(Cursor cursor) |
void |
setEventLinkHighlightingOverride(boolean o) |
protected void |
setupActions(ActionMap am,
InputMap im,
DesignerCore desCore) |
protected void |
setupLayeredPanes()
|
protected void |
setupMenus(JMenu window)
Sets up the menu bar.
|
protected void |
setupStatusBar()
Sets up the status bar.
|
void |
toolChanged(net.sourceforge.czt.animation.gui.design.ToolChangeEvent ev) |
Point |
translateCoordinateFromCSpace(Point oldPoint,
Component initialCSpace)
Translates a coordinate described in a coordinate space that is a
descendant of this
FormDesign to the same coordinate relative
to the beanPane's coordinate space. |
Point |
translateCoordinateToCSpace(Point point,
Component cSpace)
Translates a coordinate relative to the
beanPane's coordinate
space into the same coordinate relative to the coordinate space belonging
to cSpace. |
void |
unselectBean() |
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, updateaddNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecoratedaddPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, setVisible, show, toBack, toFrontadd, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTreeaction, 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, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, 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, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, 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, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycleclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetFont, postEventprotected Form form
protected EventListenerList beanSelectedListeners
protected final JPanel glassPane
protected boolean eventLinkHighlightingOverride
protected JPanel beanPane
protected final ActionMap actionMap
protected final InputMap inputMap
protected final FormDesign.StatusBar statusBar
protected Object currentBean
protected Component currentComponent
protected PropertyChangeListener beanNameChangeListener
protected net.sourceforge.czt.animation.gui.design.ToolWindow.Tool currentTool
protected Map<Object,FormDesign.HandleSet> handles
public FormDesign(ActionMap am, InputMap im, JMenu wm, DesignerCore dc)
public FormDesign(String name, ActionMap am, InputMap im, JMenu windowMenu, DesignerCore desCore)
public FormDesign(Form _form, ActionMap am, InputMap im, JMenu windowMenu, DesignerCore desCore)
public void addBeanSelectedListener(BeanSelectedListener l)
public void removeBeanSelectedListener(BeanSelectedListener l)
public BeanSelectedListener[] getBeanSelectedListeners()
protected void fireBeanSelected(Object bean)
public Form getForm()
public void setEventLinkHighlightingOverride(boolean o)
public void removeEventLink(BeanLink bl)
public void removeEventLinksToFrom(Object obj)
public void removeEventLinksTo(Object listener)
public void removeEventLinksFrom(Object source)
public Action getRaiseAction()
public JPanel getBeanPane()
public void unselectBean()
public void setCurrentBeanComponent(Component t)
public Object getCurrentBean()
public Component addBean(Object bean, Point location) throws BeanOutOfBoundsException
BeanOutOfBoundsExceptionpublic boolean removeCurrentBean()
public boolean removeBean(Component beanComponent)
public Component getCurrentBeanComponent()
Component, otherwise it is a BeanWrapper
wrapping the currentBean.BeanWrapperpublic void toolChanged(net.sourceforge.czt.animation.gui.design.ToolChangeEvent ev)
public net.sourceforge.czt.animation.gui.design.ToolWindow.Tool getCurrentTool()
protected void setupActions(ActionMap am, InputMap im, DesignerCore desCore)
protected void setupLayeredPanes()
protected void setupMenus(JMenu window)
protected void setupStatusBar()
public static FormDesign loadDesign(XMLDecoder decoder, ActionMap am, InputMap im, JMenu windowMenu, DesignerCore desCore)
public void saveDesign(XMLEncoder encoder)
public Point translateCoordinateFromCSpace(Point oldPoint, Component initialCSpace)
FormDesign to the same coordinate relative
to the beanPane's coordinate space.oldPoint - the coordinate to translate.initialCSpace - container with coordinate space to which
point is relative.null if initialCSpace is not a
descendant of beanPane.public Point componentLocationInBeanPaneSpace(Component component)
translateCoordinateFromCSpace to give the location of a
component in the beanPane's coordinate space.component - the component whose location will be found.beanPane's
coordinate space.public Point translateCoordinateToCSpace(Point point, Component cSpace)
beanPane's coordinate
space into the same coordinate relative to the coordinate space belonging
to cSpace.point - the coordinate to translate.cSpace - container with coordinate space to which point
will be translated.null if cSpace is not a
descendant of beanPane. NOTE: The coordinate may lay
outside the bounds of the container.Copyright © 2003–2016 Community Z Tools Project. All rights reserved.