Styling domain Values in AndroidPlot does not include the first value - androidplot

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);

Related

Custom labels on VTKHexahedrons

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

What is the "for identifier" in a formRow good/used for?

The extension library offers means to structure your forms by Form Tables, where you can put Form Layout Columns and Form Layout Rows.
The Form Layout Rows have a property called "for" (the "For Indentifier") - here is the OnHover-text:
"Holds the ID of the control used to edit the data. That control should be contained within this Form Layout Row control."
So, I could enter the id of e.g. an Edit Box control I put into this form row (which translates to the code ' for="inputText1" '). But what exactly is this needed for? Where or for what can this information be used?
I found no different behaviour or limited functionality when sparing this information - at least, not how we use it atm. I found nothing in the web regarding this question; hope anyone can shed some light.
It's useful if your form row contains multiple controls, preventing the form row's code from determining its "for" target automatically. In that situation, you can provide the server-side ID of the "real" target control in the row to keep the label behavior working properly.
It's also mandatory to set this attribute if you want to use the built-in OneUI or Bootstrap themes to have the label formatted correctly. For example the text will be bold only if you set the for attribute (Bootstrap acts like this)

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.

Change z-index of marker in openlayers

I've a layer with multiple markers with rather big icons, so they overlap. Via the list on the side of the map users can select a marker and the map will pan (and zoom) to it. But it will still be behind some other makers.
How do I get a individual makers z-index and set it? I would be useful to get the highest used z-index and just add one. (another solution is to add the total number of markers to the z-index)
The markers (or features) are in a myLib.features array. The console doesn't show any z-index type functions.
I can't find a appropriate example or api function for this.
EDIT:
I found this example: http://dev.openlayers.org/examples/ordering.html
I don't really understand it. Somehow the created feature takes the next z-index given by the layer via somekind of symbolizer. I have no idea how to work this static sort into a dynamic one.
Try this:
First of all, make sure you are using a OpenLayers.Layer.Vector layer, not a OpenLayers.Layer.Markers layer. Apparently the Markers layer is old news and all new development is done in the Vector layer. It has more features. (I wasted a pile of time with the Markers layer myself).
Then, each of your markers needs to be a OpenLayers.Feature.Vector object. The constructor takes three arguments, the third of which is called the style. The style is where you set your image attributes, the background shadow, the mouse-over text, and the z-index, which has the property name "graphicZIndex". I think that's what you're looking for.
http://dev.openlayers.org/releases/OpenLayers-2.12/doc/apidocs/files/OpenLayers/Feature/Vector-js.html#OpenLayers.Feature.Vector.OpenLayers.Feature.Vector.style
Add your "markers" (which are Vector's) to your Vector layer with the addFeatures function. And just ignore the "options" argument.
http://dev.openlayers.org/releases/OpenLayers-2.12/doc/apidocs/files/OpenLayers/Layer/Vector-js.html#OpenLayers.Layer.Vector.addFeatures
I found that example page too, and I found it confusing too. It was setting all the markers' styles in the Vector layer's constructor (as default values to be used if the marker style was omitted) instead of the marker's constructor. I think it makes more sense to set the marker style in the marker constructor.
To change the style in real-time, take one of your OpenLayers.Feature.Vector markers, called "marker" and do this. And let's call the Vector Layer "layer".
marker.style.graphicZIndex = 13;
layer.redraw();

Resources