renderer

commandButton inactive after ajax rendering

╄→гoц情女王★ 提交于 2019-12-20 03:20:12
问题 I have a problem with these two commandButton : Join and Leave. I want to hide Join if I click on leave and vice-versa. When I put ajax on false, there is no problem (but all the page is refresh and I don't find this optimal). But when ajax attribut is on true with specific updating (cf comment in the code), the rendering is good but the new button whitch appear become inactive. If I click on it, nothing happens (well it's seems the actionListener trigger but the view is not refreshed, I have

Creating a CubeGeometry equivilent using CSS3DRenderer

六眼飞鱼酱① 提交于 2019-12-19 11:32:15
问题 I am looking for sample code, that would show how one can create a cube (similar to THREE.CubeGeometry ) in ThreeJS using CSS3DRenderer . Something like below var my_cube = new **CSS3dCubeGeometry**( cube_width, cube_height, cube_depth) var object = new THREE.CSS3DObject( my_cube ); scene.add( object ); THREE.CSS3DObject doesn't exist and I am looking for a potential implementation of it. 回答1: You can create a cube with CSS3DRenderer like so: // params var r = Math.PI / 2; var d = 50; var pos

Set Jtable/Column Renderer for booleans

筅森魡賤 提交于 2019-12-19 09:01:18
问题 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... 回答1: 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

Using OpenGL to replace Canvas - Android

十年热恋 提交于 2019-12-18 16:09:34
问题 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,

Using OpenGL to replace Canvas - Android

与世无争的帅哥 提交于 2019-12-18 16:09:15
问题 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,

How to change style (color, font) of a single JTree node

百般思念 提交于 2019-12-18 08:28:43
问题 I have two JTree in two panels in a JFrame . I want to change the style(color and font) of nodes on drag and drop from one tree to the other.Please provide me a way to change the color of a JTree node permanently. 回答1: To start, you will need to have a data object that can handle style and color. You could subclass DefaultMutableTreeNode and add these data items with getts and setters Then you'd need to create a custom TreeCellRenderer. I recommend extending DefaultTreeCellRenderer, and in

How to change style (color, font) of a single JTree node

狂风中的少年 提交于 2019-12-18 08:28:08
问题 I have two JTree in two panels in a JFrame . I want to change the style(color and font) of nodes on drag and drop from one tree to the other.Please provide me a way to change the color of a JTree node permanently. 回答1: To start, you will need to have a data object that can handle style and color. You could subclass DefaultMutableTreeNode and add these data items with getts and setters Then you'd need to create a custom TreeCellRenderer. I recommend extending DefaultTreeCellRenderer, and in

JTable Row selection background problem.

你说的曾经没有我的故事 提交于 2019-12-18 05:25:36
问题 I have a JTable and to set a picture as background in JTable and other properties i used this code. tblMainView= new JTable(dtModel){ public Component prepareRenderer(TableCellRenderer renderer, int row, int column) { Component c = super.prepareRenderer( renderer, row, column); // We want renderer component to be transparent so background image // is visible if( c instanceof JComponent ) ((JComponent)c).setOpaque(false); return c; } ImageIcon image = new ImageIcon( "images/watermark.png" );

3D Scene Panning in perspective projection (OpenGL)

六月ゝ 毕业季﹏ 提交于 2019-12-17 22:37:00
问题 I have designed a C++ class that abstracts the user from trackball rotation, zooming and panning. I have got the rotation (using trackball) and zooming working as expected. However, panning does not behave as expected. When I pick a point and drag, I expect that on finishing drag, the picked point continues to be under the mouse. My understanding of panning in perspective projection is as follows. The target and the camera position, both will be affected by a pan operation. The camera target

JFreeChart different colors in different regions for the same dataSeries

喜欢而已 提交于 2019-12-17 19:25:57
问题 In JFreeChart I'm trying to color different regions of an XY line chart/curve based on y value. I'm overriding the XYLineAndShapeRenderer 's getItemPaint(int row, int col) , however I'm not sure how it handles the coloring of the line between the x s since it's only getting itemPaint on the x (integer values). final XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer() { @Override @Override public Paint getItemPaint(int row, int col) { System.out.println(col+","+dataset.getY(row, col