當前位置: 首頁>>代碼示例>>Java>>正文


Java CellConstraints.Alignment方法代碼示例

本文整理匯總了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;
}
 
開發者ID:DigitalMediaServer,項目名稱:DigitalMediaServer,代碼行數:30,代碼來源:FormLayoutUtil.java

示例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;
}
 
開發者ID:evandrocoan,項目名稱:ComputerScienceGraduation,代碼行數:9,代碼來源:AbstractFormBuilder.java

示例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;
}
 
開發者ID:evandrocoan,項目名稱:ComputerScienceGraduation,代碼行數:9,代碼來源:AbstractFormBuilder.java

示例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);
}
 
開發者ID:evandrocoan,項目名稱:ComputerScienceGraduation,代碼行數:12,代碼來源:AbstractFormBuilder.java

示例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;
}
 
開發者ID:JFormDesigner,項目名稱:swing-jgoodies-forms,代碼行數:9,代碼來源:AbstractFormBuilder.java

示例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;
}
 
開發者ID:JFormDesigner,項目名稱:swing-jgoodies-forms,代碼行數:9,代碼來源:AbstractFormBuilder.java


注:本文中的com.jgoodies.forms.layout.CellConstraints.Alignment方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。