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


Java MultiLineLabelUI类代码示例

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


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

示例1: createNorthPanel

import com.intellij.openapi.ui.MultiLineLabelUI; //导入依赖的package包/类
protected JComponent createNorthPanel() {
  JLabel label = new JLabel(DebuggerBundle.message("hotswap.dialog.run.prompt"));
  JPanel panel = new JPanel(new BorderLayout());
  panel.add(label, BorderLayout.CENTER);
  Icon icon = UIUtil.getQuestionIcon();
  if (icon != null) {
    label.setIcon(icon);
    label.setIconTextGap(7);
  }
  if (myDisplayHangWarning) {
    final JLabel warningLabel = new JLabel("WARNING! " + DebuggerBundle.message("hotswap.dialog.hang.warning"));
    warningLabel.setUI(new MultiLineLabelUI());
    panel.add(warningLabel, BorderLayout.SOUTH);
  }
  return panel;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:RunHotswapDialog.java

示例2: createNorthPanel

import com.intellij.openapi.ui.MultiLineLabelUI; //导入依赖的package包/类
protected JComponent createNorthPanel() {
  JPanel panel = new JPanel(new BorderLayout(15, 0));
  if (myIcon != null) {
    JLabel iconLabel = new JLabel(myIcon);
    Container container = new Container();
    container.setLayout(new BorderLayout());
    container.add(iconLabel, BorderLayout.NORTH);
    panel.add(container, BorderLayout.WEST);
  }

  if (myMessage != null) {
    JLabel textLabel = new JLabel(myMessage);
    textLabel.setUI(new MultiLineLabelUI());
    panel.add(textLabel, BorderLayout.CENTER);
  }
  return panel;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:OptionsMessageDialog.java

示例3: createNorthPanel

import com.intellij.openapi.ui.MultiLineLabelUI; //导入依赖的package包/类
protected JComponent createNorthPanel() {
  BorderLayoutPanel panel = JBUI.Panels.simplePanel(15, 10);
  if (myIcon != null) {
    JLabel iconLabel = new JLabel(myIcon);
    panel.addToLeft(JBUI.Panels.simplePanel().addToTop(iconLabel));
  }

  BorderLayoutPanel messagePanel = JBUI.Panels.simplePanel();
  if (myMessage != null) {
    JLabel textLabel = new JLabel(myMessage);
    textLabel.setBorder(JBUI.Borders.emptyBottom(5));
    textLabel.setUI(new MultiLineLabelUI());
    messagePanel.addToTop(textLabel);
  }
  panel.add(messagePanel, BorderLayout.CENTER);

  final JScrollPane jScrollPane = ScrollPaneFactory.createScrollPane();
  jScrollPane.setViewportView(myView);
  jScrollPane.setPreferredSize(JBUI.size(300, 80));
  panel.addToBottom(jScrollPane);
  return panel;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:23,代码来源:ChooseModulesDialog.java

示例4: createNorthPanel

import com.intellij.openapi.ui.MultiLineLabelUI; //导入依赖的package包/类
protected JComponent createNorthPanel() {
  JPanel panel = new JPanel(new BorderLayout(15, 10));
  if (myIcon != null) {
    JLabel iconLabel = new JLabel(myIcon);
    Container container = new Container();
    container.setLayout(new BorderLayout());
    container.add(iconLabel, BorderLayout.NORTH);
    panel.add(container, BorderLayout.WEST);
  }

  JPanel messagePanel = new JPanel(new BorderLayout());
  if (myMessage != null) {
    JLabel textLabel = new JLabel(myMessage);
    textLabel.setBorder(BorderFactory.createEmptyBorder(0, 0, 5, 0));
    textLabel.setUI(new MultiLineLabelUI());
    messagePanel.add(textLabel, BorderLayout.NORTH);
  }
  panel.add(messagePanel, BorderLayout.CENTER);

  final JScrollPane jScrollPane = ScrollPaneFactory.createScrollPane();
  jScrollPane.setViewportView(myView);
  jScrollPane.setPreferredSize(new Dimension(300, 80));
  panel.add(jScrollPane, BorderLayout.SOUTH);
  return panel;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:26,代码来源:ChooseModulesDialog.java

示例5: LuaSdkChooserPanel

import com.intellij.openapi.ui.MultiLineLabelUI; //导入依赖的package包/类
public LuaSdkChooserPanel(final Project project) {
    myJdkChooser = new JdkChooserPanel(project);

    setLayout(new GridBagLayout());
    setBorder(BorderFactory.createEtchedBorder());

    final JLabel label = new JLabel(LuaBundle.message("sdk.chooser.luabinaries.prompt"));
    label.setUI(new MultiLineLabelUI());
    add(label, new GridBagConstraints(0, GridBagConstraints.RELATIVE, 2, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST,
            GridBagConstraints.HORIZONTAL, new Insets(8, 10, 8, 10), 0, 0));

    final JLabel jdkLabel = new JLabel(LuaBundle.message("sdk.chooser.select.sdk.prompt"));
    jdkLabel.setFont(UIUtil.getLabelFont().deriveFont(Font.BOLD));
    add(jdkLabel,
            new GridBagConstraints(0, GridBagConstraints.RELATIVE, 2, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST,
                    GridBagConstraints.NONE, new Insets(8, 10, 0, 10), 0, 0));

    add(myJdkChooser,
            new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 1.0, 1.0, GridBagConstraints.NORTHWEST,
                    GridBagConstraints.BOTH, new Insets(2, 10, 10, 5), 0, 0));
    JButton configureButton = new JButton(LuaBundle.message("sdk.chooser.configure.button"));
    add(configureButton,
            new GridBagConstraints(1, GridBagConstraints.RELATIVE, 1, 1, 0.0, 1.0, GridBagConstraints.NORTHWEST,
                    GridBagConstraints.NONE, new Insets(2, 0, 10, 5), 0, 0));

    configureButton.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            myJdkChooser.editJdkTable();
        }
    });

    myJdkChooser.setAllowedJdkTypes(new SdkType[]{LuaSdkType.getInstance()});

    final Sdk selectedJdk = project == null ? null : ProjectRootManager.getInstance(project).getProjectSdk();

    myJdkChooser.fillList(LuaSdkType.getInstance(), null);
    if (selectedJdk != null) {
        myJdkChooser.selectJdk(selectedJdk);
    }
}
 
