下面列出了java.awt.peer.LabelPeer#setAlignment ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
/**
* Sets the alignment for this label to the specified alignment.
* Possible values are <code>Label.LEFT</code>,
* <code>Label.RIGHT</code>, and <code>Label.CENTER</code>.
* @param alignment the alignment to be set.
* @exception IllegalArgumentException if an improper value for
* <code>alignment</code> is given.
* @see java.awt.Label#getAlignment
*/
public synchronized void setAlignment(int alignment) {
switch (alignment) {
case LEFT:
case CENTER:
case RIGHT:
this.alignment = alignment;
LabelPeer peer = (LabelPeer)this.peer;
if (peer != null) {
peer.setAlignment(alignment);
}
return;
}
throw new IllegalArgumentException("improper alignment: " + alignment);
}
/**
* Sets the alignment for this label to the specified alignment.
* Possible values are <code>Label.LEFT</code>,
* <code>Label.RIGHT</code>, and <code>Label.CENTER</code>.
* @param alignment the alignment to be set.
* @exception IllegalArgumentException if an improper value for
* <code>alignment</code> is given.
* @see java.awt.Label#getAlignment
*/
public synchronized void setAlignment(int alignment) {
switch (alignment) {
case LEFT:
case CENTER:
case RIGHT:
this.alignment = alignment;
LabelPeer peer = (LabelPeer)this.peer;
if (peer != null) {
peer.setAlignment(alignment);
}
return;
}
throw new IllegalArgumentException("improper alignment: " + alignment);
}
/**
* Sets the alignment for this label to the specified alignment.
* Possible values are <code>Label.LEFT</code>,
* <code>Label.RIGHT</code>, and <code>Label.CENTER</code>.
* @param alignment the alignment to be set.
* @exception IllegalArgumentException if an improper value for
* <code>alignment</code> is given.
* @see java.awt.Label#getAlignment
*/
public synchronized void setAlignment(int alignment) {
switch (alignment) {
case LEFT:
case CENTER:
case RIGHT:
this.alignment = alignment;
LabelPeer peer = (LabelPeer)this.peer;
if (peer != null) {
peer.setAlignment(alignment);
}
return;
}
throw new IllegalArgumentException("improper alignment: " + alignment);
}
/**
* Sets the alignment for this label to the specified alignment.
* Possible values are <code>Label.LEFT</code>,
* <code>Label.RIGHT</code>, and <code>Label.CENTER</code>.
* @param alignment the alignment to be set.
* @exception IllegalArgumentException if an improper value for
* <code>alignment</code> is given.
* @see java.awt.Label#getAlignment
*/
public synchronized void setAlignment(int alignment) {
switch (alignment) {
case LEFT:
case CENTER:
case RIGHT:
this.alignment = alignment;
LabelPeer peer = (LabelPeer)this.peer;
if (peer != null) {
peer.setAlignment(alignment);
}
return;
}
throw new IllegalArgumentException("improper alignment: " + alignment);
}
/**
* Sets the alignment for this label to the specified alignment.
* Possible values are <code>Label.LEFT</code>,
* <code>Label.RIGHT</code>, and <code>Label.CENTER</code>.
* @param alignment the alignment to be set.
* @exception IllegalArgumentException if an improper value for
* <code>alignment</code> is given.
* @see java.awt.Label#getAlignment
*/
public synchronized void setAlignment(int alignment) {
switch (alignment) {
case LEFT:
case CENTER:
case RIGHT:
this.alignment = alignment;
LabelPeer peer = (LabelPeer)this.peer;
if (peer != null) {
peer.setAlignment(alignment);
}
return;
}
throw new IllegalArgumentException("improper alignment: " + alignment);
}
/**
* Sets the alignment for this label to the specified alignment.
* Possible values are <code>Label.LEFT</code>,
* <code>Label.RIGHT</code>, and <code>Label.CENTER</code>.
* @param alignment the alignment to be set.
* @exception IllegalArgumentException if an improper value for
* <code>alignment</code> is given.
* @see java.awt.Label#getAlignment
*/
public synchronized void setAlignment(int alignment) {
switch (alignment) {
case LEFT:
case CENTER:
case RIGHT:
this.alignment = alignment;
LabelPeer peer = (LabelPeer)this.peer;
if (peer != null) {
peer.setAlignment(alignment);
}
return;
}
throw new IllegalArgumentException("improper alignment: " + alignment);
}
/**
* Sets the alignment for this label to the specified alignment.
* Possible values are <code>Label.LEFT</code>,
* <code>Label.RIGHT</code>, and <code>Label.CENTER</code>.
* @param alignment the alignment to be set.
* @exception IllegalArgumentException if an improper value for
* <code>alignment</code> is given.
* @see java.awt.Label#getAlignment
*/
public synchronized void setAlignment(int alignment) {
switch (alignment) {
case LEFT:
case CENTER:
case RIGHT:
this.alignment = alignment;
LabelPeer peer = (LabelPeer)this.peer;
if (peer != null) {
peer.setAlignment(alignment);
}
return;
}
throw new IllegalArgumentException("improper alignment: " + alignment);
}
/**
* Sets the alignment for this label to the specified alignment.
* Possible values are {@code Label.LEFT},
* {@code Label.RIGHT}, and {@code Label.CENTER}.
* @param alignment the alignment to be set.
* @exception IllegalArgumentException if an improper value for
* {@code alignment} is given.
* @see java.awt.Label#getAlignment
*/
public synchronized void setAlignment(int alignment) {
switch (alignment) {
case LEFT:
case CENTER:
case RIGHT:
this.alignment = alignment;
LabelPeer peer = (LabelPeer)this.peer;
if (peer != null) {
peer.setAlignment(alignment);
}
return;
}
throw new IllegalArgumentException("improper alignment: " + alignment);
}
/**
* Sets the alignment for this label to the specified alignment.
* Possible values are {@code Label.LEFT},
* {@code Label.RIGHT}, and {@code Label.CENTER}.
* @param alignment the alignment to be set.
* @exception IllegalArgumentException if an improper value for
* {@code alignment} is given.
* @see java.awt.Label#getAlignment
*/
public synchronized void setAlignment(int alignment) {
switch (alignment) {
case LEFT:
case CENTER:
case RIGHT:
this.alignment = alignment;
LabelPeer peer = (LabelPeer)this.peer;
if (peer != null) {
peer.setAlignment(alignment);
}
return;
}
throw new IllegalArgumentException("improper alignment: " + alignment);
}
/**
* Sets the alignment for this label to the specified alignment.
* Possible values are <code>Label.LEFT</code>,
* <code>Label.RIGHT</code>, and <code>Label.CENTER</code>.
* @param alignment the alignment to be set.
* @exception IllegalArgumentException if an improper value for
* <code>alignment</code> is given.
* @see java.awt.Label#getAlignment
*/
public synchronized void setAlignment(int alignment) {
switch (alignment) {
case LEFT:
case CENTER:
case RIGHT:
this.alignment = alignment;
LabelPeer peer = (LabelPeer)this.peer;
if (peer != null) {
peer.setAlignment(alignment);
}
return;
}
throw new IllegalArgumentException("improper alignment: " + alignment);
}
/**
* Sets the alignment for this label to the specified alignment.
* Possible values are <code>Label.LEFT</code>,
* <code>Label.RIGHT</code>, and <code>Label.CENTER</code>.
* @param alignment the alignment to be set.
* @exception IllegalArgumentException if an improper value for
* <code>alignment</code> is given.
* @see java.awt.Label#getAlignment
*/
public synchronized void setAlignment(int alignment) {
switch (alignment) {
case LEFT:
case CENTER:
case RIGHT:
this.alignment = alignment;
LabelPeer peer = (LabelPeer)this.peer;
if (peer != null) {
peer.setAlignment(alignment);
}
return;
}
throw new IllegalArgumentException("improper alignment: " + alignment);
}
/**
* Sets the alignment for this label to the specified alignment.
* Possible values are <code>Label.LEFT</code>,
* <code>Label.RIGHT</code>, and <code>Label.CENTER</code>.
* @param alignment the alignment to be set.
* @exception IllegalArgumentException if an improper value for
* <code>alignment</code> is given.
* @see java.awt.Label#getAlignment
*/
public synchronized void setAlignment(int alignment) {
switch (alignment) {
case LEFT:
case CENTER:
case RIGHT:
this.alignment = alignment;
LabelPeer peer = (LabelPeer)this.peer;
if (peer != null) {
peer.setAlignment(alignment);
}
return;
}
throw new IllegalArgumentException("improper alignment: " + alignment);
}
/**
* Sets the alignment for this label to the specified alignment.
* Possible values are <code>Label.LEFT</code>,
* <code>Label.RIGHT</code>, and <code>Label.CENTER</code>.
* @param alignment the alignment to be set.
* @exception IllegalArgumentException if an improper value for
* <code>alignment</code> is given.
* @see java.awt.Label#getAlignment
*/
public synchronized void setAlignment(int alignment) {
switch (alignment) {
case LEFT:
case CENTER:
case RIGHT:
this.alignment = alignment;
LabelPeer peer = (LabelPeer)this.peer;
if (peer != null) {
peer.setAlignment(alignment);
}
return;
}
throw new IllegalArgumentException("improper alignment: " + alignment);
}
/**
* Sets the alignment for this label to the specified alignment.
* Possible values are <code>Label.LEFT</code>,
* <code>Label.RIGHT</code>, and <code>Label.CENTER</code>.
* @param alignment the alignment to be set.
* @exception IllegalArgumentException if an improper value for
* <code>alignment</code> is given.
* @see java.awt.Label#getAlignment
*/
public synchronized void setAlignment(int alignment) {
switch (alignment) {
case LEFT:
case CENTER:
case RIGHT:
this.alignment = alignment;
LabelPeer peer = (LabelPeer)this.peer;
if (peer != null) {
peer.setAlignment(alignment);
}
return;
}
throw new IllegalArgumentException("improper alignment: " + alignment);
}
/**
* Sets the alignment for this label to the specified alignment.
* Possible values are <code>Label.LEFT</code>,
* <code>Label.RIGHT</code>, and <code>Label.CENTER</code>.
* @param alignment the alignment to be set.
* @exception IllegalArgumentException if an improper value for
* <code>alignment</code> is given.
* @see java.awt.Label#getAlignment
*/
public synchronized void setAlignment(int alignment) {
switch (alignment) {
case LEFT:
case CENTER:
case RIGHT:
this.alignment = alignment;
LabelPeer peer = (LabelPeer)this.peer;
if (peer != null) {
peer.setAlignment(alignment);
}
return;
}
throw new IllegalArgumentException("improper alignment: " + alignment);
}
/**
* Sets the alignment for this label to the specified alignment.
* Possible values are <code>Label.LEFT</code>,
* <code>Label.RIGHT</code>, and <code>Label.CENTER</code>.
* @param alignment the alignment to be set.
* @exception IllegalArgumentException if an improper value for
* <code>alignment</code> is given.
* @see java.awt.Label#getAlignment
*/
public synchronized void setAlignment(int alignment) {
switch (alignment) {
case LEFT:
case CENTER:
case RIGHT:
this.alignment = alignment;
LabelPeer peer = (LabelPeer)this.peer;
if (peer != null) {
peer.setAlignment(alignment);
}
return;
}
throw new IllegalArgumentException("improper alignment: " + alignment);
}
/**
* Sets the alignment for this label to the specified alignment.
* Possible values are <code>Label.LEFT</code>,
* <code>Label.RIGHT</code>, and <code>Label.CENTER</code>.
* @param alignment the alignment to be set.
* @exception IllegalArgumentException if an improper value for
* <code>alignment</code> is given.
* @see java.awt.Label#getAlignment
*/
public synchronized void setAlignment(int alignment) {
switch (alignment) {
case LEFT:
case CENTER:
case RIGHT:
this.alignment = alignment;
LabelPeer peer = (LabelPeer)this.peer;
if (peer != null) {
peer.setAlignment(alignment);
}
return;
}
throw new IllegalArgumentException("improper alignment: " + alignment);
}
/**
* Sets the alignment for this label to the specified alignment.
* Possible values are <code>Label.LEFT</code>,
* <code>Label.RIGHT</code>, and <code>Label.CENTER</code>.
* @param alignment the alignment to be set.
* @exception IllegalArgumentException if an improper value for
* <code>alignment</code> is given.
* @see java.awt.Label#getAlignment
*/
public synchronized void setAlignment(int alignment) {
switch (alignment) {
case LEFT:
case CENTER:
case RIGHT:
this.alignment = alignment;
LabelPeer peer = (LabelPeer)this.peer;
if (peer != null) {
peer.setAlignment(alignment);
}
return;
}
throw new IllegalArgumentException("improper alignment: " + alignment);
}