e-Mohr v. 1.00

Class MohrPrincipalStrsCanvas

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JPanel
                  extended bywc.CanvasWC
                      extended byMohrPrincipalStrsCanvas
All Implemented Interfaces:
javax.accessibility.Accessible, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.io.Serializable

class MohrPrincipalStrsCanvas
extends CanvasWC

MohrPrincipalStrsCanvas.java - Desenha o estado de tensões.

Descrição:

===============================================================

Este arquivo contém a classe que desenha e manipula o estado de tensões principais.

===============================================================

Version:
1.0 04/09/2004
Author:
Luiz Fernando Martha, Alonso Juvinao Carbono, Anderson Resende Pereira, Fernando Busato Ramires, Paôla Reginal Dalcanal, Ricardo Rodrigues de Araujo

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
protected  MohrArc arc
          Objeto arco para desenhar ângulos
protected  Arrow2D arrow
          Objeto seta para desenhar tensões
protected  java.awt.BasicStroke arrow_stroke
          Stroke básico dos eixos
protected static double ARROW_STROKE_FAC
          Fator de proporção em relação ao tamanho horizontal da janela em coordenadas do mundo para stroke básico das setas
protected  java.awt.geom.Line2D.Double auxline
          Objeto linha para desenho de linhas auxiliares
protected  java.awt.BasicStroke auxline_stroke
          Stroke básico das linhas auxiliares
protected static double AUXLINE_STROKE_FAC
          Fator de proporção em relação ao tamanho horizontal da janela em coordenadas do mundo para stroke básico das linhas auxiliares
protected  java.awt.geom.AffineTransform def_transf
          Transformação window-viewport corrent
protected  MohrDriver driver
          Driver do programa Mohr-Circle
protected  java.awt.Font fnt
          Fonte adotado para desenho
protected  java.awt.geom.Rectangle2D.Double quad
          Quadrado
protected  java.awt.BasicStroke quad_stroke
          Stroke básico do quadrado
protected static double QUAD_STROKE_FAC
          Fator de proporção em relação ao tamanho horizontal da janela em coordenadas do mundo para stroke básico do quadrado
 
Fields inherited from class wc.CanvasWC
BASE_CENTER, BASE_LEFT, BASE_RIGHT, CENTER, DOWNWARD_Y, EAST, NORTH, NORTH_EAST, NORTH_WEST, OPAQUE, raster_area, SOUTH, SOUTH_EAST, SOUTH_WEST, TRANSPARENT, UPWARD_Y, vdistortion, WEST, world_area, world_raw, y_dir
 
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
(package private) MohrPrincipalStrsCanvas(MohrDriver driver)
          Constructor: Especifica eixo Y no sentido para cima.
 
Method Summary
 void mouseDraggedWC(java.awt.event.MouseEvent e, java.awt.geom.Point2D.Double mouse_pos)
          Handles the event of a user dragging the mouse while holding down the mouse button.
 void mousePressedWC(java.awt.event.MouseEvent e, java.awt.geom.Point2D.Double mouse_pos)
          Handles the event of the user pressing down the mouse button.
 void mouseReleasedWC(java.awt.event.MouseEvent e, java.awt.geom.Point2D.Double mouse_pos)
          Handles the event of a user releasing the mouse button.
 void redraw(java.awt.Graphics2D g)
          Redisplay method.
(package private)  void update()
          Reset method.
 
Methods inherited from class wc.CanvasWC
drawString, getVDistortion, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, paintComponent, panWorldX, panWorldY, raster2world, scaleWorld, setFont, setTextAlignment, setTextOpacity, setVDistortion, setWorld, world2raster
 
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, 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

driver

protected MohrDriver driver
Driver do programa Mohr-Circle


quad

protected java.awt.geom.Rectangle2D.Double quad
Quadrado


QUAD_STROKE_FAC

protected static final double QUAD_STROKE_FAC
Fator de proporção em relação ao tamanho horizontal da janela em coordenadas do mundo para stroke básico do quadrado

See Also:
Constant Field Values

arrow

protected Arrow2D arrow
Objeto seta para desenhar tensões


ARROW_STROKE_FAC

protected static final double ARROW_STROKE_FAC
Fator de proporção em relação ao tamanho horizontal da janela em coordenadas do mundo para stroke básico das setas

See Also:
Constant Field Values

arrow_stroke

protected java.awt.BasicStroke arrow_stroke
Stroke básico dos eixos


quad_stroke

protected java.awt.BasicStroke quad_stroke
Stroke básico do quadrado


arc

protected MohrArc arc
Objeto arco para desenhar ângulos


auxline

protected java.awt.geom.Line2D.Double auxline
Objeto linha para desenho de linhas auxiliares


AUXLINE_STROKE_FAC

protected static final double AUXLINE_STROKE_FAC
Fator de proporção em relação ao tamanho horizontal da janela em coordenadas do mundo para stroke básico das linhas auxiliares

See Also:
Constant Field Values

auxline_stroke

protected java.awt.BasicStroke auxline_stroke
Stroke básico das linhas auxiliares


def_transf

protected java.awt.geom.AffineTransform def_transf
Transformação window-viewport corrent


fnt

protected java.awt.Font fnt
Fonte adotado para desenho

Constructor Detail

MohrPrincipalStrsCanvas

MohrPrincipalStrsCanvas(MohrDriver driver)
Constructor: Especifica eixo Y no sentido para cima.

Method Detail

update

void update()
Reset method.


redraw

public void redraw(java.awt.Graphics2D g)
Redisplay method. This method is called every time the canvas is updated. Client's concrete class must implement it.

Specified by:
redraw in class CanvasWC
Parameters:
g - is the 2D graphics context that the client uses to display

mousePressedWC

public void mousePressedWC(java.awt.event.MouseEvent e,
                           java.awt.geom.Point2D.Double mouse_pos)
Handles the event of the user pressing down the mouse button.

Specified by:
mousePressedWC in class CanvasWC
Parameters:
e - is mouse event object
mouse_pos - is the mouse position in client's floating point world coordinates

mouseDraggedWC

public void mouseDraggedWC(java.awt.event.MouseEvent e,
                           java.awt.geom.Point2D.Double mouse_pos)
Handles the event of a user dragging the mouse while holding down the mouse button.

Specified by:
mouseDraggedWC in class CanvasWC
Parameters:
e - is mouse event object
mouse_pos - is the mouse position in client's floating point world coordinates

mouseReleasedWC

public void mouseReleasedWC(java.awt.event.MouseEvent e,
                            java.awt.geom.Point2D.Double mouse_pos)
Handles the event of a user releasing the mouse button.

Specified by:
mouseReleasedWC in class CanvasWC
Parameters:
e - is mouse event object
mouse_pos - is the mouse position in client's floating point world coordinates

e-Mohr v. 1.00