abbot.tester
Class JTabbedPaneLocation

java.lang.Object
  extended by abbot.tester.ComponentLocation
      extended by abbot.tester.JTabbedPaneLocation

public class JTabbedPaneLocation
extends ComponentLocation

Provides encapsulation of a location on a JTabbedPane (notably a tab). Use the JTabbedPaneLocation#JTabbedPaneLocation(Point) ctor to indicate a specific coordinate.


Nested Class Summary
(package private)  class JTabbedPaneLocation.TabNotVisibleException
          This exception is thrown if a given tab is not currently visible.
 
Field Summary
 
Fields inherited from class abbot.tester.ComponentLocation
CENTER
 
Constructor Summary
JTabbedPaneLocation()
           
JTabbedPaneLocation(int index)
           
JTabbedPaneLocation(Point p)
           
JTabbedPaneLocation(String tabName)
           
 
Method Summary
protected  String badFormat(String encoded)
           
 boolean equals(Object o)
          Returns whether the given object is an equivalent ComponentLocation.
 Rectangle getBounds(Component c)
          Convert the abstract location into a concrete area, relative to the given Component.
 Point getPoint(Component c)
          Convert the abstract location into a concrete one.
 ComponentLocation parse(String encoded)
          Convert the given encoding into the proper location.
 String toString()
           
 
Methods inherited from class abbot.tester.ComponentLocation
encodeIndex, encodeValue, isIndex, isValue, parseIndex, parseValue
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JTabbedPaneLocation

public JTabbedPaneLocation()

JTabbedPaneLocation

public JTabbedPaneLocation(String tabName)

JTabbedPaneLocation

public JTabbedPaneLocation(int index)

JTabbedPaneLocation

public JTabbedPaneLocation(Point p)
Method Detail

badFormat

protected String badFormat(String encoded)
Overrides:
badFormat in class ComponentLocation

getPoint

public Point getPoint(Component c)
Description copied from class: ComponentLocation
Convert the abstract location into a concrete one. Returns a Point relative to the given Component.

Overrides:
getPoint in class ComponentLocation
Throws:
JTabbedPaneLocation.TabNotVisibleException - if the tab is not visible

getBounds

public Rectangle getBounds(Component c)
Description copied from class: ComponentLocation
Convert the abstract location into a concrete area, relative to the given Component. If a point has been specified, returns a 1x1 rectangle, otherwise returns the a rectangle at (0, 0) of the Component's size.

Overrides:
getBounds in class ComponentLocation
Throws:
JTabbedPaneLocation.TabNotVisibleException - if the tab is not visible

equals

public boolean equals(Object o)
Description copied from class: ComponentLocation
Returns whether the given object is an equivalent ComponentLocation.

Overrides:
equals in class ComponentLocation

toString

public String toString()
Overrides:
toString in class ComponentLocation

parse

public ComponentLocation parse(String encoded)
Description copied from class: ComponentLocation
Convert the given encoding into the proper location. Allowed formats: (x, y)

Overrides:
parse in class ComponentLocation


Copyright © 2002-2008 Timothy Wall. All Rights Reserved.
Abbot is hosted on

SourceForge