|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
treebolic.Widget
public class Widget
Treebolic's main panel. Call either init() to feed the data
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
javax.swing.JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
private static boolean |
animateOnStart
Animate on start flag |
private static boolean |
debug
Loading data on separate thread |
private static boolean |
fromDom
XML is parsed by DOM parser |
private static long |
serialVersionUID
|
private IContext |
theContext
Context for operations (provides some glue to the context, application) |
private Controller |
theController
Controller |
private java.util.Hashtable<java.lang.String,java.awt.Image> |
theImages
Name-to-image map, used to void loading twice the same images |
private java.net.URL |
theImagesBase
Images base Url |
private AbstractLayerOut |
theLayerOut
Provider |
private java.awt.MediaTracker |
theMediaTracker
Media tracker |
private Model |
theModel
Model |
private Progress |
theProgress
Progress |
private IProvider |
theProvider
Provider |
private Statusbar |
theStatusbar
Status bar |
private Toolbar |
theToolbar
Toolbar |
private static java.lang.String |
theVersion
Version |
private View |
theView
View |
private Weigher |
theWeigher
Weigher |
private static boolean |
threaded
Loading data on separate thread |
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 |
Constructor Summary | |
---|---|
Widget(IContext thisContext)
Constructor |
Method Summary | |
---|---|
void |
focus(java.lang.String thisNodeId)
Focus |
private java.net.URL |
getBase()
Get base url |
IContext |
getContext()
Get context |
private INode |
getFocusNode()
Get node to initially receive focus |
java.lang.String |
getParameter(java.lang.String thisName)
Get parameter |
java.lang.String |
getTarget()
Get target |
java.lang.String |
getVersion()
Get version |
void |
init()
Init (typically called by embedding applet's init()). |
protected void |
init(IProvider thisProvider,
java.lang.String thisSource)
Init from provider and source |
void |
init(Model thisModel)
Init from model |
void |
init(java.lang.String thisProviderName,
java.lang.String thisSource)
Init (typically called by embedding applet's init()). |
protected void |
initProcess(java.lang.String thisSource)
Init (typically called by embedding applet's init()). |
void |
link(java.lang.String thisUrlString,
java.lang.String thisUrlTarget)
Link to Url |
private void |
loadImage(IEdge thisEdge)
Load edge image |
private java.awt.Image |
loadImage(java.lang.String thisSource)
Load image given its source |
private void |
loadImages()
|
private void |
loadImages(INode thisNode)
Load node and node's children's images |
private void |
loadImages(java.util.List<IEdge> thisEdgeList)
Load edges' images |
private void |
loadTopImages(Settings theseSettings)
Load top images |
private java.net.URL |
makeImageURL(java.lang.String thisImageSource)
Get image Url |
private IProvider |
makeProvider(java.lang.String thisProviderName)
Make provider |
java.net.URL |
makeURL(java.lang.String thisSource)
Make URL from source string |
java.lang.String |
match(java.lang.String thisTargetString,
java.lang.String thisScopeString,
java.lang.String thisModeString)
Match node against string |
void |
mount(INode thisMountingNode,
java.lang.String thisSource)
Mount a source at node |
void |
putInformation(java.lang.String thisHeader,
java.lang.String thisContent,
boolean isLink)
Put information |
void |
putMessage(java.lang.String thisString)
Put status string (such as error) |
void |
putProgress(java.lang.String thisString,
boolean fail)
Put progress |
void |
reinit(java.lang.String thisSource)
Re-init from same provider and new source (this assumes the provider is loaded) |
void |
umount(INode thisMountedNode)
Unmount at mountpoint node |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, 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, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, 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, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, 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, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, 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, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, 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 |
---|
private static final long serialVersionUID
private static boolean debug
private static final boolean threaded
private static final boolean fromDom
private static final boolean animateOnStart
private static final java.lang.String theVersion
private final IContext theContext
IContext
private Model theModel
private View theView
private final Controller theController
private IProvider theProvider
private final Weigher theWeigher
private final AbstractLayerOut theLayerOut
private Toolbar theToolbar
private Statusbar theStatusbar
private Progress theProgress
private java.awt.MediaTracker theMediaTracker
private java.util.Hashtable<java.lang.String,java.awt.Image> theImages
private java.net.URL theImagesBase
Constructor Detail |
---|
public Widget(IContext thisContext)
thisContext
- contextMethod Detail |
---|
public void init()
IWidget
init
in interface IWidget
public void init(java.lang.String thisProviderName, java.lang.String thisSource)
IWidget
init
in interface IWidget
thisProviderName
- provider class name (null will default to XML provider)thisSource
- source (anything the provider will make sense of)public void reinit(java.lang.String thisSource)
IWidget
reinit
in interface IWidget
thisSource
- data sourceprotected void initProcess(java.lang.String thisSource)
thisSource
- source (anything the provider will make sense of)protected void init(IProvider thisProvider, java.lang.String thisSource)
thisProvider
- data providerthisSource
- data sourcepublic void init(Model thisModel)
IWidget
init
in interface IWidget
thisModel
- modelpublic void mount(INode thisMountingNode, java.lang.String thisSource)
thisMountingNode
- mounting nodethisSource
- mounted sourcepublic void umount(INode thisMountedNode)
thisMountedNode
- mounted nodepublic java.lang.String getVersion()
getVersion
in interface IWidget
public IContext getContext()
private IProvider makeProvider(java.lang.String thisProviderName)
thisProviderName
- provider name
public java.lang.String getParameter(java.lang.String thisName)
IProviderContext
getParameter
in interface IProviderContext
thisName
- parameter name
public java.net.URL makeURL(java.lang.String thisSource)
IProviderContext
makeURL
in interface IProviderContext
private java.net.URL getBase()
private java.net.URL makeImageURL(java.lang.String thisImageSource)
thisImageSource
- image source
private void loadImages()
private void loadImages(INode thisNode)
thisNode
- starting nodeprivate void loadImages(java.util.List<IEdge> thisEdgeList)
thisEdgeList
- edge listprivate void loadImage(IEdge thisEdge)
thisEdge
- edgeprivate void loadTopImages(Settings theseSettings)
theseSettings
- settingsprivate java.awt.Image loadImage(java.lang.String thisSource)
thisSource
- source
private INode getFocusNode()
public void putProgress(java.lang.String thisString, boolean fail)
IProviderContext
putProgress
in interface IProviderContext
thisString
- messagepublic void putMessage(java.lang.String thisString)
IProviderContext
putMessage
in interface IProviderContext
thisString
- messagepublic java.lang.String getTarget()
public void putInformation(java.lang.String thisHeader, java.lang.String thisContent, boolean isLink)
thisHeader
- headerthisContent
- contentpublic void focus(java.lang.String thisNodeId)
IWidget
focus
in interface IWidget
thisNodeId
- node id to get focuspublic java.lang.String match(java.lang.String thisTargetString, java.lang.String thisScopeString, java.lang.String thisModeString)
IWidget
match
in interface IWidget
thisTargetString
- string to search forthisScopeString
- scope ("label", "content", "link", "id")thisModeString
- mode ("equals", "startswith", "includes")
public void link(java.lang.String thisUrlString, java.lang.String thisUrlTarget)
IWidget
link
in interface IWidget
thisUrlString
- url stringthisUrlTarget
- target string
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |