|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
proyecto.editor.Editor
public class Editor
Es nuestro frame principal, la encargada de diversas actividades sobre la aplicación. Las actividades de nuestra aplicación las vamos a separar en dos grupos: Acciones sobre el editor y creación de elementos.
PanelEdicion
,
JMenuBar
,
JFrame
,
Serialized FormNested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JFrame |
---|
JFrame.AccessibleJFrame |
Nested classes/interfaces inherited from class java.awt.Frame |
---|
Frame.AccessibleAWTFrame |
Nested classes/interfaces inherited from class java.awt.Window |
---|
Window.AccessibleAWTWindow |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
static PrintStream |
iSalidaStandarErr
salida standar err. |
static PrintStream |
iSalidaStandarOut
salida standar out. |
(package private) Icon |
ledrojo
Imagenes para las pestañas. |
(package private) Icon |
ledverde
Imagenes para las pestañas. |
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 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 | |
---|---|
Editor()
Constructor editor. |
Method Summary | |
---|---|
void |
abrirFichero(String nombreArchivo)
Abrir fichero. |
void |
addProyecto(File aFileProyecto)
addProyecto añade nuestro proyecto a nuestro array si no lo contiene. |
void |
buscarFichero()
******************************Manejos de Fichero Para el JTextPane ************INICIO*****************. |
void |
crearWorkSpace()
Crea el workSpace, es decir la carpeta de trabajo donde iremos guardando nuestro proyectos. |
static Editor |
get()
Obtenemos nuestra ventana principal, para tener acceso a caulquier propiedad creada. |
PanelEdicion |
getPanel()
Inicializacion de nuestro panel |
void |
getPreferecuasUsuarioXML()
getPreferecuasUsuario Método que obtine la preferencias del Usuario |
PreferenciasCompilacion |
getPreferenciasCompilacion()
Obtener el preferencias compilacion. |
PreferenciasUsuario |
getPreferenciasUsuario()
Obtener las preferencias usuario. |
File |
getPrimerProyecto()
Obtener el primer proyecto. |
File |
getProyecto(int aPosicion)
Obtener proyecto. |
ArrayList<File> |
getProyectos()
Devolvemos el array de proyectos. |
File[] |
getProyectosActivos()
Proyectos cargados en nuestro Fichero WorkSpace.xml |
void |
getProyectoXML(SplashPrincipal splash)
getProyectosXML Método que obtine el workspace y sus proyectos. |
String |
getRutaArchivo()
Obtener el ruta archivo. |
File |
getWorkspace()
Obtener el workspace. |
boolean |
guardarComo()
Guarda el fichero asignando un direccion. |
boolean |
guardarComo(File archivo)
Guardar como. |
boolean |
guardarEnFichero()
Guardar los datos en un fichero. |
void |
guardarWorkSpaceXML()
Guarda el espacio de trabajo que lo tenemos en nuestro fichero en una estructura XML. |
boolean |
okAbandonar()
Para Saber si ha salido el programador. |
void |
salir()
Crea La ventana Principal. |
boolean |
setBorrarProyecto(File proyecto)
borrar un proyecto pasado como paramentro proyecto. |
boolean |
setBorrarProyecto(String proyecto)
borrar un proyecto pasado como paramentro proyecto, solo el nombre. |
void |
setControlador(ControlVentEditor c)
Los elementos que están definidos mediante ActionCommand para los JMenuItem son: SALIR: Abandona la aplicación NUEVO : Abre la ventana que gestiona nuevo elementos en nuestra aplicación PROYECTO: Crear un proyecto ABRIR_PROYECTO: Abrir un proyecto existente ABRIR: Abre un fichero en modo texto CERRAR: Cierra la ventana activa, gestionado su estado de modificado CERRARTODO: Cierra todas las ventanas, gestionado su estado de modificado GUARDAR: Guarda un fichero abierto en un tab GUARDAR_C: Guarda todos los ficheros que tengamos con modificaciones en los tab. |
void |
setPreferenciasCompilacion(PreferenciasCompilacion prefCompilacion)
Modificar la propiedad preferencias compilacion. |
void |
setPreferenciasUsuario(PreferenciasUsuario prefUsuario)
Modificar la propiedad preferencias usuario. |
void |
setProyectosActivas(ArrayList<File> ilproyectos)
Devuelve Proyectos cargados en nuestro Fichero WorkSpace |
void |
setWorkspace(File aWorkspace)
Modificar la propiedad workspace. |
JMenu |
subMenuProyectosRecientes()
Sub menu proyectos recientes. |
void |
tratarCancelar()
Tratar cancelar. |
void |
updateCaption(String texto)
Cambiar el Camption en la parte de arriba de la ventana con el nombre de la ruta. |
Methods inherited from class java.awt.Frame |
---|
addNotify, 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.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.awt.MenuContainer |
---|
getFont, postEvent |
Field Detail |
---|
public static PrintStream iSalidaStandarOut
public static PrintStream iSalidaStandarErr
Icon ledverde
Icon ledrojo
Constructor Detail |
---|
public Editor()
Method Detail |
---|
public void salir()
InterfazVentEditor
salir
in interface InterfazVentEditor
public static Editor get()
Obtenemos nuestra ventana principal, para tener acceso a caulquier propiedad creada.
Patrón singleton.
public void getPreferecuasUsuarioXML()
Método que obtine la preferencias del Usuario
public void getProyectoXML(SplashPrincipal splash)
Método que obtine el workspace y sus proyectos.
Pasamas el spash como argumento por si lo tenemos que cerrar para la definición del workSpace
splash
- splashpublic void guardarWorkSpaceXML()
Guarda el espacio de trabajo que lo tenemos en nuestro fichero en una estructura XML.
También guardamos las preferencias de usuario
La ruta donde podemos encontrar el fichero XML es Ruta: /PFC/proyecto/configuracion/workspace.xml
public void crearWorkSpace()
public void tratarCancelar()
public PanelEdicion getPanel()
getPanel
in interface InterfazVentEditor
PanelEdicion
public JMenu subMenuProyectosRecientes()
public void setControlador(ControlVentEditor c)
Los elementos que están definidos mediante ActionCommand para los JMenuItem son:
Serán implementados en la clase ControlVentEditor.
setControlador
in interface InterfazVentEditor
c
- Sera el oyenteControlVentEditor.actionPerformed(java.awt.event.ActionEvent)
public void buscarFichero() throws IOException
buscarFichero
in interface InterfazVentEditor
BadLocationException
- *
IOException
- Signals that an I/O exception has occurred.public void abrirFichero(String nombreArchivo) throws BadLocationException
InterfazVentEditor
abrirFichero
in interface InterfazVentEditor
nombreArchivo
- the nombre archivo
BadLocationException
- the bad location exception
Creado : Parras, 13-oct-2009public boolean guardarComo() throws Excepciones, IOException
InterfazVentEditor
guardarComo
in interface InterfazVentEditor
Excepciones
- the excepciones
IOException
- Signals that an I/O exception has occurred.public boolean guardarComo(File archivo) throws Excepciones, IOException
InterfazVentEditor
guardarComo
in interface InterfazVentEditor
archivo
- the archivo
Excepciones
- the excepciones
IOException
- Signals that an I/O exception has occurred.public boolean guardarEnFichero() throws IOException
InterfazVentEditor
guardarEnFichero
in interface InterfazVentEditor
IOException
- Signals that an I/O exception has occurred.public String getRutaArchivo()
public void updateCaption(String texto)
updateCaption
in interface InterfazVentEditor
texto
- textopublic boolean okAbandonar() throws Excepciones, IOException
InterfazVentEditor
okAbandonar
in interface InterfazVentEditor
Excepciones
- the excepciones
IOException
- Signals that an I/O exception has occurred.public File getWorkspace()
public void setWorkspace(File aWorkspace)
aWorkspace
- La propiedad workspacepublic File getProyecto(int aPosicion)
aPosicion
- a posicion
public File getPrimerProyecto()
public boolean setBorrarProyecto(String proyecto)
proyecto
- String
public boolean setBorrarProyecto(File proyecto)
proyecto
- File
public void addProyecto(File aFileProyecto)
aFileProyecto
- a file proyectopublic ArrayList<File> getProyectos()
public PreferenciasCompilacion getPreferenciasCompilacion()
public void setPreferenciasCompilacion(PreferenciasCompilacion prefCompilacion)
prefCompilacion
- La propiedad preferencias compilacionpublic void setPreferenciasUsuario(PreferenciasUsuario prefUsuario)
prefUsuario
- La propiedad preferencias usuariopublic PreferenciasUsuario getPreferenciasUsuario()
public File[] getProyectosActivos()
getProyectosActivos
in interface InterfazVentEditor
InterfazVentEditor.getProyectosActivos()
public void setProyectosActivas(ArrayList<File> ilproyectos)
ilproyectos
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |