public class Thumbelina
extends javax.swing.JPanel
implements java.lang.Runnable, java.awt.event.ItemListener, javax.swing.event.ChangeListener, javax.swing.event.ListSelectionListener
限定符和类型 | 字段和说明 |
---|---|
static java.lang.String |
PROP_CURRENT_URL_PROPERTY
Property name for current URL binding.
|
static java.lang.String |
PROP_URL_QUEUE_PROPERTY
Property name for queue size binding.
|
static java.lang.String |
PROP_URL_VISITED_PROPERTY
Property name for visited URL size binding.
|
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
构造器和说明 |
---|
Thumbelina()
Creates a new instance of Thumbelina.
|
Thumbelina(java.lang.String url)
Creates a new instance of Thumbelina.
|
Thumbelina(java.net.URL url)
Creates a new instance of Thumbelina.
|
限定符和类型 | 方法和说明 |
---|---|
void |
addHistory(java.lang.String url)
Adds the given url to the history list.
|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Add a PropertyChangeListener to the listener list.
|
void |
append(java.util.ArrayList list)
Append the given URLs to the queue.
|
void |
append(java.net.URL url)
Append the given URL to the queue.
|
boolean |
getBackgroundThreadActive()
Gets the state of the background thread.
|
java.lang.String |
getCurrentURL()
Return the URL currently being examined.
|
boolean |
getHistoryListVisible()
Gets the state of history list visibility.
|
PicturePanel |
getPicturePanel()
Get the picture panel object encapsulated by this Thumbelina.
|
java.util.ArrayList |
getQueue()
Getter for property queue.
|
int |
getQueueSize()
Getter for property queue.
|
boolean |
getSequencerActive()
Gets the state of the sequencer thread.
|
int |
getSpeed()
Get the sequencer delay time.
|
boolean |
getStatusBarVisible()
Gets the state of status bar visibility.
|
boolean |
isDiscardCGI()
Getter for property discardCGI.
|
boolean |
isDiscardQueries()
Getter for property discardQueries.
|
void |
itemStateChanged(java.awt.event.ItemEvent event)
Handle checkbox events from the status bar.
|
static void |
main(java.lang.String[] args)
Mainline.
|
void |
open(java.lang.String ref)
Open a URL.
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Remove a PropertyChangeListener from the listener list.
|
void |
reset()
Reset this Thumbelina.
|
void |
run()
The main processing loop.
|
void |
setBackgroundThreadActive(boolean active)
Sets the state of the background thread activity.
|
void |
setDiscardCGI(boolean discard)
Setter for property discardCGI.
|
void |
setDiscardQueries(boolean discard)
Setter for property discardQueries.
|
void |
setHistoryListVisible(boolean visible)
Sets the history list visibility.
|
void |
setSequencerActive(boolean active)
Sets the sequencer activity state.
|
void |
setSpeed(int speed)
Set the sequencer delay time.
|
void |
setStatusBarVisible(boolean visible)
Sets the status bar visibility.
|
void |
stateChanged(javax.swing.event.ChangeEvent event)
Handles the speed slider events.
|
void |
valueChanged(javax.swing.event.ListSelectionEvent event)
Handles the history list events.
|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
add, add, add, add, add, addContainerListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public static final java.lang.String PROP_CURRENT_URL_PROPERTY
public static final java.lang.String PROP_URL_QUEUE_PROPERTY
public static final java.lang.String PROP_URL_VISITED_PROPERTY
public Thumbelina()
public Thumbelina(java.lang.String url) throws java.net.MalformedURLException
url
- Single URL to enter into the 'to follow' list.java.net.MalformedURLException
- If the url is malformed.public Thumbelina(java.net.URL url)
url
- URL to enter into the 'to follow' list.public void reset()
public void append(java.net.URL url)
url
- The url to add.public void append(java.util.ArrayList list)
list
- The list of URL objects to add.public boolean getStatusBarVisible()
true
if the status bar is visible.public void setStatusBarVisible(boolean visible)
visible
- The new visibility state.
If true
, the status bar will be unhidden.public boolean getHistoryListVisible()
true
if the history list is visible.public void setHistoryListVisible(boolean visible)
visible
- The new visibility state.
If true
, the history list will be unhidden.public boolean getSequencerActive()
true
if the thread is pumping images.public void setSequencerActive(boolean active)
active
- The new activity state.
If true
, the sequencer will be turned on.
This may alter the speed setting if it is set to zero.public boolean getBackgroundThreadActive()
true
if the thread is examining web pages.public void setBackgroundThreadActive(boolean active)
active
- If true
,
the background thread will be turned on.public int getSpeed()
public void setSpeed(int speed)
speed
- The sequencer delay in milliseconds.public boolean isDiscardCGI()
public void setDiscardCGI(boolean discard)
discard
- New value of property discardCGI.public boolean isDiscardQueries()
public void setDiscardQueries(boolean discard)
discard
- New value of property discardQueries.public PicturePanel getPicturePanel()
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
addPropertyChangeListener
在类中 java.awt.Container
listener
- The PropertyChangeListener to be added.public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
removePropertyChangeListener
在类中 java.awt.Component
listener
- The PropertyChangeListener to be removed.public java.lang.String getCurrentURL()
public void run()
run
在接口中 java.lang.Runnable
public void itemStateChanged(java.awt.event.ItemEvent event)
itemStateChanged
在接口中 java.awt.event.ItemListener
event
- The event describing the checkbox event.public void stateChanged(javax.swing.event.ChangeEvent event)
stateChanged
在接口中 javax.swing.event.ChangeListener
event
- The event describing the slider activity.public void valueChanged(javax.swing.event.ListSelectionEvent event)
valueChanged
在接口中 javax.swing.event.ListSelectionListener
event
- The event describing the list activity.public void addHistory(java.lang.String url)
url
- The URL to add to the history list.public void open(java.lang.String ref)
ref
- The URL to add.public static void main(java.lang.String[] args)
args
- the command line arguments.
Can be one or more forms of -help to get command line help,
or a URL to prime the program with.
Checks for JDK 1.4 and if not found runs in crippled mode
(no ThumbelinaFrame).public java.util.ArrayList getQueue()
public int getQueueSize()
PROP_URL_QUEUE_PROPERTY
property.