use of org.intellij.images.ui.ImageComponentDecorator in project intellij-community by JetBrains.
the class ActualSizeAction method actionPerformed.
public void actionPerformed(AnActionEvent e) {
ImageComponentDecorator decorator = ImageEditorActionUtil.getImageComponentDecorator(e);
if (decorator != null) {
ImageZoomModel zoomModel = decorator.getZoomModel();
zoomModel.setZoomFactor(1.0d);
}
}
use of org.intellij.images.ui.ImageComponentDecorator in project intellij-community by JetBrains.
the class ZoomInAction 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.canZoomIn());
}
}
use of org.intellij.images.ui.ImageComponentDecorator in project intellij-community by JetBrains.
the class ZoomInAction method actionPerformed.
public void actionPerformed(AnActionEvent e) {
ImageComponentDecorator decorator = ImageEditorActionUtil.getImageComponentDecorator(e);
if (decorator != null) {
ImageZoomModel zoomModel = decorator.getZoomModel();
zoomModel.zoomIn();
}
}
use of org.intellij.images.ui.ImageComponentDecorator in project intellij-community by JetBrains.
the class ZoomOutAction method actionPerformed.
public void actionPerformed(AnActionEvent e) {
ImageComponentDecorator decorator = ImageEditorActionUtil.getImageComponentDecorator(e);
if (decorator != null) {
ImageZoomModel zoomModel = decorator.getZoomModel();
zoomModel.zoomOut();
}
}
use of org.intellij.images.ui.ImageComponentDecorator in project intellij-community by JetBrains.
the class ToggleFileSizeAction 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.setFileSizeVisible(state);
OptionsManager.getInstance().getOptions().getEditorOptions().setFileSizeVisible(state);
}
}
Aggregations