本文整理匯總了Java中com.google.gwt.user.client.ui.DockLayoutPanel類的典型用法代碼示例。如果您正苦於以下問題:Java DockLayoutPanel類的具體用法?Java DockLayoutPanel怎麽用?Java DockLayoutPanel使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
DockLayoutPanel類屬於com.google.gwt.user.client.ui包,在下文中一共展示了DockLayoutPanel類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: addAnimationCompleteEventHandler
import com.google.gwt.user.client.ui.DockLayoutPanel; //導入依賴的package包/類
/**
* @param eventBus
*/
private void addAnimationCompleteEventHandler(HandlerManager eventBus) {
eventBus.addHandler(AnimationCompleteEvent.type, new AnimationCompleteEventHandler() {
@Override
public void onAnimationComplete(AnimationCompleteEvent event) {
if (event.getIndex() == 1) {
((Button) ((HorizontalPanel) ((DockLayoutPanel) event.getWidget()).getWidget(0)).getWidget(0)).setFocus(true);
} else {
presenter.setFocus();
}
}
});
}
示例2: setInitialFolderManagementView
import com.google.gwt.user.client.ui.DockLayoutPanel; //導入依賴的package包/類
public void setInitialFolderManagementView(FolderManagementController controller, String parentFolderPath, String baseFolderUrl,
Map<String, String> batchClassesMap) {
Label footer = new Label();
folderTableView = new FolderTableView(footer);
folderTablePresenter = new FolderTablePresenter(controller, folderTableView, parentFolderPath, baseFolderUrl);
folderSystemTreeView = new FolderSystemTreeView();
folderSystemTreePresenter = new FolderSystemTreePresenter(controller, folderSystemTreeView, parentFolderPath, footer);
SplitLayoutPanel mainContentPanel = new SplitLayoutPanel();
DockLayoutPanel leftLayoutPanel = new DockLayoutPanel(Unit.PCT);
ScrollPanel treeScrollPanel = new ScrollPanel();
treeScrollPanel.add(folderSystemTreeView);
FolderSelectionWidget folderSelectionWidget = new FolderSelectionWidget(batchClassesMap, controller.getEventBus());
leftLayoutPanel.addNorth(folderSelectionWidget, 10);
leftLayoutPanel.add(treeScrollPanel);
mainContentPanel.addWest(leftLayoutPanel, 200);
DockLayoutPanel contentMainPanel = new DockLayoutPanel(Unit.PCT);
contentMainPanel.add(folderTableView);
contentMainPanel.addStyleName(FolderManagementConstants.WHITE_BACKGROUND);
mainContentPanel.add(contentMainPanel);
mainPanel.add(mainContentPanel);
ScreenMaskUtility.unmaskScreen();
}
示例3: maximize
import com.google.gwt.user.client.ui.DockLayoutPanel; //導入依賴的package包/類
@Override
public void maximize() {
DockLayoutPanel.Direction direction = splitLayoutPanel.getWidgetDirection(widget);
if (DockLayoutPanel.Direction.NORTH == direction
|| DockLayoutPanel.Direction.SOUTH == direction) {
int maxHeight = splitLayoutPanel.getOffsetHeight() - splitLayoutPanel.getSplitterSize();
splitLayoutPanel.setWidgetSize(widget, maxHeight);
splitLayoutPanel.animate(DURATION);
} else if (DockLayoutPanel.Direction.WEST == direction
|| DockLayoutPanel.Direction.EAST == direction) {
int maxWidth = splitLayoutPanel.getOffsetWidth() - splitLayoutPanel.getSplitterSize();
splitLayoutPanel.setWidgetSize(widget, maxWidth);
splitLayoutPanel.animate(DURATION);
}
}
示例4: OpenLocationViewImpl
import com.google.gwt.user.client.ui.DockLayoutPanel; //導入依賴的package包/類
public OpenLocationViewImpl() {
DockLayoutPanel panel = new DockLayoutPanel(Style.Unit.PX);
NodeStorage storage =
new NodeStorage(
new NodeUniqueKeyProvider() {
@Override
public String getKey(@NotNull Node item) {
return String.valueOf(item.hashCode());
}
});
NodeLoader loader = new NodeLoader(Collections.<NodeInterceptor>emptySet());
tree = new Tree(storage, loader);
panel.add(tree);
setContentWidget(panel);
panel.ensureDebugId("LS-open-location-panel");
}
示例5: GitHubAuthenticatorViewImpl
import com.google.gwt.user.client.ui.DockLayoutPanel; //導入依賴的package包/類
@Inject
public GitHubAuthenticatorViewImpl(
DialogFactory dialogFactory,
GitHubLocalizationConstant locale,
ProductInfoDataProvider productInfoDataProvider) {
this.dialogFactory = dialogFactory;
this.locale = locale;
isGenerateKeys = new CheckBox(locale.authGenerateKeyLabel());
isGenerateKeys.setValue(true);
contentPanel = new DockLayoutPanel(Style.Unit.PX);
contentPanel.addNorth(
new InlineHTML(locale.authorizationDialogText(productInfoDataProvider.getName())), 20);
contentPanel.addNorth(isGenerateKeys, 20);
}
示例6: FindUsagesViewImpl
import com.google.gwt.user.client.ui.DockLayoutPanel; //導入依賴的package包/類
@Inject
public FindUsagesViewImpl(
NodeFactory nodeFactory, JavaLocalizationConstant localizationConstant) {
this.nodeFactory = nodeFactory;
setTitle(localizationConstant.findUsagesPartTitle());
DockLayoutPanel panel = new DockLayoutPanel(Style.Unit.PX);
NodeStorage storage =
new NodeStorage(
new NodeUniqueKeyProvider() {
@Override
public String getKey(@NotNull Node item) {
return String.valueOf(item.hashCode());
}
});
NodeLoader loader = new NodeLoader(Collections.<NodeInterceptor>emptySet());
tree = new Tree(storage, loader);
panel.add(tree);
setContentWidget(panel);
panel.ensureDebugId("findUsages-panel");
}
示例7: show
import com.google.gwt.user.client.ui.DockLayoutPanel; //導入依賴的package包/類
public void show() {
LayoutManager lm= Application.getInstance().getLayoutManager();
_layout.clear();
lm.getRegion(LayoutManager.POPOUT_REGION).setDisplay(GwtUtil.wrap(_layout,4,4,4,4,true));
// lm.getRegion(LayoutManager.POPOUT_REGION).setDisplay(_layout);
// lm.getRegion(LayoutManager.POPOUT_REGION).show();
_layout.addNorth(headerBar, TOOLBAR_HEIGHT);
DockLayoutPanel p= new DockLayoutPanel(Style.Unit.PX);
// _layout.add(GwtUtil.wrap(_popout.getToplevelExpandRoot(), 1,4,1,4));
_layout.add(GwtUtil.wrap(_popout.getToplevelExpandRoot(), 1,4,1,4));
_showing= true;
GwtUtil.setHidden(_close, !isCloseShowing());
_close.setDesc("Close");
}
示例8: makeTopHeader
import com.google.gwt.user.client.ui.DockLayoutPanel; //導入依賴的package包/類
protected Widget makeTopHeader(String title) {
setTitleLabel(title);
titleLabel.setWidth("100%");
DOM.setStyleAttribute(titleLabel.getElement(),"cursor", "default");
Widget close = makeCloseButton(true);
DockLayoutPanel header = new DockLayoutPanel(Style.Unit.PX);
header.setStyleName("title-bar");
// header.addStyleName(_ffCss.titleBgColor());
header.addStyleName(_ffCss.titleColor());
header.addStyleName(_ffCss.popupTitleHorizontalBackground());
titleLabel.addStyleName("title-label");
header.addEast(close, 12);
header.add(titleLabel);
header.setHeight("14px");
header.setWidth("100%");
return header;
}
示例9: makeUI
import com.google.gwt.user.client.ui.DockLayoutPanel; //導入依賴的package包/類
public Widget makeUI() {
spacialArea= new SpacialSelectUI(new SpacialSelectUI.TabChange() {
public void onTabChange() {
adjustSpacialHeight();
}
});
spacialArea.setSpacialOptions(new HashSet<SpacialType>(Arrays.asList(SpacialType.Cone, SpacialType.Box)), DataSetInfo.DataTypes.CATALOGS);
spacialArea.updateSearchMax(3600);
mainPanel.setSize("100%", "100%");
topArea= new DockLayoutPanel(Style.Unit.PX);
Widget spacialAreaWrap= new SimplePanel(spacialArea);
topArea.add(spacialAreaWrap);
mainPanel.addNorth(topArea, spacialArea.getHeightRequired());
DOM.getParent(topArea.getElement()).addClassName("change-height-transition");
return mainPanel;
}
示例10: reinit
import com.google.gwt.user.client.ui.DockLayoutPanel; //導入依賴的package包/類
void reinit(PopoutWidget.ViewType viewType, DockLayoutPanel expandRoot) {
expandRoot.clear();
doBlink(false);
_expandGrid.clear();
_expandDeck.clear();
if (_topBar!=null) expandRoot.addNorth(_topBar, PopoutWidget.CONTROLS_HEIGHT_LARGE);
// if (!AllPlots.getInstance().isMenuBarPopup()) {
// expandRoot.addSouth(AllPlots.getInstance().getMenuBarInlineStatusLine(),25);
// }
if (viewType== PopoutWidget.ViewType.GRID) {
expandRoot.add(_expandGrid);
_expandGrid.setPixelSize(expandRoot.getOffsetWidth(), expandRoot.getOffsetHeight());
// GwtUtil.setHidden(oneImageFillStyle, true);
}
else if (viewType== PopoutWidget.ViewType.ONE) {
expandRoot.add(_expandDeck);
// GwtUtil.setHidden(oneImageFillStyle, false);
}
GwtUtil.setHidden(_controlPanel, _originalExpandedList.size() <= 1);
}
示例11: processRegion
import com.google.gwt.user.client.ui.DockLayoutPanel; //導入依賴的package包/類
private static void processRegion(DockLayoutPanel p, String region, boolean show) {
DockLayoutPanel.Direction dir = region.equals("north") ? DockLayoutPanel.Direction.NORTH :
region.equals("south") ? DockLayoutPanel.Direction.SOUTH :
region.equals("east") ? DockLayoutPanel.Direction.EAST :
region.equals("west") ? DockLayoutPanel.Direction.WEST : DockLayoutPanel.Direction.CENTER;
for(int i = 0; i < p.getWidgetCount(); i++) {
DockLayoutPanel.Direction wd = p.getWidgetDirection(p.getWidget(i));
if (wd == dir) {
if (show) {
GwtUtil.DockLayout.showWidget(p, p.getWidget(i));
} else {
GwtUtil.DockLayout.hideWidget(p, p.getWidget(i));
}
}
}
}
示例12: GwtRulerComposite
import com.google.gwt.user.client.ui.DockLayoutPanel; //導入依賴的package包/類
/**
* Constructor
*
* @param parent
* a widget which will be the parent of the new instance (cannot
* be null)
* @param style
* the style of widget to construct
* @see Composite#Composite(org.eclipse.swt.widgets.Composite, int)
*/
// public GwtRulerComposite(Composite parent, int style) {
// super(parent, style);
// addDisposeListener(new DisposeListener() {
// public void widgetDisposed(DisposeEvent e) {
// disposeResources();
// }
// });
// }
public GwtRulerComposite(LayoutPanel element) {
super(null, SWT.NONE);
this.rootElement = element;
// create dock panel here with rulers
dockLayoutPanel = new DockLayoutPanel(Unit.PX);
dockLayoutPanel.getElement().setId("INNER_DOCK_LAYOUT_PANEL");
rootElement.add(dockLayoutPanel);
northPanel = new DockLayoutPanel(Unit.PX);
northPanel.getElement().setId("NORTH_DOCK_LAYOUT_PANEL");
dockLayoutPanel.addNorth(northPanel, 19);
northPanel.addWest(createPickle(), 19);
topPartInDockPanel = new Composite(null, SWT.NONE);
LayoutPanel topPanel = (LayoutPanel) topPartInDockPanel
.getNativeWidget();
topPanel.getElement().setId("TOP_RULER");
northPanel.add(topPanel);
northPanel.forceLayout();
westPartInDockPanel = new Composite(null, SWT.NONE);
westPanel = (LayoutPanel) westPartInDockPanel.getNativeWidget();
westPanel.getElement().setId("LEFT_RULER");
dockLayoutPanel.addWest(westPanel, 19);
view = (LayoutPanel) getGwtWidget();
dockLayoutPanel.add(view);
dockLayoutPanel.forceLayout();
}
示例13: setupUi
import com.google.gwt.user.client.ui.DockLayoutPanel; //導入依賴的package包/類
private void setupUi() {
// Set up UI
DockLayoutPanel self = BINDER.createAndBindUi(this);
RootPanel.get("app").add(self);
// DockLayoutPanel forcibly conflicts with sensible layout control, and
// sticks inline styles on elements without permission. They must be
// cleared.
self.getElement().getStyle().clearPosition();
splitPanel.setWidgetMinSize(searchPanel, 300);
AttachmentManagerProvider.init(AttachmentManagerImpl.getInstance());
if (LogLevel.showDebug()) {
logPanel.enable();
} else {
logPanel.removeFromParent();
}
setupSearchPanel();
setupWavePanel();
FocusManager.init();
}
示例14: ViewWithToolbar
import com.google.gwt.user.client.ui.DockLayoutPanel; //導入依賴的package包/類
public ViewWithToolbar(final PartStackUIResources resources) {
container = new DockLayoutPanel(Style.Unit.PX);
initWidget(container);
container.setSize("100%", "100%");
toolBar = new LayoutPanel();
toolBar.addStyleName(resources.partStackCss().ideBasePartToolbar());
container.addNorth(toolBar, 20);
// this hack used for adding box shadow effect to toolbar
toolBar.getElement().getParentElement().getStyle().setOverflow(Style.Overflow.VISIBLE);
}
示例15: testPanels
import com.google.gwt.user.client.ui.DockLayoutPanel; //導入依賴的package包/類
@Test
public void testPanels() throws Exception {
invokeAllAccessibleMethods(new AbsolutePanel() {});
invokeAllAccessibleMethods(new CellPanel() {});
invokeAllAccessibleMethods(new ComplexPanel() {});
invokeAllAccessibleMethods(new DeckLayoutPanel() {});
invokeAllAccessibleMethods(new DeckPanel() {});
invokeAllAccessibleMethods(new DecoratorPanel() {});
invokeAllAccessibleMethods(new DockLayoutPanel(Unit.PX) {});
invokeAllAccessibleMethods(new DockPanel() {});
invokeAllAccessibleMethods(new FlowPanel() {});
invokeAllAccessibleMethods(new FocusPanel() {});
invokeAllAccessibleMethods(new HorizontalPanel() {});
invokeAllAccessibleMethods(new HTMLPanel("") {});
invokeAllAccessibleMethods(new LayoutPanel() {});
invokeAllAccessibleMethods(new PopupPanel() {});
invokeAllAccessibleMethods(new RenderablePanel("") {});
invokeAllAccessibleMethods(new ResizeLayoutPanel() {});
invokeAllAccessibleMethods(new SimpleLayoutPanel() {});
invokeAllAccessibleMethods(new SimplePanel() {});
invokeAllAccessibleMethods(new SplitLayoutPanel() {});
invokeAllAccessibleMethods(new StackPanel() {});
invokeAllAccessibleMethods(new VerticalPanel() {});
}