@Inject public GwtAbsolutePanel() { this(new AbsolutePanel()); }
RowItem() { row = new AbsolutePanel(); row.setWidth( "100%" ); }
RowItem() { row = new AbsolutePanel(); row.setWidth( "100%" ); }
public Palette(IUIPanel panel) { this.panel = panel; this.mainPanel = new AbsolutePanel(); this.groups = new LinkedHashSet<IPaletteGroup>(); initWidget(mainPanel); this.setStyleName("ui-palette"); }
/** * Builds the absolute panel. * * @return the absolute panel */ private AbsolutePanel buildAbsolutePanel() { AbsolutePanel absolutePanel = new AbsolutePanel(); absolutePanel.setStyleName("gwt-Login-MainBox"); absolutePanel.setSize("450px", "180px"); // was "450px", "174px" return absolutePanel; }
public WorkbenchPickupDragController() { super(new AbsolutePanel(), false); setBehaviorDragProxy(true); setBehaviorDragStartSensitivity(1); }
public FieldPalette() { this.panel = new AbsolutePanel(); List<Template> templates = Templates.list(); for (int i = 0; i != templates.size(); ++i) { int row = (i / NUM_COLUMNS); int column = (i % NUM_COLUMNS); DnDLabel draggableLabel = new DnDLabel(templates.get(i)); panel.add(draggableLabel, calculateLeft(column), calculateTop(row)); } int rowCount = Math.round((float) templates.size() / NUM_COLUMNS); panel.setHeight(calculateTop(rowCount) + "px"); }
public DropProxyIndicator(IDragProxy dragProxy) { this.dragProxy = dragProxy; this.panel = new AbsolutePanel(); this.indicator = new Image(); this.panel.add(indicator); initWidget(panel); this.dropKO(); }
protected void init(){ this.panel = new AbsolutePanel(); this.panel.add(ico); this.panel.add(label); this.panel.setTitle(this.getDescription()); }
public DiagramPanel(int width, int height) { canvas = new AbsolutePanel(); this.raphael = new Raphael(canvas, width, height); // this.setWidth(""+width); // this.setHeight(""+height); add(canvas); canvas.setPixelSize(width, height); setPixelSize(width, height); this.width = width; this.height = height; }
@SuppressWarnings("unchecked") public EditorView() { this.mainPanel = new AbsolutePanel(); this.handlerManager = new HandlerManager(this); initWidget(mainPanel); this.getElement().setAttribute("style", "overflow-y:scroll;height:100%;"); }
@Override protected Widget newDragProxy(DragContext context) { final AbsolutePanel container = new AbsolutePanel(); container.getElement().getStyle().setProperty("overflow", "visible"); container.getElement().getStyle().setOpacity(0.5); container.getElement().getStyle().setZIndex(Integer.MAX_VALUE); //Offset to centre of dragProxy int offsetX = 0 - ((int) (dragProxy.getWidth() * 0.5)); int offsetY = 0 - ((int) (dragProxy.getHeight() * 2)); container.add(dragProxy, offsetX, offsetY); return container; }
@Before public void setup() { when(bm.lookupBeans(any(Class.class))).thenReturn(Collections.emptyList()); when(dragController.getBoundaryPanel()).thenReturn(new AbsolutePanel()); doNothing().when(workbench).addLayoutToRootPanel(any(WorkbenchLayout.class)); when(permissionManager.getAuthorizationPolicy()).thenReturn(authorizationPolicy); when(authorizationManager.authorize(any(Resource.class), any(User.class))).thenReturn(true); when(bm.lookupBeans(PerspectiveActivity.class)).thenReturn(Arrays.asList(perspectiveBean1, perspectiveBean2)); when(perspectiveBean1.getInstance()).thenReturn(perspectiveActivity1); when(perspectiveBean2.getInstance()).thenReturn(perspectiveActivity2); when(perspectiveActivity1.getIdentifier()).thenReturn("perspective1"); when(perspectiveActivity2.getIdentifier()).thenReturn("perspective2"); when(perspectiveActivity2.isDefault()).thenReturn(true); }
@Before public void setup() { when(bm.lookupBeans(any(Class.class))).thenReturn(Collections.emptyList()); when(dragController.getBoundaryPanel()).thenReturn(new AbsolutePanel()); doNothing().when(workbench).addLayoutToRootPanel(any(WorkbenchLayout.class)); when(permissionManager.getAuthorizationPolicy()).thenReturn(authorizationPolicy); when(authorizationManager.authorize(any(Resource.class), any(User.class))).thenReturn(true); when(bm.lookupBeans(PerspectiveActivity.class)).thenReturn(Arrays.asList(perspectiveBean1, perspectiveBean2)); when(perspectiveBean1.getInstance()).thenReturn(perspectiveActivity1); when(perspectiveBean2.getInstance()).thenReturn(perspectiveActivity2); when(perspectiveActivity1.getIdentifier()).thenReturn("perspective1"); when(perspectiveActivity2.getIdentifier()).thenReturn("perspective2"); when(perspectiveActivity2.isDefault()).thenReturn(true); }
public ContextualMenu(IHasContextualMenu hasContextualMenu) { this.hasContextualMenu = hasContextualMenu; this.mainPanel = new AbsolutePanel(); this.config = new Configuration(); this.config.setDisplayTime(300); this.config.setHeight(140); this.config.setWidth(35); initWidget(mainPanel); init(); }
public UIPanelResizeUIHandler(IUIPanel uiPanel) { this.uiPanel = uiPanel; this.mainPanel = new AbsolutePanel(); initWidget(mainPanel); if (getIncreaseBtn() instanceof Widget && getDecreaseBtn() instanceof Widget){ Widget increase = (Widget) getIncreaseBtn(); Widget decrease = (Widget) getDecreaseBtn(); mainPanel.add(increase); mainPanel.add(decrease); }else{ throw new IllegalStateException("Increase and decrease buttons should be instance of "+Widget.class); } this.refresh(); }
public ContextualMenu(IHasContextualMenu hasContextualMenu,IContextualMenu parentMenu) { this.hasContextualMenu = hasContextualMenu; this.mainPanel = new AbsolutePanel(); this.config = new Configuration(); this.config.setDisplayTime(100); this.config.setHeight(140); this.config.setWidth(35); initWidget(mainPanel); this.parentMenu = parentMenu; init(); }
class MyUpload extends Composite { private static native void clickOnInputFile(Element elem) /*-{ elem.click(); }-*/; public MyUpload() { final FileUploadWithMouseEvents upload = new FileUploadWithMouseEvents(); AbsolutePanel container = new AbsolutePanel(); container.add(upload); upload.setVisible(false); Button btn = new Button("My Browse.."); btn.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { clickOnInputFile(upload.getElement()); } }); container.add(btn); initWidget(container); } }
public void showEmptyTree() { if ( this.emptyCategories == null ) { final AbsolutePanel p = new AbsolutePanel(); p.add( new HTML( MetadataConstants.INSTANCE.NoCategoriesCreatedYetTip() ) ); final Button b = new Button( MetadataConstants.INSTANCE.Refresh() ); b.addClickHandler( new ClickHandler() { public void onClick( final ClickEvent event ) { refresh(); } } ); p.add( b ); p.setStyleName( "small-Text" ); this.emptyCategories = p; this.panel.add( this.emptyCategories ); } this.navTreeWidget.setVisible( false ); emptyCategories.setVisible( true ); }
/** * Called by {@link PickupDragController#dragStart()} to allow subclasses to provide their own * drag proxies. * * @param context the current drag context * @return a new drag proxy */ protected Widget newDragProxy(DragContext context) { AbsolutePanel container = new AbsolutePanel(); container.getElement().getStyle().setProperty("overflow", "visible"); WidgetArea draggableArea = new WidgetArea(context.draggable, null); for (Widget widget : context.selectedWidgets) { WidgetArea widgetArea = new WidgetArea(widget, null); Widget proxy = new SimplePanel(); proxy.setPixelSize(widget.getOffsetWidth(), widget.getOffsetHeight()); proxy.addStyleName(DragClientBundle.INSTANCE.css().proxy()); container.add(proxy, widgetArea.getLeft() - draggableArea.getLeft(), widgetArea.getTop() - draggableArea.getTop()); } return container; }