|
||||||||||
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
proyecto.arbol.ArbolFicheros
public class ArbolFicheros
Nested Class Summary | |
---|---|
(package private) class |
ArbolFicheros.ComparadorNodos
|
(package private) class |
ArbolFicheros.EditorListener
The listener interface for receiving editor events. |
(package private) class |
ArbolFicheros.PonIcono
Clase interna encargada de introduccir el Renderizado de nuestro árbol si deseamos introducir un nuevo tipo de fichero aquí introduciremos su tipo de fichero. |
(package private) class |
ArbolFicheros.TextFielEditor
The Class TextFielEditor. |
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
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 String |
EXTENSION_JAVA
|
static String |
EXTENSION_JAVACC
|
(package private) JScrollPane |
iScrollpaneArbol
Scroll de árbol |
(package private) DefaultMutableTreeNode |
nodoEliminar
Nodo de nuestro árbol que vamos a borrar |
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 | |
---|---|
ArbolFicheros(File dir)
Constructor arbol ficheros. |
|
ArbolFicheros(File dir,
PanelEdicion aPanel)
Constructor arbol ficheros. |
Method Summary | |
---|---|
void |
abrirFichero()
Abrir fichero el fichero seleccionada en un tab. |
void |
abrirFichero(File nombreArchivo,
Nodo nombreFichero)
Abrir fichero. |
static boolean |
acceptarExt(File file)
Acceptar ext. |
ArrayList<PaqueteActivos> |
actualizarListaPaqueteActivos(DefaultMutableTreeNode aNodoRaiz)
|
DefaultMutableTreeNode |
addNodes(DefaultMutableTreeNode nodo,
File dir)
Método que nos monta el arbol a traves de la ruta pasada como directorio. |
DefaultMutableTreeNode |
buscarNodo(DefaultMutableTreeNode aNodoRaiz,
Nodo aNodoObjeto)
Busca un objeto Nodo en nuestro árbol. |
void |
copiarCarpeta()
Copiar carpeta. |
void |
copiarFichero()
Copiar fichero. |
(package private) void |
cortarFcihero()
Cortar fcihero. |
void |
despliegaArbol()
Despliega arbol. |
void |
eliminarNodoActual()
Elimina el nodo actual. |
(package private) void |
eliminarPath()
Eliminar path seleccionado Creado : Parras, 18-abr-2009 |
boolean |
eliminarUnPaquete(PaqueteActivos aPaquete)
Eliminar un paquete. |
static void |
expandJTree(JTree tree,
int depth)
Expands all nodes in a JTree. |
static int |
expandJTreeNode(JTree tree,
TreeModel model,
Object node,
int row,
int depth)
Expands a given node in a JTree. |
ArrayList<PaqueteActivos> |
getListaPaquetes()
Obtener la lista paquetes. |
ArrayList<PaqueteActivos> |
getListaPaquetesActualizada()
Obtener la lista paquetes. |
Dimension |
getMinimumSize()
|
Nodo |
getObjetoNodo()
|
Dimension |
getPreferredSize()
|
JTree |
getTree()
Obtener el tree. |
void |
keyPressed(KeyEvent e)
|
void |
keyReleased(KeyEvent e)
|
void |
keyTyped(KeyEvent e)
|
static void |
main(String[] av)
Método main. |
static DefaultMutableTreeNode |
nodoArbolEncontrado(DefaultMutableTreeNode editNodo,
Nodo nodoNew)
Nodo arbol encontrado. |
DefaultMutableTreeNode |
nodoSeleccionado()
Nodo seleccionado. |
void |
ordenarHijos(Object parent)
Ordena los hijos de un DefaultMutableTreeNode |
File |
parsearFile(String aCadenaBuscar,
String aPathErroneo,
String aPathPdre)
Repara el path erroneo en el árbol, esto sucede porque no renombran una carpeta. |
void |
pegarFichero()
Pegar fichero. |
static int |
posicionArbol(DefaultMutableTreeNode editNodo,
Nodo nodoNew)
Posicion arbol. |
void |
refrescarArbol()
Refrescar arbol. |
DefaultMutableTreeNode |
renombrarArbol(DefaultMutableTreeNode aNodoPadre,
Nodo aNodoOld,
Nodo aNodonNew)
Repara los nodos que estan situados en árbol. |
(package private) void |
renombrarPath()
Renombrar path del arbol. |
void |
setCarpeta(String nombre)
Modificar la propiedad carpeta. |
void |
setFichero(String nombre)
Modificar la propiedad fichero. |
void |
setListaPaquetes(ArrayList<PaqueteActivos> listaPaquetes)
Modificar la propiedad lista paquetes. |
boolean |
setNuevoElemento(PaqueteActivos nuevoPaquete)
Abre crea un fichero o carpeta asociado. |
boolean |
ventanaOpcionBorrar(String fichero)
Ventana opcion borrar. |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String EXTENSION_JAVA
public static final String EXTENSION_JAVACC
DefaultMutableTreeNode nodoEliminar
JScrollPane iScrollpaneArbol
Constructor Detail |
---|
public ArbolFicheros(File dir, PanelEdicion aPanel)
dir
- directorio que vamos a cargaraPanel
- PanelEdición al que vamos a referenciarpublic ArbolFicheros(File dir)
dir
- the dirMethod Detail |
---|
public DefaultMutableTreeNode addNodes(DefaultMutableTreeNode nodo, File dir)
nodo
- Nodo a tratardir
- Directorio a tratar
public Dimension getMinimumSize()
getMinimumSize
in class JComponent
public Dimension getPreferredSize()
getPreferredSize
in class JComponent
public static boolean acceptarExt(File file)
file
- the file
public void refrescarArbol()
public void copiarFichero()
public void copiarCarpeta()
void cortarFcihero()
void renombrarPath()
public boolean ventanaOpcionBorrar(String fichero)
fichero
- the fichero
public void pegarFichero() throws IOException
IOException
- Signals that an I/O exception has occurred.public void ordenarHijos(Object parent)
aPadre
- public boolean setNuevoElemento(PaqueteActivos nuevoPaquete)
nuevoPaquete
- the nuevo paquete
public void despliegaArbol()
public static void expandJTree(JTree tree, int depth)
tree
- The JTree to expand.depth
- The depth to which the tree should be expanded. Zero will just
expand the root node, a negative value will fully expand the
tree, and a positive value will recursively expand the tree to
that depth.public static int expandJTreeNode(JTree tree, TreeModel model, Object node, int row, int depth)
tree
- The JTree to expand.model
- The TreeModel for tree.node
- The node within tree to expand.row
- The displayed row in tree that represents node.depth
- The depth to which the tree should be expanded. Zero will just
expand node, a negative value will fully expand the tree, and
a positive value will recursively expand the tree to that
depth relative to node.
public void setCarpeta(String nombre)
nombre
- La propiedad carpetapublic void setFichero(String nombre)
nombre
- La propiedad ficheropublic DefaultMutableTreeNode nodoSeleccionado()
public Nodo getObjetoNodo()
public void eliminarNodoActual()
void eliminarPath()
public void abrirFichero()
public void abrirFichero(File nombreArchivo, Nodo nombreFichero) throws BadLocationException
nombreArchivo
- the nombre archivonombreFichero
- the nombre fichero
BadLocationException
- the bad location exceptionpublic JTree getTree()
public static int posicionArbol(DefaultMutableTreeNode editNodo, Nodo nodoNew)
editNodo
- the edit nodonodoNew
- the nodo new
public static DefaultMutableTreeNode nodoArbolEncontrado(DefaultMutableTreeNode editNodo, Nodo nodoNew)
editNodo
- the edit nodonodoNew
- the nodo new
public static void main(String[] av)
av
- the arguments
public ArrayList<PaqueteActivos> getListaPaquetes()
public ArrayList<PaqueteActivos> getListaPaquetesActualizada()
public ArrayList<PaqueteActivos> actualizarListaPaqueteActivos(DefaultMutableTreeNode aNodoRaiz)
public void setListaPaquetes(ArrayList<PaqueteActivos> listaPaquetes)
listaPaquetes
- La propiedad de lista paquetespublic boolean eliminarUnPaquete(PaqueteActivos aPaquete)
aPaquete
- the a paquete
public void keyPressed(KeyEvent e)
keyPressed
in interface KeyListener
public void keyReleased(KeyEvent e)
keyReleased
in interface KeyListener
public void keyTyped(KeyEvent e)
keyTyped
in interface KeyListener
public DefaultMutableTreeNode renombrarArbol(DefaultMutableTreeNode aNodoPadre, Nodo aNodoOld, Nodo aNodonNew)
aNodoPadre
- DefaultMutableTreeNodeaNodoOld
- NodoaNodonNew
-
public File parsearFile(String aCadenaBuscar, String aPathErroneo, String aPathPdre)
aCadenaBuscar
- aPathErroneo
- aPathPdre
-
public DefaultMutableTreeNode buscarNodo(DefaultMutableTreeNode aNodoRaiz, Nodo aNodoObjeto)
aNodoRaiz
- aNodoObjeto
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |