本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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 });
}
示例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 });
}
示例10: getMinimumSize
import com.intellij.util.ui.JBUI; //导入方法依赖的package包/类
@Override
public Dimension getMinimumSize() {
return JBUI.emptySize();
}
示例11: getPreferredSize
import com.intellij.util.ui.JBUI; //导入方法依赖的package包/类
@Override
public Dimension getPreferredSize() {
return JBUI.emptySize();
}
示例12: getMaximumSize
import com.intellij.util.ui.JBUI; //导入方法依赖的package包/类
@Override
public Dimension getMaximumSize() {
return JBUI.emptySize();
}
示例13: minimumLayoutSize
import com.intellij.util.ui.JBUI; //导入方法依赖的package包/类
public Dimension minimumLayoutSize(Container parent) {
return JBUI.emptySize();
}