org.nuiton.math.matrix.viewer
Class MatrixViewerPanel

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 org.nuiton.math.matrix.viewer.MatrixViewerPanel
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class MatrixViewerPanel
extends JPanel

Panel that can display matrix list details (dimension) and rendering solutions.

Version:
$Revision: 348 $ Last update : $Date: 2011-04-08 16:03:40 +0200 (ven., 08 avril 2011) $ By : $Author: echatellier $
Author:
chatellier
See Also:
Serialized Form

Nested Class Summary
protected  class MatrixViewerPanel.IconButtonRenderingPanel
          Icon button rendering panel.
protected static class MatrixViewerPanel.MatrixComboRenderer
          Matrix list combo renderer.
protected  class MatrixViewerPanel.RadioButtonRenderingPanel
          Radio button rendering panel.
protected static class MatrixViewerPanel.RendererButtonModel
          Button model from button containing rendered instance.
 
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
protected  Map<MatrixRenderer,Component> componentForRenderers
          Map entre les renderers et les composants (valorisé par bouton de rendu) et utilisé par le choix du renderer.
protected  MatrixDimensionPanel dimensionPanel
           
protected  MatrixViewerPanel.IconButtonRenderingPanel iconPanel
           
protected  MatrixND matrix
          La matrice courrement affichées.
protected  List<MatrixFilter> matrixFilters
          Matrix filters (used after matrix reduction).
protected  Map<MatrixRenderer,Boolean> matrixRenderers
          Matrix renderer plugins.
protected  MatrixRendererSolution matrixRendererSolution
          Matrix renderer list solution.
static String PROPERTY_MATRIX
           
static String PROPERTY_MATRIX_RENDERER_SOLUTION
           
static String PROPERTY_MATRIX_RENDERERS
           
protected  MatrixViewerPanel.RadioButtonRenderingPanel radioPanel
           
protected  JPanel renderingComponentContainer
           
 
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
MatrixViewerPanel()
           
 
Method Summary
 void addMatrixDimentionAction(MatrixDimensionAction matrixDimentionAction)
          Add new action.
 boolean addMatrixFilter(MatrixFilter matrixFilter)
          Add new matrix filter.
 void addMatrixRenderer(MatrixRenderer matrixRenderer)
           
 void addMatrixRenderer(MatrixRenderer matrixRenderer, boolean defautRenderer)
          Add new matrix renderer.
protected  void buildPanel()
          Build main panel.
 MatrixND getMatrix()
          Get currently displayed matrix.
 MatrixRendererSolution getMatrixRendererSolution()
           
 boolean removeMatrixFilter(Object matrixFilter)
           
 void removeMatrixRenderer(Object matrixRenderer)
           
 void setMatrix(MatrixND matrix)
          Set currently displayed matrix.
 void setMatrixRendererSolution(MatrixRendererSolution matrixRendererSolution)
           
 void updateSelectedRenderingComponent()
          Set rendering component in rendering container.
 
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

PROPERTY_MATRIX_RENDERER_SOLUTION

public static final String PROPERTY_MATRIX_RENDERER_SOLUTION
See Also:
Constant Field Values

PROPERTY_MATRIX_RENDERERS

public static final String PROPERTY_MATRIX_RENDERERS
See Also:
Constant Field Values

PROPERTY_MATRIX

public static final String PROPERTY_MATRIX
See Also:
Constant Field Values

matrixRendererSolution

protected MatrixRendererSolution matrixRendererSolution
Matrix renderer list solution. (default to MatrixRendererSolution.RADIO_BUTTON


matrixRenderers

protected Map<MatrixRenderer,Boolean> matrixRenderers
Matrix renderer plugins.


matrixFilters

protected List<MatrixFilter> matrixFilters
Matrix filters (used after matrix reduction).


matrix

protected MatrixND matrix
La matrice courrement affichées.


dimensionPanel

protected MatrixDimensionPanel dimensionPanel

radioPanel

protected MatrixViewerPanel.RadioButtonRenderingPanel radioPanel

iconPanel

protected MatrixViewerPanel.IconButtonRenderingPanel iconPanel

renderingComponentContainer

protected JPanel renderingComponentContainer

componentForRenderers

protected Map<MatrixRenderer,Component> componentForRenderers
Map entre les renderers et les composants (valorisé par bouton de rendu) et utilisé par le choix du renderer.

Constructor Detail

MatrixViewerPanel

public MatrixViewerPanel()
Method Detail

getMatrixRendererSolution

public MatrixRendererSolution getMatrixRendererSolution()

setMatrixRendererSolution

public void setMatrixRendererSolution(MatrixRendererSolution matrixRendererSolution)

addMatrixRenderer

public void addMatrixRenderer(MatrixRenderer matrixRenderer)

addMatrixRenderer

public void addMatrixRenderer(MatrixRenderer matrixRenderer,
                              boolean defautRenderer)
Add new matrix renderer.

Parameters:
matrixRenderer - matrix renderer
defautRenderer - renderer can be called with a null matrix to get default rendering

removeMatrixRenderer

public void removeMatrixRenderer(Object matrixRenderer)

addMatrixFilter

public boolean addMatrixFilter(MatrixFilter matrixFilter)
Add new matrix filter. Used after matrix reduction and before matrix rendering.

Parameters:
matrixFilter - matrix filter
Returns:
true (as specified by Collection.add(Object)

removeMatrixFilter

public boolean removeMatrixFilter(Object matrixFilter)

setMatrix

public void setMatrix(MatrixND matrix)
Set currently displayed matrix.

Parameters:
matrix - new matrix to display

getMatrix

public MatrixND getMatrix()
Get currently displayed matrix.

Returns:
current matrix

addMatrixDimentionAction

public void addMatrixDimentionAction(MatrixDimensionAction matrixDimentionAction)
Add new action.

Parameters:
matrixDimentionAction - new action

buildPanel

protected void buildPanel()
Build main panel.


updateSelectedRenderingComponent

public void updateSelectedRenderingComponent()
Set rendering component in rendering container.



Copyright © 2004-2011 CodeLutin. All Rights Reserved.