use of org.intellij.images.ui.ImageComponentDecorator in project intellij-community by JetBrains.
the class ZoomOutAction method update.
public void update(AnActionEvent e) {
super.update(e);
if (ImageEditorActionUtil.setEnabled(e)) {
ImageComponentDecorator decorator = ImageEditorActionUtil.getImageComponentDecorator(e);
ImageZoomModel zoomModel = decorator.getZoomModel();
e.getPresentation().setEnabled(zoomModel.canZoomOut());
}
}
use of org.intellij.images.ui.ImageComponentDecorator in project intellij-community by JetBrains.
the class ToggleFileNameAction method update.
public void update(final AnActionEvent e) {
super.update(e);
ImageComponentDecorator decorator = ImageComponentDecorator.DATA_KEY.getData(e.getDataContext());
e.getPresentation().setEnabled(decorator != null && decorator.isEnabledForActionPlace(e.getPlace()));
e.getPresentation().setText(isSelected(e) ? "Hide File Name" : "Show File Name");
}
use of org.intellij.images.ui.ImageComponentDecorator in project intellij-community by JetBrains.
the class ToggleFileSizeAction method update.
public void update(final AnActionEvent e) {
super.update(e);
ImageComponentDecorator decorator = ImageComponentDecorator.DATA_KEY.getData(e.getDataContext());
e.getPresentation().setEnabled(decorator != null && decorator.isEnabledForActionPlace(e.getPlace()));
e.getPresentation().setText(isSelected(e) ? "Hide File Size" : "Show File Size");
}
use of org.intellij.images.ui.ImageComponentDecorator in project intellij-community by JetBrains.
the class ToggleFileNameAction method setSelected.
public void setSelected(AnActionEvent e, boolean state) {
ImageComponentDecorator decorator = ImageComponentDecorator.DATA_KEY.getData(e.getDataContext());
if (decorator != null && decorator.isEnabledForActionPlace(e.getPlace())) {
decorator.setFileNameVisible(state);
OptionsManager.getInstance().getOptions().getEditorOptions().setFileNameVisible(state);
}
}
use of org.intellij.images.ui.ImageComponentDecorator in project intellij-community by JetBrains.
the class ToggleTransparencyChessboardAction method update.
public void update(final AnActionEvent e) {
super.update(e);
ImageComponentDecorator decorator = ImageComponentDecorator.DATA_KEY.getData(e.getDataContext());
e.getPresentation().setEnabled(decorator != null && decorator.isEnabledForActionPlace(e.getPlace()));
e.getPresentation().setText(isSelected(e) ? "Hide Chessboard" : "Show Chessboard");
}
Aggregations