/** * Creates a scroll pane. * * @return the created scroll pane. */ protected SScrollPane createSScrollPane() { SScrollPane scrollPane = new SScrollPane(); scrollPane.setMode(SScrollPane.MODE_COMPLETE); scrollPane.setPreferredSize(SDimension.FULLAREA); scrollPane.setHorizontalAlignment(SConstants.LEFT_ALIGN); scrollPane.setVerticalAlignment(SConstants.TOP_ALIGN); //TODO remove workaround asa WingS is fixed. scrollPane.setAttribute(CSSProperty.TABLE_LAYOUT, "fixed"); return scrollPane; }
/** * Creates a scroll pane. * * @return the created scroll pane. */ protected SScrollPane createSScrollPane() { SScrollPane scrollPane = new SScrollPane(); scrollPane.setMode(SScrollPane.MODE_COMPLETE); scrollPane.setPreferredSize(SDimension.FULLAREA); scrollPane.setHorizontalAlignment(SConstants.LEFT_ALIGN); scrollPane.setVerticalAlignment(SConstants.TOP_ALIGN); // TODO remove workaround asa WingS is fixed. scrollPane.setAttribute(CSSProperty.TABLE_LAYOUT, "fixed"); return scrollPane; }
SScrollPane detailsScrollPane = new SScrollPane(detailsPane); detailsScrollPane.setMode(SScrollPane.MODE_COMPLETE); detailsScrollPane.setPreferredSize(new SDimension(10, 250)); detailsPanel = new SPanel(new SGridBagLayout()); detailsPanel.add(detailsScrollPane, new GridBagConstraints(0, 0, 1, 1, 1.0,
@Override public void writeInternal(Device device, SComponent component) throws IOException { SScrollPane scrollpane = (SScrollPane) component; if (scrollpane.getMode() == SScrollPane.MODE_COMPLETE) { SDimension preferredSize = scrollpane.getPreferredSize(); if (preferredSize == null) { scrollpane.setPreferredSize(new SDimension(200, 400)); } else { if (preferredSize.getWidthInt() < 0) Utils.setPreferredSize(component, "200", preferredSize.getHeight()); if (preferredSize.getHeightInt() < 0) Utils.setPreferredSize(component, preferredSize.getWidth(), "400");; } ScriptManager.getInstance().addScriptListener(new LayoutScrollPaneScript(component.getName())); writeContent(device, component); } else { writeContent(device, component); } Adjustable sb = scrollpane.getVerticalScrollBar(); SComponent viewport = (SComponent)scrollpane.getScrollable(); if (viewport != null && sb instanceof SScrollBar) { final JavaScriptDOMListener handleMouseWheel = new JavaScriptDOMListener( "DOMMouseScroll", "wingS.scrollbar.handleMouseWheel", '\'' +((SScrollBar)sb).getName()+ '\'', viewport); viewport.addScriptListener(handleMouseWheel); } }
scrollPane.setPreferredSize(new SDimension("180px", scrollPane .getPreferredSize().getHeight())); IView<SComponent> view = constructView(scrollPane, viewDescriptor,
scrollPane.setPreferredSize(new SDimension("180px", scrollPane .getPreferredSize().getHeight())); IView<SComponent> view = constructView(scrollPane, viewDescriptor,