entorno.grafo
Class GraphGUI

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Window
              extended by java.awt.Frame
                  extended by javax.swing.JFrame
                      extended by entorno.grafo.GraphGUI
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.event.ActionListener, java.util.EventListener, java.awt.image.ImageObserver, java.awt.event.ItemListener, MaudeEditorConstantes, java.awt.MenuContainer, javax.swing.event.PopupMenuListener, javax.swing.RootPaneContainer, java.io.Serializable, javax.swing.WindowConstants

public class GraphGUI
extends javax.swing.JFrame
implements java.awt.event.ActionListener, java.awt.event.ItemListener, MaudeEditorConstantes, javax.swing.event.PopupMenuListener

Clase: GraphGUI Funcion: Crea un GUI en donde se insertara la representacion de un grafo no dirigido

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JFrame
javax.swing.JFrame.AccessibleJFrame
 
Nested classes inherited from class java.awt.Frame
java.awt.Frame.AccessibleAWTFrame
 
Nested classes inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
 
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
(package private)  javax.swing.JRadioButton bClases
           
(package private)  javax.swing.JButton bEx
           
(package private)  javax.swing.JButton bFmod
           
(package private)  javax.swing.JButton bFth
           
(package private)  javax.swing.JButton bInc
           
(package private)  javax.swing.JButton bMod
           
(package private)  javax.swing.JButton bOmod
           
(package private)  javax.swing.JButton bOth
           
(package private)  javax.swing.JButton bPr
           
(package private)  javax.swing.JButton bTh
           
(package private)  javax.swing.JButton bTipo
           
(package private)  javax.swing.JButton bTipoFlecha
           
(package private)  javax.swing.JRadioButton bTipos
           
(package private)  javax.swing.JComboBox cboxEscalas
           
 DrawingArea drawingArea
          donde dibujaré el grafo
(package private)  ClaseVentanaLog emuMaude
          El emulador Maude
private  boolean esDeTipos
          si la ventana es para mostrar los tipos
(package private)  GraphGUI frame
          El frame de la aplicacion
(package private)  javax.swing.ButtonGroup grupoBotones
           
(package private)  javax.swing.JLabel label
          la etiqueta de la barra de estado
private static java.lang.String[] listaPorcentajes
           
(package private)  javax.swing.JLabel lTamaño
           
(package private)  javax.swing.JMenuItem menuExit
           
(package private)  javax.swing.JMenu menuFich
           
(package private)  javax.swing.JMenuItem menuPage
           
(package private)  javax.swing.JMenuItem menuPrint
           
(package private)  javax.swing.JMenu menuView
           
(package private)  javax.swing.JScrollPane scrollPane
          la barra de desplazamiento del area de dibujo
(package private)  javax.swing.JMenu subMenu
           
 javax.swing.JCheckBoxMenuItem vClases
           
 javax.swing.JCheckBoxMenuItem vImp_BOOL
           
 javax.swing.JCheckBoxMenuItem vImp_UP
           
 javax.swing.JCheckBoxMenuItem vPredefFULL
           
 javax.swing.JCheckBoxMenuItem vPredefinidos
           
 javax.swing.JCheckBoxMenuItem vTipos
           
 
