Questions tagged [cellrenderer]

145 questions
9
votes
3 answers

Why do cell renderers often extend JLabel?

I noticed this is common. For example DefaultListCellRenderer, DefaultTableCellRenderer, and DefaultTreeCellRenderer all use it. Also a lot of the custom cell renderers I see online use this as well. I want to use a custom TableCellRenderer in my…
Eva
  • 4,397
  • 5
  • 43
  • 65
9
votes
2 answers

How to let the content in JComboBox display in the center?

Currently I have this JComboBox, how can I get to center the content inside it? String[] strs = new String[]{"15158133110", "15158133124", "15158133458"}; JComboBox com = new JComboBox(strs);
SUN XIAOYU
  • 93
  • 1
  • 3
8
votes
1 answer

ag-grid cellRendering with deltaRowDataMode

Hi I have some cells with custom rendering when I update the all data, the deltaRowDataMode does not hnadle the change of my cutsom cell rendering. Other cells of the updated row are correctly updated. How can I give a clue to ag grid to compare…
bodtx
  • 590
  • 9
  • 29
7
votes
1 answer

JavaFX custom listView

I wanted to ask the best way to make a ListView with custom objects in JavaFX, I want a list that each item looks like this: I searched and found that most people do it with the cell factory method. Is ther any other way? For example with a custome…
user7128116
6
votes
2 answers

AS3 disable editable/selectable for textInput inside of a Datagrid

I am currently trying to disable the selectable / editable / or change the textInput to dynamic to get my desired result. I've got a custom datagrid with dropdowns and text input areas. However, if there is no data in my Model # column, I do not…
jc.021286
  • 220
  • 1
  • 4
  • 15
6
votes
2 answers

Java Swing - JList custom cell rendering - capturing actions

Any time I make a custom cell renderer for a JList, any elements I add to it don't ever respond to actions. For instance, If I have the cell renderer return a JPanel with elements on it, one of which has an ActionListener, it doesn't respond at…
Evan Fosmark
  • 98,895
  • 36
  • 105
  • 117
6
votes
1 answer

How to set the color of a single cell in a pygtk treeview?

I have a PyGtk treeview with a couple of columns. During runtime i add constantly new rows. Each cell contains a string. Normaly, i would use a gtk.CellRenderer for each row, but I want to set the background color of each cell, according to the…
Fookatchu
  • 7,125
  • 5
  • 28
  • 26
6
votes
0 answers

How to write a custom Gtk.CellRenderer which would show Gtk.ColorButton

I am using Python 3 and Gtk+ 3. I have a list of colors stored in a Gtk.ListStore. I want to display these colors as Gtk.ColorButton with a Gtk.CellRenderer so that the users would be able to view the colors and also change the colors too. My…
183.amir
  • 422
  • 3
  • 25
5
votes
1 answer

AG-Grid React, trouble getting custom cell renderer to update when data changes. Function components are behaving differently than class components

I'm using AG-Grid throughout a react application, and in several instances I want a cellRenderer to update when grid data changes. In both of the following cases, the cellRenderer loads correctly initially, but doesn't update when data changes: A…
M Wellman
  • 63
  • 1
  • 1
  • 5
5
votes
3 answers

How to set icon in a column of JTable?

I am able to set the column's header but not able to set icon in all the rows of first column of JTable. public class iconRenderer extends DefaultTableCellRenderer{ public Component getTableCellRendererComponent(JTable table,Object obj,boolean…
bsm
  • 1,793
  • 11
  • 30
  • 41
4
votes
1 answer

Creating a custom GtkCellRenderer with PyGobject

I'm in the process of writing a Gtk application. Up 'til know I have been using pygtk but because that has been deprecated in favor of PyGobject I have decided to make the switch. Back in the time of pygtk one could extend the…
mandel
  • 2,921
  • 3
  • 23
  • 27
4
votes
1 answer

Cell Renderer a custom componenent, keeps getting "Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node'."

When I try to render custom element using cell render, here is my component: Action.jsx import React from 'react'; export default (props) => (
4
votes
1 answer

How to make a column with a string and pixbuf in GtkTreeview?

I'm working in a app with Gtk+2 and i need to implement a File treeview. the actual code it's: public FileTree() { store = new TreeStore(2,typeof(string),typeof(string)); this.change_dir( "/dir/path" ); set_model( store ); //…
Matias
  • 265
  • 3
  • 11
4
votes
1 answer

Why does my AS3 DataGrid with sortable columns show wrong movieclip loaded in to cell after sorting?

I have a datagrid component in my AS3 project and have a custom cell renderer assigned to one column that loads a movie clip into a cell depending on the value of that cell data. For example if the cell data is the number 1 I load movieclip1, if 2 i…
undefined
  • 5,190
  • 11
  • 56
  • 90
3
votes
2 answers

JTree TreeCellRenderer raising issue on showing the selection color

I am using this below piece of code: class CountryTreeCellRenderer implements TreeCellRenderer { private JLabel label; CountryTreeCellRenderer() { label = new JLabel(); } public Component…
Abhishek Choudhary
  • 8,255
  • 19
  • 69
  • 128
1
2 3
9 10