renderer

JUNG: unpicked vertex label color

情到浓时终转凉″ 提交于 2019-12-11 03:54:14
问题 I can make picked vertex labels red using vertexLabelRenderer declared like this: DefaultVertexLabelRenderer vertexLabelRenderer=new DefaultVertexLabelRenderer(Color.RED); How do I change color of unpicked vertex labels. Constructor (see below) only allows defining unpicked vertex labels. Also method setForeground() does not affect the font color. Here is the JUNG 2.0.1 API document: http://jung.sourceforge.net/site/apidocs/edu/uci/ics/jung/visualization/renderers/DefaultVertexLabelRenderer

Resizing Window when using EffectComposer

☆樱花仙子☆ 提交于 2019-12-11 03:27:15
问题 I found this fiddle a mounth ago and I implemented it succesfully. It works like a charm except a specific scenario. If I resize the window, from very small to large, it becomes really obvious that the camera Projection Matrix doesn't get updated. This happens both on the jsFiffle example and in my implementation of it. Any possible fix? Thank you! onWindowResize = function(){ screenWidth = window.innerWidth; screenHeight = window.innerHeight; camera1.aspect = screenWidth / screenHeight;

Render the shadows once for all

孤街醉人 提交于 2019-12-11 02:19:26
问题 Given the cost of shadow casting, i was wondering if there is a feature or a possible/experimental way to render a shadowmap only once in three.js (even in webgl), for static objects positionned dynamically (ex: a procedural city). So the result can be used in next frames for static objects, at no cost. The shadow rendering would be done only when something moves. 回答1: EDIT mrdoobs approved : renderer.shadowMap.autoUpdate = false; renderer.shadowMap.needsUpdate = true; // when scene changes

JTree node's changable tooltip

天大地大妈咪最大 提交于 2019-12-10 21:17:23
问题 I have a JTree populated with some (custom) nodes. I have a class that's subclass of DefaultTreeCellRenderer and using that "MyTreeCellRenderer" i can set tooltips for each node in my tree. It works fine: JTree is populated, cell renderer is set, all added nodes do have tooltips. Problem is that i don't know how to change tooltip for certain node in already populated tree... How to do that? Is there any way to "recreate" cell renderer for just one node in JTree? 回答1: I did it! Instead of

Extjs : How to enable/disable a checkbox using renderer while loading a grid

穿精又带淫゛_ 提交于 2019-12-10 17:35:24
问题 I need to load a grid based on the query results I get. I am not having any issues with loading the text fields in the grid but there is one particular column which is a check box type. I am using the xtype: 'checkcolumn' for this purpose. The object that returns the query results returns a "Y" or "N" for this particluar column. If it is "Y", I need to enable the checkbox and if it is "N", the checkbox should be disabled. I am using the following code for defining my checkbox field. { xtype:

Interaction with a cell renderer in JTable

徘徊边缘 提交于 2019-12-10 17:18:22
问题 Is there any way to get a cell renderer to respond to mouse events, such as mouseovers? 回答1: Never tried it but I guess you would need to: a) create a custom renderer to paint the cell in two states b) you need to keep track of which cell should currently be painted in the "mouse over" state c) add a mouse listener to track mouse entered/exited and mouseMoved. With each event you would need to update a variable that tracks which cell the mouse is positioned over. You can use the columnAtPoint

Render JSF h:message with p element instead of span

偶尔善良 提交于 2019-12-10 17:12:00
问题 I would like to create a custom message renderer to renders h:message as a 'p' html element instead of as a 'span' element. It concerns the following message tag: <h:message id="firstNameErrorMsg" for="firstname" class="error-msg" /> I've written to code underneath, but that's only rendering an empty 'p' element. I suppose I have to copy all attributes and text from the original component and write it to the writer. However, I don't know where to find everything and it seems to be a lot of

How can I redefine VerticalTableHeaderCellRenderer() for javax.swing.JTable(), to write text vertically

旧街凉风 提交于 2019-12-09 23:31:42
问题 The goal to write the values of columns into JTable vertically. I read about DefaultTableCellRenderer , VerticalTableHeaderCellRenderer() but cannot implement it. Here is my code: //========================================================= private JScrollPane getTablePane() { if (tablePane == null) { tablePane = new JScrollPane(); tablePane.setRowHeaderView(getTableDictionary()); tablePane.setViewportView(getTableDictionary()); } return tablePane; } //=========================================

threejs: rendering multiple scenes in a single webgl renderer

南笙酒味 提交于 2019-12-09 13:09:02
问题 I am trying to include multiple scene into a single webgl renderer as per code below: renderer.render( scene1, camera ); renderer.render( scene2, camera ); I am facing issue where in the last scene object that is passed to the renderer is being painted and the previous one is not. I confirmed it by swapping the above two lines of code. I am newbie to threejs and would like to know if the above can be achieved? and also if you can guide me towards supporting examples (if any). Thanks! 回答1: The

Highcharts renderer.text as export only

不问归期 提交于 2019-12-08 12:44:06
问题 I have an optional feature for a chart that adds a renderer.text text object. When the chart is exported I would like this to be added only in that case. Below I have source code on how I have been accessing the renderer and the exporter. In the commented section Insert Here is where I was thinking it might go but I am unsure of the syntax. Thank you myChart.renderer.text('Filtered', 5, 10) .attr({rotation: 0}) .css({color: '#4572A7', fontSize: '8px', fontStyle:'italic'}) .add(); myChart