Table cell Render for one cell

Hi all
I am hoping that someone can help me with a cell render for one cell only.
I am needing to make some cells bold.
What i was hoping is that there is a way of passing in a row and column number to make that cells font bold?
Any ideas ??
I am building a List of accounts that I what to look like this.
1-0000 Asset |Asset|Balance
1-1000 Cheque Account |Bank|Balance
1-2000 Credit Cards |Credit|Balance
1-2020 Visa |Credit Card|Balance
1-2030 Master Card |Credit Card|Balance

Create a renderer like you've done in the past:
http://forum.java.sun.com/thread.jspa?threadID=679718&start=2
The renderer knows the row and column you are doing the renderering on so you just need to add a conditional check:
if (aBoldCell)
setFont( getFont().deriveFont(...) );
else
setFont( table.getFont() );

Similar Messages

  • Tables with more than one cell with a high number of rowspan (ej. 619). This cell can not be print in a page and it must be cut. But I don't know how  indesign can do this action.

    Tables with more than one cell with a high number of rowspan (ej. 619). This cell can not be print in a page and it must be cut. But I don’t know how  indesign can do this action.

    set the wake-on lan on the main computer
    The laptop's too far away from the router to be connected by ethernet. It's all wifi.
    No separate server app on the laptop, it's all samba
    The files are on a windows laptop and a hard drive hooked up to the windows laptop. The windows share server is pants, so I'd need some sort of third party server running. Maybe you weren't suggesting to use Samba to connect to the windows share though?
    I'm glad that you've all understood my ramblings and taken and interest, thanks The way I see it, I can't be the only netbook user these days looking for this kind of convenience, and I certainly won't be once chrome and moblin hit the market.
    Last edited by saft (2010-03-18 20:38:08)

  • Smartview functions very slow - even for one cell.

    We have several Smartview functions spreadsheets that are running very slowly. I took one and removed everything except for one cell that with the hsgetvalue formula, and the cells that it links to to get the point of view. It either takes about 10-20 seconds to refresh or gives us error 12030 and does not refresh.
    Other spreadsheets seem to have no problem refreshing, even if they are quite a bit larger.
    Have any of you seen anything like this? Any ideas?

    It could be some type of network connectivity issue.
    If you install Fiddler2 (http://www.fiddler2.com/fiddler2/), you can see the actual communicatiosn from Smartview and the web server running smartview. If you get an immediate response between the request and the response, then something is probably going funny inside of Smartview on your machine. If the response to the data request from Smartview is taking a long time, then I would investigate teh server to see if there are any resource issues, etc.
    It won't immediately give you the cause; however, it will help you narrow some things down.
    Charles

  • Setting a cell renderer for a Cell?

    Hi everybody,
    I'm sitting here with a problem: I'm trying to set a Cell renderer for a cell.
    The problem is in all of the examples that i saw till now this was made only with columns.
    Is it possible to set different CellRenderer foor different cells in the same column?

    Hi,
    if you implement your cellRenderer you return the Object you get for all columns but the one you want to be handled im a special way. As you know the row as well you can return sth different for each row.
    Phil

  • Creating 2 table maintainance views for one custom table

    Hello All,
    I want to create 2 table maintainace views for one custom table.
    I know how to create table maintainace but I want to know whether we can create only one maintainance view or we cal also create 2 maintainace views for a single custom table.
    Regards
    Mahesh

    Hello,
    You can create as many maintenance views one one table as you want.
    Kind regards,
    Bart

  • Two table maintenance generator for one table

    Can we created two table maintenance generator for one ztable. if yes then what will be the steps.

    Hi Prem,
    Why you need two table maintenance generator for a single table?
    We can generate only single table maintenance  generator for a single table.
    you can add modification event in  inside table maintenance if you need anything to change or validate in insde your table maintenance generator.
    Regards,
    Prasenjit

  • Make Editable only for one cell

    Hi,
    Is it possible to make one cell editable in a non-editable column of a matrix?
    I have made a column non-editable.  Now, based on a CFL value (which is in another column) selected, i want to make that row's non-editable column as editable.
    My code, which fails:
    If objMatrix.Columns.Item("V_1").Cells.Item(pVal.Row).Specific.value = 0 Then
                objMatrix.Columns.Item("V_0").Cells.Item(pVal.Row).Specific.Enabled = True
    End If

    If is column set to non editable, you cannot allow to user change the vaule in any cell. The only way is set the column as editable and catch the events as
    If pVal.ItemUID = "matrix" And pVal.BeforeAction = True And pVal.EventType = SAPbouiCOM.BoEventTypes.et_VALIDATE (for cghanges, gotfocus for accesing) And pVal.ColUID = "col" And pVal.ItemChanged = True Then
    which will catch the changes of cell and if the cell isnt enabled for changes, set bubleevent to true.

  • Setting cell editor for individual cell in JTable

    Hi there,
    I want to provide individual cell editor for my JTable. Basically, my JTable shows property names and values. I want to show different cell editors for different properties.
    I followed the advice in this post:
    http://forum.java.sun.com/thread.jsp?forum=57&thread=423318
    but I have a question:
    I looked at the code of DefaultCellEditor. It just has a single editor component (the one provided in the constructor), so all the methods use the same component and certain aspects are customized for the type of component. Again, there can be only one type of component at a time.The problem that I am facing is that I will have different components for different row/column of the same table. So how do I implement some of the methods (for example, getCellEditorValue()), when I have multiple editor components?
    Also, how do I commit changes made by the user?
    I am extremely confused.
    Someone please help!
    Thanks.

    Actually, that's what I am currently doing.
    Here is my cell editor class:
    public class ObjectPropertyEditor extends DefaultCellEditor
           public ObjectPropertyEditor()
              super(new JTextField());
              Vector list = new Vector();
              list.add("Yes");
              list.add("No");
             myCombo = new JComboBox(list);
          public Component getTableCellEditorComponent(JTable table, Object value,
              boolean isSelected, int row, int column)
             String colName = (String)table.getValueAt(row,0);
             if(colName.equalsIgnoreCase("Leaf-Node?")) //if it is the "Leaf" property, return the combo box as the editor
                 return myCombo;
            else  //for all other properties, use JTextField of the super class
                return super.getTableCellEditorComponent(table,value,isSelected,row,column);
        private JComboBox myCombo;
    }The problem I have is that when I select a new item from the combo box, the new selection is not reflected in the tableModel. I don't know how I can achive that. I think I need the functionalities that DefaultCellEditor gives to its delegate when its constructor arguments is a combo box. But how can I get two different sets of functionalities (JTextField and JComboBox) ?
    Please help!
    Thanks.

  • PLEASE HELP-JTable cell editor-change one cell, changes all cells of column

    for example i have 3 rows 4 columns, column 3 and 4 are dates. now if i change the date to a new value (eg for of column 3)
    for any row, and then i click on any other cell. All cell values ie all rows for that column are changed to that new value.
    ie it changed column 3 for all rows 1, 2 and 3 to that new value which i changed in only one cell of that column.
    PLEASE HELP me , tell me what change i make to the code to fix it ....
    this is my cell renderer for date
    class DateCellRenderer extends JbcDateTimeChooser implements TableCellRenderer {
      protected Border m_noFocusBorder;
      public DateCellRenderer() {
        super();
        setStylePattern(JbcDateTimeChooser.MEDIUM);
        m_noFocusBorder = new EmptyBorder(1, 2, 1, 2);
        setOpaque(true);
        setBorder(m_noFocusBorder);
      public Component getTableCellRendererComponent(JTable table,
       Object value, boolean isSelected, boolean hasFocus,
       int row, int column)
      if(value instanceof Date) {
          Date b = (Date)value;
          setDate(b);
        setFont(table.getFont());
        setBorder(hasFocus ? UIManager.getBorder(
          "Table.focusCellHighlightBorder") : m_noFocusBorder);
        return this;
    }I have this custom cell editor date
    class DateCellEditor extends AbstractCellEditor implements TableCellEditor {
      protected JbcDateTimeChooser editor;
      public DateCellEditor() {
        super();
        editor = new JbcDateTimeChooser();
        editor.setStylePattern(JbcDateTimeChooser.MEDIUM);
      public Object getCellEditorValue() {
        return editor.getDate();
      public Component getTableCellEditorComponent(JTable table,
       Object value, boolean isSelected, int row, int column)
        if(value instanceof Date) {
          editor.setDate((Date)value);
        return editor;
    }and this is how i defined in jtable
        lnnTableModel = new CellSiteLNNTableModel();
        lnnTable.setModel(lnnTableModel);
        lnnTableModel.addColumn("ABC");
        lnnTableModel.addColumn("DEF");
        lnnTableModel.addColumn("Date From");
        lnnTableModel.addColumn("Date To");
        for(int k = 0; k < lnnTableModel.getColumnCount(); k++) {
          TableColumn col = lnnTable.getColumn(lnnTableModel.getColumnName(k));
          TableCellRenderer renderer;
            DefaultTableCellRenderer textRenderer = new DefaultTableCellRenderer();
            renderer = textRenderer;
          TableCellEditor editor;
          JTextField textColumn = new JTextField();
          if((k == CellSiteLNN.DATE_FROM) || (k == CellSiteLNN.DATE_TO)) {
            editor = new DateCellEditor();  //  this is the cell editor
         renderer = new DateCellRenderer(); // this is the assigned cell renderer
          } else {
            editor = new DefaultCellEditor(textColumn);
          col.setCellRenderer(renderer);
          col.setCellEditor(editor);
        }

    table model is extended from AbstractTableModel
    and have these methods
    do you see anything wrong here.....
      public Object getValueAt(int row, int column) {
        Vector rowVector = (Vector)dataVector.elementAt(row);
        return rowVector.elementAt(column);
      public void setValueAt(Object aValue, int row, int column) {
        Vector rowVector = (Vector)dataVector.elementAt(row);
        rowVector.setElementAt(aValue, column);
        // generate notification
        fireTableChanged(new TableModelEvent(this, row, row, column));
      } // end method (setValueAt)

  • JTable custom cell renderer for each cell

    Hi,
    Iam trying to implement a JTable in which each cell in a column can be of a different type. i.e it can be a tree node or plain text. Can someone point me to examples where this has been done.
    Iam trying to override getColumnClass but it only takes a column no as parameter. I would like to return a different type depending on the row for which getColumnClass is called. It would help if getColumnClass could take 2 params (row and column). Can someone help.
    Cheers,
    vidyut

    You can override getCellRenderer(int row, int column) of JTable

  • Change Capitalization For Many Cells at Once

    How can I change the captialization for many table cells at once. I can do it for one cell at a time by triple-clicking an choosing the capitalization menu within fonts, but if I select all the cells I want to change and then go to fonts>capitalization, the capitalization menu is dimmed.
    thanks,
    Jeff

    I'm a little confused by this thread. As Badunit describes, can't you just select multiple cells and make a menu pick?
    No need for formulas, right?  (unless it's a special situation of capitalizing the start of each sentence)
    SG

  • Changing scaling factor for each cell in Bex Analyzer

    Hi,
    We have a query with 2 structure (1 structure in rows, 1 in columns). We execute the query with Bex Analyzer in Excel.
    We would like to change the scaling factor for each cell. If we use the function 'Properties' for the active cell (context menu), we can change the scaling factor only for one cell.
    Is it possible to change it for the complete table?
    We use BI 7.0, patch 14.
    Thanks,
    Peter
    Edited by: Péter Egyedi on Jan 25, 2008 5:18 PM

    Have you got the solution for this problem?

  • How to enable hyperlink for a cell in excel thru OLE?

    Hi,
    Iam using OLE2 to download data from an internal table into excel sheet.I want to enable hyperlink for one cell in each line of the excel. Please advice how to go abt it?
    Regards,
    Shambu

    To hyperlink to the specific sheet in your workbook, you need to first create the sheet and use the parameter #3 of the Hyperlink's ADD method.
    Try like this:
    *.....Hyperlink to another sheet
      GET PROPERTY OF e_appl 'Range' = e_range
        exporting
        #1 = 'A1'
        #2 = 'A1'.
      GET PROPERTY OF e_activesheet 'Hyperlinks' = e_hyperlink.
      get property of e_work 'Sheets' = e_sheets.
      CALL METHOD OF e_sheets 'Add' = e_work2.
      CALL METHOD OF e_hyperlink 'Add'
        EXPORTING
        #1 = e_range
        #2 = ''
        #3 = 'Sheet2!A1'.   "Targeted Sheet & Cell
    *.....Hyperlink to another sheet
    Regards,
    Naimesh Patel

  • How to color more than one cell in an ALV line ???

    Hi SDN community,
    I have the following problem:
    I display an internal table with the 'REUSE_ALV_GRID_DISPLAY' function and want to color two cells, not only one cell.
    Coloring one cell is no problem with...
    cell_color1 TYPE lvc_t_scol, " cell color
    DATA  gs_cellcolor    TYPE          lvc_s_scol. " to color a cell
    gs_cellcolor-fname = 'TNAME'.
    gs_cellcolor-color-col = '6'.
    gs_cellcolor-color-int = '1'.
    gs_cellcolor-color-inv = '0'.
    LOOP AT it_result.
      IF it_result-trend EQ 'fast-growing'.
        APPEND gs_cellcolor TO it_result-cell_color1.
        IF sy-subrc EQ 0.
          MODIFY it_result.
        ENDIF.
      ENDIF.
    ENDLOOP.
    and
    ls_layout-coltab_fieldname = 'CELL_COLOR1'.
    , the last one is in the layout building form.
    My problem is that in
    ls_layout-coltab_fieldname = 'CELL_COLOR1'.
    , I can only type in ONE fieldname, but I would like to color more than one field/cell, you got my problem?
    Thank you very much,
    Marius

    I'm pretty sure that the color would be controlled by what records are appended to the CELL_COLOR1 table inside IT_RESULT. . So move the code inside the IF statement, and add addition logic.
    LOOP AT it_result.
      IF it_result-trend EQ 'fast-growing'.
       gs_cellcolor-fname = 'TNAME'.
       gs_cellcolor-color-col = '6'.
       gs_cellcolor-color-int = '1'.
       gs_cellcolor-color-inv = '0'.
        APPEND gs_cellcolor TO it_result-cell_color1.
        IF sy-subrc EQ 0.
          MODIFY it_result.
        ENDIF.
    else.
       gs_cellcolor-fname = 'OTHER_FIELD'.
       gs_cellcolor-color-col = '5'.
       gs_cellcolor-color-int = '1'.
       gs_cellcolor-color-inv = '0'.
        APPEND gs_cellcolor TO it_result-cell_color1.
        IF sy-subrc EQ 0.
          MODIFY it_result.
        ENDIF.
      ENDIF.
    ENDLOOP.
    Regards,
    Rich Heilman

  • How can I select rows of cells and merge them vertically into one cell in each column?

    I'm working in CS4 and need to be able to select 2 to 6 rows of cells (with many columns) in a table and then merge the selected cells vertically into one cell in each column. A few cells in the chart will not need to merge so I must select the ones that do. I have almost 100 pages of charts with cells that need merged this way by Tuesday. Please help!
    Top chart example needs to change to the bottom example.
    Header 1
    Header 2
    Header 3
    Header 4
    Header 5
    Header 6
    100
    600
    300
    600
    20000
    120000
    2000
    500
    400
    50000
    10000
    5000
    3000
    200
    700
    67
    122
    600
    900
    100
    2
    7
    123
    1110
    Header 1
    Header 2
    Header 3
    Header 4
    Header 5
    Header 6
    100
    500
    200
    100
    600
    400
    700
    900
    300
    5000
    30000
    2
    600
    10000
    67
    7
    20000
    2000
    122
    123
    120000
    5000
    600
    1110

    SmartCellMerge may help you:
    http://www.indiscripts.com/post/2012/04/improve-the-way-you-merge-cells-in-indesign
    @+
    Marc

Maybe you are looking for

  • OpenGL, nVidia 8600M GT 128mb and After Effects CS3 8.0.2

    I've just sold my one year old macbook and bought a new (not so new now, revision C), 2.2 ghz nVidia 128 mb macbook pro. I did that cause I work with After Effects and thought a bigger screen and dedicated graphics with OpenGL would improve my perfor

  • Display problems in Data Quality for Data Integrator

    Hello, I have some problems when i try to "create join". When I click to add a filter, a window appears but nothing is displayed... http://img255.imageshack.us/img255/1379/filterentitymo5.jpg I have the same problem when I add "entity business rule",

  • HT2448 How can we get Microsoft word on iPad

    Download licensed 'VM vare' and get it all in one

  • Thirdparty- Urgent .

    Hi , Please look in to this issue...pl let me know the suggesion. I  have created a third party sales order (2321188) with only one line in Test System. The material (TEST_WOP) is created and an info record (5300165073) is created as well. However th

  • Crash and video garbage on K2M2

    I need help, I think that I have a bad k2m2 combo board. I have read through most of the forum and can't find any similar problem. I am not a newbie, I have seen this problem on an ASRock once before but RMA'd that board. But after getting an MSI, I