|
||||||||||
| 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
msg.ProteinMatrix
public class ProteinMatrix
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
javax.swing.JComponent.AccessibleJComponent |
| Field Summary |
|---|
| Fields inherited from class javax.swing.JComponent |
|---|
TOOL_TIP_TEXT_KEY, 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 | |
|---|---|
ProteinMatrix(Msg_panel alles,
int wWidth,
int wHeight)
Initializes a new ProteinMatrix. |
|
| Method Summary | |
|---|---|
void |
addElement(ProteinElement newElement)
Adds a ProteinElement. |
void |
calculateMatrixStartSize(int panelWidth,
int panelHeight,
int matrixWidth,
int matrixHeight)
Calculates the start size of the lipid matrix. |
int |
calculateProteinNumber()
Calculates the number of Proteins. |
int |
calculateQuantityIntValue(int quantity,
int sizeX,
int sizeY)
Calculates the quantity value of a ProteinElement in the lipid matrix. |
void |
calculateRatio(int wH,
int wW,
int mH,
int mW)
Calculates the ratio of a singe lipid according to the panel size. |
void |
changeBusyCords(int x1,
int y1,
int x2,
int y2,
int sizeX,
int sizeY)
Changes the busy coordinates in the lipid matrix. |
void |
changeElements()
Change the properties of the component. |
void |
changeKey(java.lang.String oldKey,
java.lang.String newKey)
Change the key of all elements that belong to the old key. |
void |
changeResize()
Changes the component if the window is resized. |
void |
changeZoomDefault()
Change the size of the component to fit the size of the panel. |
void |
changeZoomIn()
Change the size of the component to zoom in. |
void |
changeZoomOut()
Change the size of the component to zoom out. |
boolean |
checkRotate(int angle)
Checks if the ProteinElement is rotated with 90° or 270°. |
void |
clearCords()
Clear the busy coordinates in the lipid matrix. |
boolean |
createElements()
Creates the new ProteinElements components. |
void |
createProgBar()
Creates and initializes a MatrixProgressBar. |
void |
deleteKey(java.lang.String key)
Delete the key of an elements that had been deleted. |
void |
deleteProgBar()
Deletes a MatrixProgressBar. |
int[] |
generateCoordinates(int sizeX,
int sizeY)
Generate the coordinates for the ProteinElement on the lipid matrix. |
void |
generateLoaded()
Generates the ProteinElements loaded with an XML file. |
void |
generateMatrix(int wWidth,
int wHeight)
Generate the matrix of the lipids and executes the calculateRatio() function. |
void |
generateNew()
Generates new ProteinElement objects and add them to this panel. |
Msg_panel |
getAlles()
|
java.util.Hashtable |
getBusy()
|
java.awt.Color |
getColorBackground()
|
java.lang.String[] |
getElement(int i)
Returns the element at index i. |
java.util.Vector |
getElementList()
|
int |
getMatrixHeight()
|
int |
getMatrixWidth()
|
int |
getMaxTry()
|
MembranModel |
getMembranModel()
|
int |
getMHeight()
|
int |
getMWidth()
|
int |
getMZoom()
|
int |
getMZoomFactor()
|
MatrixProgressBar |
getProgbar()
|
int |
getRatioHeight()
|
int |
getRatioWidth()
|
int |
getResizeValue()
|
int |
getWHeight()
|
int |
getWWidth()
|
boolean |
isDebugModus()
|
boolean |
loadElements()
Creates the new ProteinElements components when an XML file is loaded. |
void |
paintComponent(java.awt.Graphics g)
Paints the component. |
void |
printCords()
Prints the lipid matrix to the STDOUT. |
void |
removeBusyCords(int x,
int y,
int sizeX,
int sizeY)
Removes the busy coordinates in the lipid matrix. |
void |
saveCurrentStatus()
Save the current status with all its components and their properties. |
void |
setAlles(Msg_panel alles)
|
void |
setBusy(java.util.Hashtable busy)
|
void |
setBusyCords(int x,
int y,
int sizeX,
int sizeY)
Set the busy coordinates in the lipid matrix. |
void |
setColorBackground(java.awt.Color colorBackground)
|
void |
setDebugModus(boolean debugModus)
|
void |
setElementList(java.util.Vector elementList)
|
void |
setMaxTry(int maxTry)
|
void |
setMembranModel(MembranModel membranModel)
|
void |
setMHeight(int height)
|
void |
setMWidth(int width)
|
void |
setMZoom(int zoom)
|
void |
setMZoomFactor(int zoomFactor)
|
void |
setProgbar(MatrixProgressBar progbar)
|
void |
setRatioHeight(int ratioHeight)
|
void |
setRatioWidth(int ratioWidth)
|
void |
setResizeValue(int resizeValue)
|
void |
setWHeight(int height)
|
void |
setWWidth(int width)
|
boolean |
testCords(int x,
int y,
int sizeX,
int sizeY)
Test if the protein do not overlap with the busy coordinates in the lipid matrix. |
boolean |
testSpace()
Checks if the proteins could be placed all on the lipid matrix. |
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, setUI, updateUI |
| Methods inherited from class javax.swing.JComponent |
|---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, 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, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, 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, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
| Methods inherited from class java.awt.Container |
|---|
add, add, add, add, add, addContainerListener, 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, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate |
| Methods inherited from class java.awt.Component |
|---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, 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, 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 |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ProteinMatrix(Msg_panel alles,
int wWidth,
int wHeight)
alles - Msg_panelwWidth - int (panel width)wHeight - int (panel height)| Method Detail |
|---|
public void generateMatrix(int wWidth,
int wHeight)
wWidth - int (panel width)wHeight - int (panel height)public void changeElements()
public void changeResize()
public void changeZoomIn()
public void changeZoomOut()
public void changeZoomDefault()
public void saveCurrentStatus()
public void changeKey(java.lang.String oldKey,
java.lang.String newKey)
oldKey - StringnewKey - Stringpublic void deleteKey(java.lang.String key)
key - String
public void calculateMatrixStartSize(int panelWidth,
int panelHeight,
int matrixWidth,
int matrixHeight)
panelWidth - int (panel width)panelHeight - int (panel height)matrixWidth - int (lipid matrix width)matrixHeight - int (lipid matrix height)public void generateNew()
public void generateLoaded()
public int calculateProteinNumber()
public boolean createElements()
public boolean loadElements()
public boolean checkRotate(int angle)
angle - int
public int calculateQuantityIntValue(int quantity,
int sizeX,
int sizeY)
quantity - intsizeX - int (width of the protein in lipids)sizeY - int (height of the protein in lipids)
public void createProgBar()
public void deleteProgBar()
public void paintComponent(java.awt.Graphics g)
paintComponent in class javax.swing.JComponentpublic boolean testSpace()
public int[] generateCoordinates(int sizeX,
int sizeY)
sizeX - int (width of the protein in lipids)sizeY - int (height of the protein in lipids)
public void setBusyCords(int x,
int y,
int sizeX,
int sizeY)
x - int (x position in lipid matrix)y - int (y position in lipid matrix)sizeX - int (width of the protein in lipids)sizeY - int (height of the protein in lipids)
public void removeBusyCords(int x,
int y,
int sizeX,
int sizeY)
x - int (x position in lipid matrix)y - int (y position in lipid matrix)sizeX - int (width of the protein in lipids)sizeY - int (height of the protein in lipids)
public void changeBusyCords(int x1,
int y1,
int x2,
int y2,
int sizeX,
int sizeY)
x1 - int (old x position in lipid matrix)y1 - int (old y position in lipid matrix)x2 - int (new x position in lipid matrix)y2 - int (new y position in lipid matrix)sizeX - int (width of the protein in lipids)sizeY - int (height of the protein in lipids)public void printCords()
public boolean testCords(int x,
int y,
int sizeX,
int sizeY)
x - int (x position in lipid matrix)y - int (y position in lipid matrix)sizeX - int (width of the protein in lipids)sizeY - int (height of the protein in lipids)
public void clearCords()
public void calculateRatio(int wH,
int wW,
int mH,
int mW)
wH - int (window height)wW - int (window width)mH - int (matrix height)mW - int (matrix width)public int getMatrixHeight()
public int getMatrixWidth()
public void addElement(ProteinElement newElement)
newElement - ProteinElementpublic java.lang.String[] getElement(int i)
i - int
public int getRatioWidth()
public Msg_panel getAlles()
public void setAlles(Msg_panel alles)
alles - The alles to set.public java.util.Hashtable getBusy()
public void setBusy(java.util.Hashtable busy)
busy - The busy to set.public java.awt.Color getColorBackground()
public void setColorBackground(java.awt.Color colorBackground)
colorBackground - The colorBackground to set.public boolean isDebugModus()
public void setDebugModus(boolean debugModus)
debugModus - The debugModus to set.public java.util.Vector getElementList()
public void setElementList(java.util.Vector elementList)
elementList - The elementList to set.public int getMaxTry()
public void setMaxTry(int maxTry)
maxTry - The maxTry to set.public MembranModel getMembranModel()
public void setMembranModel(MembranModel membranModel)
membranModel - The membranModel to set.public int getMHeight()
public void setMHeight(int height)
height - The mHeight to set.public int getMWidth()
public void setMWidth(int width)
width - The mWidth to set.public int getMZoom()
public void setMZoom(int zoom)
zoom - The mZoom to set.public int getMZoomFactor()
public void setMZoomFactor(int zoomFactor)
zoomFactor - The mZoomFactor to set.public MatrixProgressBar getProgbar()
public void setProgbar(MatrixProgressBar progbar)
progbar - The progbar to set.public int getRatioHeight()
public void setRatioHeight(int ratioHeight)
ratioHeight - The ratioHeight to set.public void setRatioWidth(int ratioWidth)
ratioWidth - The ratioWidth to set.public int getResizeValue()
public void setResizeValue(int resizeValue)
resizeValue - The resizeValue to set.public int getWHeight()
public void setWHeight(int height)
height - The wHeight to set.public int getWWidth()
public void setWWidth(int width)
width - The wWidth to set.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||