| Constructor: |
protected Title() {
this(Title.DEFAULT_POSITION,
Title.DEFAULT_HORIZONTAL_ALIGNMENT,
Title.DEFAULT_VERTICAL_ALIGNMENT, Title.DEFAULT_PADDING);
}
Creates a new title, using default attributes where necessary. |
protected Title(RectangleEdge position,
HorizontalAlignment horizontalAlignment,
VerticalAlignment verticalAlignment) {
this(position, horizontalAlignment, verticalAlignment,
Title.DEFAULT_PADDING);
}
Creates a new title, using default attributes where necessary. Parameters:
position - the position of the title (null not
permitted).
horizontalAlignment - the horizontal alignment of the title
(null not permitted).
verticalAlignment - the vertical alignment of the title
(null not permitted).
|
protected Title(RectangleEdge position,
HorizontalAlignment horizontalAlignment,
VerticalAlignment verticalAlignment,
RectangleInsets padding) {
// check arguments...
if (position == null) {
throw new IllegalArgumentException("Null 'position' argument.");
}
if (horizontalAlignment == null) {
throw new IllegalArgumentException(
"Null 'horizontalAlignment' argument.");
}
if (verticalAlignment == null) {
throw new IllegalArgumentException(
"Null 'verticalAlignment' argument.");
}
if (padding == null) {
throw new IllegalArgumentException("Null 'spacer' argument.");
}
this.position = position;
this.horizontalAlignment = horizontalAlignment;
this.verticalAlignment = verticalAlignment;
setPadding(padding);
this.listenerList = new EventListenerList();
this.notify = true;
}
Parameters:
position - the position of the title (null not
permitted).
horizontalAlignment - the horizontal alignment of the title (LEFT,
CENTER or RIGHT, null not
permitted).
verticalAlignment - the vertical alignment of the title (TOP,
MIDDLE or BOTTOM, null not
permitted).
padding - the amount of space to leave around the outside of the
title (null not permitted).
|