javax.swing
Class Spring.SumSpring

java.lang.Object
  extended byjavax.swing.Spring
      extended byjavax.swing.Spring.AbstractSpring
          extended byjavax.swing.Spring.StaticSpring
              extended byjavax.swing.Spring.CompoundSpring
                  extended byjavax.swing.Spring.SumSpring
Enclosing class:
Spring

private static class Spring.SumSpring
extends Spring.CompoundSpring


Nested Class Summary
 
Nested classes inherited from class javax.swing.Spring
Spring.AbstractSpring, Spring.CompoundSpring
 
Field Summary
protected  int max
           
protected  int min
           
protected  int pref
           
protected  Spring s1
           
protected  Spring s2
           
protected  int size
           
 
Fields inherited from class javax.swing.Spring
UNSET
 
Constructor Summary
Spring.SumSpring(Spring s1, Spring s2)
           
 
Method Summary
protected  void clear()
           
 int getMaximumValue()
          Returns the maximum value of this Spring.
 int getMinimumValue()
          Returns the minimum value of this Spring.
 int getPreferredValue()
          Returns the preferred value of this Spring.
 int getValue()
          Returns the current value of this Spring.
(package private)  boolean isCyclic(SpringLayout l)
           
protected  int op(int x, int y)
           
 void setValue(int size)
          Sets the current value of this Spring to value.
 String toString()
          Returns a string representation of the object.
 
Methods inherited from class javax.swing.Spring
constant, constant, difference, getStrain, max, minus, setStrain, sum
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

s1

protected Spring s1

s2

protected Spring s2

min

protected int min

pref

protected int pref

max

protected int max

size

protected int size
Constructor Detail

Spring.SumSpring

public Spring.SumSpring(Spring s1,
                        Spring s2)
Method Detail

op

protected int op(int x,
                 int y)
Specified by:
op in class Spring.CompoundSpring

setValue

public void setValue(int size)
Description copied from class: Spring
Sets the current value of this Spring to value.

Overrides:
setValue in class Spring.CompoundSpring

toString

public String toString()
Description copied from class: Object
Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.

The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:

 getClass().getName() + '@' + Integer.toHexString(hashCode())
 

Overrides:
toString in class Spring.StaticSpring

clear

protected void clear()
Overrides:
clear in class Spring.AbstractSpring

getMinimumValue

public int getMinimumValue()
Description copied from class: Spring
Returns the minimum value of this Spring.

Overrides:
getMinimumValue in class Spring.StaticSpring

getPreferredValue

public int getPreferredValue()
Description copied from class: Spring
Returns the preferred value of this Spring.

Overrides:
getPreferredValue in class Spring.StaticSpring

getMaximumValue

public int getMaximumValue()
Description copied from class: Spring
Returns the maximum value of this Spring.

Overrides:
getMaximumValue in class Spring.StaticSpring

getValue

public int getValue()
Description copied from class: Spring
Returns the current value of this Spring.

Overrides:
getValue in class Spring.AbstractSpring

isCyclic

boolean isCyclic(SpringLayout l)
Overrides:
isCyclic in class Spring