• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java LC类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: preShow

import net.miginfocom.layout.LC; //导入依赖的package包/类
@Override
public void preShow() {
    setTitle(Localizer.get("title.AvailableVariables"));
    panel.setLayout(new MigLayout(new LC().gridGap("8pt", "4pt")));

    JLabel jlName = new JLabel(Localizer.get("label.Name"));
    JLabel jlExample = new JLabel(Localizer.get("label.Example"));
    panel.add(jlName, new CC().pushX().growX());
    panel.add(jlExample, new CC().pushX().growX().wrap());
    panel.add(new SeparatorComponent(10), new CC().pushX().growX().wrap().spanX());

    for (Map.Entry<String, String> entry : ptWrapper.getFakeProperties().entrySet()) {
        JTextField  key = new JTextField (entry.getKey());
        JTextField  value = new JTextField (entry.getValue());
        key.setEditable(false);
        value.setEditable(false);

        panel.add(key, new CC().pushX().growX());
        panel.add(value, new CC().pushX().growX().wrap());
    }

    pack();
}
 
开发者ID:CeH9,项目名称:PackageTemplates,代码行数:24,代码来源:PredefinedVariablesDialog.java


示例2: createOptionsBlock

import net.miginfocom.layout.LC; //导入依赖的package包/类
@NotNull
private JPanel createOptionsBlock() {
    JPanel optionsPanel = new JPanel(new MigLayout(new LC()));

    // Script
    jlScript = new IconLabel(
            Localizer.get("tooltip.ColoredWhenItemHasScript"),
            PluginIcons.SCRIPT,
            PluginIcons.SCRIPT_DISABLED
    );

    updateComponentsState();

    optionsPanel.add(jlScript, new CC().pad(0, 0, 0, 6));
    optionsPanel.add(jlVariable, new CC());
    return optionsPanel;
}
 
开发者ID:CeH9,项目名称:PackageTemplates,代码行数:18,代码来源:GlobalVariableWrapper.java


示例3: preShow

import net.miginfocom.layout.LC; //导入依赖的package包/类
@Override
public void preShow() {
    panel.setLayout(new MigLayout(new LC().gridGap("0", "8pt")));

    actionsPanel = new JPanel(new MigLayout(new LC().fillX().insetsAll("0").gridGap("0", "0")));
    wrappers = new ArrayList<>();

    for (SearchAction searchAction : customPath.getListSearchAction()) {
        createSearchAction(searchAction);
    }

    btnAdd = getAddButton();
    btnRegexpHelper = getRegexpButton();

    panel.add(actionsPanel, new CC().pushX().grow().spanX().wrap());
    panel.add(btnAdd, new CC().spanX().split(2));
    panel.add(btnRegexpHelper, new CC().wrap());
}
 
开发者ID:CeH9,项目名称:PackageTemplates,代码行数:19,代码来源:CustomPathDialog.java


示例4: preShow

import net.miginfocom.layout.LC; //导入依赖的package包/类
@Override
public void preShow() {
    panel.setLayout(new MigLayout(new LC().gridGap("0", "8pt")));

    //Type
    ArrayList<WriteRules> actionTypes = new ArrayList<>();
    if(hasParent){
        actionTypes.add(WriteRules.FROM_PARENT);
    }
    actionTypes.add(WriteRules.USE_EXISTING);
    actionTypes.add(WriteRules.ASK_ME);
    actionTypes.add(WriteRules.OVERWRITE);

    comboBoxRules = new ComboBox(actionTypes.toArray());
    comboBoxRules.setRenderer(new WriteRulesCellRenderer());
    comboBoxRules.setSelectedItem(writeRules);

    panel.add(comboBoxRules, new CC().pushX().growX().spanX().gapY("10","10"));
}
 
开发者ID:CeH9,项目名称:PackageTemplates,代码行数:20,代码来源:WriteRulesDialog.java


示例5: 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


示例6: 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


示例7: DatumHolder

import net.miginfocom.layout.LC; //导入依赖的package包/类
/**
 * Creates the {@code DatumHolder}.
 */
