Package com.dci.intellij.dbn.execution.method

Examples of com.dci.intellij.dbn.execution.method.ArgumentValue


    private class CellRenderer extends DefaultTableCellRenderer {
        public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
            Component component = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
            if (column == 0) {
                ArgumentValue argumentValue = (ArgumentValue) value;
                setBorder(EMPTY_BORDER);
                setBackground(UIUtil.getPanelBackgound());
                setForeground(UIUtil.getLabelForeground());

                if (argumentValue.getAttribute() != null) {
                    RowIcon icon = new RowIcon(2);
                    icon.setIcon(Icons.SMALL_TREE_BRANCH, 0);
                    icon.setIcon(argumentValue.getAttribute().getIcon(), 1);
                    setIcon(icon);
                } else {
                    setIcon(argumentValue.getArgument().getIcon());
                }
                setText(argumentValue.getName());
            } else {
                setBorder(EMPTY_BORDER);
                if (!isSelected) {
                    setBackground(UIUtil.getTableBackground());
                    setForeground(UIUtil.getLabelForeground());
View Full Code Here


        return false;
    }

    public Object getValueAt(int rowIndex, int columnIndex) {
        int index = 0;
        ArgumentValue resultArgumentValue = null;
        for (ArgumentValue argumentValue : argumentValues) {
            if (!argumentValue.isCursor()) {
                if (index == rowIndex) {
                    resultArgumentValue = argumentValue;
                    break;
                }
                index++;
            }
        }
        return
            resultArgumentValue == null ? null :
            columnIndex == 0 ? resultArgumentValue :
            columnIndex == 1 ? resultArgumentValue.getValue() : null;
    }
View Full Code Here

    public void setExecutionDuration(int executionDuration) {
        this.executionDuration = executionDuration;
    }

    public void addArgumentValue(DBArgument argument, Object value) throws SQLException {
        ArgumentValue argumentValue = new ArgumentValue(argument, value);
        argumentValues.add(argumentValue);
        if (value instanceof ResultSet) {
            ResultSet resultSet = (ResultSet) value;
            if (cursorModels == null) {
                cursorModels = new HashMap<DBArgumentRef, ResultSetDataModel>();
View Full Code Here

            cursorModels.put(argument.getRef(), dataModel);
        }
    }

    public void addArgumentValue(DBArgument argument, DBTypeAttribute attribute, Object value) {
        ArgumentValue argumentValue = new ArgumentValue(argument, attribute, value);
        argumentValues.add(argumentValue);
    }
View Full Code Here

    }

    @Override
    public String toString() {
        if (userValue instanceof ArgumentValue) {
            ArgumentValue argumentValue = (ArgumentValue) userValue;
            return "" + argumentValue.getValue();
        }

        if (userValue instanceof DBObject) {
            DBObject object = (DBObject) userValue;
            return object.getName();
View Full Code Here

                setIcon(argument == null ? Icons.DBO_ARGUMENT : argument.getIcon());
                append(argumentRef.getName(), SimpleTextAttributes.REGULAR_ATTRIBUTES);
            }

            if (userValue instanceof ArgumentValue) {
                ArgumentValue argumentValue = (ArgumentValue) userValue;
                DBArgument argument = argumentValue.getArgument();
                DBTypeAttribute attribute = argumentValue.getAttribute();
                Object originalValue = argumentValue.getValue();
                String displayValue = originalValue instanceof ResultSet ? "" : "" + originalValue;

                if (attribute == null) {
                    setIcon(argument.getIcon());
                    append(argument.getName(), SimpleTextAttributes.REGULAR_ATTRIBUTES);
View Full Code Here

TOP

Related Classes of com.dci.intellij.dbn.execution.method.ArgumentValue

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.