Fields inherited from class javax.swing.JFrame
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface entorno.MaudeEditorConstantes
ARCHIVO_ACCION_CLOSE, ARCHIVO_ACCION_CLOSE_ALL, ARCHIVO_ACCION_CLOSE_ALL_E, ARCHIVO_ACCION_CLOSE_E, ARCHIVO_ACCION_EXIT, ARCHIVO_ACCION_EXIT_E, ARCHIVO_ACCION_NEW, ARCHIVO_ACCION_NEW_E, ARCHIVO_ACCION_OPEN, ARCHIVO_ACCION_OPEN_E, ARCHIVO_ACCION_PAGE_SETUP, ARCHIVO_ACCION_PAGE_SETUP_E, ARCHIVO_ACCION_PRINT, ARCHIVO_ACCION_PRINT_E, ARCHIVO_ACCION_SAVE, ARCHIVO_ACCION_SAVE_AS, ARCHIVO_ACCION_SAVE_AS_E, ARCHIVO_ACCION_SAVE_E, AREA_EDITOR, AREA_MAUDE, BUSCAR_ACCION_FIND, BUSCAR_ACCION_FIND_E, BUSCAR_ACCION_GO_LINE, BUSCAR_ACCION_GO_LINE_E, BUSCAR_ACCION_REPLACE, BUSCAR_ACCION_REPLACE_E, COLOR_COMENTARIOS, COLOR_CURSOR, COLOR_ECUACIONES, COLOR_FONDO, COLOR_FONDO_TEXTO_SELECCIONADO, COLOR_MODULOS, COLOR_PROPIEDADES, COLOR_TEXTO_NORMAL, COLOR_TEXTO_SELECCIONADO, COLOR_VARIABLES, DEPURADOR_ABORTAR, DEPURADOR_ABORTAR_E, DEPURADOR_ACTIVAR, DEPURADOR_ACTIVAR_E, DEPURADOR_DAR1PASO, DEPURADOR_DAR1PASO_E, DEPURADOR_DONDE, DEPURADOR_DONDE_E, DEPURADOR_PUNTOSRUPTURA, DEPURADOR_PUNTOSRUPTURA_E, DEPURADOR_RESUMIR, DEPURADOR_RESUMIR_E, DEPURADOR_TITULO, DEPURADOR_TITULO_E, EDICION_ACCION_COPY, EDICION_ACCION_COPY_E, EDICION_ACCION_CUT, EDICION_ACCION_CUT_E, EDICION_ACCION_DELETE, EDICION_ACCION_DELETE_E, EDICION_ACCION_PASTE, EDICION_ACCION_PASTE_E, EDICION_ACCION_REDO, EDICION_ACCION_REDO_E, EDICION_ACCION_SELECT_ALL, EDICION_ACCION_SELECT_ALL_E, EDICION_ACCION_UNDO, EDICION_ACCION_UNDO_E, EDICION_VER_BARRA_INF, EDICION_VER_BARRA_INF_E, EDICION_VER_BARRA_SUP, EDICION_VER_BARRA_SUP_E, EDICION_VER_BARRAS_HERR, EDICION_VER_BARRAS_HERR_E, EDITOR_ACCION_COMANDO, EDITOR_ACCION_COMANDO_E, EDITOR_ACCION_ENVIAR, EDITOR_ACCION_ENVIAR_E, ESTA_COLOREADO, ESTA_SELECT_SALIDA, ESTA_SELECT_SERVIDOR, ESTILO_LETRA, GRAFO_ESCALA, GRAFO_ESCALA_E, GRAFO_EXIT, GRAFO_EXIT_E, GRAFO_PAGE_SETUP, GRAFO_PAGE_SETUP_E, GRAFO_PRINT, GRAFO_PRINT_E, GRAFO_VIEW_CLASES, GRAFO_VIEW_CLASES_E, GRAFO_VIEW_MODS_PREDEF, GRAFO_VIEW_MODS_PREDEF_E, GRAFO_VIEW_MODS_PREDEF_FULL, GRAFO_VIEW_MODS_PREDEF_FULL_E, GRAFO_VIEW_REL, GRAFO_VIEW_REL_BOOL, GRAFO_VIEW_REL_BOOL_E, GRAFO_VIEW_REL_E, GRAFO_VIEW_REL_UP, GRAFO_VIEW_REL_UP_E, GRAFO_VIEW_TIPOS, GRAFO_VIEW_TIPOS_E, HELP_ACCION_ABOUT, HELP_ACCION_ABOUT_E, HELP_AYUDA_MAUDE_WORKSTATION, HELP_AYUDA_MAUDE_WORKSTATION_E, HELP_AYUDA_MAUDE2, HELP_AYUDA_MAUDE2_E, IDIOMA, IP_SERVIDOR, MAUDE_ACCION_CLEAR_ERRORS, MAUDE_ACCION_CLEAR_ERRORS_E, MAUDE_ACCION_DISPLAY_GRAFO, MAUDE_ACCION_DISPLAY_GRAFO_E, MAUDE_ACCION_DISPLAY_GRAFO_TIPOS, MAUDE_ACCION_DISPLAY_GRAFO_TIPOS_E, MAUDE_ACCION_INIT_FULL_MAUDE, MAUDE_ACCION_INIT_FULL_MAUDE_E, MAUDE_ACCION_INIT_MAUDE, MAUDE_ACCION_INIT_MAUDE_E, MAUDE_ACCION_LOOP_INIT, MAUDE_ACCION_LOOP_INIT_E, MAUDE_ACCION_OPEN, MAUDE_ACCION_OPEN_E, MAUDE_ACCION_QUIT_MAUDE, MAUDE_ACCION_QUIT_MAUDE_E, MAUDE_ACCION_REWRITE, MAUDE_ACCION_REWRITE_E, MAUDE_ACCION_SAVE_AS, MAUDE_ACCION_SAVE_AS_E, MAUDE_ACCION_SHOW, MAUDE_ACCION_SHOW_E, MAUDE_SHOW_ALL, MAUDE_SHOW_ALL_E, MAUDE_SHOW_CLASSES, MAUDE_SHOW_CLASSES_E, MAUDE_SHOW_EQ, MAUDE_SHOW_EQ_E, MAUDE_SHOW_LABELS, MAUDE_SHOW_LABELS_E, MAUDE_SHOW_MEMBERSHIPS, MAUDE_SHOW_MEMBERSHIPS_E, MAUDE_SHOW_MESSAGES, MAUDE_SHOW_MESSAGES_E, MAUDE_SHOW_MODULE, MAUDE_SHOW_MODULE_E, MAUDE_SHOW_OPERS, MAUDE_SHOW_OPERS_E, MAUDE_SHOW_RULES, MAUDE_SHOW_RULES_E, MAUDE_SHOW_SORTS, MAUDE_SHOW_SORTS_E, MODULO_ACTIVO, MODULO_ACTIVO_E, NOMBRE_FICH_SALIDA, PALABRAS_ECUACIONES, PALABRAS_MODULOS, PALABRAS_PROPIEDADES, PALABRAS_VARIABLES, PESTANA_EMULADOR, PESTANA_ERROR, PESTANA_RESULT, PREFERENCES, PREFERENCES_E, PROMPT_FULL_MAUDE, PUERTO_SERVIDOR, RUTA_ACROBAT_READER, RUTA_DOCUMENT_MAUDE, RUTA_FICH_SALIDA, RUTA_FULL_MAUDE, RUTA_MAUDE, RUTA_TRABAJO, SERVIDOR_EVENTO_CTRL_C, SERVIDOR_INSERTAR_FULL_MAUDE, TAMANO_BUFFER_COLOR, TAMANO_BUFFER_EMULADOR, TAMANO_FICH_SALIDA, TAMANO_LETRA, TIPO_LETRA, TITULO_NUEVO, TITULO_VENT_PRINC, TITULO_VENT_PRINC_CORE, TITULO_VENT_PRINC_FULL, TRAZA_ACTIVAR, TRAZA_ACTIVAR_E, TRAZA_CONDITION, TRAZA_CONDITION_E, TRAZA_EQ, TRAZA_EQ_E, TRAZA_ETIQUETAS, TRAZA_ETIQUETAS_E, TRAZA_MB, TRAZA_MB_E, TRAZA_MODULOS, TRAZA_MODULOS_E, TRAZA_OPERADORES, TRAZA_OPERADORES_E, TRAZA_RL, TRAZA_RL_E, TRAZA_SELECT, TRAZA_SELECT_E, TRAZA_SELECT_WHAT, TRAZA_SELECT_WHAT_E, TRAZA_SUBSTITUTION, TRAZA_SUBSTITUTION_E, TRAZA_TITULO, TRAZA_TITULO_E, TRAZA_WHOLE, TRAZA_WHOLE_E
 
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
GraphGUI(ClaseVentanaLog emuladorMaude, boolean tipos)
          Constructor del interfaz grafico.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          Acciones del menu
