protected String getStyle() { String style = "<style type='text/css'>"; style += "table {align:center; border:solid black 1px; background-color:" + getBackgroundColour() + ";width:100%; height:100%; overflow:auto;}"; style += "</style>"; return style; }
@Override protected DataflowActivity getActivity() { return (DataflowActivity) super.getActivity(); }
/** * Constructs an instance of the view, and initialises the view itself. * <p> * The constructor parameter for the implementation of this class should define the specific Activity type itself. * </p> * @param activity */ public ActivityContextualView(Activity<?> activity) { super(); this.activity = activity; initView(); }
public void actionPerformed(ActionEvent e) { ActivityConfigurationDialog currentDialog = ActivityConfigurationAction.getDialog(getActivity()); if (currentDialog != null) { currentDialog.toFront(); return; } final StringConstantConfigView stringConstantConfigView = new StringConstantConfigView((StringConstantActivity)getActivity()); final ActivityConfigurationDialog<StringConstantActivity, StringConstantConfigurationBean> dialog = new ActivityConfigurationDialog<StringConstantActivity, StringConstantConfigurationBean>(getActivity(), stringConstantConfigView); ActivityConfigurationAction.setDialog(getActivity(), dialog); }
private String buildHtml() { String html = "<html><head>" + getStyle() + "</head><body>"; html += buildTableOpeningTag(); html += "<tr><td colspan=2>" + getViewTitle() + "</td></tr>"; html += getRawTableRowsHtml() + "</table>"; html += "</body></html>"; return html; }
private String buildHtml() { String html = HtmlUtils.getHtmlHead(getBackgroundColour()); html += HtmlUtils.buildTableOpeningTag(); html += "<tr><th colspan=\"2\">" + getViewTitle() + "</th></tr>"; html += getRawTableRowsHtml() + "</table>"; html += "</body></html>"; return html; }
@Override protected JComponent getMainFrame() { return panelForHtml(buildHtml()); }
/** * Update the html view with the latest information in the configuration * bean */ public void refreshView() { editorPane.setText(buildHtml()); } }
private String buildTableOpeningTag() { String result = "<table "; Map<String, String> props = getTableProperties(); for (String key : props.keySet()) { result += key + "=\"" + props.get(key) + "\" "; } result += ">"; return result; }
public ActivityConfigurationAction(A activity) { this.activity = activity; putValue(SMALL_ICON, ActivityIconManager.getInstance().iconForActivity(activity)); }
protected Processor findProcessor(Dataflow df) { Activity<?> activity = getActivity(); for (Processor processor : df.getProcessors()) { if (processor.getActivityList().contains(activity)) return processor; } return null; } }
public void actionPerformed(ActionEvent e) { ActivityConfigurationDialog currentDialog = ActivityConfigurationAction.getDialog(getActivity()); if (currentDialog != null) { currentDialog.toFront(); return; } final BeanshellConfigView beanshellConfigView = new BeanshellConfigView((BeanshellActivity)getActivity()); final ActivityConfigurationDialog<BeanshellActivity, BeanshellActivityConfigurationBean> dialog = new ActivityConfigurationDialog<BeanshellActivity, BeanshellActivityConfigurationBean>(getActivity(), beanshellConfigView); ActivityConfigurationAction.setDialog(getActivity(), dialog); }
@Override public DataflowActivity getActivity() { return (DataflowActivity) super.getActivity(); }
/** * Update the html view with the latest information in the configuration * bean */ public void refreshView() { editorPane.setText(buildHtml()); } }
/** * Constructs an instance of the view, and initialises the view itself. * <p> * The constructor parameter for the implementation of this class should define the specific Activity type itself. * </p> * @param activity */ public ActivityContextualView(Activity<?> activity) { super(); this.activity = activity; initView(); }
@SuppressWarnings("serial") public void actionPerformed(ActionEvent action) { ActivityConfigurationDialog currentDialog = ActivityConfigurationAction.getDialog(getActivity()); if (currentDialog != null) { currentDialog.toFront(); return; } final BiomartConfigurationPanel configurationPanel = new BiomartConfigurationPanel(getActivity()); final ActivityConfigurationDialog<BiomartActivity, Element> dialog = new ActivityConfigurationDialog<BiomartActivity, Element>(getActivity(), configurationPanel); ActivityConfigurationAction.setDialog(getActivity(), dialog); }
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; }
@Override public JComponent getMainFrame() { editorPane = HtmlUtils.createEditorPane(buildHtml()); return HtmlUtils.panelForHtml(editorPane); }
public void actionPerformed(ActionEvent arg0) { ActivityConfigurationDialog<BiomobyActivity, BiomobyActivityConfigurationBean> currentDialog = ActivityConfigurationAction.getDialog(getActivity()); if (currentDialog != null) { currentDialog.toFront(); return; } final BiomobyConfigView biomobyConfigView = new BiomobyConfigView((BiomobyActivity)getActivity()); final ActivityConfigurationDialog<BiomobyActivity, BiomobyActivityConfigurationBean> dialog = new ActivityConfigurationDialog<BiomobyActivity, BiomobyActivityConfigurationBean>(getActivity(), biomobyConfigView); ActivityConfigurationAction.setDialog(getActivity(), dialog); }
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; }