Skip to content

Commit

Permalink
Changed more icons and improved the image loading.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bio7 committed Oct 28, 2016
1 parent 285f68b commit 099bdee
Show file tree
Hide file tree
Showing 90 changed files with 808 additions and 163 deletions.
Binary file added com.eco.bio7.edit/icons/groovy.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added com.eco.bio7.edit/icons/groovy@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added com.eco.bio7.edit/icons/groovy@3x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion com.eco.bio7.edit/plugin.xml
Expand Up @@ -12,7 +12,7 @@
contributorClass="org.eclipse.ui.texteditor.BasicTextEditorActionContributor"
default="true"
extensions="bsh,groovy,js"
icon="icons/groovy.gif"
icon="icons/groovy.png"
id="com.eco.bio7.editors.TemplateEditor"
name="Bio7 Editor">
</editor>
Expand Down
Binary file added com.eco.bio7.floweditor/icons/connection.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added com.eco.bio7.floweditor/icons/connection@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added com.eco.bio7.floweditor/icons/connection@3x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added com.eco.bio7.floweditor/icons/file.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added com.eco.bio7.floweditor/icons/file@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added com.eco.bio7.floweditor/icons/file@3x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added com.eco.bio7.floweditor/icons/file_green.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added com.eco.bio7.floweditor/icons/file_green@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added com.eco.bio7.floweditor/icons/file_green@3x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added com.eco.bio7.floweditor/icons/flow.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added com.eco.bio7.floweditor/icons/flow@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added com.eco.bio7.floweditor/icons/flow@3x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added com.eco.bio7.floweditor/icons/ifelse.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added com.eco.bio7.floweditor/icons/ifelse@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added com.eco.bio7.floweditor/icons/ifelse@3x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added com.eco.bio7.floweditor/icons/info.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added com.eco.bio7.floweditor/icons/info@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added com.eco.bio7.floweditor/icons/info@3x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added com.eco.bio7.floweditor/icons/logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added com.eco.bio7.floweditor/icons/logo@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added com.eco.bio7.floweditor/icons/logo@3x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added com.eco.bio7.floweditor/icons/loop.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added com.eco.bio7.floweditor/icons/loop@2x.png
Binary file added com.eco.bio7.floweditor/icons/loop@3x.png
Binary file added com.eco.bio7.floweditor/icons/start.png
Binary file added com.eco.bio7.floweditor/icons/start@2x.png
Binary file added com.eco.bio7.floweditor/icons/start@3x.png
Binary file added com.eco.bio7.floweditor/icons/state.png
Binary file added com.eco.bio7.floweditor/icons/state@2x.png
Binary file added com.eco.bio7.floweditor/icons/state@3x.png
Binary file added com.eco.bio7.floweditor/icons/stop.png
Binary file added com.eco.bio7.floweditor/icons/stop@2x.png
Binary file added com.eco.bio7.floweditor/icons/stop@3x.png
4 changes: 2 additions & 2 deletions com.eco.bio7.floweditor/plugin.xml
Expand Up @@ -9,7 +9,7 @@
<extension point="org.eclipse.ui.editors">
<editor name="Flow Editor"
extensions="ecoflow"
icon="icons/flowchart.gif"
icon="icons/flow.png"
default="true"
class="com.eco.bio7.floweditor.shapes.ShapesEditor"
contributorClass="com.eco.bio7.floweditor.shapes.FlowContributor"
Expand All @@ -20,7 +20,7 @@
<wizard
category="com.eco.bio7.bio7"
class="com.eco.bio7.floweditor.shapes.ShapesCreationWizard"
icon="icons/flowchart.gif"
icon="icons/flow.png"
id="com.eco.bio7.floweditor.ShapesCreationWizard"
name="Flow"
project="false">
Expand Down
Expand Up @@ -15,6 +15,7 @@
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.Image;
import com.eco.bio7.floweditor.shapes.ShapesPlugin;
import org.eclipse.draw2d.Figure;
import org.eclipse.draw2d.Graphics;
import org.eclipse.draw2d.IFigure;
Expand All @@ -31,7 +32,7 @@ public class FileFigure extends Figure implements MouseListener {

public Color BG = new Color(null, 242, 240, 255);

static Image classImage = new Image(null, FileFigure.class.getResourceAsStream("logo.gif"));
static Image classImage = ShapesPlugin.getImageDescriptor("/icons/file.png").createImage();

static Font BOLD = new Font(null, "", 10, SWT.BOLD);

Expand Down
Expand Up @@ -62,7 +62,7 @@ public StickyNote() {
add(text);
text.setText("A Bio7 flow-file");
Display display = Display.getCurrent();
setBackgroundColor(new Color(display, 126, 199, 55));
setBackgroundColor(new Color(display, 99, 141, 67));
setOpaque(true);
}

Expand Down
Expand Up @@ -13,6 +13,7 @@
package com.eco.bio7.floweditor.model;

import org.eclipse.swt.graphics.Image;
import com.eco.bio7.floweditor.shapes.ShapesPlugin;

/**
* A rectangular shape.
Expand All @@ -21,7 +22,7 @@
*/
public class BeanShellScript extends Shape {
/** A 16x16 pictogram of a rectangular shape. */
private static final Image BEAN_SHELL_ICON = createImage("icons/logo.gif");
private static final Image BEAN_SHELL_ICON = ShapesPlugin.getImageDescriptor("/icons/file_green.png").createImage();

private static final long serialVersionUID = 1;

Expand Down
Expand Up @@ -11,6 +11,7 @@
package com.eco.bio7.floweditor.model;

import org.eclipse.swt.graphics.Image;
import com.eco.bio7.floweditor.shapes.ShapesPlugin;

/**
* An elliptical shape.
Expand All @@ -20,8 +21,7 @@
public class EllipticalShape extends Shape {

/** A 16x16 pictogram of an elliptical shape. */
private static final Image ELLIPSE_ICON = createImage("icons/loop.gif");

private static final Image ELLIPSE_ICON = ShapesPlugin.getImageDescriptor("/icons/loop.png").createImage();
private static final long serialVersionUID = 1;

public Image getIcon() {
Expand Down
Expand Up @@ -13,6 +13,7 @@
package com.eco.bio7.floweditor.model;

import org.eclipse.swt.graphics.Image;
import com.eco.bio7.floweditor.shapes.ShapesPlugin;

/**
* A rectangular shape.
Expand All @@ -21,7 +22,7 @@
*/
public class FlowDecisionShape extends Shape {
/** A 16x16 pictogram of a rectangular shape. */
private static final Image FLOW_ICON = createImage("icons/ifelse.gif");
private static final Image FLOW_ICON = ShapesPlugin.getImageDescriptor("/icons/ifelse.png").createImage();

private static final long serialVersionUID = 1;

Expand Down
Expand Up @@ -12,14 +12,16 @@

import org.eclipse.swt.graphics.Image;

import com.eco.bio7.floweditor.shapes.ShapesPlugin;

/**
* A rectangular shape.
*
* @author Elias Volanakis
*/
public class RectangularShape extends Shape {
/** A 16x16 pictogram of a rectangular shape. */
private static final Image RECTANGLE_ICON = createImage("icons/info.gif");
private static final Image RECTANGLE_ICON = ShapesPlugin.getImageDescriptor("/icons/info.png").createImage();

private static final long serialVersionUID = 1;

Expand Down
Expand Up @@ -12,14 +12,16 @@

import org.eclipse.swt.graphics.Image;

import com.eco.bio7.floweditor.shapes.ShapesPlugin;

/**
* A rectangular shape.
*
* @author Elias Volanakis
*/
public class TriangleEndShape extends Shape {
/** A 16x16 pictogram of a rectangular shape. */
private static final Image TRIANGLE_ICON = createImage("icons/stop.gif");
private static final Image TRIANGLE_ICON = ShapesPlugin.getImageDescriptor("/icons/stop.png").createImage();

private static final long serialVersionUID = 1;

Expand Down
Expand Up @@ -12,14 +12,16 @@

import org.eclipse.swt.graphics.Image;

import com.eco.bio7.floweditor.shapes.ShapesPlugin;

/**
* A rectangular shape.
*
* @author Elias Volanakis
*/
public class TriangleShape extends Shape {
/** A 16x16 pictogram of a rectangular shape. */
private static final Image TRIANGLE_ICON = createImage("icons/start.gif");
private static final Image TRIANGLE_ICON = ShapesPlugin.getImageDescriptor("/icons/start.png").createImage();

private static final long serialVersionUID = 1;

Expand Down
Expand Up @@ -185,12 +185,12 @@ protected IFigure createFigure() {
f.setOpaque(true);
Display display = Display.getCurrent();

f.setBackgroundColor(new Color(display, 126, 199, 55));
f.setBackgroundColor(new Color(display, 99, 141, 67));
StackLayout layout = new StackLayout();

f.setLayoutManager(layout);
f.setSize(10, 10);
label.setBackgroundColor(new Color(display, 126, 199, 55));
label.setBackgroundColor(new Color(display, 99, 141, 67));
label.setOpaque(false);
f.add(label);

Expand All @@ -202,7 +202,7 @@ else if (getModel() instanceof TriangleEndShape) {
f.setOpaque(true);
Display display = Display.getCurrent();

f.setBackgroundColor(new Color(display, 126, 199, 55));
f.setBackgroundColor(new Color(display, 99, 141, 67));

StackLayout layout = new StackLayout();

Expand All @@ -221,7 +221,7 @@ else if (getModel() instanceof TriangleShape) {
f.setOpaque(true);
Display display = Display.getCurrent();

f.setBackgroundColor(new Color(display, 126, 199, 55));
f.setBackgroundColor(new Color(display, 99, 141, 67));
StackLayout layout = new StackLayout();

f.setLayoutManager(layout);
Expand All @@ -236,7 +236,7 @@ else if (getModel() instanceof TriangleShape) {
f.setOpaque(true);
Display display = Display.getCurrent();

f.setBackgroundColor(new Color(display, 126, 199, 55));
f.setBackgroundColor(new Color(display, 99, 141, 67));
StackLayout layout = new StackLayout();

f.setLayoutManager(layout);
Expand All @@ -255,7 +255,7 @@ else if (getModel() instanceof BeanShellScript) {
f.setOpaque(true);
Display display = Display.getCurrent();

f.setBackgroundColor(new Color(display, 126, 199, 55));
f.setBackgroundColor(new Color(display, 99, 141, 67));

f.setLayoutManager(new ToolbarLayout(false));

Expand All @@ -271,7 +271,7 @@ else if (getModel() instanceof RectangularShape) {
f.setOpaque(true);
Display display = Display.getCurrent();

f.setBackgroundColor(new Color(display, 126, 199, 55));
f.setBackgroundColor(new Color(display, 99, 141, 67));

StackLayout layout = new StackLayout();

Expand Down Expand Up @@ -426,7 +426,7 @@ public void propertyChange(PropertyChangeEvent evt) {

public void run() {
IFigure ifigure = getFigure();
ifigure.setBackgroundColor(new Color(null, 126, 199, 55));
ifigure.setBackgroundColor(new Color(null, 99, 141, 67));

ifigure.repaint();
}
Expand Down
Expand Up @@ -36,7 +36,7 @@
* @see #createPalette()
* @author Elias Volanakis
*
* M.Austenfeld - Changes for the Bio7 application.
* M.Austenfeld - Changes for the Bio7 application.
*/
final class ShapesEditorPaletteFactory {

Expand All @@ -52,36 +52,20 @@ private static PaletteContainer createShapesDrawer() {

PaletteDrawer componentsDrawer = new PaletteDrawer("Flowchart");

CombinedTemplateCreationEntry component = new CombinedTemplateCreationEntry(
"Loop", "Create a Loop", EllipticalShape.class,
new SimpleFactory(EllipticalShape.class), ImageDescriptor
.createFromFile(ShapesPlugin.class, "icons/loop.gif"),
ImageDescriptor.createFromFile(ShapesPlugin.class,
"icons/loop.gif"));
CombinedTemplateCreationEntry component = new CombinedTemplateCreationEntry("Loop", "Create a Loop", EllipticalShape.class, new SimpleFactory(EllipticalShape.class),
ShapesPlugin.getImageDescriptor("/icons/loop.png"), ShapesPlugin.getImageDescriptor("/icons/loop@3x.png"));
componentsDrawer.add(component);

component = new CombinedTemplateCreationEntry("Stop", "Create a Stop",
TriangleEndShape.class, new SimpleFactory(
TriangleEndShape.class), ImageDescriptor
.createFromFile(ShapesPlugin.class, "icons/stop.gif"),
ImageDescriptor.createFromFile(ShapesPlugin.class,
"icons/stop.gif"));
component = new CombinedTemplateCreationEntry("Stop", "Create a Stop", TriangleEndShape.class, new SimpleFactory(TriangleEndShape.class),
ShapesPlugin.getImageDescriptor("icons/stop.png"), ShapesPlugin.getImageDescriptor( "icons/stop@3x.png"));
componentsDrawer.add(component);

component = new CombinedTemplateCreationEntry("Start",
"Define a Starting Point", TriangleShape.class,
new SimpleFactory(TriangleShape.class), ImageDescriptor
.createFromFile(ShapesPlugin.class, "icons/start.gif"),
ImageDescriptor.createFromFile(ShapesPlugin.class,
"icons/start.gif"));
component = new CombinedTemplateCreationEntry("Start", "Define a Starting Point", TriangleShape.class, new SimpleFactory(TriangleShape.class),
ShapesPlugin.getImageDescriptor("icons/start.png"), ShapesPlugin.getImageDescriptor("icons/start@3x.png"));
componentsDrawer.add(component);

component = new CombinedTemplateCreationEntry("Decision",
"Create a Decision", FlowDecisionShape.class,
new SimpleFactory(FlowDecisionShape.class),
ImageDescriptor.createFromFile(ShapesPlugin.class,
"icons/ifelse.gif"), ImageDescriptor.createFromFile(
ShapesPlugin.class, "icons/ifelse.gif"));
component = new CombinedTemplateCreationEntry("Decision", "Create a Decision", FlowDecisionShape.class, new SimpleFactory(FlowDecisionShape.class),
ShapesPlugin.getImageDescriptor("/icons/ifelse.png"), ShapesPlugin.getImageDescriptor("/icons/ifelse@3x.png"));
componentsDrawer.add(component);

return componentsDrawer;
Expand All @@ -91,12 +75,8 @@ private static PaletteContainer createShapesDrawer2() {

PaletteDrawer componentsDrawer = new PaletteDrawer("Extra");

CombinedTemplateCreationEntry component = new CombinedTemplateCreationEntry(
"Info", "Create an Information Label", RectangularShape.class,
new SimpleFactory(RectangularShape.class), ImageDescriptor
.createFromFile(ShapesPlugin.class, "icons/info.gif"),
ImageDescriptor.createFromFile(ShapesPlugin.class,
"icons/info.gif"));
CombinedTemplateCreationEntry component = new CombinedTemplateCreationEntry("Info", "Create an Information Label", RectangularShape.class, new SimpleFactory(RectangularShape.class),
ShapesPlugin.getImageDescriptor("/icons/info.png"), ShapesPlugin.getImageDescriptor("/icons/info@3x.png"));
componentsDrawer.add(component);

return componentsDrawer;
Expand Down Expand Up @@ -132,22 +112,17 @@ private static PaletteContainer createToolsGroup(PaletteRoot palette) {
toolGroup.add(new PaletteSeparator());

// Add (solid-line) connection tool
tool = new ConnectionCreationToolEntry("Connection",
"Create a connection - two connections per shape allowed",
new CreationFactory() {
public Object getNewObject() {
return null;
}

// see ShapeEditPart#createEditPolicies()
// this is abused to transmit the desired line style
public Object getObjectType() {
return Connection.SOLID_CONNECTION;
}
}, ImageDescriptor.createFromFile(ShapesPlugin.class,
"icons/connection_s16.gif"), ImageDescriptor
.createFromFile(ShapesPlugin.class,
"icons/connection_s24.gif"));
tool = new ConnectionCreationToolEntry("Connection", "Create a connection - two connections per shape allowed", new CreationFactory() {
public Object getNewObject() {
return null;
}

// see ShapeEditPart#createEditPolicies()
// this is abused to transmit the desired line style
public Object getObjectType() {
return Connection.SOLID_CONNECTION;
}
}, ShapesPlugin.getImageDescriptor("icons/connection.png"), ShapesPlugin.getImageDescriptor("icons/connection@3x.png"));
toolGroup.add(tool);

return toolGroup;
Expand Down
Expand Up @@ -12,6 +12,7 @@

import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.plugin.AbstractUIPlugin;

/**
Expand Down Expand Up @@ -49,5 +50,15 @@ public ShapesPlugin() {
singleton = this;
}
}
/**
* Returns an image descriptor for the image file at the given
* plug-in relative path.
*
* @param path the path
* @return the image descriptor
*/
public static ImageDescriptor getImageDescriptor(String path) {
return AbstractUIPlugin.imageDescriptorFromPlugin("com.eco.bio7.floweditor", path);
}

}
Binary file added com.eco.bio7.pythonedit/icons/python.png
Binary file added com.eco.bio7.pythonedit/icons/python@2x.png
Binary file added com.eco.bio7.pythonedit/icons/python@3x.png
2 changes: 1 addition & 1 deletion com.eco.bio7.pythonedit/plugin.xml
Expand Up @@ -7,7 +7,7 @@
<editor
name="Python Editor"
extensions="py"
icon="icons/jython.gif"
icon="icons/python.png"
contributorClass="org.eclipse.ui.texteditor.BasicTextEditorActionContributor"
class="com.eco.bio7.editors.python.PythonEditor"
id="com.eco.bio7.pythoneditors.PythonEditor">
Expand Down
Binary file added com.eco.bio7/icons/editor/flowdebug.png
Binary file added com.eco.bio7/icons/editor/flowdebug@2x.png
Binary file added com.eco.bio7/icons/editor/flowdebug@3x.png
Binary file modified com.eco.bio7/icons/editor/flowexecute.png
Binary file modified com.eco.bio7/icons/editor/flowexecute@2x.png
Binary file modified com.eco.bio7/icons/editor/flowexecute@3x.png
Binary file added com.eco.bio7/icons/editor/groovy.png
Binary file added com.eco.bio7/icons/editor/groovy@2x.png
Binary file added com.eco.bio7/icons/editor/groovy@3x.png
Binary file added com.eco.bio7/icons/editor/python.png
Binary file added com.eco.bio7/icons/editor/python@2x.png
Binary file added com.eco.bio7/icons/editor/python@3x.png

0 comments on commit 099bdee

Please sign in to comment.