JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.util.swing
Class JCSpring

java.lang.Object
  |
  +--java.awt.Component
        |
        +--com.klg.jclass.util.swing.JCSpring
All Implemented Interfaces:
ImageObserver, JCElastic, MenuContainer, Serializable

public class JCSpring
extends Component
implements JCElastic, Serializable

Stretchable concrete implementable of the JCElastic interface, which specifies components as stretchable for the JCElasticLayout manager and its subclasses.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
protected  int b_count
           
protected  int h_count
           
protected  int horizontalElasticity
           
protected  Dimension max
           
protected  int v_count
           
protected  int verticalElasticity
           
protected  Dimension zero
           
 
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
JCSpring()
          Creates a completely stretchable component with an elasticity of 1 in both horizontal and vertical directions.
JCSpring(int horizontal_elasticity, int vertical_elasticity)
          Creates a component that is stretchable in the direction specified.
 
Method Summary
static com.klg.jclass.util.swing.JCSpring createHorizontalSpring()
          Creates a spring that is only horizontally stretchable with an elasticity of 1.
static com.klg.jclass.util.swing.JCSpring createHorizontalSpring(int elasticity)
          Creates a spring that is only horizontally stretchable with the specified elasticity.
static com.klg.jclass.util.swing.JCSpring createVerticalSpring()
          Creates a spring that is only vertically stretchable with an elasticity of 1.
static com.klg.jclass.util.swing.JCSpring createVerticalSpring(int elasticity)
          Creates a spring that is only vertically stretchable with the specified elasticity.
 String getAbout()
          Returns vendor information.
 int getHorizontalElasticity()
          Returns the horizontal elasticity or "stretchiness" of the component.
 Dimension getMaximumSize()
          Returns the maximum size of the component.
 Dimension getMinimumSize()
          Returns the minimum size of the component.
 Dimension getPreferredSize()
          Returns the preferred size of the component.
 int getVerticalElasticity()
          Returns the vertical elasticity or "stretchiness" of the component.
 void setAbout(String s)
          Provided for Beans property editors - has no effect.
 void setHorizontalElasticity(int elasticity)
           
 void setVerticalElasticity(int elasticity)
           
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

zero

protected final Dimension zero

max

protected final Dimension max

horizontalElasticity

protected int horizontalElasticity

verticalElasticity

protected int verticalElasticity

h_count

protected int h_count

b_count

protected int b_count

v_count

protected int v_count
Constructor Detail

JCSpring

public JCSpring()
Creates a completely stretchable component with an elasticity of 1 in both horizontal and vertical directions.


JCSpring

public JCSpring(int horizontal_elasticity,
                int vertical_elasticity)
Creates a component that is stretchable in the direction specified.

Parameters:
horizontal_elasticity -
vertical_elasticity -
Method Detail

createHorizontalSpring

public static com.klg.jclass.util.swing.JCSpring createHorizontalSpring()
Creates a spring that is only horizontally stretchable with an elasticity of 1.

Returns:

createHorizontalSpring

public static com.klg.jclass.util.swing.JCSpring createHorizontalSpring(int elasticity)
Creates a spring that is only horizontally stretchable with the specified elasticity.

Parameters:
elasticity -
Returns:

createVerticalSpring

public static com.klg.jclass.util.swing.JCSpring createVerticalSpring()
Creates a spring that is only vertically stretchable with an elasticity of 1.

Returns:

createVerticalSpring

public static com.klg.jclass.util.swing.JCSpring createVerticalSpring(int elasticity)
Creates a spring that is only vertically stretchable with the specified elasticity.

Parameters:
elasticity -
Returns:

setAbout

public void setAbout(String s)
Provided for Beans property editors - has no effect.

Parameters:
s -

getAbout

public String getAbout()
Returns vendor information.

Returns:
vendor information

getHorizontalElasticity

public int getHorizontalElasticity()
Description copied from interface: JCElastic
Returns the horizontal elasticity or "stretchiness" of the component. A value of 0 means it is not "stretchy" at all. A common value is 1. The higher the value the greater the stretchiness.

Specified by:
getHorizontalElasticity in interface JCElastic
Returns:
horizontal elasticity; 0 means not "stretchy"

setHorizontalElasticity

public void setHorizontalElasticity(int elasticity)

getVerticalElasticity

public int getVerticalElasticity()
Description copied from interface: JCElastic
Returns the vertical elasticity or "stretchiness" of the component. A value of 0 means it is not "stretchy" at all. A common value is 1. The higher the value the greater the stretchiness.

Specified by:
getVerticalElasticity in interface JCElastic
Returns:
vertical elasticity; 0 means not "stretchy"

setVerticalElasticity

public void setVerticalElasticity(int elasticity)

getMinimumSize

public Dimension getMinimumSize()
Returns the minimum size of the component.

Overrides:
getMinimumSize in class Component
Returns:
minimum size of component

getPreferredSize

public Dimension getPreferredSize()
Returns the preferred size of the component.

Overrides:
getPreferredSize in class Component
Returns:
preferred size of the component

getMaximumSize

public Dimension getMaximumSize()
Returns the maximum size of the component.

Overrides:
getMaximumSize in class Component
Returns:
maximum size of the component

Copyright © 2004 Quest Software Inc..
All rights reserved.