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


Java LC.hideMode方法代码示例

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


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

示例1: DesktopFilter

import net.miginfocom.layout.LC; //导入方法依赖的package包/类
public DesktopFilter() {
    delegate = AppBeans.get(FilterDelegate.class);
    delegate.setFilter(this);
    LC topLc = new LC();
    topLc.hideMode(3);
    topLc.insetsAll("0");
    if (LayoutAdapter.isDebug()) {
        topLc.debug(1000);
    }
    MigLayout topLayout = new MigLayout(topLc);
    impl = new JPanel(topLayout);

    Container layout = delegate.getLayout();
    JComponent unwrap = DesktopComponentsHelper.getComposition(layout);
    impl.add(unwrap, "width 100%");

    setWidth("100%");

    delegate.addExpandedStateChangeListener(e -> fireExpandStateChange(e.isExpanded()));
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:21,代码来源:DesktopFilter.java

示例2: DesktopFieldGroup

import net.miginfocom.layout.LC; //导入方法依赖的package包/类
public DesktopFieldGroup() {
    LC lc = new LC();
    lc.hideMode(3); // Invisible components will not participate in the layout at all and it will for instance not take up a grid cell.
    lc.insets("0 0 0 0");
    if (LayoutAdapter.isDebug()) {
        lc.debug(1000);
    }

    layout = new MigLayout(lc);
    impl = new JPanel(layout);
    assignClassDebugProperty(impl);
    collapsiblePanel = new CollapsiblePanel(super.getComposition());
    assignClassDebugProperty(collapsiblePanel);
    collapsiblePanel.setBorderVisible(false);

    setWidth(Component.AUTO_SIZE);

    fieldFactory = AppBeans.get(FieldGroupFieldFactory.NAME);
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:20,代码来源:DesktopFieldGroup.java

示例3: update

import net.miginfocom.layout.LC; //导入方法依赖的package包/类
@Override
protected void update() {
    LC lc = new LC();
    lc.setWrapAfter(getColumns());
    lc.hideMode(2); // The size of an invisible component will be set to 0, 0 and the gaps will also be set to 0 around it.
    lc.fill();

    lc.setInsets(MigLayoutHelper.makeInsets(margins));

    if (!spacing) {
        lc.gridGap("0", "0");
    }

    if (isDebug())
        lc.debug(1000);

    layout.setLayoutConstraints(lc);

    AC rowConstr = new AC();
    rowConstr.align("top");  // left-top align by default
    layout.setRowConstraints(rowConstr);

    AC colConstr = new AC();
    for (int i = 0; i < colCount; i++) {
        float ratio = columnRatio[i];
        colConstr.grow(ratio, i);
        colConstr.shrink(ratio != 0 ? (float) Math.sqrt(1.0f / ratio) : 100.0f, i);
    }
    layout.setColumnConstraints(colConstr);
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:31,代码来源:MigGridLayoutAdapter.java

示例4: updateLayoutConstraints

import net.miginfocom.layout.LC; //导入方法依赖的package包/类
private void updateLayoutConstraints(boolean resetExpanded) {
    LC lc = new LC();
    lc.hideMode(2); //  Invisible components will not participate in the layout at all and it will for instance not take up a grid cell
    lc.fill(); // always give all space to components, otherwise align doesn't work
    AC rowConstr = new AC();
    AC colConstr = new AC();

    if (direction.equals(FlowDirection.X)) {
        rowConstr.align("top");
        lc.flowX();
        if (expandedComponent != null || resetExpanded) {
            adjustExpanding(lc, colConstr);
        }
    } else {
        lc.flowY();
        if (expandedComponent != null || resetExpanded) {
            adjustExpanding(lc, rowConstr);
        }
    }

    lc.setInsets(MigLayoutHelper.makeInsets(margins));

    if (!spacing) {
        if (direction.equals(FlowDirection.X)) {
            lc.gridGapX("0");
        } else {
            lc.gridGapY("0");
        }
    }

    if (isDebug())
        lc.debug(1000);

    layout.setLayoutConstraints(lc);
    layout.setRowConstraints(rowConstr);
    layout.setColumnConstraints(colConstr);
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:38,代码来源:MigBoxLayoutAdapter.java

示例5: RowsCountComponent

import net.miginfocom.layout.LC; //导入方法依赖的package包/类
public RowsCountComponent() {
    LC lc = new LC();
    lc.hideMode(2);
    lc.insetsAll("2");

    layout = new MigLayout(lc);
    if (LayoutAdapter.isDebug()) {
        lc.debug(1000);
    }
    setLayout(layout);

    firstButton = new JButton("<<");
    add(firstButton);
    firstButton.setPreferredSize(size);
    firstButton.setMinimumSize(size);

    prevButton = new JButton("<");
    add(prevButton);
    prevButton.setPreferredSize(size);
    prevButton.setMinimumSize(size);

    label = new JLabel();
    label.setMinimumSize(size);
    add(label);

    countButton = new JXHyperlink();
    countButton.setText("[?]");
    add(countButton);

    nextButton = new JButton(">");
    add(nextButton);
    nextButton.setPreferredSize(size);
    nextButton.setMinimumSize(size);

    lastButton = new JButton(">>");
    add(lastButton);
    lastButton.setPreferredSize(size);
    lastButton.setMinimumSize(size);
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:40,代码来源:DesktopRowsCount.java

示例6: createAlignTab

import net.miginfocom.layout.LC; //导入方法依赖的package包/类
private Component createAlignTab() {
    JPanel box = new JPanel();
    box.setFocusable(false);
    MigLayout boxLayout = new MigLayout("debug 1000, fill");
    box.setLayout(boxLayout);

    JPanel panel = new JPanel();
    MigLayout layout = new MigLayout("debug 1000, fill");
    panel.setLayout(layout);

    JLabel label = new JLabel("Label");
    CC cc = new CC();
    cc.alignX("right").alignY("50%");

    panel.add(label);

    layout.setComponentConstraints(label, cc);

    LC lc = new LC();
    lc.hideMode(2); // The size of an invisible component will be set to 0, 0 and the gaps will also be set to 0 around it.
    lc.debug(1000);

    AC rowConstr = new AC();
    AC colConstr = new AC();

    lc.fillX();
    lc.flowY();
    lc.gridGapY("0");

    layout.setLayoutConstraints(lc);
    layout.setRowConstraints(rowConstr);
    layout.setColumnConstraints(colConstr);

    box.add(panel, "height 100px, width 100px");
    layout.setComponentConstraints(label, cc);
    return box;
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:38,代码来源:VclTestApp.java


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