|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--javax.swing.JComponent
|
+--javax.swing.JPanel
|
+--torsusapplet.DrawArea
DrawArea class handles the graphical construction and display of truss structures.
| Inner classes inherited from class javax.swing.JPanel |
javax.swing.JPanel.AccessibleJPanel |
| Inner classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
| Inner classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent |
| Field Summary | |
static int |
DRAW_HEIGHT
Integer value representing width of the DrawArea. |
static int |
DRAW_WIDTH
Integer value representing width of the DrawArea. |
static int |
X_ORIGIN_OFFSET
Integer value representing x offset. |
static int |
Y_ORIGIN_OFFSET
Integer value representing y offset. |
| 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 | |
DrawArea(TorsusView v)
Constructor takes view as an argument to enable communication in both directions between classes. |
|
| Method Summary | |
void |
addMember(Node m,
Node n)
Calls the method of the same name on the local TrussStructure. |
void |
displayNodeMemberNumbers(boolean b)
If boolean b is true, the numbering scheme of the Nodes and Members is displayed. |
void |
drawLine(java.awt.Point a,
java.awt.Point b)
Draws a line between Points a and b. |
void |
drawSnap(Node n,
boolean b)
Depending on value of boolean b, this method will draw a "snap square" around Node n. |
void |
drawXLoad(Node n,
java.awt.Graphics graphics)
Draws the arrow and force corresponding to the of x-component of the load at Node n. |
void |
drawYLoad(Node n,
java.awt.Graphics graphics)
Draws the arrow and force corresponding to the of y-component of the load at Node n. |
TrussStructure |
getTrussStructure()
Returns most current copy of local TrussStructure. |
void |
highlightMember(Member m,
boolean b)
Depending on value of boolean b, this method will highlight Member m. |
void |
highlightModifyNode(Node n,
boolean b)
Depending on value of boolean b, this method will highlight Node n. |
void |
modifyStructure(Node n,
java.awt.Point p)
Calls the method of the same name on the local TrussStructure. |
void |
paintComponent(java.awt.Graphics g)
This method overrides the paintComponent() method of JPanel. |
void |
paintDisplacedNodes(TrussStructure t)
Causes DrawArea to display only the displaced structure. |
void |
paintInternalForces(TrussStructure t)
Causes DrawArea to display only the internal forces of the structure. |
void |
paintStructureOnly()
Causes DrawArea to display only the structure (build mode). |
void |
refresh()
Calls repaint() on self. |
void |
removeMember(Node m,
Node n)
Calls the method of the same name on the local TrussStructure. |
void |
resetScreen()
Resets local TrussStructure and reverts to build mode. |
void |
resetTempLine()
Erases any remnant of the "sticky" line used in graphical addition Members. |
void |
setBC(Node n,
int mode)
Calls the method of the same name on the local TrussStructure. |
void |
setBGBlack()
Changes the color scheme of the DrawArea to correspond to a black background (~15 different items are assigned colors). |
void |
setBGWhite()
Changes the color scheme of the DrawArea to correspond to a white background (~15 different items are assigned colors). |
void |
setGrid(boolean b,
int n)
If boolean b is true, grid is turned on at a spacing of n pixels. |
void |
setLoad(Node n,
double fx,
double fy)
Calls the method of the same name on the local TrussStructure. |
void |
setSnapDistance(int n)
Calls the method of the same name on the local TrussStructure. |
void |
setTrussStructure(TrussStructure t)
Sets the current TrussStructure according to argument. |
void |
undo()
Reverts local TrussStructure to form before last build operation. |
| Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUIClassID, paramString, 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, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int DRAW_WIDTH
public static final int DRAW_HEIGHT
public static final int X_ORIGIN_OFFSET
public static final int Y_ORIGIN_OFFSET
| Constructor Detail |
public DrawArea(TorsusView v)
| Method Detail |
public void paintComponent(java.awt.Graphics g)
paintComponent in class javax.swing.JComponentpublic TrussStructure getTrussStructure()
public void setTrussStructure(TrussStructure t)
public void refresh()
public void paintStructureOnly()
public void paintDisplacedNodes(TrussStructure t)
public void paintInternalForces(TrussStructure t)
public void drawLine(java.awt.Point a,
java.awt.Point b)
public void drawSnap(Node n,
boolean b)
public void highlightMember(Member m,
boolean b)
public void highlightModifyNode(Node n,
boolean b)
public void modifyStructure(Node n,
java.awt.Point p)
public void addMember(Node m,
Node n)
public void removeMember(Node m,
Node n)
public void resetScreen()
public void resetTempLine()
public void setBC(Node n,
int mode)
public void setBGBlack()
public void setBGWhite()
public void setGrid(boolean b,
int n)
public void setSnapDistance(int n)
public void setLoad(Node n,
double fx,
double fy)
public void displayNodeMemberNumbers(boolean b)
public void drawXLoad(Node n,
java.awt.Graphics graphics)
public void drawYLoad(Node n,
java.awt.Graphics graphics)
public void undo()
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||