JLogView_.interfaces
Class LGPanel

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by JLogView_.interfaces.LGPanel
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.event.ComponentListener, java.awt.event.ItemListener, java.awt.event.MouseMotionListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.event.ListSelectionListener, javax.swing.event.TreeSelectionListener

public class LGPanel
extends javax.swing.JPanel
implements java.awt.event.ActionListener, javax.swing.event.ListSelectionListener, javax.swing.event.TreeSelectionListener, java.awt.event.MouseMotionListener, java.awt.event.ComponentListener, java.awt.event.ItemListener

LGPanel is the main control centre. It is not a window, because it has to be usable from two backends. One is the standalone JLogView_ application, the other one is the Applet side. Because it is the main control area there are a lot of connections with all the other widgets and windows.

At the top of the panel there is a toolbar which is only used when being in standalone mode because all of its content does not make sense in the context of being part of a webpage.

Currently when being in applet mode, we are using the old loggraph view just to mimic what is being done in the output of baubles. However it might in the future be more useful to use the tree view instead.

There are a lot of event listeners being implemented by this interfaces to manage, transfer, delegate all interactions to the right parts.

See Also:
Serialized Form

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
 
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
LGPanel(boolean standalone, boolean isTreeView)
          This is the constructor of LGPanel.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          This function comes from the ActionListener interface, it handles response to clicks on menus items and buttons
 void componentHidden(java.awt.event.ComponentEvent e)
          This method comes from the ComponentListener interface, it handles response to a component being set unvisible (hidden)
 void componentMoved(java.awt.event.ComponentEvent e)
          This method comes from the ComponentListener interface, it handles response to a component being moved
 void componentResized(java.awt.event.ComponentEvent e)
          This method comes from the ComponentListener interface, it handles response to a component being resized
 void componentShown(java.awt.event.ComponentEvent e)
          This method comes from the ComponentListener interface, it handles response to a component being set visible (shown)
 LGTable[] getTables()
          This method returns the array of tables currently being used.
 void itemStateChanged(java.awt.event.ItemEvent ie)
          This method comes from the ItemListener interface, it handles response to a change of item state, for example a tick bock getting ticked or unticked
 void mouseDragged(java.awt.event.MouseEvent e)
          This method comes from the MouseMotionListener interface, it handles response to a mouse dragging event
 void mouseMoved(java.awt.event.MouseEvent e)
          This function comes from the MouseMotionListener interface, it handles response to a mouse movement
 void setTables(LGTable[] tabs)
          This method loads up an array of tables this triggers the first graph of the first table to be selected and therefore displayed in the canvas.
 void valueChanged(javax.swing.event.ListSelectionEvent lse)
          This function comes from the ListSelectionListener interace it handles the response to a click on the list structures and updates the display accordingly
 void valueChanged(javax.swing.event.TreeSelectionEvent tse)
          This function comes from the TreeSelectionListener interace it handles the response to a click on the tree structure and updates the display accordingly
 
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
 

Constructor Detail

LGPanel

public LGPanel(boolean standalone,
               boolean isTreeView)
This is the constructor of LGPanel. This is the constructor to use, trying to use the default constructor (i.e without arguments) would result in loads of uninitialised stuff.

Parameters:
standalone - a boolean, true -> we are using the standalone JLogView_, false-> we are using the applet
isTreeView - a boolean, true -> we use the tree view, false -> we use the old loggraph view
Method Detail

getTables

public LGTable[] getTables()
This method returns the array of tables currently being used. It is mainly useful for switching between two instances of LGPanel using different viewing modes

Returns:
an array of LGTable objects representing all tables and graphs (inside the tables)
See Also:
LGTable

setTables

public void setTables(LGTable[] tabs)
This method loads up an array of tables this triggers the first graph of the first table to be selected and therefore displayed in the canvas. If null is passed nothing happens.

Parameters:
tabs - an array of LGTable objects representing all tables and graphs (inside the tables)
See Also:
LGTable

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
This function comes from the ActionListener interface, it handles response to clicks on menus items and buttons

Specified by:
actionPerformed in interface java.awt.event.ActionListener

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent e)
This function comes from the MouseMotionListener interface, it handles response to a mouse movement

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

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent e)
This method comes from the MouseMotionListener interface, it handles response to a mouse dragging event

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

itemStateChanged

public void itemStateChanged(java.awt.event.ItemEvent ie)
This method comes from the ItemListener interface, it handles response to a change of item state, for example a tick bock getting ticked or unticked

Specified by:
itemStateChanged in interface java.awt.event.ItemListener

valueChanged

public void valueChanged(javax.swing.event.ListSelectionEvent lse)
This function comes from the ListSelectionListener interace it handles the response to a click on the list structures and updates the display accordingly

Specified by:
valueChanged in interface javax.swing.event.ListSelectionListener

valueChanged

public void valueChanged(javax.swing.event.TreeSelectionEvent tse)
This function comes from the TreeSelectionListener interace it handles the response to a click on the tree structure and updates the display accordingly

Specified by:
valueChanged in interface javax.swing.event.TreeSelectionListener

componentHidden

public void componentHidden(java.awt.event.ComponentEvent e)
This method comes from the ComponentListener interface, it handles response to a component being set unvisible (hidden)

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

componentMoved

public void componentMoved(java.awt.event.ComponentEvent e)
This method comes from the ComponentListener interface, it handles response to a component being moved

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

componentShown

public void componentShown(java.awt.event.ComponentEvent e)
This method comes from the ComponentListener interface, it handles response to a component being set visible (shown)

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

componentResized

public void componentResized(java.awt.event.ComponentEvent e)
This method comes from the ComponentListener interface, it handles response to a component being resized

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