Package org.jdesktop.swingx.table

Examples of org.jdesktop.swingx.table.TableColumnExt


            updateStringValueForColumn((TableColumn) event.getSource(),
                    (TableCellRenderer) event.getNewValue());
        } else if (event.getPropertyName().startsWith("highlighter")) {
            if (event.getSource() instanceof TableColumnExt
                    && getRowCount() > 0) {
                TableColumnExt column = (TableColumnExt) event.getSource();

                Rectangle r = getCellRect(0, convertColumnIndexToView(column
                        .getModelIndex()), true);
                r.height = getHeight();
                repaint(r);
            } else {
                repaint();
View Full Code Here


         */
        for (int i = 0; i < getModel().getColumnCount(); i++) {
            // add directly to columnModel - don't go through this.addColumn
            // to guarantee full control of ColumnFactory
            // addColumn has the side-effect to set the header!
            TableColumnExt tableColumn = getColumnFactory()
                    .createAndConfigureTableColumn(getModel(), i);
            if (tableColumn != null) {
                getColumnModel().addColumn(tableColumn);
            }
        }
View Full Code Here

        // added then don't create a compound here.
        if (compoundHighlighter != null) {
            stamp = compoundHighlighter.highlight(stamp, adapter);
        }

        TableColumnExt columnExt = getColumnExt(column);

        if (columnExt != null) {
            // JW: fix for #838 - artificial compound installs listener
            // PENDING JW: instead of doing the looping ourselves, how
            // about adding a method prepareRenderer to the TableColumnExt
            for (Highlighter highlighter : columnExt.getHighlighters()) {
                stamp = highlighter.highlight(stamp, adapter);

            }
            // CompoundHighlighter columnHighlighters
            // = new CompoundHighlighter(columnExt.getHighlighters());
View Full Code Here

     */
    protected String getColumnToolTipText(MouseEvent event) {
        if (getXTable() == null) return null;
        int column = columnAtPoint(event.getPoint());
        if (column < 0) return null;
        TableColumnExt columnExt = getXTable().getColumnExt(column);
        return columnExt != null ? columnExt.getToolTipText() : null;
    }
View Full Code Here

                    else
                        sb.append(month);
                    String currentMonth = sb.toString();
                    int columnIndex = -1;
                    for (int i = 0; i < notAssignedTable.getColumnCount(false); i++) {
                        TableColumnExt tce = notAssignedTable.getColumnExt(i);
                        String brmonthTitle = ObjectUtil.findColumnTxt(539, "B", "RMONTH");
                        if (brmonthTitle.equals(tce.getTitle())) {
                            columnIndex = i;
                            break;
                        }
                    }
                    if (columnIndex != -1) {
View Full Code Here

               
                if (getCurrentObject().getClsId() == 160) {//for currency object                
                    PatternHighlighter pattern = new PatternHighlighter();
                    int columnIndex = -1;
                    for (int i = 0; i < objectTable.getColumnCount(false); i++) {
                        TableColumnExt tce = objectTable.getColumnExt(i);
                        String ccTitle = ObjectUtil.findColumnTxt(160, "C", "C");
                        if (ccTitle.equals(tce.getTitle())) {
                            columnIndex = i;
                            break;
                        }
                    }
                    if (columnIndex != -1) {
                        String lc = CurrencyPlugin.getInstance().getLc();
                        String regularExpr = lc;          
                        pattern.setPattern(regularExpr, columnIndex);
                        pattern.setBackground(Color.BLUE);
                        pattern.setForeground(Color.WHITE);
                        highlighters.addHighlighter(pattern);
                    }                   
                } else if (getCurrentObject().getClsId() == 140) {//for ruser object
                    PatternHighlighter pattern = new PatternHighlighter();
                    int columnIndex = -1;
                    for (int i = 0; i < objectTable.getColumnCount(false); i++) {
                        TableColumnExt tce = objectTable.getColumnExt(i);
                        String ccTitle = ObjectUtil.findColumnTxt(140, "RUSER", "RUSER");
                        if (ccTitle.equals(tce.getTitle())) {
                            columnIndex = i;
                            break;
                        }
                    }
                    if (columnIndex != -1) {                       
                        String regularExpr = GlobalValueManager.getValue("SESSION.LOGINUSER");          
                        pattern.setPattern(regularExpr, columnIndex);
                        pattern.setBackground(Color.BLUE);
                        pattern.setForeground(Color.WHITE);
                        highlighters.addHighlighter(pattern);
                    }                                       
                } else if (getCurrentObject().getClsId() == 120) {//for at object
                    PatternHighlighter pattern = new PatternHighlighter();
                    int columnIndex = -1;
                    for (int i = 0; i < objectTable.getColumnCount(false); i++) {
                        TableColumnExt tce = objectTable.getColumnExt(i);
                        String ccTitle = ObjectUtil.findColumnTxt(120, "AT", "AT");
                        if (ccTitle.equals(tce.getTitle())) {
                            columnIndex = i;
                            break;
                        }
                    }
                    if (columnIndex != -1) {                       
View Full Code Here

    private String[] getHiddenColumns() {
        List<String> hiddenCols = new ArrayList<String>();
        TableColumnModelExt columnModel = (TableColumnModelExt) table.getColumnModel();
        for (int i = 0; i < columnModel.getColumnCount(); i++) {
            TableColumnExt col = columnModel.getColumnExt(i);
            if (!col.isVisible()) {
                hiddenCols.add((String) col.getHeaderValue());
            }
        }
        return hiddenCols.toArray(new String[0]);
    }
View Full Code Here

    }

    private void setHiddenColumns(String[] columns) {
        TableColumnModelExt columnModel = (TableColumnModelExt) table.getColumnModel();
        for (int i = 0; i < columnModel.getColumnCount(); i++) {
            TableColumnExt col = columnModel.getColumnExt(i);
            for (int j = 0; j < columns.length; j++) {
                if (columns[j].equals(col.getHeaderValue())) {
                    col.setVisible(false);
                }
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.jdesktop.swingx.table.TableColumnExt

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.