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


Java ComponentOrientation.isHorizontal方法代碼示例

本文整理匯總了Java中java.awt.ComponentOrientation.isHorizontal方法的典型用法代碼示例。如果您正苦於以下問題:Java ComponentOrientation.isHorizontal方法的具體用法?Java ComponentOrientation.isHorizontal怎麽用?Java ComponentOrientation.isHorizontal使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在java.awt.ComponentOrientation的用法示例。


在下文中一共展示了ComponentOrientation.isHorizontal方法的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getPageAxisConstant

import java.awt.ComponentOrientation; //導入方法依賴的package包/類
public static int getPageAxisConstant()
{
	if (PlatformFriend.RUNNING_ON_JAVA_14_OR_HIGHER)
	{
		return BoxLayout.PAGE_AXIS;
	}
	else
	{
		ComponentOrientation componentOrientation = ComponentOrientation.getOrientation(Locale.getDefault());
		
		if (componentOrientation.isHorizontal())
			return BoxLayout.Y_AXIS;
		else
			return BoxLayout.X_AXIS;
	}
}
 
開發者ID:dhorlick,項目名稱:balloonist,代碼行數:17,代碼來源:LocaleFriend.java

示例2: getLineAxisConstant

import java.awt.ComponentOrientation; //導入方法依賴的package包/類
public static int getLineAxisConstant()
{
	if (PlatformFriend.RUNNING_ON_JAVA_14_OR_HIGHER)
	{
		return BoxLayout.LINE_AXIS;
	}
	else
	{
		ComponentOrientation componentOrientation = ComponentOrientation.getOrientation(Locale.getDefault());
		
		if (componentOrientation.isHorizontal())
			return BoxLayout.X_AXIS;
		else
			return BoxLayout.Y_AXIS;
	}
}
 
開發者ID:dhorlick,項目名稱:balloonist,代碼行數:17,代碼來源:LocaleFriend.java

示例3: AbstractButtonPanelBuilder

import java.awt.ComponentOrientation; //導入方法依賴的package包/類
/**
 * Constructs a <code>AbstractFormBuilder</code>
 * for the given FormLayout and layout container.
 *
 * @param layout     the {@link FormLayout} to use
 * @param container  the layout container
 *
 * @throws NullPointerException if the layout or container is null
 */
protected AbstractButtonPanelBuilder(FormLayout layout, JPanel container) {
    if (layout == null) {
        throw new NullPointerException("The layout must not be null.");
    }

    if (container == null) {
        throw new NullPointerException("The layout container must not be null.");
    }

    this.container = container;
    this.layout    = layout;
    container.setLayout(layout);

    setOpaque(false);

    currentCellConstraints = new CellConstraints();
    ComponentOrientation orientation = container.getComponentOrientation();
    leftToRight = orientation.isLeftToRight()
              || !orientation.isHorizontal();
}
 
開發者ID:evandrocoan,項目名稱:ComputerScienceGraduation,代碼行數:30,代碼來源:AbstractButtonPanelBuilder.java

示例4: AbstractFormBuilder

import java.awt.ComponentOrientation; //導入方法依賴的package包/類
/**
 * Constructs a <code>AbstractFormBuilder</code>
 * for the given FormLayout and layout container.
 *
 * @param layout     the {@link FormLayout} to use
 * @param container  the layout container
 *
 * @throws NullPointerException if the layout or container is null
 */
public AbstractFormBuilder(FormLayout layout, Container container) {
    if (layout == null)
        throw new NullPointerException("The layout must not be null.");

    if (container == null)
        throw new NullPointerException("The layout container must not be null.");

    this.container = container;
    this.layout    = layout;

    container.setLayout(layout);
    currentCellConstraints = new CellConstraints();
    ComponentOrientation orientation = container.getComponentOrientation();
    leftToRight = orientation.isLeftToRight()
              || !orientation.isHorizontal();
}
 
開發者ID:evandrocoan,項目名稱:ComputerScienceGraduation,代碼行數:26,代碼來源:AbstractFormBuilder.java

示例5: resolveAxis