开发者ID:internetisalie,项目名称:lua-for-idea,代码行数:41,代码来源:LuaSdkChooserPanel.java

示例6: createNorthPanel

import com.intellij.openapi.ui.MultiLineLabelUI; //导入依赖的package包/类
protected JComponent createNorthPanel() {
  JLabel label = new JLabel(myMessage);
  label.setUI(new MultiLineLabelUI());
  JPanel panel = new JPanel(new BorderLayout());
  panel.add(label, BorderLayout.CENTER);
  Icon icon = Messages.getQuestionIcon();
  if (icon != null) {
    label.setIcon(icon);
    label.setIconTextGap(7);
  }
  return panel;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:YesNoPreviewUsagesDialog.java

示例7: getComponent

import com.intellij.openapi.ui.MultiLineLabelUI; //导入依赖的package包/类
public JComponent getComponent() {
  final JLabel label = new JLabel(IdeBundle.message("prompt.please.select.project.jdk"));
  label.setUI(new MultiLineLabelUI());
  final JPanel panel = new JPanel(new GridBagLayout()){
    public Dimension getPreferredSize() {
      return new Dimension(-1, 200);
    }
  };
  panel.add(label, new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 1, 0,GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(0,0,0,0),0,0));
  myJDKsComponent.setBorder(BorderFactory.createEmptyBorder(4, 0, 0, 0));
  panel.add(myJDKsComponent, new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 1, 1.0, GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, new Insets(0,0,0,0), 0, 0));
  return panel;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:ProjectJdkStep.java

示例8: initChunksPanel

