本文整理汇总了Java中com.intellij.ui.SortedListModel类的典型用法代码示例。如果您正苦于以下问题:Java SortedListModel类的具体用法?Java SortedListModel怎么用?Java SortedListModel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SortedListModel类属于com.intellij.ui包,在下文中一共展示了SortedListModel类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: CreateGradleLibraryFromFilesDialog
import com.intellij.ui.SortedListModel; //导入依赖的package包/类
public CreateGradleLibraryFromFilesDialog(@NotNull Project project, @NotNull List<OrderRoot> roots) {
super(project, true);
setTitle(COMMAND_TITLE);
myProject = project;
myRoots = roots;
mySettingsFile = GradleSettingsFile.get(myProject);
final FormBuilder builder = LibraryNameAndLevelPanel.createFormBuilder();
myModulesComboBox = new ModulesComboBox();
myModulesComboBox.fillModules(myProject);
myModulesComboBox.setSelectedModule(findModule(roots));
for (Iterator iter = ((SortedListModel)myModulesComboBox.getModel()).iterator(); iter.hasNext(); ) {
Module module = (Module)iter.next();
String path = GradleSettingsFile.getModuleGradlePath(module);
if (path == null || !mySettingsFile.hasBuildFile(path)) {
iter.remove();
}
}
builder.addLabeledComponent("&Add to module:", myModulesComboBox);
myPanel = builder.getPanel();
init();
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:23,代码来源:CreateLibraryFromFilesAction.java
示例2: GroupList
import com.intellij.ui.SortedListModel; //导入依赖的package包/类
public GroupList(PsiClass[] classes)
{
super(new BorderLayout());
SortedListModel<String> model = new SortedListModel<String>(new Comparator<String>()
{
public int compare(String s1, String s2) {
return s1.compareTo(s2);
}
});
list = new JBList(model);
Set<String> groups = TestNGUtil.getAnnotationValues("groups", classes);
String[] array = ArrayUtil.toStringArray(groups);
Arrays.sort(array);
model.addAll(array);
add(ScrollPaneFactory.createScrollPane(list));
list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
ScrollingUtil.ensureSelectionExists(list);
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:GroupList.java
示例3: SearchSupport
import com.intellij.ui.SortedListModel; //导入依赖的package包/类
public SearchSupport(EditorTextField textField) {
myTextField = textField;
myTextField.getDocument().addDocumentListener(new DocumentAdapter() {
@Override
public void documentChanged(DocumentEvent event) {
onTextChanged();
}
});
//noinspection SSBasedInspection
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
myTextField.addKeyListener(new KeyAdapter() {
public void keyPressed(final KeyEvent e) {
processListSelection(e);
}
});
}
});
myList.setVisibleRowCount(10);
myListModel = new SortedListModel<T>(null);
myList.setModel(myListModel);
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:27,代码来源:SearchSupport.java
示例4: GroupList
import com.intellij.ui.SortedListModel; //导入依赖的package包/类
public GroupList(PsiClass[] classes)
{
super(new BorderLayout());
SortedListModel<String> model = new SortedListModel<String>(new Comparator<String>()
{
public int compare(String s1, String s2) {
return s1.compareTo(s2);
}
});
list = new JBList(model);
Set<String> groups = TestNGUtil.getAnnotationValues("groups", classes);
String[] array = ArrayUtil.toStringArray(groups);
Arrays.sort(array);
model.addAll(array);
add(ScrollPaneFactory.createScrollPane(list));
list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
ListScrollingUtil.ensureSelectionExists(list);
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:19,代码来源:GroupList.java
示例5: run
import com.intellij.ui.SortedListModel; //导入依赖的package包/类
public void run(SortedListModel<MMUserStatus> listModel, String username, String password, String url) throws IOException, URISyntaxException, CertificateException, InterruptedException, UnrecoverableKeyException, NoSuchAlgorithmException, KeyStoreException, KeyManagementException {
MM_URL = url;
login(username, password);
users();
teams();
userStatus();
ws = websocket(listModel);
java.util.Timer timer = new Timer();
timer.schedule(new TimerTask() {
@Override
public void run() {
try {
if (ws == null || ws.isClosed()) {
Notifications.Bus.notify(new Notification("team", "mattermost websocket", "websocket reconnecting...", NotificationType.INFORMATION));
ws = websocket(listModel);
}
ws.send("{\"action\":\"get_statuses\",\"seq\":" + (++seq) + "}");
statusSeq = seq;
} catch (Throwable t) {
t.printStackTrace();
Notifications.Bus.notify(new Notification("team", "mattermost Error", t.getMessage(), NotificationType.ERROR));
}
}
}, 5000, 60000);
this.listModel = listModel;
fillListModel();
}
开发者ID:stefandotti,项目名称:intellij-mattermost-plugin,代码行数:28,代码来源:MattermostClient.java
示例6: SortedListBinding
import com.intellij.ui.SortedListModel; //导入依赖的package包/类
public SortedListBinding(JList list, ListProperty<T> property, Comparator<T> comparator) {
super(property, list);
list.setModel(new SortedListModel<T>(comparator));
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:UIPropertyBinding.java
示例7: getModel
import com.intellij.ui.SortedListModel; //导入依赖的package包/类
private SortedListModel<T> getModel() {
return ((SortedListModel<T>)getList().getModel());
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:UIPropertyBinding.java
注:本文中的com.intellij.ui.SortedListModel类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论