private  void exitProgram()
          Para salir de la ventana
 java.awt.Point findPositionNode(int nodeIndex, int numNodes)
          Encuentra una posicion donde poner el nodo.
 DrawingArea getDrawingArea()
           
 void itemStateChanged(java.awt.event.ItemEvent e)
           
 void popupMenuCanceled(javax.swing.event.PopupMenuEvent evt)
           
 void popupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent evt)
           
 void popupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent evt)
           
 void setGraph(Graph g)
           
private  void setLanguageSpanish()
          Establece la ventana a español
private  void setSizeNodesAccion()
          Cambia el tamaño del radio de los nodos
 void updateLabel(java.lang.String statusText)
          Actualiza la barra de estado
 
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update
 
Methods inherited from class java.awt.Frame
addNotify, finalize, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setAlwaysOnTop, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationByPlatform, setLocationRelativeTo, show, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Field Detail

frame

final GraphGUI frame
El frame de la aplicacion


label

javax.swing.JLabel label
la etiqueta de la barra de estado


scrollPane

javax.swing.JScrollPane scrollPane
la barra de desplazamiento del area de dibujo


drawingArea

public DrawingArea drawingArea
donde dibujaré el grafo


emuMaude

ClaseVentanaLog emuMaude
El emulador Maude


