javax.swing.JLabel.getComponentOrientation()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(5.3k)|赞(0)|评价(0)|浏览(166)

本文整理了Java中javax.swing.JLabel.getComponentOrientation()方法的一些代码示例,展示了JLabel.getComponentOrientation()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JLabel.getComponentOrientation()方法的具体详情如下:
包路径:javax.swing.JLabel
类名称:JLabel
方法名:getComponentOrientation

JLabel.getComponentOrientation介绍

暂无

代码示例

代码示例来源:origin: org.swinglabs.swingx/swingx-all

/**
 * {@inheritDoc}
 */
@Override
public ComponentOrientation getComponentOrientation() {
  return label.getComponentOrientation();
}

代码示例来源:origin: org.codehaus.jtstand/jtstand-desktop

/**
 * {@inheritDoc}
 */
@Override
public ComponentOrientation getComponentOrientation() {
  return label.getComponentOrientation();
}

代码示例来源:origin: org.swinglabs.swingx/swingx-core

/**
 * {@inheritDoc}
 */
@Override
public ComponentOrientation getComponentOrientation() {
  return label.getComponentOrientation();
}

代码示例来源:origin: org.bidib.jbidib.swinglabs.swingx/swingx-core

/**
 * {@inheritDoc}
 */
@Override
public ComponentOrientation getComponentOrientation() {
  return label.getComponentOrientation();
}

代码示例来源:origin: com.haulmont.thirdparty/swingx-core

/**
 * {@inheritDoc}
 */
@Override
public ComponentOrientation getComponentOrientation() {
  return label.getComponentOrientation();
}

代码示例来源:origin: org.bidib.jbidib.swinglabs.swingx/swingx-core

/**
 * {@inheritDoc}
 */
@Override
public void setComponentOrientation(ComponentOrientation o) {
  ComponentOrientation old = label.getComponentOrientation();
  label.setComponentOrientation(o);
  firePropertyChange("componentOrientation", old, label.getComponentOrientation());
}

代码示例来源:origin: org.swinglabs.swingx/swingx-all

/**
 * {@inheritDoc}
 */
@Override
public void setComponentOrientation(ComponentOrientation o) {
  ComponentOrientation old = label.getComponentOrientation();
  label.setComponentOrientation(o);
  firePropertyChange("componentOrientation", old, label.getComponentOrientation());
}

代码示例来源:origin: org.codehaus.jtstand/jtstand-desktop

/**
 * {@inheritDoc}
 */
@Override
public void setComponentOrientation(ComponentOrientation o) {
  ComponentOrientation old = label.getComponentOrientation();
  label.setComponentOrientation(o);
  firePropertyChange("componentOrientation", old, label.getComponentOrientation());
}

代码示例来源:origin: org.swinglabs.swingx/swingx-core

/**
 * {@inheritDoc}
 */
@Override
public void setComponentOrientation(ComponentOrientation o) {
  ComponentOrientation old = label.getComponentOrientation();
  label.setComponentOrientation(o);
  firePropertyChange("componentOrientation", old, label.getComponentOrientation());
}

代码示例来源:origin: com.haulmont.thirdparty/swingx-core

/**
 * {@inheritDoc}
 */
@Override
public void setComponentOrientation(ComponentOrientation o) {
  ComponentOrientation old = label.getComponentOrientation();
  label.setComponentOrientation(o);
  firePropertyChange("componentOrientation", old, label.getComponentOrientation());
}

代码示例来源:origin: com.github.insubstantial/flamingo

@Override
  public void layoutContainer(Container parent) {
    int layoutGap = getLayoutGap();
    Dimension labelPrefSize = captionLabel.getPreferredSize();
    int labelWidth = labelPrefSize.width;
    int labelHeight = labelPrefSize.height;
    int y = layoutGap;
    if (captionLabel.getComponentOrientation().isLeftToRight()) {
      captionLabel.setBounds(layoutGap, y, labelWidth, labelHeight);
    } else {
      captionLabel.setBounds(parent.getWidth() - layoutGap
          - labelWidth, y, labelWidth, labelHeight);
    }
    y += labelHeight + layoutGap;
    colorSelectorContainer.setBounds(0, y, parent.getWidth(), parent
        .getHeight()
        - y - (colorSelectorPanel.isLastPanel() ? 1 : 0));
  }
}

代码示例来源:origin: stackoverflow.com

Rectangle textR) {
int horizAlignment = component.getHorizontalAlignment();
boolean leftToRight = component.getComponentOrientation()
    .isLeftToRight();

代码示例来源:origin: com.github.insubstantial/flamingo

int labelWidth = groupLabel.getPreferredSize().width;
int labelHeight = getGroupTitleHeight(i);
if (groupLabel.getComponentOrientation().isLeftToRight()) {
  groupLabel.setBounds(left + groupInsets.left, y,
      labelWidth, labelHeight);

代码示例来源:origin: eugener/oxbow

} else {
  ComponentOrientation orientation =
      label.getComponentOrientation();
  if (ComponentOrientation.RIGHT_TO_LEFT.equals(orientation)) {
    if (filterIconPlacement == SwingConstants.LEADING) {

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-profiler

public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected,
                         boolean cellHasFocus) {
    JLabel rendererOrig = (JLabel) super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
    renderer.setComponentOrientation(rendererOrig.getComponentOrientation());
    renderer.setFontEx(rendererOrig.getFont());
    renderer.setOpaque(rendererOrig.isOpaque());
    renderer.setForeground(rendererOrig.getForeground());
    renderer.setBackground(rendererOrig.getBackground());
    renderer.setEnabled(rendererOrig.isEnabled());
    renderer.setBorder(rendererOrig.getBorder());
    if ((value != null) && value instanceof Lookup.Provider) {
      Lookup.Provider p = (Lookup.Provider) value;
      renderer.setText(ProjectUtilities.getDisplayName(p));
      renderer.setIcon(ProjectUtilities.getIcon(p));
      if (ProjectUtilities.getMainProject() == value) {
        renderer.setFontEx(renderer.getFont().deriveFont(Font.BOLD)); // bold for main project
      } else {
        renderer.setFontEx(renderer.getFont().deriveFont(Font.PLAIN));
      }
    } else {
      renderer.setText(rendererOrig.getText());
      renderer.setIcon(emptyIcon);
    }
    return renderer;
  }
}

代码示例来源:origin: org.bidib.org.oxbow/swingbits

} else {
  ComponentOrientation orientation =
      label.getComponentOrientation();
  if (ComponentOrientation.RIGHT_TO_LEFT.equals(orientation)) {
    if (filterIconPlacement == SwingConstants.LEADING) {

相关文章

JLabel类方法