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


Java LC类代码示例

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


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


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