本文整理汇总了Java中com.google.gwt.user.client.ui.ToggleButton.setTitle方法的典型用法代码示例。如果您正苦于以下问题:Java ToggleButton.setTitle方法的具体用法?Java ToggleButton.setTitle怎么用?Java ToggleButton.setTitle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.user.client.ui.ToggleButton
的用法示例。
在下文中一共展示了ToggleButton.setTitle方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: LASAnnotationsButton
import com.google.gwt.user.client.ui.ToggleButton; //导入方法依赖的package包/类
public LASAnnotationsButton() {
mainPanel.add(layoutPanel);
annotationsButton = new ToggleButton(new Image(GWT.getModuleBaseURL()+"../images/i_off.png"),
new Image(GWT.getModuleBaseURL()+"../images/i_on.png"), new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
if ( annotationsButton.isDown() ) {
setOpen(true);
annotationsButton.setTitle(DEFAULT_UP_TOOLTIP);
} else {
setOpen(false);
annotationsButton.setTitle(DEFAULT_DOWN_TOOLTIP);
}
}
});
annotationsButton.setTitle(DEFAULT_UP_TOOLTIP);
annotationsButton.setStylePrimaryName("OL_MAP-ToggleButton");
annotationsButton.addStyleDependentName("WIDTH");
initWidget(annotationsButton);
}
示例2: LASAnnotationsButtonPanelImpl
import com.google.gwt.user.client.ui.ToggleButton; //导入方法依赖的package包/类
public LASAnnotationsButtonPanelImpl(String outputPanelID) {
setName(outputPanelID);
String moduleBaseURL = GWT.getModuleBaseURL();
String upImageURL = moduleBaseURL + "../images/i_off.png";
Image upImage = new Image(upImageURL);
String downImageURL = moduleBaseURL + "../images/i_on.png";
Image downImage = new Image(downImageURL);
button = new ToggleButton(
upImage,
downImage);
button.setTitle("Plot Annotations");
button.setStylePrimaryName("OL_MAP-ToggleButton");
button.addStyleDependentName("WIDTH");
button.addValueChangeHandler(new ValueChangeHandler<Boolean>() {
public void onValueChange(ValueChangeEvent<Boolean> event) {
annotations.setVisible(button.isDown());
}
});
initWidget(button);
}
示例3: addTabButton
import com.google.gwt.user.client.ui.ToggleButton; //导入方法依赖的package包/类
private void addTabButton(ToggleButton p_button, String p_title)
{
p_button.addValueChangeHandler( this );
p_button.setTitle( p_title );
p_button.setStyleName( "fmp-PushButton32" );
m_vTabPanel.add( p_button );
}
示例4: createToggleButton
import com.google.gwt.user.client.ui.ToggleButton; //导入方法依赖的package包/类
/** Method to create a Toggle button for the toolbar **/
private ToggleButton createToggleButton(String url, Integer top, Integer left, Integer width, Integer height, String tip) {
Image extract = new Image(url, left, top, width, height);
ToggleButton tb = new ToggleButton(extract);
tb.setHeight(height+"px");
tb.setWidth(width+"px");
tb.addClickHandler(evHandler);
if (tip != null) {
tb.setTitle(tip);
}
return tb;
}
示例5: createToggleButton
import com.google.gwt.user.client.ui.ToggleButton; //导入方法依赖的package包/类
private ToggleButton createToggleButton(AbstractImagePrototype img, String tip) {
ToggleButton tb = new ToggleButton(img.createImage());
tb.addClickListener(listener);
tb.setTitle(tip);
return tb;
}
示例6: createToggleButton
import com.google.gwt.user.client.ui.ToggleButton; //导入方法依赖的package包/类
private ToggleButton createToggleButton(AbstractImagePrototype img, String tip) {
ToggleButton tb = new ToggleButton(img.createImage());
tb.addClickHandler(handler);
tb.setTitle(tip);
return tb;
}
示例7: createToggleButton
import com.google.gwt.user.client.ui.ToggleButton; //导入方法依赖的package包/类
private ToggleButton createToggleButton(ImageResource img, String tip) {
ToggleButton tb = new ToggleButton(new Image(img));
tb.addClickHandler(handler);
tb.setTitle(tip);
return tb;
}
示例8: createToggleButton
import com.google.gwt.user.client.ui.ToggleButton; //导入方法依赖的package包/类
private ToggleButton createToggleButton(ImageResource img, String tip) {
ToggleButton tb = new ToggleButton(new Image(img));
tb.addClickHandler(handler);
tb.setTitle(tip);
return tb;
}
示例9: createToggleButton
import com.google.gwt.user.client.ui.ToggleButton; //导入方法依赖的package包/类
private ToggleButton createToggleButton(ImageResource img, String tip) {
ToggleButton tb = new ToggleButton(new Image(img));
tb.addClickHandler(handler);
tb.setTitle(tip);
return tb;
}
示例10: createToggleButton
import com.google.gwt.user.client.ui.ToggleButton; //导入方法依赖的package包/类
private ToggleButton createToggleButton(AbstractImagePrototype img, String tip) {
ToggleButton tb = new ToggleButton(img.createImage());
tb.addClickListener(listener);
tb.setTitle(tip);
return tb;
}