javax.swing.text.html
Class IsindexView

java.lang.Object
  extended byjavax.swing.text.View
      extended byjavax.swing.text.ComponentView
          extended byjavax.swing.text.html.IsindexView
All Implemented Interfaces:
ActionListener, EventListener, SwingConstants

class IsindexView
extends ComponentView
implements ActionListener

A view that supports the <ISINDEX< tag. This is implemented as a JPanel that contains

Author:
Sunita Mani

Nested Class Summary
 
Nested classes inherited from class javax.swing.text.ComponentView
 
Field Summary
(package private)  JTextField textField
           
 
Fields inherited from class javax.swing.text.ComponentView
 
Fields inherited from class javax.swing.text.View
BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXIS
 
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
 
Constructor Summary
IsindexView(Element elem)
          Creates an IsindexView
 
Method Summary
 void actionPerformed(ActionEvent evt)
          Responsible for processing the ActionEvent.
 Component createComponent()
          Creates the components necessary to to implement this view.
 
Methods inherited from class javax.swing.text.ComponentView
getAlignment, getComponent, getMaximumSpan, getMinimumSpan, getPreferredSpan, modelToView, paint, setParent, viewToModel
 
Methods inherited from class javax.swing.text.View
append, breakView, changedUpdate, createFragment, forwardUpdate, forwardUpdateToView, getAttributes, getBreakWeight, getChildAllocation, getContainer, getDocument, getElement, getEndOffset, getGraphics, getNextVisualPositionFrom, getParent, getResizeWeight, getStartOffset, getToolTipText, getView, getViewCount, getViewFactory, getViewIndex, getViewIndex, insert, insertUpdate, isVisible, modelToView, modelToView, preferenceChanged, remove, removeAll, removeUpdate, replace, setSize, updateChildren, updateLayout, viewToModel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

textField

JTextField textField
Constructor Detail

IsindexView

public IsindexView(Element elem)
Creates an IsindexView

Method Detail

createComponent

public Component createComponent()
Creates the components necessary to to implement this view. The component returned is a JPanel, that contains the PROMPT to the left and JTextField to the right.

Overrides:
createComponent in class ComponentView

actionPerformed

public void actionPerformed(ActionEvent evt)
Responsible for processing the ActionEvent. In this case this is hitting enter/return in the text field. This will construct the URL from the base URL of the document. To the URL is appended a '?' followed by the contents of the JTextField. The search contents are URLEncoded.

Specified by:
actionPerformed in interface ActionListener