1 |
/* JToolBar.java -- |
/* JToolBar.java -- |
2 |
Copyright (C) 2002, 2004 Free Software Foundation, Inc. |
Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc. |
3 |
|
|
4 |
This file is part of GNU Classpath. |
This file is part of GNU Classpath. |
5 |
|
|
378 |
/** The orientation of the JToolBar. */ |
/** The orientation of the JToolBar. */ |
379 |
private int orientation = HORIZONTAL; |
private int orientation = HORIZONTAL; |
380 |
|
|
|
/** Fired in a PropertyChangeEvent when the orientation property changes. */ |
|
|
public static final String ORIENTATION_CHANGED_PROPERTY = "orientation"; |
|
|
|
|
|
/** Fired in a PropertyChangeEvent when the floatable property changes. */ |
|
|
public static final String FLOATABLE_CHANGED_PROPERTY = "floatable"; |
|
|
|
|
|
/** Fired in a PropertyChangeEvent when the borderPainted property changes. */ |
|
|
public static final String BORDER_PAINTED_CHANGED_PROPERTY = "borderPainted"; |
|
|
|
|
|
/** Fired in a PropertyChangeEvent when the margin property changes. */ |
|
|
public static final String MARGIN_CHANGED_PROPERTY = "margin"; |
|
|
|
|
|
/** Fired in a PropertyChangeEvent when the rollover property changes. */ |
|
|
public static final String ROLLOVER_CHANGED_PROPERTY = "rollover"; |
|
|
|
|
381 |
/** |
/** |
382 |
* This method creates a new JToolBar object with horizontal orientation |
* This method creates a new JToolBar object with horizontal orientation |
383 |
* and no name. |
* and no name. |
504 |
if (b != rollover) |
if (b != rollover) |
505 |
{ |
{ |
506 |
rollover = b; |
rollover = b; |
507 |
firePropertyChange(ROLLOVER_CHANGED_PROPERTY, ! rollover, rollover); |
firePropertyChange("rollover", ! rollover, rollover); |
508 |
revalidate(); |
revalidate(); |
509 |
repaint(); |
repaint(); |
510 |
} |
} |
580 |
{ |
{ |
581 |
Insets oldMargin = this.margin; |
Insets oldMargin = this.margin; |
582 |
this.margin = margin; |
this.margin = margin; |
583 |
firePropertyChange(MARGIN_CHANGED_PROPERTY, oldMargin, this.margin); |
firePropertyChange("margin", oldMargin, this.margin); |
584 |
revalidate(); |
revalidate(); |
585 |
repaint(); |
repaint(); |
586 |
} |
} |
607 |
if (painted != paintBorder) |
if (painted != paintBorder) |
608 |
{ |
{ |
609 |
paintBorder = painted; |
paintBorder = painted; |
610 |
firePropertyChange(BORDER_PAINTED_CHANGED_PROPERTY, ! paintBorder, |
firePropertyChange("borderPainted", ! paintBorder, |
611 |
paintBorder); |
paintBorder); |
612 |
repaint(); |
repaint(); |
613 |
} |
} |
634 |
if (floatable != this.floatable) |
if (floatable != this.floatable) |
635 |
{ |
{ |
636 |
this.floatable = floatable; |
this.floatable = floatable; |
637 |
firePropertyChange(FLOATABLE_CHANGED_PROPERTY, ! floatable, floatable); |
firePropertyChange("floatable", ! floatable, floatable); |
638 |
} |
} |
639 |
} // setFloatable() |
} // setFloatable() |
640 |
|
|
677 |
{ |
{ |
678 |
int oldOrientation = this.orientation; |
int oldOrientation = this.orientation; |
679 |
this.orientation = orientation; |
this.orientation = orientation; |
680 |
firePropertyChange(ORIENTATION_CHANGED_PROPERTY, oldOrientation, |
firePropertyChange("orientation", oldOrientation, this.orientation); |
|
this.orientation); |
|
681 |
revalidate(); |
revalidate(); |
682 |
repaint(); |
repaint(); |
683 |
} |
} |