grupoBotones

javax.swing.ButtonGroup grupoBotones

vPredefinidos

public javax.swing.JCheckBoxMenuItem vPredefinidos

vTipos

public javax.swing.JCheckBoxMenuItem vTipos

vClases

public javax.swing.JCheckBoxMenuItem vClases

vPredefFULL

public javax.swing.JCheckBoxMenuItem vPredefFULL

vImp_BOOL

public javax.swing.JCheckBoxMenuItem vImp_BOOL

vImp_UP

public javax.swing.JCheckBoxMenuItem vImp_UP

bMod

javax.swing.JButton bMod

bFmod

javax.swing.JButton bFmod

bTh

javax.swing.JButton bTh

bFth

javax.swing.JButton bFth

bOmod

javax.swing.JButton bOmod

bOth

javax.swing.JButton bOth

bInc

javax.swing.JButton bInc

bEx

javax.swing.JButton bEx

bPr

javax.swing.JButton bPr

bTipo

javax.swing.JButton bTipo

bTipoFlecha

javax.swing.JButton bTipoFlecha

bTipos

javax.swing.JRadioButton bTipos

bClases

javax.swing.JRadioButton bClases

menuFich

javax.swing.JMenu menuFich

menuView

javax.swing.JMenu menuView

subMenu

javax.swing.JMenu subMenu

menuPage

javax.swing.JMenuItem menuPage

menuPrint

javax.swing.JMenuItem menuPrint

menuExit

javax.swing.JMenuItem menuExit

lTamaño

javax.swing.JLabel lTamaño

cboxEscalas

javax.swing.JComboBox cboxEscalas

listaPorcentajes

private static java.lang.String[] listaPorcentajes

esDeTipos

private boolean esDeTipos
si la ventana es para mostrar los tipos

Constructor Detail

GraphGUI

public GraphGUI(ClaseVentanaLog emuladorMaude,
                boolean tipos)
Constructor del interfaz grafico. Se le pasa el emulador Maude Asi podré hacer uso del método formarGrafo a la hora de que quiera actualizarlo.

Method Detail

setLanguageSpanish

private void setLanguageSpanish()
Establece la ventana a español


getDrawingArea

public DrawingArea getDrawingArea()

setGraph

public void setGraph(Graph g)

exitProgram

private void exitProgram()
Para salir de la ventana


setSizeNodesAccion

private void setSizeNodesAccion()
Cambia el tamaño del radio de los nodos


findPositionNode

public java.awt.Point findPositionNode(int nodeIndex,
                                       int numNodes)
Encuentra una posicion donde poner el nodo.


popupMenuWillBecomeVisible

public void popupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent evt)
Specified by:
popupMenuWillBecomeVisible in interface javax.swing.event.PopupMenuListener

popupMenuWillBecomeInvisible

public void popupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent evt)
Specified by:
popupMenuWillBecomeInvisible in interface javax.swing.event.PopupMenuListener

popupMenuCanceled

public void popupMenuCanceled(javax.swing.event.PopupMenuEvent evt)
Specified by:
popupMenuCanceled in interface javax.swing.event.PopupMenuListener

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Acciones del menu

Specified by:
actionPerformed in interface java.awt.event.ActionListener

itemStateChanged

public void itemStateChanged(java.awt.event.ItemEvent e)
Specified by:
itemStateChanged in interface java.awt.event.ItemListener

updateLabel

public void updateLabel(java.lang.String statusText)
Actualiza la barra de estado