import com.intellij.openapi.ui.MultiLineLabelUI; //导入依赖的package包/类
private void initChunksPanel() {
  List<Chunk<Module>> chunks = getCycleChunks();
  if (chunks.isEmpty()) {
    return;
  }
  myChunksPanel.setLayout(new BorderLayout());
  myChunksPanel.setBorder(
    IdeBorderFactory.createTitledBorder(CompilerBundle.message("generate.ant.build.dialog.cyclic.modules.table.title"),
                                        true));
  JLabel textLabel = new JLabel(CompilerBundle.message("generate.ant.build.dialog.cyclic.modules.table.description"));
  textLabel.setUI(new MultiLineLabelUI());
  textLabel.setBorder(IdeBorderFactory.createEmptyBorder(4, 4, 6, 4));
  myChunksPanel.add(textLabel, BorderLayout.NORTH);

  myTableModel = new MyTableModel(chunks);
  myTable = new Table(myTableModel);
  final MyTableCellRenderer cellRenderer = new MyTableCellRenderer();
  final TableColumn nameColumn = myTable.getColumnModel().getColumn(MyTableModel.NAME_COLUMN);
  nameColumn.setCellEditor(ComboBoxTableCellEditor.INSTANCE);
  nameColumn.setCellRenderer(cellRenderer);
  final TableColumn labelColumn = myTable.getColumnModel().getColumn(MyTableModel.NUMBER_COLUMN);
  labelColumn.setCellRenderer(cellRenderer);

  final Dimension preferredSize = new Dimension(myTable.getPreferredSize());
  preferredSize.height = (myTableModel.getRowCount() + 2) * myTable.getRowHeight() + myTable.getTableHeader().getHeight();

  final JScrollPane scrollPane = ScrollPaneFactory.createScrollPane(myTable);
  scrollPane.setPreferredSize(preferredSize);
  myChunksPanel.add(scrollPane, BorderLayout.CENTER);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:31,代码来源:GenerateAntBuildDialog.java

示例9: createComponent

import com.intellij.openapi.ui.MultiLineLabelUI; //导入依赖的package包/类
public JComponent createComponent() {
  final JPanel mainPanel = new JPanel(new BorderLayout());
  // important: do not allow to remove or change macro name for already defined macros befor project is loaded
  myEditor = new PathMacroListEditor(myUndefinedMacroNames);
  final JComponent editorPanel = myEditor.getPanel();

  mainPanel.add(editorPanel, BorderLayout.CENTER);

  final JLabel textLabel = new JLabel(myText);
  textLabel.setUI(new MultiLineLabelUI());
  textLabel.setBorder(IdeBorderFactory.createEmptyBorder(6, 6, 6, 6));
  mainPanel.add(textLabel, BorderLayout.NORTH);

  return mainPanel;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:UndefinedMacrosConfigurable.java

示例10: createNorthPanel

import com.intellij.openapi.ui.MultiLineLabelUI; //导入依赖的package包/类
@Override
protected JComponent createNorthPanel() {
  JLabel label = new JLabel(myMessage);
  label.setUI(new MultiLineLabelUI());

  JPanel panel = new JPanel(new BorderLayout(10, 0));
  if (myIcon != null) {
    panel.add(new JLabel(myIcon), BorderLayout.WEST);
    panel.add(label, BorderLayout.CENTER);
  }
  else {
    panel.add(label, BorderLayout.WEST);
  }
  return panel;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:RefactoringMessageDialog.java

示例11: createCenterPanel

import com.intellij.openapi.ui.MultiLineLabelUI; //导入依赖的package包/类
protected JComponent createCenterPanel() {
  final JPanel panel = new JPanel(new BorderLayout());
  final JLabel label = new JLabel(VcsBundle.message("changes.commit.partial.offer.to.move.text"));
  label.setUI(new MultiLineLabelUI());
  label.setIconTextGap(10);
  label.setIcon(Messages.getQuestionIcon());
  panel.add(label, BorderLayout.CENTER);
  panel.add(Box.createVerticalStrut(10), BorderLayout.SOUTH);
  return panel;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:ChangelistMoveOfferDialog.java

示例12: createPromptLabel

import com.intellij.openapi.ui.MultiLineLabelUI; //导入依赖的package包/类
@Nullable
private JLabel createPromptLabel() {
  if (myPrompt != null) {
    final JLabel label = new JLabel(myPrompt);
    label.setUI(new MultiLineLabelUI());
    label.setBorder(new EmptyBorder(5, 1, 5, 1));
    return label;
  }
  return null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:AbstractSelectFilesDialog.java

示例13: createCenterPanel

import com.intellij.openapi.ui.MultiLineLabelUI; //导入依赖的package包/类
protected JComponent createCenterPanel() {
  final JLabel selectText = new JLabel(VcsBundle.message("dialog.enable.version.control.integration.select.vcs.label.text"));
  selectText.setUI(new MultiLineLabelUI());

  final JPanel mainPanel = new JPanel(new GridBagLayout());
  final GridBagConstraints gb =
    new GridBagConstraints(0, 0, 1, 1, 0, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0);

  mainPanel.add(selectText, gb);

  ++ gb.gridx;
  gb.anchor = GridBagConstraints.NORTHEAST;

  myVcsCombo = new VcsCombo(prepareComboData());
  mainPanel.add(myVcsCombo, gb);

  myVcsCombo.addActionListener(new ActionListener() {
    public void actionPerformed(final ActionEvent e) {
      validateVcs();
    }
  });
  validateVcs();

  final JLabel helpText = new JLabel(VcsBundle.message("dialog.enable.version.control.integration.hint.text"));
  helpText.setUI(new MultiLineLabelUI());
  helpText.setForeground(UIUtil.getInactiveTextColor());

  gb.anchor = GridBagConstraints.NORTHWEST;
  gb.gridx = 0;
  ++ gb.gridy;
  gb.gridwidth = 2;
  mainPanel.add(helpText, gb);

  final JPanel wrapper = new JPanel(new GridBagLayout());
  wrapper.add(mainPanel, new GridBagConstraints(0,0,1,1,1,1,GridBagConstraints.NORTHWEST, GridBagConstraints.NONE,
                                                new Insets(0,0,0,0), 0,0));
  return wrapper;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:39,代码来源:StartUseVcsDialog.java

示例14: createStandardLegendPanel

import com.intellij.openapi.ui.MultiLineLabelUI; //导入依赖的package包/类
protected static JPanel createStandardLegendPanel(final String methodDefinedText,
                                                  final String methodNotDefinedLegallyText,
                                                  final String methodShouldBeDefined) {
  final JPanel panel = new JPanel(new GridBagLayout());

  JLabel label;
  final GridBagConstraints gc =
    new GridBagConstraints(0, 0, 1, 1, 1, 0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(3, 5, 0, 5), 0, 0);

  label = new JLabel(methodDefinedText, AllIcons.Hierarchy.MethodDefined, SwingConstants.LEFT);
  label.setUI(new MultiLineLabelUI());
  label.setIconTextGap(10);
  panel.add(label, gc);

  gc.gridy++;
  label = new JLabel(methodNotDefinedLegallyText, AllIcons.Hierarchy.MethodNotDefined, SwingConstants.LEFT);
  label.setUI(new MultiLineLabelUI());
  label.setIconTextGap(10);
  panel.add(label, gc);

  gc.gridy++;
  label = new JLabel(methodShouldBeDefined, AllIcons.Hierarchy.ShouldDefineMethod, SwingConstants.LEFT);
  label.setUI(new MultiLineLabelUI());
  label.setIconTextGap(10);
  panel.add(label, gc);

  return panel;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:29,代码来源:MethodHierarchyBrowserBase.java

示例15: DefaultValueChooser

import com.intellij.openapi.ui.MultiLineLabelUI; //导入依赖的package包/类
public DefaultValueChooser(Project project, String name, String defaultValue) {
  super(project);
  new RadioUpDownListener(myLeaveBlankRadioButton, myFeelLuckyRadioButton, myUseValueRadioButton);
  final ActionListener actionListener = new ActionListener() {
    @Override
    public void actionPerformed(ActionEvent e) {
      myValueEditor.setEnabled(myUseValueRadioButton.isSelected());
      if (myUseValueRadioButton.isSelected()) {
        myValueEditor.selectAll();
        myValueEditor.requestFocus();
      }
    }
  };
  myLeaveBlankRadioButton.addActionListener(actionListener);
  myFeelLuckyRadioButton.addActionListener(actionListener);
  myUseValueRadioButton.addActionListener(actionListener);
  setTitle("Default value for parameter \"" + name + "\" needed");
  myLeaveBlankRadioButton.setSelected(true);
  myValueEditor.setEnabled(false);
  myFeelLuckyDescription.setText("Variables of the same type would be searched in the method call place.\n" +
                                 "When exactly one variable is found, it would be used.\n" +
                                 "Otherwise parameter place would be left blank.");
  myFeelLuckyDescription.setUI(new MultiLineLabelUI());
  myBlankDescription.setUI(new MultiLineLabelUI());
  myValueEditor.setText(defaultValue);
  init();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:28,代码来源:DefaultValueChooser.java


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