public DatumHolder() {
	super(new BorderLayout());
	setOpaque(false);
	setBackground(INVISIBLE);

	panel = new JPanel(new MigLayout(new LC().flowY()));
	panel.setOpaque(false);
	panel.setBackground(INVISIBLE);
	add(panel, BorderLayout.CENTER);

	JScrollPane scrollPane = new JScrollPane(panel);
	scrollPane
			.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
	scrollPane.setOpaque(false);
	scrollPane.setBackground(INVISIBLE);
	scrollPane.setBorder(BorderFactory.createEmptyBorder());

	scrollPane.getViewport().setOpaque(false);
	scrollPane.setViewportBorder(BorderFactory.createEmptyBorder());
	scrollPane.getViewport().setBackground(INVISIBLE);

	add(scrollPane, BorderLayout.CENTER);
}
 
开发者ID:wchargin,项目名称:kiosk,代码行数:27,代码来源:DatumHolder.java


示例8: CommitteeOutlineView

import net.miginfocom.layout.LC; //导入依赖的package包/类
/**
 * Creates the committee outline view.
 */
public CommitteeOutlineView() {
	super(new MigLayout(new LC().flowY()));
	setBorder(BorderFactory.createLineBorder(Color.BLACK));
	lblCommitteeName.setFont(lblCommitteeName.getFont()
			.deriveFont(Font.BOLD)
			.deriveFont(lblCommitteeName.getFont().getSize() * 1.5f));
	lblUpdated.setFont(lblUpdated.getFont().deriveFont(Font.BOLD)
			.deriveFont(lblUpdated.getFont().getSize() * 0.75f));
	for (JLabel lbl : new JLabel[] { lblCommitteeName, lblTopic,
			lblComments, lblUpdated }) {
		lbl.setText(Character.toString(' ')); // for pack()'s benefit
		add(lbl, new CC().grow().pushX());
		lbl.setIcon(new ImageIcon(new BufferedImage(16, 16,
				BufferedImage.TYPE_INT_ARGB)));
	}
	add(btnRemove, new CC().grow().pushX());
}
 
开发者ID:wchargin,项目名称:kiosk,代码行数:21,代码来源:CommitteeOutlineView.java


示例9: MultiCrisisEditor

import net.miginfocom.layout.LC; //导入依赖的package包/类
public MultiCrisisEditor(Committee committee) {
	super(new BorderLayout());

	final JButton btnAdd = new JButton(Messages.getString("MultiCrisisEditor.AddCrisis")); //$NON-NLS-1$
	add(btnAdd, BorderLayout.NORTH);
	btnAdd.addActionListener(new ActionListener() {
		@Override
		public void actionPerformed(ActionEvent ae) {
			addBlankCrisis();
		}
	});

	pnlControllers = new JPanel(new MigLayout(new LC().flowY()));
	add(new JScrollPane(pnlControllers,
			JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
			JScrollPane.HORIZONTAL_SCROLLBAR_NEVER), BorderLayout.CENTER);

	setCommittee(committee);
}
 
开发者ID:wchargin,项目名称:kiosk,代码行数:20,代码来源:MultiCrisisEditor.java


示例10: CrisisView

import net.miginfocom.layout.LC; //导入依赖的package包/类
public CrisisView() {
	super(new MigLayout(new LC().flowY()));

	add(band, new CC().growY().spanY().wrap());
	add(Box.createHorizontalStrut(5), new CC().growY().spanY().wrap());

	final CC cc = new CC().growX().pushX();

	lblCrisisName = new JLabel();
	add(lblCrisisName, cc);
	lblCrisisName.setFont(lblCrisisName.getFont().deriveFont(Font.BOLD));

	lblGuestSpeaker = new JLabel();
	add(lblGuestSpeaker, cc);

	lblBriefing = new JLabel();
	add(lblBriefing, cc);
}
 
开发者ID:wchargin,项目名称:kiosk,代码行数:19,代码来源:CrisisView.java


示例11: buildView

