@Override protected DataflowActivity getActivity() { return (DataflowActivity) super.getActivity(); }
@Override public DataflowActivity getActivity() { return (DataflowActivity) super.getActivity(); }
public String getBackgroundColour() { // FIXME would prefer instanceof but no class def found error was thrown // even though the pom had the activity in it - spring peoblem? if (getActivity().getClass().getName().equalsIgnoreCase( "net.sf.taverna.t2.activities.localworker.LocalworkerActivity")) { if (checkAnnotations()) { String colour = (String) ColourManager .getInstance() .getProperty( "net.sf.taverna.t2.activities.beanshell.BeanshellActivity"); return colour; } } String colour = (String) ColourManager.getInstance().getProperty(getActivity().getClass().getName()); return colour == null ? "#ffffff" : colour; }
public String getBackgroundColour() { // FIXME would prefer instanceof but no class def found error was thrown // even though the pom had the activity in it - spring peoblem? if (getActivity().getClass().getName().equalsIgnoreCase( "net.sf.taverna.t2.activities.localworker.LocalworkerActivity")) { if (checkAnnotations()) { String colour = (String) ColourManager .getInstance() .getProperty( "net.sf.taverna.t2.activities.beanshell.BeanshellActivity"); return colour; } } String colour = (String) ColourManager.getInstance().getProperty(getActivity().getClass().getName()); return colour == null ? "#ffffff" : colour; }
private boolean checkAnnotations() { for (AnnotationChain chain : getActivity().getAnnotations()) { for (AnnotationAssertion<?> assertion : chain.getAssertions()) { Object detail = assertion.getDetail(); if (detail instanceof HostInstitution) { // this is a user defined localworker so use the beanshell // colour! return true; } } } return false; }
private boolean checkAnnotations() { for (AnnotationChain chain : getActivity().getAnnotations()) { for (AnnotationAssertion<?> assertion : chain.getAssertions()) { Object detail = assertion.getDetail(); if (detail instanceof HostInstitution) { // this is a user defined localworker so use the beanshell // colour! return true; } } } return false; }