Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

bojangles.widgets
Class Widget  view Widget download Widget.java

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JPanel
                  extended bybojangles.widgets.Widget
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.event.ComponentListener, java.util.EventListener, java.awt.event.FocusListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.io.Serializable
Direct Known Subclasses:
Page, TextButton

public class Widget
extends javax.swing.JPanel
implements java.awt.event.MouseListener, java.awt.event.FocusListener, java.awt.event.MouseMotionListener, java.awt.event.ComponentListener

Title:

Description:

Copyright: Copyright (c) 2002

Company:

Version:
1.0

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
protected  int borderDepth
           
protected  int BOTTOMLEFT
           
protected  int BOTTOMRIGHT
           
protected  int clickedOnBorder
           
protected  java.util.Vector elementFocusListeners
           
protected  bojangles.ElementFocusListener focusListener
           
protected  int height
           
protected  java.awt.Point lastPoint
           
protected  boolean moveable
           
protected  int NONE
           
protected  java.lang.String path
           
protected  javax.swing.border.Border previousBorder
           
protected  boolean resizeable
           
protected  int TOPLEFT
           
protected  int TOPRIGHT
           
protected  int width
           
protected  bojangles.xml.XmlHandler xmlHandler
           
 
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
Widget(java.lang.String path, bojangles.xml.XmlHandler xmlHandler, bojangles.ElementFocusListener fl)
           
 
Method Summary
 void addElementFocusListener(bojangles.ElementFocusListener e)
           
 void componentHidden(java.awt.event.ComponentEvent componentEvent)
          This method is called when the component is hidden.
 void componentMoved(java.awt.event.ComponentEvent componentEvent)
          This method is called when the component is moved.
 void componentResized(java.awt.event.ComponentEvent componentEvent)
          This method is called when the component is resized.
 void componentShown(java.awt.event.ComponentEvent componentEvent)
          This method is called when the component is made visible.
 void focusGained(java.awt.event.FocusEvent e)
          This method is called when a component gains the keyboard focus.
 void focusLost(java.awt.event.FocusEvent e)
          This method is invoked when a component loses the keyboard focus.
 boolean getMoveable()
           
 java.lang.String getPath()
           
 boolean getResizeable()
           
 void mouseClicked(java.awt.event.MouseEvent e)
          This method is called when the mouse is clicked (pressed and released in short succession) on a component.
 void mouseDragged(java.awt.event.MouseEvent e)
          This method is called when the mouse is moved over a component while a button has been pressed.
 void mouseEntered(java.awt.event.MouseEvent e)
          This method is called when the mouse enters a component.
 void mouseExited(java.awt.event.MouseEvent e)
          This method is called when the mouse exits a component.
 void mouseMoved(java.awt.event.MouseEvent e)
          This method is called when the mouse is moved over a component while no button is pressed.
 void mousePressed(java.awt.event.MouseEvent e)
          This method is called when the mouse is pressed over a component.
 void mouseReleased(java.awt.event.MouseEvent e)
          This method is called when the mouse is released over a component.
private  void notifyElementFocusListeners()
           
 void removeElementFocusListener(bojangles.ElementFocusListener e)
           
 void setBounds(int x, int y, int width, int height)
          Sets the bounding rectangle for this component to the specified values.
 void setMoveable(boolean moveable)
           
 void setPath(java.lang.String path)
           
 void setResizeable(boolean resizeable)
           
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, 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, 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, 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, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, 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, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, 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, 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, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NONE

protected final int NONE
See Also:
Constant Field Values

TOPRIGHT

protected final int TOPRIGHT
See Also:
Constant Field Values

TOPLEFT

protected final int TOPLEFT
See Also:
Constant Field Values

BOTTOMRIGHT

protected final int BOTTOMRIGHT
See Also:
Constant Field Values

BOTTOMLEFT

protected final int BOTTOMLEFT
See Also:
Constant Field Values

path

