本文整理汇总了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()));
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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;
}