本文整理匯總了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());
}
示例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);
}
示例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));
}
示例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;
}