protected java.lang.String path

resizeable

protected boolean resizeable

moveable

protected boolean moveable

elementFocusListeners

protected java.util.Vector elementFocusListeners

lastPoint

protected java.awt.Point lastPoint

width

protected int width

height

protected int height

borderDepth

protected int borderDepth

clickedOnBorder

protected int clickedOnBorder

previousBorder

protected javax.swing.border.Border previousBorder

xmlHandler

protected bojangles.xml.XmlHandler xmlHandler

focusListener

protected bojangles.ElementFocusListener focusListener
Constructor Detail

Widget

public Widget(java.lang.String path,
              bojangles.xml.XmlHandler xmlHandler,
              bojangles.ElementFocusListener fl)
Method Detail

setPath

public void setPath(java.lang.String path)

getPath

public java.lang.String getPath()

setBounds

public void setBounds(int x,
                      int y,
                      int width,
                      int height)
Description copied from class: java.awt.Component
Sets the bounding rectangle for this component to the specified values. Note that these coordinates are relative to the parent, not to the screen.


addElementFocusListener

public void addElementFocusListener(bojangles.ElementFocusListener e)

removeElementFocusListener

public void removeElementFocusListener(bojangles.ElementFocusListener e)

notifyElementFocusListeners

private void notifyElementFocusListeners()

focusGained

public void focusGained(java.awt.event.FocusEvent e)
Description copied from interface: java.awt.event.FocusListener
This method is called when a component gains the keyboard focus.

Specified by:
focusGained in interface java.awt.event.FocusListener

focusLost

public void focusLost(java.awt.event.FocusEvent e)
Description copied from interface: java.awt.event.FocusListener
This method is invoked when a component loses the keyboard focus.

Specified by:
focusLost in interface java.awt.event.FocusListener

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Description copied from interface: java.awt.event.MouseListener
This method is called when the mouse is pressed over a component.

Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Description copied from interface: java.awt.event.MouseListener
This method is called when the mouse is clicked (pressed and released in short succession) on a component.

Specified by:
mouseClicked in interface java.awt.event.MouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
Description copied from interface: java.awt.event.MouseListener
This method is called when the mouse enters a component.

Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
Description copied from interface: java.awt.event.MouseListener
This method is called when the mouse exits a component.

Specified by:
mouseExited in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Description copied from interface: java.awt.event.MouseListener
This method is called when the mouse is released over a component.

Specified by:
mouseReleased in interface java.awt.event.MouseListener

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent e)
Description copied from interface: java.awt.event.MouseMotionListener
This method is called when the mouse is moved over a component while a button has been pressed.

Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent e)
Description copied from interface: java.awt.event.MouseMotionListener
This method is called when the mouse is moved over a component while no button is pressed.

Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener

componentShown

public void componentShown(java.awt.event.ComponentEvent componentEvent)
Description copied from interface: java.awt.event.ComponentListener
This method is called when the component is made visible.

Specified by:
componentShown in interface java.awt.event.ComponentListener

componentHidden

public void componentHidden(java.awt.event.ComponentEvent componentEvent)
Description copied from interface: java.awt.event.ComponentListener
This method is called when the component is hidden.

Specified by:
componentHidden in interface java.awt.event.ComponentListener

componentMoved

public void componentMoved(java.awt.event.ComponentEvent componentEvent)
Description copied from interface: java.awt.event.ComponentListener
This method is called when the component is moved.

Specified by:
componentMoved in interface java.awt.event.ComponentListener

componentResized

public void componentResized(java.awt.event.ComponentEvent componentEvent)
Description copied from interface: java.awt.event.ComponentListener
This method is called when the component is resized.

Specified by:
componentResized in interface java.awt.event.ComponentListener

setResizeable

public void setResizeable(boolean resizeable)

getResizeable

public boolean getResizeable()

setMoveable

public void setMoveable(boolean moveable)

getMoveable

public boolean getMoveable()