本文整理匯總了Java中com.jgoodies.forms.layout.CellConstraints.Alignment方法的典型用法代碼示例。如果您正苦於以下問題:Java CellConstraints.Alignment方法的具體用法?Java CellConstraints.Alignment怎麽用?Java CellConstraints.Alignment使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.jgoodies.forms.layout.CellConstraints
的用法示例。
在下文中一共展示了CellConstraints.Alignment方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: flipHorizontally
import com.jgoodies.forms.layout.CellConstraints; //導入方法依賴的package包/類
/**
* Creates and returns a horizontally flipped clone of the given cell
* constraints object. Flips the horizontal alignment and the left and right
* insets.
*
* @param cc
* the original cell constraints object
* @return the flipped cell constraints with flipped horizontal alignment,
* and flipped left and right insets - if any
*/
private static CellConstraints flipHorizontally(CellConstraints cc) {
CellConstraints.Alignment flippedHAlign = cc.hAlign;
if (flippedHAlign == CellConstraints.LEFT) {
flippedHAlign = CellConstraints.RIGHT;
} else {
if (flippedHAlign == CellConstraints.RIGHT) {
flippedHAlign = CellConstraints.LEFT;
}
}
CellConstraints flipped = new CellConstraints(cc.gridX, cc.gridY, cc.gridWidth, cc.gridHeight, flippedHAlign, cc.vAlign);
if (cc.insets != null) {
flipped.insets = new Insets(cc.insets.top, cc.insets.right, cc.insets.bottom, cc.insets.left);
}
return flipped;
}
示例2: setHAlignment
import com.jgoodies.forms.layout.CellConstraints; //導入方法依賴的package包/類
/**
* Sets the horizontal alignment.
*
* @param alignment the new horizontal alignment
*/
public final void setHAlignment(CellConstraints.Alignment alignment) {
currentCellConstraints.hAlign = alignment;
}
示例3: setVAlignment
import com.jgoodies.forms.layout.CellConstraints; //導入方法依賴的package包/類
/**
* Sets the vertical alignment.
*
* @param alignment the new vertical alignment
*/
public final void setVAlignment(CellConstraints.Alignment alignment) {
currentCellConstraints.vAlign = alignment;
}
示例4: setAlignment
import com.jgoodies.forms.layout.CellConstraints; //導入方法依賴的package包/類
/**
* Sets the horizontal and vertical alignment.
*
* @param hAlign the new horizontal alignment
* @param vAlign the new vertical alignment
*/
public final void setAlignment(CellConstraints.Alignment hAlign,
CellConstraints.Alignment vAlign) {
setHAlignment(hAlign);
setVAlignment(vAlign);
}
示例5: setHAlignment
import com.jgoodies.forms.layout.CellConstraints; //導入方法依賴的package包/類
/**
* Sets the horizontal alignment.
*
* @param alignment the new horizontal alignment
*/
public final void setHAlignment(CellConstraints.Alignment alignment) {
cellConstraints().hAlign = alignment;
}
示例6: setVAlignment
import com.jgoodies.forms.layout.CellConstraints; //導入方法依賴的package包/類
/**
* Sets the vertical alignment.
*
* @param alignment the new vertical alignment
*/
public final void setVAlignment(CellConstraints.Alignment alignment) {
cellConstraints().vAlign = alignment;
}