md3.md3view
Class MD3ViewPakFileControl

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.ScrollPane
                    |
                    +--md3.md3view.MD3ViewPakFileControl

public class MD3ViewPakFileControl
extends java.awt.ScrollPane

This class implements the pak file control of the MD3View application. A tree overview of the contents of a pak will be shown. The user can interact with the tree by double clicking on nodes or by using popup menus.

Author:
Erwin Vervaet (erwin@cs.kuleuven.ac.be)
See Also:
Serialized Form

Field Summary
protected  java.lang.String basePakFileOpenPath
          Path of last file loaded from the current pak file.
 
Fields inherited from class java.awt.ScrollPane
SCROLLBARS_ALWAYS, SCROLLBARS_AS_NEEDED, SCROLLBARS_NEVER
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Constructor Summary
MD3ViewPakFileControl(MD3View container)
          Create a new pak file control widget for the given application.
 
Method Summary
 void closePakFile()
          Close the current pak file of the control.
 void finalize()
           
 java.io.InputStream getInputStream(java.util.zip.ZipEntry entry)
          Return an input stream for the given pak file entry.
 java.util.Enumeration getPakEntries()
          Return an iterator over all entries of the open pak file.
 java.util.zip.ZipEntry getPakEntry(java.lang.String name)
          Return a ZipEntry from the pak file for the given name, or null if name is not found.
 boolean hasOpenPakFile()
          Is there currently a pak file open in the control?
 void openPakFile(java.lang.String filename)
          Open the given pak file and display its contents in the widget.
 
Methods inherited from class java.awt.ScrollPane
addImpl, addNotify, doLayout, getHAdjustable, getHScrollbarHeight, getScrollbarDisplayPolicy, getScrollPosition, getVAdjustable, getViewportSize, getVScrollbarWidth, layout, paramString, printComponents, setLayout, setScrollPosition, setScrollPosition
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, countComponents, deliverEvent, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setCursor, setFont, update, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

basePakFileOpenPath

protected java.lang.String basePakFileOpenPath

Path of last file loaded from the current pak file.

Constructor Detail

MD3ViewPakFileControl

public MD3ViewPakFileControl(MD3View container)

Create a new pak file control widget for the given application.

Method Detail

openPakFile

public void openPakFile(java.lang.String filename)
                 throws java.io.IOException

Open the given pak file and display its contents in the widget.


closePakFile

public void closePakFile()
                  throws java.io.IOException

Close the current pak file of the control.


hasOpenPakFile

public boolean hasOpenPakFile()

Is there currently a pak file open in the control?


getPakEntry

public java.util.zip.ZipEntry getPakEntry(java.lang.String name)

Return a ZipEntry from the pak file for the given name, or null if name is not found.


getPakEntries

public java.util.Enumeration getPakEntries()

Return an iterator over all entries of the open pak file.


getInputStream

public java.io.InputStream getInputStream(java.util.zip.ZipEntry entry)
                                   throws java.io.IOException

Return an input stream for the given pak file entry.


finalize

public void finalize()
              throws java.lang.Exception
Overrides:
finalize in class java.lang.Object