本文整理匯總了Java中com.google.gwt.user.client.ui.ScrollPanel.setHeight方法的典型用法代碼示例。如果您正苦於以下問題:Java ScrollPanel.setHeight方法的具體用法?Java ScrollPanel.setHeight怎麽用?Java ScrollPanel.setHeight使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.google.gwt.user.client.ui.ScrollPanel
的用法示例。
在下文中一共展示了ScrollPanel.setHeight方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: adapterWithScrollbars
import com.google.gwt.user.client.ui.ScrollPanel; //導入方法依賴的package包/類
/**
* Wraps the given {@code widget} with a ScollPanel and builds an
* {@link AdapterField} for it.
*
* @param label
* The field label. If {@code blank}, label separator is
* automatically disabled.
* @param widget
* The widget wrapped into the scroll panel and into the adapter
* field.
* @param width
* Width of the given widget.
* @param height
* Height of the scroll panel.
* @return The field.
*/
public static AdapterField adapterWithScrollbars(final String label, final IsWidget widget, final int width,
final int height) {
final ScrollPanel scrollPanel = new ScrollPanel();
scrollPanel.setWidget(Widget.asWidgetOrNull(widget));
scrollPanel.addAttachHandler(new AttachEvent.Handler() {
@Override
public void onAttachOrDetach(AttachEvent event) {
scrollPanel.setWidth(width + "px");
}
});
scrollPanel.setHeight(height + "px");
return adapter(label, scrollPanel);
}
示例2: QueryView
import com.google.gwt.user.client.ui.ScrollPanel; //導入方法依賴的package包/類
public QueryView() {
splitPanel = new MaterialSplitPanel();
splitPanel.setHeight(Window.getClientHeight() - 102 + "px");
splitPanel.setBarPosition(25);
leftPanel = new MaterialPanel();
leftPanel.setBackgroundColor(Color.WHITE);
leftPanel.setGrid("s6 l3");
leftScrollPanel = new ScrollPanel();
leftScrollPanel.setHeight(Window.getClientHeight() - 130 + "px");
rightPanel = new MaterialPanel();
rightPanel.setBackgroundColor(Color.GREY_LIGHTEN_2);
rightPanel.setGrid("s6 l9");
rightScrollPanel = new ScrollPanel();
rightScrollPanel.setHeight(Window.getClientHeight() - 130 + "px");
splitPanel.add(leftPanel);
splitPanel.add(rightPanel);
add(splitPanel);
}
示例3: createLyricsDialog
import com.google.gwt.user.client.ui.ScrollPanel; //導入方法依賴的package包/類
private void createLyricsDialog()
{
lyricsDialog = new DialogBox();
VerticalPanel vPanel = new VerticalPanel();
vPanel.setHeight( "100%" );
vPanel.setHorizontalAlignment( VerticalPanel.ALIGN_CENTER );
vPanel.setVerticalAlignment( VerticalPanel.ALIGN_MIDDLE );
lyricsDialog.add( vPanel );
lyrics = new HTML();
ScrollPanel scrollPanel = new ScrollPanel();
scrollPanel.setWidth( "300px" );
scrollPanel.setHeight( "250px" );
scrollPanel.add( lyrics );
vPanel.add( scrollPanel );
Button close = new NativeButton( "Close" );
close.addClickListener( new ClickListener() {
public void onClick( Widget arg0 ) {
lyricsDialog.hide();
}
} );
vPanel.add( close );
}
示例4: LeftPanelWidget
import com.google.gwt.user.client.ui.ScrollPanel; //導入方法依賴的package包/類
public LeftPanelWidget(PlannerFormWidget plannerForm,
ItineraryStackWidget itineraryStack, AlertStackWidget alertStack,
boolean useScrollPanel) {
verticalPanel = new VerticalPanel();
verticalPanel.add(plannerForm);
if (useScrollPanel) {
VerticalPanel innerScrollPanel = new VerticalPanel();
innerScrollPanel.add(alertStack);
innerScrollPanel.add(itineraryStack);
ScrollPanel scrollPanel = new ScrollPanel(innerScrollPanel);
scrollPanel.setHeight("100%");
verticalPanel.add(scrollPanel);
verticalPanel.setCellHeight(scrollPanel, "100%");
} else {
verticalPanel.add(alertStack);
verticalPanel.add(itineraryStack);
}
initWidget(verticalPanel);
setWidth("100%");
if (useScrollPanel) {
setHeight("100%");
}
}
示例5: DiagramController
import com.google.gwt.user.client.ui.ScrollPanel; //導入方法依賴的package包/類
public DiagramController(int canvasWidth, int canvasHeight, int frameWidth,
int frameHeight) {
this(canvasWidth, canvasHeight);
scrollPanel = new ScrollPanel(getView());
scrollPanel.setWidth(frameWidth-30 + "px");
scrollPanel.setHeight(frameHeight + "px");
}
示例6: onUpdate
import com.google.gwt.user.client.ui.ScrollPanel; //導入方法依賴的package包/類
@Override
public void onUpdate(int width, int height) {
ScrollPanel panel = (ScrollPanel)getWidget();
panel.setHeight(height + "px");
panel.setWidth(width + "px");
container.setWidth("100%");
for (ListItem item : items) {
item.onUpdate(width, height);
}
}
示例7: SearchWidget
import com.google.gwt.user.client.ui.ScrollPanel; //導入方法依賴的package包/類
public SearchWidget(MainWidget master) {
this.master = master;
panel = new VerticalPanel();
searchbar = new HorizontalPanel();
searchbar.setHeight("100px");
scrollable = new ScrollPanel();
scrollable.setHeight("400px");
oracle = new MultiWordSuggestOracle();
box = new SuggestBox(oracle);
b = new Button("Search");
box.setWidth("200px");
lbl = new Label("Enter Search Criteria");
BuildUI();
}
示例8: render
import com.google.gwt.user.client.ui.ScrollPanel; //導入方法依賴的package包/類
public UIObject render(ComponentGVO component, String uuid, String parent, String context) {
QRootPanel qRootPanel = null;
if (component != null) {
if (component instanceof WindowGVO) {
WindowGVO gvo = (WindowGVO) component;
qRootPanel = new QRootPanel();
RendererHelper.addId(component, qRootPanel,uuid,parent, context, false);
RendererHelper.addUUID(component, qRootPanel, uuid);
RendererHelper.addEvents(component, qRootPanel, uuid);
Widget rootPanel = (Widget)super.renderChildComponent(gvo.getRootPanel(), uuid,gvo.getId(), context);
Widget menuAndToolbar = createMenuAndToolbar(qRootPanel,gvo.getRootPanel(), uuid, parent);
Widget messageBox = new MessageBox();
ScrollPanel sp = new ScrollPanel();
if (ClientApplicationContext.getInstance().isMDI()){
sp.setHeight(gvo.getHeight());
sp.setWidth(gvo.getWidth());
} else {
sp.setHeight(Window.getClientHeight()+"px");
sp.setWidth(Window.getClientWidth()+"px");
}
sp.add(rootPanel);
qRootPanel.setMenuAndToolBar(menuAndToolbar);
qRootPanel.setRootPanel(sp);
qRootPanel.setMessageBox(messageBox);
qRootPanel.add(menuAndToolbar,0,0);
int yPosition = toolbarHeight != null ? Integer.parseInt(toolbarHeight)+ 20 : 0;
if(qRootPanel.getMenuBar() != null){
yPosition+=22;
}
qRootPanel.add(sp,0,yPosition);
qRootPanel.add(messageBox,200,0);
}
}
return qRootPanel;
}
示例9: show
import com.google.gwt.user.client.ui.ScrollPanel; //導入方法依賴的package包/類
/**
* Creates the preview wadl dialog
* @param html The xhtml string containig the syntax-highlighted wadl
*/
public static void show(String html) {
final DialogBox dialog = new DialogBox();
dialog.setText(GuiFactory.strings.wadlPreviewDialog());
VerticalPanel preview = new VerticalPanel();
ScrollPanel scrollPanel = new ScrollPanel();
scrollPanel.setStyleName("restDescribe-wadlArea");
scrollPanel.setHeight(Math.floor(Window.getClientHeight() * 0.75) + "px");
scrollPanel.setWidth(Math.floor(Window.getClientWidth() * 0.9) + "px");
scrollPanel.add(new HTML(html));
preview.add(scrollPanel);
Button closeButton = new Button(GuiFactory.strings.close());
closeButton.addClickListener(new ClickListener() {
public void onClick(Widget sender) {
dialog.hide();
GuiFactory.blockScreen(false);
}
});
preview.add(new HTML("<br />"));
preview.add(closeButton);
preview.setCellHorizontalAlignment(closeButton, HasHorizontalAlignment.ALIGN_CENTER);
dialog.setWidget(preview);
dialog.setPopupPosition((int) Math.floor(Window.getClientWidth() * 0.05), (int) Math.floor(Window.getClientHeight() * 0.05));
GuiFactory.blockScreen(true);
dialog.show();
}
示例10: createPreviewArea
import com.google.gwt.user.client.ui.ScrollPanel; //導入方法依賴的package包/類
private void createPreviewArea(TabLayoutPanel tab) {
previewPanel = new VerticalPanel();//really need?
previewPanel.setSize("100%","100%");
ScrollPanel scroll=new ScrollPanel();
scroll.setWidth("100%");
previewPanel.add(scroll);
scroll.setHeight("100%");
previewHTML = new HTML();
//scroll.setWidget(previewHTML);
scroll.setWidget(htmlContainer);
tab.add(previewPanel,"Preview");
}
示例11: setTableUI
import com.google.gwt.user.client.ui.ScrollPanel; //導入方法依賴的package包/類
private void setTableUI(final FlexTable flexTable, final DataTable dataTable) {
ScrollPanel panel = new ScrollPanel();
if (dataTable.getRows().getRow().size() == 0) {
setEmptyTableView(flexTable, dataTable.getHeaderRow());
}
panel.add(flexTable);
panel.setHeight("150px");
panel.setWidth("400px");
panel.setTitle(dataTable.getName());
HorizontalPanel hPanel = new HorizontalPanel();
insertRowButton = new Button();
deleteRowButton = new Button();
deleteAllRowButton = new Button();
manualExtractionButton = new Button();
setButtonsText();
onInsertButtonClicked(insertRowButton, dataTable);
onDeleteButtonClicked(deleteRowButton, dataTable);
onDeleteAllButtonClicked(deleteAllRowButton, dataTable);
onManualExtractionButtonClicked(manualExtractionButton, dataTable);
final String tableName = dataTable.getName();
tableNameVsButtonMap.put(insertRowButton, tableName);
tableNameVsButtonMap.put(deleteRowButton, tableName);
tableNameVsButtonMap.put(deleteAllRowButton, tableName);
tableNameVsButtonMap.put(manualExtractionButton, tableName);
Label label = new Label();
label.setWidth(GAP_BETWEEN_BUTTONS);
hPanel.add(insertRowButton);
hPanel.add(label);
label = new Label();
label.setWidth(GAP_BETWEEN_BUTTONS);
hPanel.add(deleteRowButton);
hPanel.add(label);
label = new Label();
label.setWidth(GAP_BETWEEN_BUTTONS);
hPanel.add(deleteAllRowButton);
hPanel.add(label);
hPanel.add(manualExtractionButton);
Label emptyLabel = new Label();
emptyLabel.setHeight("20px");
verticalPanel.add(emptyLabel);
emptyLabel = new Label();
emptyLabel.setText(dataTable.getName());
verticalPanel.add(emptyLabel);
verticalPanel.add(hPanel);
emptyLabel = new Label();
emptyLabel.setHeight("10px");
verticalPanel.add(emptyLabel);
verticalPanel.add(panel);
}
示例12: LeftPanelWidget
import com.google.gwt.user.client.ui.ScrollPanel; //導入方法依賴的package包/類
public LeftPanelWidget(Unit unit) {
super(unit);
addStyleName(Utils.sandboxStyle.leftPanel());
HorizontalPanel titlePanel = new HorizontalPanel();
titlePanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
titlePanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);
titleLabel = new Label();
titleLabel.addStyleName(Utils.sandboxStyle.title());
titlePanel.add(titleLabel);
titlePanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_RIGHT);
anchor = new Anchor();
anchor.addStyleName(Utils.sandboxStyle.toggle());
titlePanel.add(anchor);
titlePanel.setSize("100%", "100%");
addNorth(titlePanel, 40);
contentScroll = new ScrollPanel() {
@Override
public void onResize() {
super.onResize();
int scrollHeight = this.getScrollableElement().getClientHeight();
int elementHeight = this.getContainerElement().getClientHeight();
boolean isScroll = elementHeight > scrollHeight;
if (isScroll && !(LeftPanelWidget.this.isOpen && LeftPanelWidget.this.isActive)) {
LeftPanelWidget.this.addStyleName(Utils.sandboxStyle.isScroll());
} else {
LeftPanelWidget.this.removeStyleName(Utils.sandboxStyle.isScroll());
}
}
};
contentScroll.setHeight("100%");
add(contentScroll);
addStyleName(Utils.sandboxStyle.isOpen());
anchor.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
if (isActive) {
setOpen(!isOpen, false);
}
}
});
}
示例13: DiaryLayerDialog
import com.google.gwt.user.client.ui.ScrollPanel; //導入方法依賴的package包/類
public DiaryLayerDialog(MainWidget master) {
this.master = master;
dialog = new DialogBox(false, true);
tabPanel = new TabPanel();
passPnl = new ScrollPanel();
passPnl.setWidth("500px");
passPnl.setHeight("100px");
maryView = new SimplePanel();
johnView = new SimplePanel();
passThrus = new Label("pass-throughs");
passThrus.setWidth("100%");
passThrus.setStyleName("flexTableCellHead");
MarylblId = new Label();
JohnJameslblId = new Label();
MarylblArrivalDate= new Label();
JohnJameslblArrivalDate = new Label();
MarylblDepartDate= new Label();
JohnJameslblDepartDate = new Label();
MarylblLocation= new Label();
JohnJameslblLocation = new Label();
MarylblLink= new Label();
JohnJameslblLink = new Label();
MarylblSights= new Label();
JohnJameslblSights = new Label();
MarylblLatitude = new Label();
MarylblLongitude = new Label();
JohnJameslblLatitude = new Label();
JohnJameslblLongitude = new Label();
buildUI();
}
示例14: AllDialog
import com.google.gwt.user.client.ui.ScrollPanel; //導入方法依賴的package包/類
public AllDialog(MainWidget master) {
this.master = master;
dialog = new DialogBox(false, true);
tabPanel = new TabPanel();
passPnl = new ScrollPanel();
passPnl.setWidth("500px");
passPnl.setHeight("100px");
maryView = new SimplePanel();
johnView = new SimplePanel();
V1View = new SimplePanel();
V2View = new SimplePanel();
V3View = new SimplePanel();
V4View = new SimplePanel();
passThrus = new Label("pass-throughs");
passThrus.setWidth("100%");
passThrus.setStyleName("flexTableCellHead");
MarylblId = new Label();
JohnJameslblId = new Label();
V1lblId = new Label();
V2lblId = new Label();
V3lblId = new Label();
V4lblId = new Label();
MarylblArrivalDate= new Label();
JohnJameslblArrivalDate = new Label();
V1lblArrivalDate= new Label();
V2lblArrivalDate = new Label();
V3lblArrivalDate= new Label();
V4lblArrivalDate = new Label();
MarylblDepartDate= new Label();
JohnJameslblDepartDate = new Label();
V1lblDepartDate= new Label();
V2lblDepartDate = new Label();
V3lblDepartDate= new Label();
V4lblDepartDate = new Label();
MarylblLocation= new Label();
JohnJameslblLocation = new Label();
V1lblLocation= new Label();
V2lblLocation = new Label();
V3lblLocation= new Label();
V4lblLocation = new Label();
MarylblLink= new Label();
JohnJameslblLink = new Label();
V1lblLink= new Label();
V2lblLink = new Label();
V3lblLink= new Label();
V4lblLink = new Label();
MarylblSights= new Label();
JohnJameslblSights = new Label();
V1lblSights= new Label();
V2lblSights = new Label();
V3lblSights= new Label();
V4lblSights = new Label();
MarylblLatitude = new Label();
MarylblLongitude = new Label();
JohnJameslblLatitude = new Label();
JohnJameslblLongitude = new Label();
V1lblLatitude = new Label();
V1lblLongitude = new Label();
V2lblLatitude = new Label();
V2lblLongitude = new Label();
V3lblLatitude = new Label();
V3lblLongitude = new Label();
V4lblLatitude = new Label();
V4lblLongitude = new Label();
buildUI();
}
示例15: onModuleLoad
import com.google.gwt.user.client.ui.ScrollPanel; //導入方法依賴的package包/類
public void onModuleLoad()
{
final WebPoller webPoller = WebPoller.newWebPoller();
webPoller.setRequestFactory( this );
registerListeners( webPoller );
_start = new Button( "Start", new ClickHandler()
{
@Override
public void onClick( final ClickEvent event )
{
_start.setEnabled( false );
_longPoll.setEnabled( false );
_longErrorBackOff.setEnabled( false );
webPoller.setLogLevel( Level.INFO );
webPoller.setInterRequestDuration( _longPoll.getValue() == Boolean.TRUE ? 0 : 2000 );
webPoller.setInterErrorDuration( _longErrorBackOff.getValue() == Boolean.TRUE ? 5000 : 0 );
webPoller.start();
}
} );
_stop = new Button( "Stop", new ClickHandler()
{
@Override
public void onClick( ClickEvent event )
{
webPoller.stop();
_stop.setEnabled( false );
}
} );
_stop.setEnabled( false );
_longPoll = new CheckBox( "Long Poll" );
_longErrorBackOff = new CheckBox( "Error Backoff" );
_messages = new HTML();
_scrollPanel = new ScrollPanel();
_scrollPanel.setHeight( "250px" );
_scrollPanel.add( _messages );
RootPanel.get().add( _scrollPanel );
{
final FlowPanel controls = new FlowPanel();
controls.add( _longPoll );
controls.add( _longErrorBackOff );
controls.add( _start );
controls.add( _stop );
RootPanel.get().add( controls );
}
}