|
||||||||||
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
FEJDGui.MatrixPanel
This panel displays the matrix with the painted elements
Nested Class Summary |
Nested classes inherited from class javax.swing.JPanel |
javax.swing.JPanel.AccessibleJPanel |
Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
private boolean |
all
True if the whole panel has to be painted (to create a jpeg for exemple) |
private boolean |
isDispDecomp
Keeps the choice of the user about the displaying of the LU decomposition |
private int |
margin
The margin around the matrix |
private java.util.Vector |
matBlue
Contains non zero elements of the matrix |
private java.util.Vector |
matDecompBlue
Contains non zero elements of the LU matrix after decomposition |
private java.util.Vector |
matGreen
Contains the elements of the matrix corresponding to dirichlet nodes |
private java.util.Vector |
matGreenTmp
Contains the row and the column of the current dirichlet point |
private java.util.Vector |
matRed
Contains the non zero elements of the matrix added by the current element |
private java.util.Vector |
matRedTmp
Contains the row and the column of the current highlighted row, for the display of the solving process |
private int |
size
The size of the displayed matrix |
private java.util.Vector |
vectBlue
Contains non zero elements of the vector |
private java.util.Vector |
vectGreen
Contains the elements of the vector corresponding to dirichlet nodes |
private java.util.Vector |
vectRed
Contains the non zero elements of the vector added by the current element |
private int |
zoomValue
The current value of the zoom |
Fields inherited from class javax.swing.JPanel |
|
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.Container |
|
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 | |
MatrixPanel()
Construts and initialises a new matrix panel |
Method Summary | |
void |
changeDispDecomp()
Switches between displaying and not displaying the LU matrix |
void |
clearGreenTmp()
Clears the matrix containing temporary green points |
void |
clearRedTmp()
Clears the matrix containing temporary red points |
void |
emptyMat()
Clears the matrices containing colored points |
void |
emptyVect()
Clears the vectors containing colored elements |
boolean |
getDispDecomp()
Returns true if the user wants to display the LU matrix |
int |
getMargin()
Returns the margin of the panel |
private Vector2 |
getMatBlue(int i)
Returns the ith blue element of the matrix |
private int |
getMatBlueSize()
Returns the number of blue elements of the matrix |
private Vector2 |
getMatDecompBlue(int i)
Returns the ith blue element of the LU matrix |
private int |
getMatDecompBlueSize()
Returns the number of blue elements of the LU matrix |
private Vector2 |
getMatGreen(int i)
Returns the ith green element of the matrix |
private int |
getMatGreenSize()
Returns the number of green elements of the matrix |
private Vector2 |
getMatGreenTmp(int i)
Returns the ith temporary green element of the matrix |
private int |
getMatGreenTmpSize()
Returns the number of temporary green elements of the matrix |
private Vector2 |
getMatRed(int i)
Returns the ith red element of the matrix |
private int |
getMatRedSize()
Returns the number of red elements of the matrix |
private Vector2 |
getMatRedTmp(int i)
Returns the ith temporary red element of the matrix |
private int |
getMatRedTmpSize()
Returns the number of temporary red elements of the matrix |
int |
getSizeMat()
Returns the size of the matrix |
private int |
getVectBlue(int i)
Returns the ith blue element of the vector |
private int |
getVectBlueSize()
Returns the number of blue elements of the vector |
private int |
getVectGreen(int i)
Returns the ith green element of the vector |
private int |
getVectGreenSize()
Returns the number of green elements of the vector |
private int |
getVectRed(int i)
Returns the ith red element of the vector |
private int |
getVectRedSize()
Returns the number of green elements of the vector |
void |
insertMat()
Changes all the red point of the matrix to blue points |
void |
insertVect()
Changes all the red point of the vector to blue elements |
boolean |
isCrossDisplayed(int i,
int j)
Returns true if any portion of the row i and the column j is displayed by the scroll pane |
boolean |
isElemDisplayed(int i,
int j)
Returns true if the element (i,j) of the matrix is displayed by the scroll pane |
void |
loadDecomp(SkyLine SMatrix)
Loads the LU decomposition of the matrix |
void |
paintComponent(java.awt.Graphics g)
Paints the components of the display |
private void |
printValue(java.awt.Graphics g,
int ni,
int nj,
int xd,
int yd,
java.awt.Color col,
int asc,
java.awt.FontMetrics fm,
boolean symetric)
Prints the value of the element of the matrix |
private void |
printVectValue(java.awt.Graphics g,
int nbr,
int xd,
int yd,
java.awt.Color col,
int asc,
java.awt.FontMetrics fm)
Prints the value of the element of the vector |
void |
recalcPanelSize(int value)
Recomputes the size of the matrix when the scroll bar is moved |
void |
setMatGreen(int i,
int j)
Sets (i,j) as green element of the matrix |
void |
setMatGreenTmp(int i,
int j)
Sets (i,j) as temporary green element of the matrix |
void |
setMatRed(int i,
int j)
Sets (i,j) as red element of the matrix |
void |
setMatRedTmp(int i,
int j)
Sets (i,j) as temporary red element of the matrix |
void |
setMesh(int size)
Sets the mesh so its matrix can be displayed |
void |
setVectGreen(int i)
Sets i as green element of the vector |
void |
setVectRed(int i)
Sets i as red element of the vector |
void |
willPaintAll()
Turns the all variable to true |
Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, 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, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, 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, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, 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, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, 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 boolean isDispDecomp
private java.util.Vector vectBlue
private java.util.Vector vectRed
private java.util.Vector vectGreen
private java.util.Vector matBlue
private java.util.Vector matDecompBlue
private java.util.Vector matRed
private java.util.Vector matGreen
private java.util.Vector matGreenTmp
private java.util.Vector matRedTmp
private int margin
private int zoomValue
private int size
private boolean all
Constructor Detail |
public MatrixPanel()
Method Detail |
public void setMesh(int size)
public void setMatRed(int i, int j)
private Vector2 getMatRed(int i)
private Vector2 getMatBlue(int i)
private Vector2 getMatDecompBlue(int i)
public void setMatGreen(int i, int j)
public void setMatGreenTmp(int i, int j)
public void setMatRedTmp(int i, int j)
private Vector2 getMatGreen(int i)
private Vector2 getMatRedTmp(int i)
private Vector2 getMatGreenTmp(int i)
private int getMatRedSize()
private int getMatBlueSize()
private int getMatDecompBlueSize()
private int getMatGreenSize()
private int getMatGreenTmpSize()
private int getMatRedTmpSize()
public void emptyMat()
public void clearGreenTmp()
public void clearRedTmp()
public void insertMat()
public void setVectRed(int i)
private int getVectRed(int i)
private int getVectBlue(int i)
public void setVectGreen(int i)
private int getVectGreen(int i)
private int getVectRedSize()
private int getVectBlueSize()
private int getVectGreenSize()
public void emptyVect()
public void insertVect()
public int getSizeMat()
public void loadDecomp(SkyLine SMatrix)
public boolean isElemDisplayed(int i, int j)
public boolean isCrossDisplayed(int i, int j)
public void recalcPanelSize(int value)
public void changeDispDecomp()
public boolean getDispDecomp()
public int getMargin()
private void printValue(java.awt.Graphics g, int ni, int nj, int xd, int yd, java.awt.Color col, int asc, java.awt.FontMetrics fm, boolean symetric)
private void printVectValue(java.awt.Graphics g, int nbr, int xd, int yd, java.awt.Color col, int asc, java.awt.FontMetrics fm)
public void willPaintAll()
public void paintComponent(java.awt.Graphics g)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |