renderer

How to findout component-family and renderer-type of a JSF component

ぃ、小莉子 提交于 2019-12-01 07:03:08
How can I findout the component-family and the (default) renderer-type of a JSF component? These information are necessary when (overriding custom renderers) using the following annotation: @FacesRenderer(componentFamily="",rendererType="") I Googled, went throughed the JSF specification and Ed Burn's book, but couldn't find what I wanted. Programmatically, you could find them out by just printing UIComponent#getFamily() and UIComponent#getRendererType() . Documentary, you could find them out by just looking in the javadoc of the component implementation. For example, <h:inputText> is

Set Jtable/Column Renderer for booleans

自闭症网瘾萝莉.ら 提交于 2019-12-01 06:21:17
Right now my Boolean values for my JTable display as JCheckBoxes . This would normally be fine but I would like to display them as either an alternative String or image. I can get them to display as true/false but I would like to display them as a checkmark (✔) if true and nothing if false. Possibly an image but lets do a String first... Create a custom renderer. Extend the DefaultTableCellRenderer and add your own code to display whatever you want. It could be a custom Icon or if the "checkmark" is a printable character than you can just set the renderer text to the appropriate character.

SwingX JXTable: use ColorHighlighter to color rows based on a “row object”

倖福魔咒の 提交于 2019-12-01 05:54:09
I'm using JXTable and I know how to do this based on DefaultRenderers for JTable, but I want to know how to do it in a way that's JXTable-friendly based on HighlighterPipeline. I have a list of objects displayed in a table, and each row represents one object. I would like to color the rows displaying objects of a certain type a different color. It looks like I should be using ColorHighlighter . But I can't find examples for this, other than the simple highlighters like "color every other row" or some such thing. I need the row number since there's no such thing as a "row object" in the JTable

Implement a column renderer for Vaadin 8 Grid

社会主义新天地 提交于 2019-12-01 05:40:22
问题 The Vaadin Framework guide has a page describing how to use Column Renderers in a Vaadin Grid. And this page describes implementing renderers, but all too briefly. I want to implement a InstantRenderer to complement the partial set of java.time renderers added in Vaadin 8.1. Renderers were added for LocalDate & LocalDateTime but not for Instant , OffsetDateTime , and ZonedDateTime . For my Instant renderer I am currently simply applying the current default time zone ( ZoneId ) to get a

How to findout component-family and renderer-type of a JSF component

拥有回忆 提交于 2019-12-01 04:36:50
问题 How can I findout the component-family and the (default) renderer-type of a JSF component? These information are necessary when (overriding custom renderers) using the following annotation: @FacesRenderer(componentFamily="",rendererType="") I Googled, went throughed the JSF specification and Ed Burn's book, but couldn't find what I wanted. 回答1: Programmatically, you could find them out by just printing UIComponent#getFamily() and UIComponent#getRendererType(). Documentary, you could find them

“GL_HALF_FLOAT” with OpenGL Rendering and GLSL

孤者浪人 提交于 2019-11-30 19:38:16
问题 I am programming an OpenGL renderer in C++. I want it to be as efficient as possible and each vertex/normal/UV tex coord/tangents/etc to take up as little memory as possible. I am using indexes, line strips, and fans. I was thinking that 32bit floating points are not necessary and 16 bit Floating points should be fine, at least for some of these like normals and UVs. I can't seem to find any examples of this anywhere. I can find talk of "GL_HALF_FLOAT", but no real examples. Am I on the right

Angular2 retrieve all elements with class name

坚强是说给别人听的谎言 提交于 2019-11-30 17:14:20
Can anyone help with how to find 'All' Elements with a particular class name in Angular 2? I thought it would be trivial but it's giving me more problems that was prepared for. <span class="classImLookingFor">foo</span> <span class="classImLookingFor">Voo</span> <span class="classImLookingFor">Moo</span> I thought by doing what I have below would return all the elements with class "classImLookingFor" but it only returns the first instance. constructor(private renderer: Renderer){} ngAfterViewInit(){ const el = this.renderer.selectRootElement('.classImLookingFor'); this.renderer

Angular2 retrieve all elements with class name

若如初见. 提交于 2019-11-30 16:30:40
问题 Can anyone help with how to find 'All' Elements with a particular class name in Angular 2? I thought it would be trivial but it's giving me more problems that was prepared for. <span class="classImLookingFor">foo</span> <span class="classImLookingFor">Voo</span> <span class="classImLookingFor">Moo</span> I thought by doing what I have below would return all the elements with class "classImLookingFor" but it only returns the first instance. constructor(private renderer: Renderer){}

Compound JTree Node allowing events to pass through to objects underneath

时光总嘲笑我的痴心妄想 提交于 2019-11-30 15:50:52
I'm trying to create a JTree in which some nodes are compound objects containing a JLabel and a JButton. The Node is representing a server and port shown by the JLabel, the JButton will use the Desktop API to open the default browser and go to the URL. I have read the following already and have followed them as closely as I can. The Node is displayed how I want it (mostly - I can deal with making it nicer later) but when I try to click on the button the JTree is responding to the events, not the button. java swing: add custom graphical button to JTree item http://www.java2s.com/Code/Java/Swing

Using OpenGL to replace Canvas - Android

戏子无情 提交于 2019-11-30 13:36:45
I am attempting to replace the Canvas-based rendering system that I already have with the faster opengl-es surface, however, I can't seem to get an openGL renderer to conform in such a way that it acts as 2d field, rather than a perspective view. My current code for the renderer looks as follows: @Override public void onSurfaceChanged(GL10 gl, int width, int height) { gl.glViewport(0, 0, width, height); gl.glMatrixMode(GL10.GL_PROJECTION); gl.glLoadIdentity(); gl.glOrthof(0.0f, width, 0.0f, height, 0.0f, 1.0f); gl.glShadeModel(GL10.GL_FLAT); gl.glEnable(GL10.GL_BLEND); gl.glBlendFunc(GL10.GL