renderer

How to register a custom renderer in JSF?

元气小坏坏 提交于 2019-12-25 01:46:45
问题 We have numerical values in our database, representing a two-value-state. Of course this would perfectly match a boolean, but oracle has no such datatype. The NUMBER(1,0) type from the database is matched to a java.lang.Short type in Java (sometimes they used a NUMBER(*,0) to represent booleans, which are matched to java.math.BigDecimal). Since it is somehow obvious, I want to offer ice:selectBooleanCheckbox in the view as a value representation and UIComponent to the user. (I use IceFaces as

Java Need stepRender lines for some but not all lines

末鹿安然 提交于 2019-12-24 17:55:58
问题 I have a JFreeChart that has several different lines plotted on it. I need to change some of the lines to step lines. I know I need to use the CategoryStepRenderer but am having trouble implementing it. I attached the following code that I use to change the color of the lines. I would like to be able to do the step line in a similar way. All of the ways I have found involve changing all of the lines. Thanks private void updateChartColor(ArrayList mlColor,ArrayList mlLine){ XYPlot plot=(XYPlot

Is there ANY way to have the three.js camera lookat being rendered off-center?

杀马特。学长 韩版系。学妹 提交于 2019-12-24 12:06:43
问题 Is there a way to setup the Three.js renderer in such a way that the lookat point of the camera is not in the center of the rendered image? To clarify: image a scene with just one 1x1x1m cube at ( 0, 0, 0 ). The camera is located at ( 0, 0, 10 ) and the lookat point is at the origin, coinciding with the center of the cube. If I render this scene as is, I might end up with something like this: normal render However I'd like to be able to render this scene in such a way that the lookat point is

How to get full highlighting (with border) on JTable Renderer

此生再无相见时 提交于 2019-12-24 09:33:01
问题 There is a common method when using JTable TableCellRenderers for setting the background and foreground when the cell is selected. Here is an example question that was asked: Why does my Java custom cell renderer not show highlighting when the row/cell is selected? This solution is lacking one thing ... the border around the cell. (Note I am not asking about a border around the row, as was asked here.) The border should highlight when the cell is selected. It is not acceptable to just create

how to make my 3D Gameobject invisible if no renderer attached in UNITY?

醉酒当歌 提交于 2019-12-24 07:47:06
问题 I have 3D object and I want to make it invisible by turning off its rendering . But when I run the code in runtime it shows :: " Exception in callback: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> UnityEngine.MissingComponentException: There is no 'Renderer' attached to the "3dObject" game object, but a script is trying to access it. " I want to know if There is no renderer then how I am able to see that object in scene/game view.

Need to add JCheckBox In JTable Dynamically

陌路散爱 提交于 2019-12-24 02:31:18
问题 I have two JTable . There are certain number of records in one JTable . Once the first JTable is loaded I want to load equal number of JCheckbox to be created in the second table. I have this scenario ... vl pass both the tables in method addCheckBox . private void addCheckBox(JTable procTableSrc, JTable procTableCk){ CheckBoxRenderer checkBoxRenderer = new CheckBoxRenderer(); EachRowRenderer rowRenderer = new EachRowRenderer(); int rows = procTableSrc.getRowCount(); DefaultTableModel dm =

How to color specific rows in a JTable

霸气de小男生 提交于 2019-12-23 04:52:07
问题 I want the ability to highlight some rows of JTable , depending on the values in the row itself. For example, if the existing qty < reorder level , that row should be highlighted in the JTable . I know there is a table method tblItems.setSelectionBackground(Color.yellow); that works when the rows are selected, but is there a similar method that doesn't rely on the rows being selected to have them show in a different color? public class MyTableCellRenderer implements TableCellRenderer {

JTree set background of node to non-opaque

守給你的承諾、 提交于 2019-12-22 04:39:15
问题 Please have a look at the SSCCE. How can I make the non-selected tree nodes' background transparent. At the moment the background of non-selected nodes is white. My cell renderer, however, should paint it non-opaque if it is not selected (and green when selected...what it does). In the end I want non-selected nodes to be just text without background, since the area which is red in the SSCCE has a gradient fill in my application. import java.awt.BorderLayout; import java.awt.Color; import java

changing how Nimbus LaF handles JTree node highlighting

蓝咒 提交于 2019-12-21 09:39:09
问题 I have been working to transition a Java application from WindowsLookAndFeel to Nimbus, largely successfully, despite Nimbus foibles. My users overall like the Nimbus LaF but didn't like some details, some of which I changed by consulting previous questions on this site. Example: I copied the LeafIcon, ClosedIcon and OpenIcon from Windows LaF (which they liked) and use them in the Nimbus version, for a nice combination of LaFs. Stuck on one last (?) problem. I have a JTree with a subclassed

Rails3: How to pass param into custom will_paginate renderer?

南楼画角 提交于 2019-12-21 03:42:56
问题 I've got a custom will_paginate renderer that overrides WillPaginate::ViewHelpers::LinkRenderer's link method like so: def link(text, target, attributes = {}) "<a href='/users/95/friends_widget?page=#{target}' rel='next' data-remote='true'>#{text}</a>" end ...and that works great, except you can see the hard-coded 95 in that link. How would I pass a parameter (e.g. user or user's ID) into the custom renderer via the Rails view? <%= will_paginate(@user_friends, :remote => true, :renderer =>