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