This is my code :
HighChart chart = new HighChart(title, PIE, data);
VLayout vlayout = new VLayout(title);
vlayout.setHeight100();
vlayout.setWidth100();
vlayout.addMember(chart);
Tab tab = new Tab();
tab.setTitle(title);
tab.setPane(vlayout);
tab.setCanClose(true);
tabset.addTab(tab);
The HighChart class contain the showcase example code.
The result is an empty tab, any solutions?
I solved the problem, the ​​RootLayoutPanel who did not accept the chart display, a simple replacement by a layout.draw(); did the trick
Related
I'm using V-Leaflet in the Java project I have:
LMap leafletMap = new LMap();
LOpenStreetMapLayer baseLayer = new LOpenStreetMapLayer();
leafletMap.addBaseLayer(baseLayer, null);
The map appearance and functionality is fine
except the tiles icon at the upper-right corner. How to remove it??
I'm using Vaadin 8 with Java.
TIA.
Extension extOut = null;
for(Extension ext : leafletMap.getExtensions()){
if(ext instanceof LLayers){
extOut = ext;
}
}
leafletMap.removeControl((AbstractControl)extOut);
I am working on smartGwt project i have developed simple slectedItem dropdown. This dropdown does not showing any vaules for slection this is multiple selction dropdown. below is my code
final Window winModal = new Window();
winModal.setWidth(700);
winModal.setHeight(400);
winModal.setAutoSize(true);
winModal.setTitle("Schedule");
winModal.setShowMinimizeButton(false);
winModal.setIsModal(true);
winModal.setShowModalMask(true);
winModal.centerInPage();
DynamicForm form = new DynamicForm();
form.setHeight100();
form.setWidth100();
form.setPadding(5);
form.setLayoutAlign(VerticalAlignment.BOTTOM);
SelectItem selectItemMultiplePickList = new SelectItem();
selectItemMultiplePickList.setTitle("Select Multiple");
selectItemMultiplePickList.setMultiple(true);
selectItemMultiplePickList.setMultipleAppearance(MultipleAppearance.PICKLIST);
selectItemMultiplePickList.setValueMap("Cat", "Dog", "Giraffe", "Goat", "Marmoset", "Mouse");
form.setFields(selectItemMultiplePickList);
winModal.addItem(form);
winModal.show();
my dropdown widget is showing but not showing any values inside dropdown
anyhelp
Thanks in advance
It's kinda hacky but a quick way to use a select without a datasource is to set the special values:
https://www.smartclient.com/smartgwtee-release/javadoc/com/smartgwt/client/widgets/form/fields/SelectItem.html#setSpecialValues-java.util.LinkedHashMap-
i'm new in java, i try to add new lines in a message string:
String message = "Test User1,\n Test User2,\n Test User1";
WindowMessage win2 = new WindowMessage("The following Names are duplicate : "+messages);
win2.setModal(true);
app.addWindow(win2);
i tried to add \r\n, \n, %r%n, %n, but none of them working
in my WindowMessage(extends WindowPane) class, the Message is set as a Label:
lblMessage.setText(Message);
Any idea why?
Try using JOptionPane.showMessageDialog
It's not clear which API you're using, but try using a JLabel with html:
JLabel l = new JLabel("<html>line1<br>line2</html>");
If you are using a library that does not support multilines within the same label (check the docs!), then you should stack two labels on top of each other:
Label line1 = ...
Label line2 = ...
If you do not have control over how many labels you can add, then what you are trying to do is not possible with your library.
Following is my code but it shows only one column in autocomplete but i want shows data in tabular foramte with multiple column[In short i want to show suggestion box in tabular formate]. how i can do that?
Thanks in advance Please suggest anything..
FlowPanel panel = new FlowPanel();
initWidget(panel);
final BulletList list = new BulletList();
list.setStyleName("token-input-list-facebook");
final ListItem item = new ListItem();
item.setStyleName("token-input-input-token-facebook");
final TextBox itemBox = new TextBox();
itemBox.getElement().setAttribute( "style", "outline-color: -moz-use-text-color; outline-style: none; outline-width: medium;");
final SuggestBox box = new SuggestBox(getSuggestions(), itemBox);
box.getElement().setId("suggestion_box");
item.add(box);
list.add(item);
I am using gwt openlayers to draw some linestrings on the map. I would like to change the draw feature line appearance. I noticed that PathHandler class has setStyle method, but setting style using this method does not change the line appearance.
private DrawFeature createDrawFeature() {
DrawFeatureOptions options = new DrawFeatureOptions();
options.onFeatureAdded(getStyle());
PathHandler handler = new PathHandler();
handler.setStyle(style);
return new DrawFeature(layer, handler, options );
}
private Style getStyle() {
Style style = new Style();
style.setStrokeColor("#ffffff");
style.setStrokeWidth(2.0);
return style;
}
I was trying to set different style options but there was no effect.
Does anyone know how to change appearance of DrawFeature line?
The handler that does the drawing (Point, Path, or Polygon) is in charge if the style of your sketches (features before they are completed).
So to style the sketches you do :
//Create a style. We want a blue dashed line.
final Style drawStyle = new Style(); //create a Style to use
drawStyle.setFillColor("white");
drawStyle.setGraphicName("x");
drawStyle.setPointRadius(4);
drawStyle.setStrokeWidth(3);
drawStyle.setStrokeColor("#66FFFF");
drawStyle.setStrokeDashstyle("dash");
//create a StyleMap using the Style
StyleMap drawStyleMap = new StyleMap(drawStyle);
//Create PathHanlderOptions using this StyleMap
PathHandlerOptions phOpt = new PathHandlerOptions();
phOpt.setStyleMap(drawStyleMap);
//Create DrawFeatureOptions and set the PathHandlerOptions (that have the StyleMap, that have the Style we wish)
DrawFeatureOptions drawFeatureOptions = new DrawFeatureOptions();
drawFeatureOptions.setHandlerOptions(phOpt);
PathHandler pathHanlder = new PathHandler();
// Create the DrawFeature control to draw on the map, and pass the DrawFeatureOptions to control the style of the sketch
final DrawFeature drawLine = new DrawFeature(vectorLayer, pathHanlder, drawFeatureOptions);
map.addControl(drawLine);
drawLine.activate();
I also added an example to she showcase : http://demo.gwt-openlayers.org/gwt_ol_showcase/GwtOpenLayersShowcase.html?example=DrawFeature%20style%20example