当前位置: 首页>>代码示例>>Java>>正文


Java JBUI.emptySize方法代码示例

本文整理汇总了Java中com.intellij.util.ui.JBUI.emptySize方法的典型用法代码示例。如果您正苦于以下问题:Java JBUI.emptySize方法的具体用法?Java JBUI.emptySize怎么用?Java JBUI.emptySize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.util.ui.JBUI的用法示例。


在下文中一共展示了JBUI.emptySize方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: preferredLayoutSize

import com.intellij.util.ui.JBUI; //导入方法依赖的package包/类
public Dimension preferredLayoutSize(Container parent) {
  Dimension rd, mbd;
  Insets i = getInsets();

  if (contentPane != null) {
    rd = contentPane.getPreferredSize();
  }
  else {
    rd = parent.getSize();
  }
  if (menuBar != null && menuBar.isVisible() && !myFullScreen) {
    mbd = menuBar.getPreferredSize();
  }
  else {
    mbd = JBUI.emptySize();
  }
  return new Dimension(Math.max(rd.width, mbd.width) + i.left + i.right,
                       rd.height + mbd.height + i.top + i.bottom);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:20,代码来源:IdeRootPane.java

示例2: minimumLayoutSize

import com.intellij.util.ui.JBUI; //导入方法依赖的package包/类
public Dimension minimumLayoutSize(Container parent) {
  Dimension rd, mbd;
  Insets i = getInsets();
  if (contentPane != null) {
    rd = contentPane.getMinimumSize();
  }
  else {
    rd = parent.getSize();
  }
  if (menuBar != null && menuBar.isVisible() && !myFullScreen) {
    mbd = menuBar.getMinimumSize();
  }
  else {
    mbd = JBUI.emptySize();
  }
  return new Dimension(Math.max(rd.width, mbd.width) + i.left + i.right,
                       rd.height + mbd.height + i.top + i.bottom);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:IdeRootPane.java

示例3: maximumLayoutSize

import com.intellij.util.ui.JBUI; //导入方法依赖的package包/类
public Dimension maximumLayoutSize(Container target) {
  Dimension rd, mbd;
  Insets i = getInsets();
  if (menuBar != null && menuBar.isVisible() && !myFullScreen) {
    mbd = menuBar.getMaximumSize();
  }
  else {
    mbd = JBUI.emptySize();
  }
  if (contentPane != null) {
    rd = contentPane.getMaximumSize();
  }
  else {
    rd = new Dimension(Integer.MAX_VALUE,
                       Integer.MAX_VALUE - i.top - i.bottom - mbd.height - 1);
  }
  return new Dimension(Math.min(rd.width, mbd.width) + i.left + i.right,
                       rd.height + mbd.height + i.top + i.bottom);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:20,代码来源:IdeRootPane.java

示例4: minimumLayoutSize

import com.intellij.util.ui.JBUI; //导入方法依赖的package包/类
@Override
public Dimension minimumLayoutSize(Container container) {
  Dimension dimension = JBUI.emptySize();
  for(int i = 0; i < container.getComponentCount(); i++){
    Component component = container.getComponent(i);
    if (!component.isVisible()) continue;
    Dimension dimension1 = component.getMinimumSize();
    dimension.width = Math.max(dimension.width, dimension1.width);
    if (i > 0){
      dimension.height += vGap;
    }
    dimension.height += dimension1.height;
  }
  addInsets(dimension, container);
  return dimension;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:VerticalFlowLayout.java

示例5: preferredLayoutSize

import com.intellij.util.ui.JBUI; //导入方法依赖的package包/类
@Override
public Dimension preferredLayoutSize(Container container) {
  Dimension dimension = JBUI.emptySize();
  for(int i = 0; i < container.getComponentCount(); i++){
    Component component = container.getComponent(i);
    if (!component.isVisible()) continue;
    Dimension dimension1 = component.getPreferredSize();
    dimension.width = Math.max(dimension.width, dimension1.width);
    if (i > 0){
      dimension.height += vGap;
    }
    dimension.height += dimension1.height;
  }
  addInsets(dimension, container);
  return dimension;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:VerticalFlowLayout.java

示例6: getPreferredSize

import com.intellij.util.ui.JBUI; //导入方法依赖的package包/类
@Override
public Dimension getPreferredSize() {
  final ArrayList<Rectangle> bounds = new ArrayList<Rectangle>();
  calculateBounds(new Dimension(Integer.MAX_VALUE, Integer.MAX_VALUE), bounds);
  if (bounds.isEmpty()) return JBUI.emptySize();
  int xLeft = Integer.MAX_VALUE;
  int yTop = Integer.MAX_VALUE;
  int xRight = Integer.MIN_VALUE;
  int yBottom = Integer.MIN_VALUE;
  for (int i = bounds.size() - 1; i >= 0; i--) {
    final Rectangle each = bounds.get(i);
    if (each.x == Integer.MAX_VALUE) continue;
    xLeft = Math.min(xLeft, each.x);
    yTop = Math.min(yTop, each.y);
    xRight = Math.max(xRight, each.x + each.width);
    yBottom = Math.max(yBottom, each.y + each.height);
  }
  final Dimension dimension = new Dimension(xRight - xLeft, yBottom - yTop);

  if (myLayoutPolicy == AUTO_LAYOUT_POLICY && myReservePlaceAutoPopupIcon) {
    if (myOrientation == SwingConstants.HORIZONTAL) {
      dimension.width += AllIcons.Ide.Link.getIconWidth();
    }
    else {
      dimension.height += AllIcons.Ide.Link.getIconHeight();
    }
  }

  JBInsets.addTo(dimension, getInsets());

  return dimension;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:33,代码来源:ActionToolbarImpl.java

示例7: getPreferredSize

import com.intellij.util.ui.JBUI; //导入方法依赖的package包/类
@Override
public Dimension getPreferredSize() {
  final String text = myLabel.getText();
  if (text == null || text.trim().isEmpty()) {
    return JBUI.emptySize();
  }

  final Dimension preferredSize = super.getPreferredSize();
  int maxWidth = JBUI.scale(350);
  if (!myHtml && preferredSize.width > maxWidth) { // do not allow caption to extend parent container
    return new Dimension(maxWidth, preferredSize.height);
  }
  
  return preferredSize;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:TitlePanel.java

示例8: AbstractDimensionProperty

import com.intellij.util.ui.JBUI; //导入方法依赖的package包/类
public AbstractDimensionProperty(@NonNls final String name){
  super(null, name);
  myChildren=new Property[]{
    new IntFieldProperty(this, "width", -1, JBUI.emptySize()),
    new IntFieldProperty(this, "height", -1, JBUI.emptySize()),
  };
  myRenderer = new DimensionRenderer();
  myEditor = new IntRegexEditor<Dimension>(Dimension.class, myRenderer, new int[] { -1, -1 });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:AbstractDimensionProperty.java

示例9: IntroDimensionProperty

import com.intellij.util.ui.JBUI; //导入方法依赖的package包/类
public IntroDimensionProperty(final String name, final Method readMethod, final Method writeMethod, final boolean storeAsClient){
  super(name, readMethod, writeMethod, storeAsClient);
  myChildren = new Property[]{
    new IntFieldProperty(this, "width", -1, JBUI.emptySize()),
    new IntFieldProperty(this, "height", -1, JBUI.emptySize()),
  };
  myRenderer = new DimensionRenderer();
  myEditor = new IntRegexEditor<Dimension>(Dimension.class, myRenderer, new int[] { -1, -1 });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:IntroDimensionProperty.java

示例10: getMinimumSize

import com.intellij.util.ui.JBUI; //导入方法依赖的package包/类
@Override
public Dimension getMinimumSize() {
  return JBUI.emptySize();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:PrintDialog.java

示例11: getPreferredSize

import com.intellij.util.ui.JBUI; //导入方法依赖的package包/类
@Override
public Dimension getPreferredSize() {
  return JBUI.emptySize();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:PrintDialog.java

示例12: getMaximumSize

import com.intellij.util.ui.JBUI; //导入方法依赖的package包/类
@Override
public Dimension getMaximumSize() {
  return JBUI.emptySize();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:LanguageConsoleImpl.java

示例13: minimumLayoutSize

import com.intellij.util.ui.JBUI; //导入方法依赖的package包/类
public Dimension minimumLayoutSize(Container parent) {
  return JBUI.emptySize();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:PaletteContentWindow.java


注:本文中的com.intellij.util.ui.JBUI.emptySize方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。