com.tensegrity.gui.swing.control.slidepanel
Class Slide

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JPanel
                  extended bycom.tensegrity.gui.swing.control.slidepanel.Slide
All Implemented Interfaces:
javax.accessibility.Accessible, Evaluable, java.awt.image.ImageObserver, java.awt.MenuContainer, Observer, java.io.Serializable

public final class Slide
extends javax.swing.JPanel
implements Observer, Evaluable

This class represents a single slide. A single slide is a slideComponent consisting of a SlideTitle on top, followed by the user supplied component below it. Finally vertical glue is added to fix layout problems. This class is internal to this package.

Version:
$Id: Slide.java,v 1.46 2005/08/29 15:13:01 BurkhardWick Exp $
Author:
Stepan Rutz, MichaelKegel
See Also:
Serialized Form

Nested Class Summary
protected  class Slide.SlideScrollPane
          This subclass of JScrollPane provides a mean to return either true or false in the overridden JScrollPane.isValidateRoot() method.
 
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
 
Method Summary
 void addObserver(Observer observer)
          Adds the given parameter Observer to this observable's.
 void applyEvList()
          Tells the component to apply its UIItemEvaluationList.
 void deleteObserver(Observer observer)
          Deletes the given Observer from this observable's.
 void doLayout()
           
 java.awt.Dimension getPreferredSize()
          Returns the preferred size for this slide by calculating the height as a sum of title's and component's height and using the width of the component as width for this slide.
 javax.swing.JScrollPane getScrollPane()
          Returns the scrollpane of this slide if it is scrollable or null
 javax.swing.JComponent getSlideComponent()
          Returns the Component nested in this slide.
 SlideTitle getSlideTitle()
          Returns the title component of this slide.
 java.lang.String getTitle()
          Returns the title of this slide.
 void installEvList()
          Tells the component to setup its internal state.
 boolean isFocusTraversable()
           
 void requestFocus()
           
 void setInternatSlideIsValidateRootReturnedValue(boolean isSlideComponentValidateRoot)
           Method allowing setting the value that will be returned by the internal JScrollPane (if any) JScrollPane.isValidateRoot() method.
 void setTitle(java.lang.String s)
          Sets the title of this Slide.
 void toggleFoldState()
          Toggles fold state.
 void update(Observable o, java.lang.Object arg)
          Triggers layout of this component.
 void updateUI()
          Perform some custom ui updating.
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI
 
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, 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, paint, 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, 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, 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, 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
 

Method Detail

toggleFoldState

public void toggleFoldState()
Toggles fold state.


setInternatSlideIsValidateRootReturnedValue

public void setInternatSlideIsValidateRootReturnedValue(boolean isSlideComponentValidateRoot)

Method allowing setting the value that will be returned by the internal JScrollPane (if any) JScrollPane.isValidateRoot() method.

Parameters:
isSlideComponentValidateRoot - this value will be returned by the internal JScrollPane (if any) JScrollPane.isValidateRoot() method.

getSlideTitle

public SlideTitle getSlideTitle()
Returns the title component of this slide.

Returns:
SlideTitle the title component.

getTitle

public java.lang.String getTitle()
Returns the title of this slide. This method delegates this call to the internal SlideTitle.getText().

Returns:
the title text.

setTitle

public void setTitle(java.lang.String s)
Sets the title of this Slide. This method delegates to SlideTitle.setText(String).

Parameters:
s - the new title for this slide.

getSlideComponent

public javax.swing.JComponent getSlideComponent()
Returns the Component nested in this slide.

Returns:
the nested slide-component.

addObserver

public void addObserver(Observer observer)
Adds the given parameter Observer to this observable's.

Parameters:
observer - the observer to add.

deleteObserver

public void deleteObserver(Observer observer)
Deletes the given Observer from this observable's.

Parameters:
observer - the Observer instance to delete.

update

public void update(Observable o,
                   java.lang.Object arg)
Triggers layout of this component.

Specified by:
update in interface Observer
Parameters:
o - the observable that triggered the call.
arg - an object carrying additional information.

updateUI

public void updateUI()
Perform some custom ui updating.


getPreferredSize

public java.awt.Dimension getPreferredSize()
Returns the preferred size for this slide by calculating the height as a sum of title's and component's height and using the width of the component as width for this slide.

See Also:
Component.getPreferredSize()

requestFocus

public void requestFocus()

isFocusTraversable

public boolean isFocusTraversable()

doLayout

public void doLayout()

getScrollPane

public javax.swing.JScrollPane getScrollPane()
Returns the scrollpane of this slide if it is scrollable or null

Returns:
the scrollpane of this slide if it is scrollable or null

installEvList

public void installEvList()
Description copied from interface: Evaluable
Tells the component to setup its internal state.

Specified by:
installEvList in interface Evaluable

applyEvList

public void applyEvList()
Description copied from interface: Evaluable
Tells the component to apply its UIItemEvaluationList.

Specified by:
applyEvList in interface Evaluable


Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.