Package org.nuiton.math.matrix.viewer
Class MatrixViewerPanel
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- javax.swing.JComponent
-
- javax.swing.JPanel
-
- 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$ Last update : $Date$ By : $Author$
- Author:
- chatellier
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description 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
Fields Modifier and Type Field Description 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 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
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
accessibleContext, 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
Constructors Constructor Description MatrixViewerPanel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addMatrixDimentionAction(MatrixDimensionAction matrixDimentionAction)
Add new action.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()
void
initRenderering(List[] dimSelectedValues, int[] selectedActions)
Init renderering by autoselecting some dimensions values and some dimensions action.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, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, 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, 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, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, 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, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
-
-
-
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 toMatrixRendererSolution.RADIO_BUTTON
-
matrixRenderers
protected Map<MatrixRenderer,Boolean> matrixRenderers
Matrix renderer plugins.
-
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.
-
-
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 rendererdefautRenderer
- renderer can be called with a null matrix to get default rendering
-
removeMatrixRenderer
public void removeMatrixRenderer(Object matrixRenderer)
-
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.
-
initRenderering
public void initRenderering(List[] dimSelectedValues, int[] selectedActions)
Init renderering by autoselecting some dimensions values and some dimensions action. And perform rendering.- Parameters:
dimSelectedValues
- selected values in each dimensionsselectedActions
- selected action in each dimensions- Throws:
IllegalArgumentException
- if matrix has not been set
-
-