當前位置: 首頁>>代碼示例>>Java>>正文


Java JBList.createDefaultListModel方法代碼示例

本文整理匯總了Java中com.intellij.ui.components.JBList.createDefaultListModel方法的典型用法代碼示例。如果您正苦於以下問題:Java JBList.createDefaultListModel方法的具體用法?Java JBList.createDefaultListModel怎麽用?Java JBList.createDefaultListModel使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.intellij.ui.components.JBList的用法示例。


在下文中一共展示了JBList.createDefaultListModel方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: createUIComponents

import com.intellij.ui.components.JBList; //導入方法依賴的package包/類
private void createUIComponents() {
  myOrientationToggle =
    new ASGallery<ScreenOrientation>(JBList.createDefaultListModel(ScreenOrientation.PORTRAIT, ScreenOrientation.LANDSCAPE),
                                     new Function<ScreenOrientation, Image>() {
                                       @Override
                                       public Image apply(ScreenOrientation input) {
                                         return IconUtil.toImage(ORIENTATIONS.get(input).myIcon);
                                       }
                                     }, new Function<ScreenOrientation, String>() {
      @Override
      public String apply(ScreenOrientation input) {
        return ORIENTATIONS.get(input).myName;
      }
    }, new Dimension(50, 50));
  myOrientationToggle.setCellMargin(new Insets(3, 5, 3, 5));
  myOrientationToggle.setBackground(JBColor.background());
  myOrientationToggle.setForeground(JBColor.foreground());
  myScalingComboBox = new ComboBox(new EnumComboBoxModel<AvdScaleFactor>(AvdScaleFactor.class));
  myHardwareSkinHelpLabel = new HyperlinkLabel("How do I create a custom hardware skin?");
  myHardwareSkinHelpLabel.setHyperlinkTarget(AvdWizardConstants.CREATE_SKIN_HELP_LINK);
  mySkinComboBox = new SkinChooser(getProject());
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:23,代碼來源:ConfigureAvdOptionsStep.java

示例2: createUIComponents

import com.intellij.ui.components.JBList; //導入方法依賴的package包/類
private void createUIComponents() {
  myFormFactorGallery = new ASGallery<ModuleTemplate>(JBList.createDefaultListModel(), new Function<ModuleTemplate, Image>() {
    @Override
    public Image apply(ModuleTemplate input) {
      return IconUtil.toImage(input.getIcon());
    }
  }, new Function<ModuleTemplate, String>() {
    @Override
    public String apply(@Nullable ModuleTemplate input) {
      return input == null ? "<none>" : input.getName();
    }
  }, WizardConstants.DEFAULT_GALLERY_THUMBNAIL_SIZE);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:14,代碼來源:ChooseModuleTypeStep.java

示例3: getListModel

import com.intellij.ui.components.JBList; //導入方法依賴的package包/類
private static ListModel getListModel(List<File> files) {
  ArrayList<FileListItem> items = Lists.newArrayListWithExpectedSize(files.size());
  for (File f : files) {
    items.add(new FileListItem(f));
  }
  Collections.sort(items);
  return JBList.createDefaultListModel(ArrayUtil.toObjectArray(items));
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:9,代碼來源:ChooseFromFileListDialog.java

示例4: setUp

import com.intellij.ui.components.JBList; //導入方法依賴的package包/類
@Override
protected void setUp() throws Exception {
  super.setUp();
  ModelObject[] objects = new ModelObject[COLUMNS];
  for (int i = 0; i < COLUMNS; i++) {
    objects[i] = new ModelObject(i + 1);
  }
  ASGallery<ModelObject> asGallery =
    new ASGallery<ModelObject>(JBList.createDefaultListModel(objects), Functions.<Image>constant(null), Functions.toStringFunction(),
                               THUMBNAIL_SIZE);
  asGallery.setBorder(BORDER);
  gallery = asGallery;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:14,代碼來源:ASGalleryTest.java


注:本文中的com.intellij.ui.components.JBList.createDefaultListModel方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。