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: 322 $ Last update : $Date: 2011-01-04 18:39:14 +0100 (mar., 04 janv. 2011) $ By : $Author: echatellier $
Author:
chatellier
See Also:
Serialized Form

Nested Class Summary
protected  class MatrixViewerPanel.IconButtonRenderingPanel
          Icon button rendering panel.
protected  class MatrixViewerPanel.MatrixComboBox
          Matrix list combo box.
protected  class MatrixViewerPanel.MatrixComboBoxModel
          Matrix list combo box model.
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  List<MatrixND> matrices
          Matrices to render (depend on matrixComboVisible to true).
protected  MatrixViewerPanel.MatrixComboBox matrixComboBox
          Matrix list combo box.
protected  boolean matrixComboVisible
          Matrix list combo visibility (defaut to false).
protected  List<MatrixFilter> matrixFilters
          Matrix filters (used after matrix reduction).
protected  List<MatrixRenderer> matrixRenderers
          Matrix renderer plugins.
protected  MatrixRendererSolution matrixRendererSolution
          Matrix renderer list solution.
static String PROPERTY_MATRICES
           
static String PROPERTY_MATRIX_COMBO_VISIBLE
           
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 addMatrix(MatrixND... matrices)
           
 boolean addMatrixFilter(MatrixFilter matrixFilter)
          Add new matrix filter.
 boolean addMatrixRenderer(MatrixRenderer matrixRenderer)
           
protected  void buildPanel()
          Build main panel.
 void clearMatrix()
           
 MatrixRendererSolution getMatrixRendererSolution()
           
protected  boolean isMatrixComboVisible()
           
 void removeMatrix(Object... matrices)
           
 boolean removeMatrixFilter(Object matrixFilter)
           
 boolean removeMatrixRenderer(Object matrixRenderer)
           
 void setMatrixComboVisible(boolean matrixComboVisible)
           
 void setMatrixRendererSolution(MatrixRendererSolution matrixRendererSolution)
           
protected  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_COMBO_VISIBLE

public static final String PROPERTY_MATRIX_COMBO_VISIBLE
See Also:
Constant Field Values

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_MATRICES

public static final String PROPERTY_MATRICES
See Also:
Constant Field Values

matrixComboVisible

protected boolean matrixComboVisible
Matrix list combo visibility (defaut to false).


matrixRendererSolution

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


matrixRenderers

protected List<MatrixRenderer> matrixRenderers
Matrix renderer plugins.


matrixFilters

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


matrices

protected List<MatrixND> matrices
Matrices to render (depend on matrixComboVisible to true).


matrixComboBox

protected MatrixViewerPanel.MatrixComboBox matrixComboBox
Matrix list combo box.


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

isMatrixComboVisible

protected boolean isMatrixComboVisible()

setMatrixComboVisible

public void setMatrixComboVisible(boolean matrixComboVisible)

getMatrixRendererSolution

public MatrixRendererSolution getMatrixRendererSolution()

setMatrixRendererSolution

public void setMatrixRendererSolution(MatrixRendererSolution matrixRendererSolution)

addMatrixRenderer

public boolean addMatrixRenderer(MatrixRenderer matrixRenderer)

removeMatrixRenderer

public boolean 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)

addMatrix

public void addMatrix(MatrixND... matrices)

removeMatrix

public void removeMatrix(Object... matrices)

clearMatrix

public void clearMatrix()

buildPanel

protected void buildPanel()
Build main panel.


updateSelectedRenderingComponent

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



Copyright © 2004-2011 CodeLutin. All Rights Reserved.