import net.miginfocom.layout.LC; //导入依赖的package包/类
@Override
public void buildView(Project project, JPanel container) {
    if (panel == null) {
        panel = new JPanel(new MigLayout(new LC().insets("0").gridGapY("2pt").fillX()));
    } else {
        panel.removeAll();
    }

    jlName = new JLabel(AllIcons.Nodes.Package, SwingConstants.LEFT);
    jlName.setDisabledIcon(jlName.getIcon());
    jlName.setText(Localizer.get("Directory"));

    etfName = UIHelper.getEditorTextField(getDirectory().getName(), project);
    addMouseListener();

    container.add(getOptionsPanel(), new CC().spanX().split(3));
    container.add(jlName, new CC().pad(0, 0, 0, UIHelper.PADDING_LABEL));
    container.add(etfName, new CC().growX().pushX().wrap());

    updateComponentsState();

    //Children
    if (!getListElementWrapper().isEmpty()) {
        for (ElementWrapper elementWrapper : getListElementWrapper()) {
            elementWrapper.buildView(project, panel);
        }

        UIHelper.setLeftPadding(panel, UIHelper.PADDING + UIHelper.DEFAULT_PADDING);
        container.add(panel, new CC().spanX().growX().pushX().wrap());
    }
}
 
开发者ID:CeH9,项目名称:PackageTemplates,代码行数:32,代码来源:DirectoryWrapper.java


示例12: getOptionsPanel

import net.miginfocom.layout.LC; //导入依赖的package包/类
@NotNull
private JPanel getOptionsPanel() {
    //  isEnabled
    cbEnabled = new JBCheckBox();
    cbEnabled.setSelected(directory.isEnabled());
    cbEnabled.addItemListener(e -> setEnabled(cbEnabled.isSelected()));
    cbEnabled.setToolTipText(Localizer.get("tooltip.IfCheckedElementWillBeCreated"));

    // Script
    jlScript = new IconLabel(
            Localizer.get("tooltip.ColoredWhenItemHasScript"),
            PluginIcons.SCRIPT,
            PluginIcons.SCRIPT_DISABLED
    );

    // CustomPath
    jlCustomPath = new IconLabel(
            Localizer.get("tooltip.ColoredWhenItemHasCustomPath"),
            PluginIcons.CUSTOM_PATH,
            PluginIcons.CUSTOM_PATH_DISABLED
    );

    // WriteRules
    jlWriteRules = new IconLabelCustom<Directory>(Localizer.get("tooltip.WriteRules"), directory) {
        @Override
        public void onUpdateIcon(Directory item) {
            setIcon(item.getWriteRules().toIcon());
        }
    };

    updateOptionIcons();

    JPanel optionsPanel = new JPanel(new MigLayout(new LC().insets("0").gridGap("2pt","0")));
    optionsPanel.add(cbEnabled, new CC());
    optionsPanel.add(jlScript, new CC());
    optionsPanel.add(jlCustomPath, new CC());
    optionsPanel.add(jlWriteRules, new CC());
    return optionsPanel;
}
 
开发者ID:CeH9,项目名称:PackageTemplates,代码行数:40,代码来源:DirectoryWrapper.java


示例13: getOptionsPanel

import net.miginfocom.layout.LC; //导入依赖的package包/类
@NotNull
private JPanel getOptionsPanel() {
    JPanel optionsPanel = new JPanel(new MigLayout(new LC().insets("0").gridGap("2pt","0")));

    cbEnabled = new JBCheckBox();
    cbEnabled.setSelected(file.isEnabled());
    cbEnabled.addItemListener(e -> setEnabled(cbEnabled.isSelected()));
    cbEnabled.setToolTipText(Localizer.get("tooltip.IfCheckedElementWillBeCreated"));

    // Script
    jlScript = new IconLabel(
            Localizer.get("tooltip.ColoredWhenItemHasScript"),
            PluginIcons.SCRIPT,
            PluginIcons.SCRIPT_DISABLED
    );

    // CustomPath
    jlCustomPath = new IconLabel(
            Localizer.get("tooltip.ColoredWhenItemHasCustomPath"),
            PluginIcons.CUSTOM_PATH,
            PluginIcons.CUSTOM_PATH_DISABLED
    );

    // WriteRules
    jlWriteRules = new IconLabelCustom<File>(Localizer.get("tooltip.WriteRules"), file) {
        @Override
        public void onUpdateIcon(File item) {
            setIcon(item.getWriteRules().toIcon());
        }
    };

    updateOptionIcons();

    optionsPanel.add(cbEnabled, new CC());
    optionsPanel.add(jlScript, new CC());
    optionsPanel.add(jlCustomPath, new CC());
    optionsPanel.add(jlWriteRules, new CC());
    return optionsPanel;
}
 
