本文整理汇总了Java中com.intellij.ide.ui.LafManagerListener类的典型用法代码示例。如果您正苦于以下问题:Java LafManagerListener类的具体用法?Java LafManagerListener怎么用?Java LafManagerListener使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LafManagerListener类属于com.intellij.ide.ui包,在下文中一共展示了LafManagerListener类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: SearchEverywhereAction
import com.intellij.ide.ui.LafManagerListener; //导入依赖的package包/类
public SearchEverywhereAction() {
createSearchField();
LafManager.getInstance().addLafManagerListener(new LafManagerListener() {
@Override
public void lookAndFeelChanged(LafManager source) {
createSearchField();
}
});
myRenderer = new MyListRenderer();
myList.setCellRenderer(myRenderer);
//noinspection SSBasedInspection
SwingUtilities.invokeLater(new Runnable() {
public void run() {
onFocusLost(field.getTextEditor());
}
});
}
示例2: Plugin
import com.intellij.ide.ui.LafManagerListener; //导入依赖的package包/类
public Plugin() {
myDelayedRunner = new DelayedRunner();
myLineSelectionManagers = new HashMap<>();
myPasteOverrideEditors = new HashSet<>();
myMultiPasteAction = new MiaMultiplePasteAction();
myActionEventEditorMap = new HashMap<>();
myEditorActionListeners = new HashMap<>();
myHighlightWordListeners = new HashSet<>();
myPasteOverrideComponent = null;
myLafManagerListener = new LafManagerListener() {
UIManager.LookAndFeelInfo lookAndFeel = LafManager.getInstance().getCurrentLookAndFeel();
@Override
public void lookAndFeelChanged(final LafManager source) {
UIManager.LookAndFeelInfo newLookAndFeel = source.getCurrentLookAndFeel();
if (lookAndFeel != newLookAndFeel) {
lookAndFeel = newLookAndFeel;
settingsChanged(mySettings);
}
}
};
MessageBusConnection messageBusConnection = ApplicationManager.getApplication().getMessageBus().connect(this);
messageBusConnection.subscribe(ApplicationSettingsListener.TOPIC, this::settingsChanged);
myDelayedRunner.addRunnable(messageBusConnection::disconnect);
mySettings = ApplicationSettings.getInstance();
settingsChanged(mySettings);
clearHighlightWords();
}
示例3: WebProjectTemplate
import com.intellij.ide.ui.LafManagerListener; //导入依赖的package包/类
public WebProjectTemplate() {
reset();
//peer stays in memory forever. So, adding hard reference is OK here
//todo[Dmitry]: pass some Disposable object here
LafManager.getInstance().addLafManagerListener(new LafManagerListener() {
@Override
public void lookAndFeelChanged(LafManager source) {
reset();
}
});
}
示例4: updateJavaParameters
import com.intellij.ide.ui.LafManagerListener; //导入依赖的package包/类
@Override
public void updateJavaParameters(RunConfigurationBase configuration, JavaParameters params, RunnerSettings runnerSettings) {
if (!isApplicableFor(configuration)) {
return;
}
ApplicationConfiguration appConfiguration = (ApplicationConfiguration) configuration;
SnapShooterConfigurationSettings settings = appConfiguration.getUserData(SnapShooterConfigurationSettings.SNAP_SHOOTER_KEY);
if (settings == null) {
settings = new SnapShooterConfigurationSettings();
appConfiguration.putUserData(SnapShooterConfigurationSettings.SNAP_SHOOTER_KEY, settings);
}
if (appConfiguration.ENABLE_SWING_INSPECTOR) {
settings.setLastPort(NetUtils.tryToFindAvailableSocketPort());
}
if (appConfiguration.ENABLE_SWING_INSPECTOR && settings.getLastPort() != -1) {
params.getProgramParametersList().prepend(appConfiguration.MAIN_CLASS_NAME);
params.getProgramParametersList().prepend(Integer.toString(settings.getLastPort()));
// add +1 because idea_rt.jar will be added as the last entry to the classpath
params.getProgramParametersList().prepend(Integer.toString(params.getClassPath().getPathList().size() + 1));
Set<String> paths = new TreeSet<String>();
paths.add(PathUtil.getJarPathForClass(SnapShooter.class)); // ui-designer-impl
paths.add(PathUtil.getJarPathForClass(BaseComponent.class)); // appcore-api
paths.add(PathUtil.getJarPathForClass(ProjectComponent.class)); // openapi
paths.add(PathUtil.getJarPathForClass(LwComponent.class)); // UIDesignerCore
paths.add(PathUtil.getJarPathForClass(GridConstraints.class)); // forms_rt
paths.add(PathUtil.getJarPathForClass(PaletteGroup.class)); // openapi
paths.add(PathUtil.getJarPathForClass(LafManagerListener.class)); // ui-impl
paths.add(PathUtil.getJarPathForClass(DataProvider.class)); // action-system-openapi
paths.add(PathUtil.getJarPathForClass(XmlStringUtil.class)); // idea
paths.add(PathUtil.getJarPathForClass(Navigatable.class)); // pom
paths.add(PathUtil.getJarPathForClass(AreaInstance.class)); // extensions
paths.add(PathUtil.getJarPathForClass(FormLayout.class)); // jgoodies
paths.addAll(PathManager.getUtilClassPath());
for(String path: paths) {
params.getClassPath().addFirst(path);
}
params.setMainClass("com.intellij.uiDesigner.snapShooter.SnapShooter");
}
}
示例5: addLafManagerListener
import com.intellij.ide.ui.LafManagerListener; //导入依赖的package包/类
public void addLafManagerListener(LafManagerListener l) {
}
示例6: removeLafManagerListener
import com.intellij.ide.ui.LafManagerListener; //导入依赖的package包/类
public void removeLafManagerListener(LafManagerListener l) {
}
示例7: addLafManagerListener
import com.intellij.ide.ui.LafManagerListener; //导入依赖的package包/类
/**
* Adds specified listener
*/
@Override
public void addLafManagerListener(@NotNull final LafManagerListener l) {
myListenerList.add(LafManagerListener.class, l);
}
示例8: removeLafManagerListener
import com.intellij.ide.ui.LafManagerListener; //导入依赖的package包/类
/**
* Removes specified listener
*/
@Override
public void removeLafManagerListener(@NotNull final LafManagerListener l) {
myListenerList.remove(LafManagerListener.class, l);
}
示例9: fireLookAndFeelChanged
import com.intellij.ide.ui.LafManagerListener; //导入依赖的package包/类
private void fireLookAndFeelChanged() {
LafManagerListener[] listeners = myListenerList.getListeners(LafManagerListener.class);
for (LafManagerListener listener : listeners) {
listener.lookAndFeelChanged(this);
}
}
示例10: addLafManagerListener
import com.intellij.ide.ui.LafManagerListener; //导入依赖的package包/类
/**
* Adds specified listener
*/
public void addLafManagerListener(@NotNull final LafManagerListener l) {
myListenerList.add(LafManagerListener.class, l);
}
示例11: removeLafManagerListener
import com.intellij.ide.ui.LafManagerListener; //导入依赖的package包/类
/**
* Removes specified listener
*/
public void removeLafManagerListener(@NotNull final LafManagerListener l) {
myListenerList.remove(LafManagerListener.class, l);
}
示例12: updateJavaParameters
import com.intellij.ide.ui.LafManagerListener; //导入依赖的package包/类
@Override
public void updateJavaParameters(RunConfigurationBase configuration, JavaParameters params, RunnerSettings runnerSettings) {
if (!isApplicableFor(configuration)) {
return;
}
ApplicationConfiguration appConfiguration = (ApplicationConfiguration) configuration;
SnapShooterConfigurationSettings settings = appConfiguration.getUserData(SnapShooterConfigurationSettings.SNAP_SHOOTER_KEY);
if (settings == null) {
settings = new SnapShooterConfigurationSettings();
appConfiguration.putUserData(SnapShooterConfigurationSettings.SNAP_SHOOTER_KEY, settings);
}
if (appConfiguration.ENABLE_SWING_INSPECTOR) {
try {
settings.setLastPort(NetUtils.findAvailableSocketPort());
}
catch(IOException ex) {
settings.setLastPort(-1);
}
}
if (appConfiguration.ENABLE_SWING_INSPECTOR && settings.getLastPort() != -1) {
params.getProgramParametersList().prepend(appConfiguration.MAIN_CLASS_NAME);
params.getProgramParametersList().prepend(Integer.toString(settings.getLastPort()));
// add +1 because idea_rt.jar will be added as the last entry to the classpath
params.getProgramParametersList().prepend(Integer.toString(params.getClassPath().getPathList().size() + 1));
Set<String> paths = new TreeSet<String>();
paths.add(PathUtil.getJarPathForClass(SnapShooter.class)); // ui-designer-impl
paths.add(PathUtil.getJarPathForClass(BaseComponent.class)); // appcore-api
paths.add(PathUtil.getJarPathForClass(ProjectComponent.class)); // openapi
paths.add(PathUtil.getJarPathForClass(LwComponent.class)); // UIDesignerCore
paths.add(PathUtil.getJarPathForClass(GridConstraints.class)); // forms_rt
paths.add(PathUtil.getJarPathForClass(LafManagerListener.class)); // ui-impl
paths.add(PathUtil.getJarPathForClass(DataProvider.class)); // action-system-openapi
paths.add(PathUtil.getJarPathForClass(XmlStringUtil.class)); // idea
paths.add(PathUtil.getJarPathForClass(Navigatable.class)); // pom
paths.add(PathUtil.getJarPathForClass(AreaInstance.class)); // extensions
paths.add(PathUtil.getJarPathForClass(FormLayout.class)); // jgoodies
paths.addAll(PathManager.getUtilClassPath());
for(String path: paths) {
params.getClassPath().addFirst(path);
}
params.setMainClass("com.intellij.uiDesigner.snapShooter.SnapShooter");
}
}
示例13: updateJavaParameters
import com.intellij.ide.ui.LafManagerListener; //导入依赖的package包/类
@Override
public void updateJavaParameters(RunConfigurationBase configuration, OwnJavaParameters params, RunnerSettings runnerSettings) {
if (!isApplicableFor(configuration)) {
return;
}
ApplicationConfiguration appConfiguration = (ApplicationConfiguration) configuration;
SnapShooterConfigurationSettings settings = appConfiguration.getUserData(SnapShooterConfigurationSettings.SNAP_SHOOTER_KEY);
if (settings == null) {
settings = new SnapShooterConfigurationSettings();
appConfiguration.putUserData(SnapShooterConfigurationSettings.SNAP_SHOOTER_KEY, settings);
}
if (appConfiguration.ENABLE_SWING_INSPECTOR) {
try {
settings.setLastPort(NetUtils.findAvailableSocketPort());
}
catch(IOException ex) {
settings.setLastPort(-1);
}
}
if (appConfiguration.ENABLE_SWING_INSPECTOR && settings.getLastPort() != -1) {
params.getProgramParametersList().prepend(appConfiguration.MAIN_CLASS_NAME);
params.getProgramParametersList().prepend(Integer.toString(settings.getLastPort()));
// add +1 because idea_rt.jar will be added as the last entry to the classpath
params.getProgramParametersList().prepend(Integer.toString(params.getClassPath().getPathList().size() + 1));
Set<String> paths = new TreeSet<String>();
paths.add(PathUtil.getJarPathForClass(SnapShooter.class)); // ui-designer-impl
paths.add(PathUtil.getJarPathForClass(BaseComponent.class)); // appcore-api
paths.add(PathUtil.getJarPathForClass(ProjectComponent.class)); // openapi
paths.add(PathUtil.getJarPathForClass(LwComponent.class)); // UIDesignerCore
paths.add(PathUtil.getJarPathForClass(GridConstraints.class)); // forms_rt
paths.add(PathUtil.getJarPathForClass(LafManagerListener.class)); // ui-impl
paths.add(PathUtil.getJarPathForClass(DataProvider.class)); // action-system-openapi
paths.add(PathUtil.getJarPathForClass(XmlStringUtil.class)); // idea
paths.add(PathUtil.getJarPathForClass(Navigatable.class)); // pom
paths.add(PathUtil.getJarPathForClass(AreaInstance.class)); // extensions
paths.add(PathUtil.getJarPathForClass(FormLayout.class)); // jgoodies
paths.addAll(PathManager.getUtilClassPath());
for(String path: paths) {
params.getClassPath().addFirst(path);
}
params.setMainClass("com.intellij.uiDesigner.snapShooter.SnapShooter");
}
}
示例14: addLafManagerListener
import com.intellij.ide.ui.LafManagerListener; //导入依赖的package包/类
@Override
public void addLafManagerListener(LafManagerListener l) {
}
示例15: removeLafManagerListener
import com.intellij.ide.ui.LafManagerListener; //导入依赖的package包/类
@Override
public void removeLafManagerListener(LafManagerListener l) {
}