import java.awt.ComponentOrientation; //導入方法依賴的package包/類
/**
  * Given one of the 4 axis values, resolve it to an absolute axis.
  * The relative axis values, PAGE_AXIS and LINE_AXIS are converted
  * to their absolute couterpart given the target's ComponentOrientation
  * value.  The absolute axes, X_AXIS and Y_AXIS are returned unmodified.
  *
  * @param axis the axis to resolve
  * @param o the ComponentOrientation to resolve against
  * @return the resolved axis
  */
 private int resolveAxis( int axis, ComponentOrientation o ) {
     int absoluteAxis;
     if( axis == LINE_AXIS ) {
         absoluteAxis = o.isHorizontal() ? X_AXIS : Y_AXIS;
     } else if( axis == PAGE_AXIS ) {
         absoluteAxis = o.isHorizontal() ? Y_AXIS : X_AXIS;
     } else {
         absoluteAxis = axis;
     }
     return absoluteAxis;
}
 
開發者ID:javalovercn,項目名稱:j2se_for_android,代碼行數:22,代碼來源:BoxLayout.java

示例6: isHorizontalIn

import java.awt.ComponentOrientation; //導入方法依賴的package包/類
private boolean isHorizontalIn(Container parent)
{
  ComponentOrientation orientation = parent.getComponentOrientation();
  return this.way == X_AXIS
    || (this.way == LINE_AXIS
        && orientation.isHorizontal())
    || (this.way == PAGE_AXIS
        && (!orientation.isHorizontal()));
}
 
開發者ID:vilie,項目名稱:javify,代碼行數:10,代碼來源:BoxLayout.java

示例7: setComponentOrientation

import java.awt.ComponentOrientation; //導入方法依賴的package包/類
void setComponentOrientation(ComponentOrientation orientation) {
    horizontal = orientation.isHorizontal();
    leftToRight = orientation.isLeftToRight();
}
 
開發者ID:SunburstApps,項目名稱:OpenJSharp,代碼行數:5,代碼來源:LayoutComparator.java

示例8: isRightToLeft

import java.awt.ComponentOrientation; //導入方法依賴的package包/類
public boolean isRightToLeft()
{
	// Check layout orientation
	ComponentOrientation orientation = _parent.getComponentOrientation();
	return orientation.isHorizontal() && !orientation.isLeftToRight();
}
 
開發者ID:pgdurand,項目名稱:jGAF,代碼行數:7,代碼來源:OrientationPolicy.java

示例9: isLeftToRight

import java.awt.ComponentOrientation; //導入方法依賴的package包/類
private boolean isLeftToRight() {
    ComponentOrientation orientation = getPanel().getComponentOrientation();
    return orientation.isLeftToRight()
              || !orientation.isHorizontal();
}
 
開發者ID:JFormDesigner,項目名稱:swing-jgoodies-forms,代碼行數:6,代碼來源:AbstractFormBuilder.java

示例10: AbstractButtonPanelBuilder

import java.awt.ComponentOrientation; //導入方法依賴的package包/類
/**
 * Constructs an AbstractButtonPanelBuilder
 * for the given FormLayout and layout container.
 *
 * @param layout     the FormLayout to use
 * @param container  the layout container
 *
 * @throws NullPointerException if {@code layout} or {@code container} is {@code null}
 */
protected AbstractButtonPanelBuilder(FormLayout layout, JPanel container) {
    super(layout, container);
    opaque(false);
    ComponentOrientation orientation = container.getComponentOrientation();
    leftToRight = orientation.isLeftToRight()
              || !orientation.isHorizontal();
}
 
開發者ID:JFormDesigner,項目名稱:swing-jgoodies-forms,代碼行數:17,代碼來源:AbstractButtonPanelBuilder.java

示例11: AbstractFormBuilder

import java.awt.ComponentOrientation; //導入方法依賴的package包/類
/**
 * Constructs an AbstractFormBuilder
 * for the given FormLayout and layout container.
 *
 * @param layout     the FormLayout to use
 * @param panel  the layout container
 *
 * @throws NullPointerException if {@code layout} or {@code container} is {@code null}
 */
protected AbstractFormBuilder(FormLayout layout, JPanel panel) {
    super(layout, panel);
    ComponentOrientation orientation = panel.getComponentOrientation();
    leftToRight = orientation.isLeftToRight()
              || !orientation.isHorizontal();
}
 
開發者ID:JFormDesigner,項目名稱:swing-jgoodies-forms,代碼行數:16,代碼來源:AbstractFormBuilder.java


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