开发者ID:CeH9,项目名称:PackageTemplates,代码行数:40,代码来源:FileWrapper.java


示例14: preShow

import net.miginfocom.layout.LC; //导入依赖的package包/类
@Override
public void preShow() {
    panel.setLayout(new MigLayout(new LC().fillX()));
    panel.add(new JBLabel(
                    Localizer.get("label.Actions")),
            new CC().spanX().wrap()
    );

    addSeparator();
    createViews();

    pack();
}
 
开发者ID:CeH9,项目名称:PackageTemplates,代码行数:14,代码来源:ReportDialog.java


示例15: buildView

import net.miginfocom.layout.LC; //导入依赖的package包/类
@Override
public void buildView() {
    panel.setLayout(new MigLayout(new LC().insets("0").fillX().gridGapY("1pt")));

    buildLanguageBlock();
    buildAutoImportBlock();
}
 
开发者ID:CeH9,项目名称:PackageTemplates,代码行数:8,代码来源:SettingsDialog.java


示例16: preShow

import net.miginfocom.layout.LC; //导入依赖的package包/类
@Override
public void preShow() {
    setTitle(Localizer.get("title.RegexpHelper"));
    panel.setLayout(new MigLayout(new LC().gridGap("0", "8pt")));

    JLabel jlPattern = new JLabel(Localizer.get("label.RegexpPattern"));

    tfPattern = new EditorTextField(".*My[\\w]+\\.html.*", project, RegExpFileType.INSTANCE);
    tfPattern.setOneLineMode(false);

    JLabel jlText = new JLabel(Localizer.get("label.Text"));
    tfText = new EditorTextField("Bla bla bla\nMyUniqueTextFragment.html\nBla bla bla");
    tfText.setOneLineMode(false);

    JPanel secondPanel = new JPanel(new MigLayout(new LC().insets("0").gridGap("0", "4pt")));
    secondPanel.add(jlText, new CC().wrap());
    secondPanel.add(tfText, new CC().wrap().push().grow());

    JBSplitter splitter = new JBSplitter(true, 0.35f);
    splitter.setFirstComponent(tfPattern);
    splitter.setSecondComponent(secondPanel);
    splitter.setShowDividerControls(true);
    splitter.setHonorComponentsMinimumSize(true);

    btnTry = new JButton(Localizer.get("TryIt"));
    btnTry.addMouseListener(new ClickListener() {
        @Override
        public void mouseClicked(MouseEvent e) {
            doMatch();
        }
    });
    jlResult = new JLabel(Localizer.get("ResultWillBeHere"));

    panel.add(jlPattern, new CC().wrap().spanX());
    panel.add(splitter, new CC().wrap().push().grow().spanX());
    panel.add(btnTry, new CC().spanX().split(2));
    panel.add(jlResult, new CC().wrap().pushX().growX());
}
 
开发者ID:CeH9,项目名称:PackageTemplates,代码行数:39,代码来源:RegexpHelperDialog.java


示例17: 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


示例18: 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


示例19: adjustExpanding

import net.miginfocom.layout.LC; //导入依赖的package包/类
private void adjustExpanding(LC lc, AC ac) {
    Component[] components = container.getComponents();
    for (int i = 0; i < components.length; i++) {
        if (expandedComponent == null
                || expandedComponent == components[i]) {
            ac.fill(i);
        } else {
            ac.size("min!", i);
        }
    }
    lc.fill();
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:13,代码来源:MigBoxLayoutAdapter.java


示例20: 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



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java SwingHelper类代码示例发布时间:2022-05-22
下一篇:
Java StrutsPortletAction类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap