Custom labels on VTKHexahedrons - vtk

I'm new to VTK. I'm writing a QTWidget which displays thousands of VTKHexahedrons stacked on each other using VTKUnstructuredGrid. I need to label the "visible" faces of each VTKHexahedron with a custom label.
I looked into VTKTextProperty but it requires a VTKTextActor for each Property and that does not scale well. The other option I looked at was using VTKLabeledDataMapper using cell attributes but I need custom labels to display not cell-id's.
Is there a way to do this ? Any sample code would be really helpful. Any suggestions/ideas will be greatly appreciated !
Thanks,
Ujjwala

Related

Acumatica T100(Setting ComboBox at Runtime) enable property not available for edstatus

I'm having an issue following this lesson exercise here's an image of the instructions. When I have the edStatus field selected the enable property is not available for me to change.Here is an image of the layout editor with edStatus selected. Other fields have the enable ExtProperty but this specific field I can't locate it to complete the exercise. Any input would be greatly appreciated. Thank you
Just realized that you can set the enabled property even if not listed via the layout editor through the source code. Hopes this helps anyone else stuck on this issue.

Styling domain Values in AndroidPlot does not include the first value

I am working on an Android application that requires the use of a Graph, for this purpose I am using AndroidPlot's XYSeries. I am trying to style the graph, everything is fine but the first value of the domain. As you can see in the screen shot below, the style does not apply for all the values
This is how I style the values
plot.getGraphWidget().getDomainLabelPaint().setTextSize(22);
plot.getGraphWidget().getRangeLabelPaint().setTextSize(22);
plot.getGraphWidget().getRangeLabelPaint()
.setColor(Color.BLACK);
Could you please tell me what's wrong and how to apply the style for all the values?
I just solved this problem, the first value is called DomainOriginLabelPaint not DomainLabelPaint, in order to style it we need to add
plot.getGraphWidget().getDomainOriginLabelPaint().setTextSize(22);

How to display the restricted rows in ListView

I have taken the horizontal list view.I am able to display the images in list view.It is displaying all the images horizontally.But my requirement is i need to show only 4 images in a row.If there is 5th image then it should come in the second row(for each row there should me only 4 images).How can i do this.Actually i am struck up here.I think you are able to understand my problem.Thank You.
I am using JavaFX 2.x
As far as I understand, if you need to allocate only 4 images in a row, and the 5th+ images transfer on the next row, you will be able to use a GridPane :
http://docs.oracle.com/javafx/2/layout/builtin_layouts.htm
where you could obviously set position of ImageView. Seems, it works so : you determine your own ListCell, and set its graphic node to be a gridpane, and configure grid pane as you wish.
Also, take a look on a flow pane, possibly, it will help you.
If I'm wrong with a recipe, please, try to describe your trouble again (code/screenshot). I'm not comletely sure about it.

How to change Nokia full touch lwuit form header color

I want to to change the header color of nokia lwuit based full touch form and i have tried setTitleComponent method but it is not working. Please also check the following link
http://projects.developer.nokia.com/LWUIT_for_Series_40/wiki/UsingSeries40FullTouchFeatures
in which it is mentioned we cannot style the header but is it means we cannot change the bgcolor as well or put custom images in the header?
Note that when using LWUIT for Series 40 port, the default way of running LWUIT apps is a normal-size canvas in Series 40 full touch devices. Thus the Series 40 chrome shows on top of canvas. And there is no way of customising it (other than the title text).
If you want to provide branding elements to the title, the options are:
1. create an additional lable below the Series 40 headerbar
2. run the application in full-screen. We are planning to create a high-level API for this but currently it is already possible using the following trick:
((GameCanvas) (javax.microedition.lcdui.Display.getDisplay(this)).getCurrent()).setFullScreenMode(true);
In the latter option you will of course lose the Series 40 full touch layout.
Use lwuit source, you can change method visibility if required, this is example what i used to use gradient color
form.getTitleComponent().getStyle().setBackgroundType(Style.BACKGROUND_GRADIENT_LINEAR_VERTICAL);
form.getTitleComponent().getStyle().setBackgroundGradientEndColor(Color.GRADIENT_END);
form.getTitleComponent().getStyle().setBackgroundGradientStartColor(Color.GRADIENT_START);
form.getTitleComponent().getStyle().setFgColor(Color.WHITE);
form.getTitleComponent().getStyle().setPadding(10,10,0,0);
form.getTitleComponent().getStyle().setFont(font);
Here Color is my custom class that is used for color code, you can use your one.

Dynamic UI ListView

If I have a xml file linear layout with CheckBox, TextView and ImageView and want this to display as scrollable list, having different name and different pictures in every rom of ListView , how can I do it. I am really confused, can you please help me understand. Thank you.
What you're trying to achieve is a custom list row. There are plenty of examples around:
http://appfulcrum.com/?p=311
http://www.softwarepassion.com/android-series-custom-listview-items-and-adapters/

Resources