/** * {@inheritDoc} */ @Override protected String getActionText() { if (renderingConnector != null) { if (renderingConnector.getConnectorValue() == null) { return ""; } return renderingConnector.getConnectorValue().toString(); } return super.getActionText(); }
/** * {@inheritDoc} */ @Override protected String getActionText() { if (renderingConnector != null) { if (renderingConnector.getConnectorValue() == null) { return ""; } return renderingConnector.getConnectorValue().toString(); } return super.getActionText(); }
/** * Returns the value of the swing view's connector. * <p> * {@inheritDoc} */ public Object getCellEditorValue() { Object cellEditorValue = editorView.getConnector().getConnectorValue(); if (cellEditorValue == NULLMAP) { return null; } return cellEditorValue; }
/** * Returns the value of the swing view's connector. * <p> * {@inheritDoc} */ public Object getCellEditorValue() { return editorView.getConnector().getConnectorValue(); }
/** * Returns the connector value of the connector at <code>index</code> in the * child connectors collection contained in the backed collection connector. * <p> * {@inheritDoc} */ public Object getElementAt(int index) { return collectionConnector.getChildConnector(index).getConnectorValue(); }
/** * Returns the connector value of the connector at <code>index</code> in the * child connectors collection contained in the backed collection connector. * <p> * {@inheritDoc} */ public Object getElementAt(int index) { return collectionConnector.getChildConnector(index).getConnectorValue(); }
/** * Returns the value of the swing view's connector. * <p> * {@inheritDoc} */ public Object getCellEditorValue() { return editorView.getConnector().getConnectorValue(); }
/** * Returns the connector value of the connector at <code>index</code> in the * child connectors collection contained in the backed collection connector. * <p> * {@inheritDoc} */ public Object getElementAt(int index) { IValueConnector cellConnector = collectionConnector .getChildConnector(index); if (cellConnector instanceof ICompositeValueConnector) { return cellConnector.toString(); } return cellConnector.getConnectorValue(); }
/** * Returns the value of the connector which backs the cell model (2nd level of * nesting). * <p> * {@inheritDoc} */ public Object getValueAt(int rowIndex, int columnIndex) { IValueConnector cellConnector = getConnectorAt(rowIndex, columnIndex); Object connectorValue = cellConnector.getConnectorValue(); if (connectorValue instanceof byte[]) { return null; } return connectorValue; }
/** * Returns the value of the connector which backs the cell model (2nd level of * nesting). * <p> * {@inheritDoc} */ public Object getValueAt(int rowIndex, int columnIndex) { IValueConnector cellConnector = getConnectorAt(rowIndex, columnIndex); Object connectorValue = cellConnector.getConnectorValue(); if (connectorValue instanceof byte[]) { return null; } return connectorValue; }
/** * Returns the value of the connector which backs the cell model (2nd level of * nesting). * <p> * {@inheritDoc} */ public Object getValueAt(int rowIndex, int columnIndex) { IValueConnector cellConnector = getConnectorAt(rowIndex, columnIndex); if (cellConnector instanceof ICompositeValueConnector) { return cellConnector.toString(); } Object connectorValue = cellConnector.getConnectorValue(); if (connectorValue instanceof byte[]) { return null; } return connectorValue; }
/** * Retrieve the binary content to display the infos on. * * @param context * the action context. * @return The binary content to display the infos on or null. */ protected byte[] getBinaryContent(Map<String, Object> context) { Object connectorValue = getViewConnector(context).getConnectorValue(); byte[] content; if (connectorValue instanceof String) { content = ((String) connectorValue).getBytes(); } else { content = (byte[]) connectorValue; } return content; } }
/** * {@inheritDoc} */ public void checkWorkspaceAccess(String workspaceName) { checkAccess((ISecurable) getWorkspaceConnector(workspaceName) .getConnectorValue()); }
/** * Retrieve the binary content to display the info on. * * @param context * the action context. * @return The binary content to display the info on or null. */ protected byte[] getBinaryContent(Map<String, Object> context) { Object connectorValue = getModelConnector(getModelPath(context), context).getConnectorValue(); byte[] content; if (connectorValue instanceof String) { content = ((String) connectorValue).getBytes(); } else { content = (byte[]) connectorValue; } return content; }
/** * {@inheritDoc} */ @Override public String getDisplayValue() { if (getRenderingConnector() != null) { return getRenderingConnector().getConnectorValue(); } return ""; }
/** * {@inheritDoc} */ public String getDisplayValue() { if (getRenderingConnector() != null) { return (String) getRenderingConnector().getConnectorValue(); } return ""; }
/** * Gets the value to display as row font. * * @param rowIndex * the row index to compute the font for. * @return the row font or null. */ public String getRowFont(int rowIndex) { if (getRowFontProperty() != null) { IValueConnector fontConnector = ((ICompositeValueConnector) collectionConnector .getChildConnector(rowIndex)).getChildConnector(getRowFontProperty()); if (fontConnector != null && fontConnector.getConnectorValue() != null) { return fontConnector.getConnectorValue().toString(); } } return null; }
/** * Sets the renderer value. * * @param value * the model value. */ protected void setValue(Object value) { if (value instanceof IValueConnector) { Object connectorValue = ((IValueConnector) value).getConnectorValue(); setSelected((connectorValue != null && (Boolean) connectorValue)); } else { setSelected((value != null && (Boolean) value)); } }
/** * {@inheritDoc} */ @Override public boolean execute(IActionHandler actionHandler, Map<String, Object> context) { IValueConnector modelConnector = getModelConnector(context); if (modelConnector == null) { return false; } Object clone = cloneElement(modelConnector.getConnectorValue(), context); setActionParameter(clone, context); return super.execute(actionHandler, context); }
/** * {@inheritDoc} */ @Override public boolean execute(IActionHandler actionHandler, Map<String, Object> context) { ICollectionConnector resultConnector = ((ICollectionConnectorProvider) getViewConnector(context)) .getCollectionConnector(); int[] resultSelectedIndices = resultConnector.getSelectedIndices(); if (resultSelectedIndices != null && resultSelectedIndices.length > 0) { Object selectedComponent = resultConnector.getChildConnector( resultSelectedIndices[0]).getConnectorValue(); context.put(ActionContextConstants.ACTION_PARAM, selectedComponent); } return super.execute(actionHandler, context); } }