use of org.eclipse.jface.resource.ImageDescriptor in project cubrid-manager by CUBRID.
the class EditTableAction method init.
protected void init() {
setText(NAME);
setToolTipText(NAME);
setId(ID);
ImageDescriptor icon = CommonUIPlugin.getImageDescriptor("icons/action/table_record_edit.png");
if (icon != null) {
setImageDescriptor(icon);
setEnabled(true);
}
}
use of org.eclipse.jface.resource.ImageDescriptor in project cubrid-manager by CUBRID.
the class ModifyTableNameAction method init.
@Override
protected void init() {
setText(NAME);
setToolTipText(NAME);
setId(ID);
ImageDescriptor icon = CommonUIPlugin.getImageDescriptor("icons/action/table_rename.png");
if (icon != null) {
setImageDescriptor(icon);
setEnabled(false);
}
}
use of org.eclipse.jface.resource.ImageDescriptor in project cubrid-manager by CUBRID.
the class CubridManagerAppPlugin method getImage.
/**
* Returns an image for the image file at the given plug-in relative path.
*
* @param path the path
* @return the image
*/
public static Image getImage(String path) {
Image image = getDefault().getImageRegistry().get(path);
if (image == null || image.isDisposed()) {
ImageDescriptor imageDesc = AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, path);
CubridManagerAppPlugin.getDefault().getImageRegistry().put(path, imageDesc);
return CubridManagerAppPlugin.getDefault().getImageRegistry().get(path);
}
return image;
}
use of org.eclipse.jface.resource.ImageDescriptor in project cubrid-manager by CUBRID.
the class GraphPlanImageSupport method getImage.
public static Image getImage(PlanNode planNode) {
String method = planNode.getMethod();
if (method == null) {
return CommonUIPlugin.getImage("icons/queryplan/default.png");
}
method = method.toLowerCase();
method = method.replaceAll(" ", "_");
method = method.replaceAll("\\-", "_");
method = method.replaceAll("\\(", "");
method = method.replaceAll("\\)", "");
if (method.equals("temp") && StringUtil.isNotEmpty(planNode.getOrder())) {
method = "temp_order";
} else if (method.equals("tempgroup_by")) {
method = "temp_group_by";
} else if (method.equals("temporder_by")) {
method = "temp_order";
}
String imagePath = "icons/queryplan/" + method + ".png";
ImageDescriptor imageDescript = CommonUIPlugin.getImageDescriptor(imagePath);
if (imageDescript == null) {
return CommonUIPlugin.getImage("icons/queryplan/default.png");
}
return CommonUIPlugin.getImage(imagePath);
}
use of org.eclipse.jface.resource.ImageDescriptor in project ow by vtst.
the class OwJsClosurePlugin method createImage.
private Image createImage(String key) {
IPath path = getImageBasePath().append(key);
URL url = FileLocator.find(getBundle(), path, null);
if (url != null) {
ImageDescriptor descriptor = ImageDescriptor.createFromURL(url);
if (descriptor != null)
return descriptor.createImage();
}
return null;
}
Aggregations