本文整理汇总了Java中com.intellij.util.ui.StatusText类的典型用法代码示例。如果您正苦于以下问题:Java StatusText类的具体用法?Java StatusText怎么用?Java StatusText使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
StatusText类属于com.intellij.util.ui包,在下文中一共展示了StatusText类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: propertyChange
import com.intellij.util.ui.StatusText; //导入依赖的package包/类
@Override
public void propertyChange(@NotNull PropertyChangeEvent evt) {
if (project.isDisposed()) {
myPopup.cancel();
return;
}
((NameFilteringListModel)files.getModel()).refilter();
((NameFilteringListModel)toolWindows.getModel()).refilter();
if (files.getModel().getSize() + toolWindows.getModel().getSize() == 0) {
toolWindows.getEmptyText().setText("");
files.getEmptyText().setText("Press 'Enter' to search in Project");
}
else {
files.getEmptyText().setText(StatusText.DEFAULT_EMPTY_TEXT);
toolWindows.getEmptyText().setText(StatusText.DEFAULT_EMPTY_TEXT);
}
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:Switcher.java
示例2: setChangeLists
import com.intellij.util.ui.StatusText; //导入依赖的package包/类
public void setChangeLists(final List<CommittedChangeList> receivedChanges) {
final boolean hasEmptyCaches = CommittedChangesCache.getInstance(myProject).hasEmptyCaches();
ApplicationManager.getApplication().invokeLater(new Runnable() {
public void run() {
if (myLoadingChangeListsLabel != null) {
remove(myLoadingChangeListsLabel);
myLoadingChangeListsLabel = null;
}
myCommittedChangeLists = receivedChanges;
myTreeBrowser.setItems(myCommittedChangeLists, CommittedChangesBrowserUseCase.UPDATE);
if (hasEmptyCaches) {
final StatusText statusText = myTreeBrowser.getEmptyText();
statusText.clear();
statusText.appendText("Click ")
.appendText("Refresh", SimpleTextAttributes.LINK_ATTRIBUTES, new ActionListener() {
public void actionPerformed(final ActionEvent e) {
RefreshIncomingChangesAction.doRefresh(myProject);
}
})
.appendText(" to initialize repository changes cache");
}
}
}, myProject.getDisposed());
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:26,代码来源:UpdateInfoTree.java
示例3: populateUi
import com.intellij.util.ui.StatusText; //导入依赖的package包/类
public void populateUi(@NotNull AtomReader atomReader) {
ApplicationManager.getApplication().assertIsDispatchThread();
assert (myAtomTreeRoot != null);
myAtomTreeRenderer.init(myEnumInfoCache, atomReader);
myTree.setModel(new DefaultTreeModel(myAtomTreeRoot));
myTree.setLargeModel(true); // Set some performance optimizations for large models.
myTree.setRowHeight(TreeUtil.TREE_ROW_HEIGHT); // Make sure our rows are constant height.
myTree.setCellRenderer(myAtomTreeRenderer);
if (myAtomTreeRoot.getChildCount() == 0) {
myTree.getEmptyText().setText(StatusText.DEFAULT_EMPTY_TEXT);
}
myLoadingPanel.stopLoading();
myLoadingPanel.revalidate();
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:AtomController.java
示例4: initTree_
import com.intellij.util.ui.StatusText; //导入依赖的package包/类
private void initTree_() {
myEmptyText = new StatusText(this) {
@Override
protected boolean isStatusVisible() {
return Tree.this.isEmpty();
}
};
myExpandableItemsHandler = ExpandableItemsHandlerFactory.install(this);
addMouseListener(new MyMouseListener());
if (Patches.SUN_BUG_ID_4893787) {
addFocusListener(new MyFocusListener());
}
setCellRenderer(new NodeRenderer());
setSelectionModel(mySelectionModel);
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:20,代码来源:Tree.java
示例5: propertyChange
import com.intellij.util.ui.StatusText; //导入依赖的package包/类
@Override
public void propertyChange(PropertyChangeEvent evt) {
final MyList list = getSelectedList();
final Object value = list.getSelectedValue();
((NameFilteringListModel)files.getModel()).refilter();
((NameFilteringListModel)toolWindows.getModel()).refilter();
if (files.getModel().getSize() + toolWindows.getModel().getSize() == 0) {
toolWindows.getEmptyText().setText("");
files.getEmptyText().setText("Press 'Enter' to search in Project");
} else {
files.getEmptyText().setText(StatusText.DEFAULT_EMPTY_TEXT);
toolWindows.getEmptyText().setText(StatusText.DEFAULT_EMPTY_TEXT);
}
files.repaint();
toolWindows.repaint();
getSelectedList(list).setSelectedValue(value, true);
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:18,代码来源:Switcher.java
示例6: load
import com.intellij.util.ui.StatusText; //导入依赖的package包/类
private void load(final boolean first, final String filter) {
final StatusText emptyText = table.getEmptyText();
final String originalValue = emptyText.getText();
emptyText.setText("Loading...");
okButton.setEnabled(false);
ApplicationManager.getApplication().executeOnPooledThread(new Runnable() {
@Override
public void run() {
model.load(filter);
UIUtil.invokeLaterIfNeeded(new Runnable() {
@Override
public void run() {
if (model.hasMore() && first) {
// truncated: if query changes execute fetch data again
header.addHeaderObserver(MultipleItemsDialog.this);
header.setInstantFiltering(false);
header.setFilterOnUpdates(false);
}
emptyText.setText(originalValue);
updateSelectionFromModel();
updateOk();
}
});
}
});
}
开发者ID:janotav,项目名称:ali-idea-plugin,代码行数:27,代码来源:MultipleItemsDialog.java
示例7: propertyChange
import com.intellij.util.ui.StatusText; //导入依赖的package包/类
@Override
public void propertyChange(@Nonnull PropertyChangeEvent evt) {
if (project.isDisposed()) {
myPopup.cancel();
return;
}
((NameFilteringListModel)files.getModel()).refilter();
((NameFilteringListModel)toolWindows.getModel()).refilter();
if (files.getModel().getSize() + toolWindows.getModel().getSize() == 0) {
toolWindows.getEmptyText().setText("");
files.getEmptyText().setText("Press 'Enter' to search in Project");
}
else {
files.getEmptyText().setText(StatusText.DEFAULT_EMPTY_TEXT);
toolWindows.getEmptyText().setText(StatusText.DEFAULT_EMPTY_TEXT);
}
}
开发者ID:consulo,项目名称:consulo,代码行数:18,代码来源:Switcher.java
示例8: setChangeLists
import com.intellij.util.ui.StatusText; //导入依赖的package包/类
public void setChangeLists(final List<CommittedChangeList> receivedChanges) {
final boolean hasEmptyCaches = CommittedChangesCache.getInstance(myProject).hasEmptyCaches();
ApplicationManager.getApplication().invokeLater(() -> {
if (myLoadingChangeListsLabel != null) {
remove(myLoadingChangeListsLabel);
myLoadingChangeListsLabel = null;
}
myCommittedChangeLists = receivedChanges;
myTreeBrowser.setItems(myCommittedChangeLists, CommittedChangesBrowserUseCase.UPDATE);
if (hasEmptyCaches) {
final StatusText statusText = myTreeBrowser.getEmptyText();
statusText.clear();
statusText.appendText("Click ").appendText("Refresh", SimpleTextAttributes.LINK_ATTRIBUTES, new ActionListener() {
public void actionPerformed(final ActionEvent e) {
RefreshIncomingChangesAction.doRefresh(myProject);
}
}).appendText(" to initialize repository changes cache");
}
}, myProject.getDisposed());
}
开发者ID:consulo,项目名称:consulo,代码行数:22,代码来源:UpdateInfoTree.java
示例9: InstalledPluginsManagerMain
import com.intellij.util.ui.StatusText; //导入依赖的package包/类
public InstalledPluginsManagerMain(PluginManagerUISettings uiSettings) {
super(uiSettings);
init();
myActionsPanel.setLayout(new FlowLayout(FlowLayout.LEFT));
JButton installJB = new JButton("Install JetBrains plugin...");
installJB.setMnemonic('j');
installJB.addActionListener(new BrowseRepoListener(JETBRAINS_VENDOR));
myActionsPanel.add(installJB);
JButton browse = new JButton("Browse repositories...");
browse.setMnemonic('b');
browse.addActionListener(new BrowseRepoListener(null));
myActionsPanel.add(browse);
JButton installFromDisk = new JButton("Install plugin from disk...");
installFromDisk.setMnemonic('d');
installFromDisk.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
final InstalledPluginsTableModel model = (InstalledPluginsTableModel)pluginsModel;
chooseAndInstall(model, new Consumer<Pair<File, IdeaPluginDescriptor>>() {
@Override
public void consume(Pair<File, IdeaPluginDescriptor> pair) {
model.appendOrUpdateDescriptor(pair.second);
setRequireShutdown(true);
select(pair.second);
}
}, myActionsPanel);
}
});
myActionsPanel.add(installFromDisk);
StatusText emptyText = pluginTable.getEmptyText();
emptyText.setText("Nothing to show.");
emptyText.appendText(" Click ");
emptyText.appendText("Browse", SimpleTextAttributes.LINK_ATTRIBUTES, new BrowseRepoListener(null));
emptyText.appendText(" to search for non-bundled plugins.");
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:41,代码来源:InstalledPluginsManagerMain.java
示例10: onUpdateFinished
import com.intellij.util.ui.StatusText; //导入依赖的package包/类
private void onUpdateFinished() {
myPackagesTable.setPaintBusy(false);
myPackagesTable.getEmptyText().setText(StatusText.DEFAULT_EMPTY_TEXT);
updateUninstallUpgrade();
// Action button presentations won't be updated if no events occur (e.g. mouse isn't moving, keys aren't being pressed).
// In that case emulating activity will help:
ActivityTracker.getInstance().inc();
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:InstalledPackagesPanel.java
示例11: populateUi
import com.intellij.util.ui.StatusText; //导入依赖的package包/类
public void populateUi(@NotNull Client client) {
ApplicationManager.getApplication().assertIsDispatchThread();
assert (myFrameData != null);
assert (myEditor.getContext() != null);
assert (myEditor.getCaptureId() != null);
if (myEditor.getDeviceId() == null) {
// If there is no device selected, don't do anything.
return;
}
DefaultListModel model = new DefaultListModel();
model.ensureCapacity(myFrameData.size());
for (ScrubberLabelData data : myFrameData) {
model.addElement(data);
}
setModel(model);
if (myFrameData.size() == 0) {
myList.getEmptyText().setText(StatusText.DEFAULT_EMPTY_TEXT);
}
ImageFetcher imageFetcher = new ImageFetcher(client);
imageFetcher.prepareFetch(myEditor.getDeviceId(), myEditor.getCaptureId(), myEditor.getContext());
myScrubberCellRenderer.setup(imageFetcher);
myList.setCellRenderer(myScrubberCellRenderer);
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:28,代码来源:ScrubberController.java
示例12: getEmptyText
import com.intellij.util.ui.StatusText; //导入依赖的package包/类
@NotNull
@Override
public StatusText getEmptyText() {
return new StatusText() {
@Override
protected boolean isStatusVisible() {
return true;
}
};
}
开发者ID:Microsoft,项目名称:vso-intellij,代码行数:11,代码来源:WorkspaceMappingsTableEditor.java
示例13: init
import com.intellij.util.ui.StatusText; //导入依赖的package包/类
private void init() {
myEmptyText = new StatusText(this) {
@Override
protected boolean isStatusVisible() {
return JBTextField.this.getText().isEmpty();
}
@Override
protected Rectangle getTextComponentBound() {
Rectangle bounds = super.getTextComponentBound();
return new Rectangle(JBTextField.this.getInsets().left, bounds.y, bounds.width, bounds.height);
}
};
myEmptyText.clear();
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:16,代码来源:JBTextField.java
示例14: init
import com.intellij.util.ui.StatusText; //导入依赖的package包/类
private void init() {
setSelectionBackground(UIUtil.getListSelectionBackground());
setSelectionForeground(UIUtil.getListSelectionForeground());
myEmptyText = new StatusText(this) {
@Override
protected boolean isStatusVisible() {
return JBList.this.isEmpty();
}
};
myExpandableItemsHandler = ExpandableItemsHandlerFactory.install(this);
setCellRenderer(new DefaultListCellRenderer());
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:15,代码来源:JBList.java
示例15: reloadModel
import com.intellij.util.ui.StatusText; //导入依赖的package包/类
public void reloadModel(final boolean userForcedRefresh) {
myUpdating.set(true);
myTable.getEmptyText().setText(StatusText.DEFAULT_EMPTY_TEXT);
final JBLoadingPanel loadingPanel = getLoadingPanel();
loadingPanel.startLoading();
ApplicationManager.getApplication().executeOnPooledThread(new Runnable() {
public void run() {
try {
myUpdater = new Updater(loadingPanel, 100);
myUpdater.start();
myTree = new DTree(null, "", true);
mySrc.refresh(userForcedRefresh);
myTrg.refresh(userForcedRefresh);
scan(mySrc, myTree, true);
scan(myTrg, myTree, false);
}
catch (final IOException e) {
LOG.warn(e);
reportException(VcsBundle.message("refresh.failed.message", StringUtil.decapitalize(e.getLocalizedMessage())));
}
finally {
if (myTree != null) {
myTree.setSource(mySrc);
myTree.setTarget(myTrg);
myTree.update(mySettings);
applySettings();
}
}
}
});
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:32,代码来源:DirDiffTableModel.java
示例16: reloadModel
import com.intellij.util.ui.StatusText; //导入依赖的package包/类
public void reloadModel(final boolean userForcedRefresh) {
myUpdating.set(true);
myTable.getEmptyText().setText(StatusText.DEFAULT_EMPTY_TEXT);
final JBLoadingPanel loadingPanel = getLoadingPanel();
loadingPanel.startLoading();
final ModalityState modalityState = ModalityState.current();
ApplicationManager.getApplication().executeOnPooledThread(() -> {
EmptyProgressIndicator indicator = new EmptyProgressIndicator(modalityState);
ProgressManager.getInstance().executeProcessUnderProgress(() -> {
try {
if (myDisposed) return;
myUpdater = new Updater(loadingPanel, 100);
myUpdater.start();
text.set("Loading...");
myTree = new DTree(null, "", true);
mySrc.refresh(userForcedRefresh);
myTrg.refresh(userForcedRefresh);
scan(mySrc, myTree, true);
scan(myTrg, myTree, false);
}
catch (final IOException e) {
LOG.warn(e);
reportException(VcsBundle.message("refresh.failed.message", StringUtil.decapitalize(e.getLocalizedMessage())));
}
finally {
if (myTree != null) {
myTree.setSource(mySrc);
myTree.setTarget(myTrg);
myTree.update(mySettings);
applySettings();
}
}
}, indicator);
});
}
开发者ID:consulo,项目名称:consulo,代码行数:38,代码来源:DirDiffTableModel.java
示例17: adjustEmptyText
import com.intellij.util.ui.StatusText; //导入依赖的package包/类
private void adjustEmptyText() {
VirtualFile virtualFile = myFilePath.getVirtualFile();
if ((virtualFile == null || !virtualFile.isValid()) && !myFilePath.getIOFile().exists()) {
setEmptyText("File " + myFilePath.getName() + " not found");
}
else if (myInRefresh) {
setEmptyText(CommonBundle.getLoadingTreeNodeText());
}
else {
setEmptyText(StatusText.DEFAULT_EMPTY_TEXT);
}
}
开发者ID:consulo,项目名称:consulo,代码行数:13,代码来源:FileHistoryPanelImpl.java
示例18: DetailsPanel
import com.intellij.util.ui.StatusText; //导入依赖的package包/类
public DetailsPanel(@Nonnull Project project) {
myProject = project;
myStatusText = new StatusText() {
@Override
protected boolean isStatusVisible() {
return StringUtil.isEmpty(myText);
}
};
myStatusText.setText("Commit message");
myStatusText.attachTo(this);
setPreferredSize(new Dimension(150, 100));
}
开发者ID:consulo,项目名称:consulo,代码行数:14,代码来源:DetailsPanel.java
示例19: getEmptyText
import com.intellij.util.ui.StatusText; //导入依赖的package包/类
@NotNull
@Override
public StatusText getEmptyText() {
return myTable.getEmptyText();
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:ClassFilterEditor.java
示例20: getEmptyText
import com.intellij.util.ui.StatusText; //导入依赖的package包/类
public StatusText getEmptyText() {
return getEditorComponent().getEmptyText();
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:JreComboboxEditor.java
注:本文中的com.intellij.util.ui.StatusText类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论