Java 类com.google.gwt.dom.client.Style.BorderStyle 实例源码

项目:daris    文件:SearchForm.java   
private void updateResultTab(BaseWidget cw) {
    if (_resultTabId <= 0) {
        _resultSP = new SimplePanel();
        _resultSP.fitToParent();
        _resultSP.setBorderTop(1, BorderStyle.SOLID, new RGB(0x88, 0x88,
                0x88));
        _resultTabId = _tp.addTab("Results", null, _resultSP);
    }
    if (cw == null) {
        boolean v = valid().valid();
        HTML msg = new HTML(
                v ? "No result yet. Click \"Search\" button to get the results."
                        : "No result yet. The query filter is not valid or incomplete. Activate \"Filters\" tab to complete the filters.");
        msg.setFontSize(12);
        msg.setColour(RGBA.RED);
        msg.setMargin(20);
        _resultSP.setContent(msg);
    } else {
        _resultSP.setContent(cw);
    }
    updateMenuBar();
}
项目:daris    文件:DObjectDetails.java   
private static Widget headerFor(DObject o) {

        String text = StringUtil.upperCaseFirst(o.type().toString());
        if (o.id() != null) {
            text += " - " + o.id();
        }
        Label label = new Label(text);
        label.setFontSize(12);
        label.setFontWeight(FontWeight.BOLD);

        CenteringPanel cp = new CenteringPanel(Axis.BOTH);
        cp.setWidth100();
        cp.setHeight(20);
        cp.setMarginTop(1);
        cp.setBorderTop(1, BorderStyle.SOLID, new RGB(221, 221, 221));
        cp.setBorderLeft(1, BorderStyle.SOLID, new RGB(221, 221, 221));
        cp.setBorderRight(1, BorderStyle.SOLID, new RGB(221, 221, 221));
        cp.setBorderRadiusTopLeft(5);
        cp.setBorderRadiusTopRight(5);
        cp.setBackgroundImage(
                new LinearGradient(LinearGradient.Orientation.TOP_TO_BOTTOM,
                        new RGB(221, 221, 221), new RGB(204, 204, 204)));
        cp.add(label);
        return cp;
    }
项目:daris    文件:SimpleTabPanel.java   
public SimpleTabPanel() {

        _hp = new HorizontalPanel();
        _hp.setHeight100();
        _hp.setPosition(Position.ABSOLUTE);
        _hp.setLeft(0);

        AbsolutePanel ap = new AbsolutePanel();
        ap.setOverflow(Overflow.HIDDEN);
        ap.setPreferredHeight(TAB_BAR_HEIGHT);
        ap.add(_hp);
        add(ap);

        _sp = new SimplePanel();
        _sp.fitToParent();
        _sp.setBorderTop(2, BorderStyle.SOLID, TAB_COLOR);
        _sp.setBorderLeft(1, BorderStyle.SOLID, TAB_COLOR);
        _sp.setBorderRight(1, BorderStyle.SOLID, TAB_COLOR);
        _sp.setBorderBottom(1, BorderStyle.SOLID, TAB_COLOR);
        add(_sp);
        _buttons = new HashMap<String, TabButton>();
        _widgets = new HashMap<String, Widget>();
        _listeners = new HashMap<String, TabListener>();
    }
项目:daris    文件:CTabPanel.java   
public TabBar(CTabPanel tabPanel) {

            _tabPanel = tabPanel;

            _tabsArea = new HorizontalPanel();
            _tabsArea.setHeight100();
            _tabsArea.setPosition(Position.ABSOLUTE);
            _tabsArea.setLeft(0);
            _tabsArea.setZIndex(Z_INDEX_TABS);
            add(_tabsArea);

            initControlsAreaLeft();

            initControlsAreaRight();

            setOverflow(Overflow.HIDDEN);
            setBorderBottom(3, Style.BorderStyle.SOLID, TAB_COLOUR_SELECTED);
            setWidth100();
            setPreferredHeight(DEFAULT_TAB_BAR_HEIGHT);
        }
项目:bitcoin-transaction-explorer    文件:Arrow.java   
public Arrow(final Orientation orientation, final int borderWidth) {
  setElement(d);
  this.orientation = orientation;
  this.borderWidth = borderWidth;
  d.appendChild(d1);
  d.appendChild(d2);
  d.getStyle().setPosition(Position.ABSOLUTE);
  d1.getStyle().setPosition(Position.ABSOLUTE);
  d1.getStyle().setHeight(0, Unit.PX);
  d1.getStyle().setWidth(0, Unit.PX);
  d1.getStyle().setPropertyPx(orientation.pos, 0);
  d1.getStyle().setPropertyPx(orientation.altPos, 0);
  d1.getStyle().setBorderStyle(BorderStyle.SOLID);
  d2.getStyle().setPosition(Position.ABSOLUTE);
  d2.getStyle().setHeight(0, Unit.PX);
  d2.getStyle().setWidth(0, Unit.PX);
  d2.getStyle().setPropertyPx(orientation.pos, borderWidth);
  d2.getStyle().setPropertyPx(orientation.altPos, borderWidth);
  d2.getStyle().setBorderStyle(BorderStyle.SOLID);
  topBottom = orientation == Orientation.TOP || orientation == Orientation.BOTTOM;
}
项目:gef-gwt    文件:Text.java   
@Override
public void setBounds(int x, int y, int width, int height) {
    if (textArea.isAttached()) {
        textArea.setFocus(true);
        textArea.setText(getText());
        Style textAreaStyle = textArea.getElement().getStyle();
        textAreaStyle.setProperty("resize", "none");
        textAreaStyle.setBorderStyle(BorderStyle.NONE);
        panel.setWidgetLeftWidth(textArea, x - 6, Unit.PX, width + 5,
                Unit.PX);
        panel.setWidgetTopHeight(textArea, y - 6, Unit.PX, height + 7,
                Unit.PX);
        textAreaStyle.setWidth(width + 5, Unit.PX);
        textAreaStyle.setHeight(height + 7, Unit.PX);
    }
}
项目:hexa.tools    文件:DragDrop.java   
public CaptureWidget()
{
    addMouseMoveHandler( this );
    addMouseUpHandler( this );

    Style style = getElement().getStyle();
    // workaround for IE8 opacity
    // http://code.google.com/p/google-web-toolkit/issues/detail?id=5538
    style.setProperty( "filter", "alpha(opacity=0)" );
    style.setOpacity( 0 );
    style.setZIndex( 0 );// 1000);
    style.setMargin( 0, Style.Unit.PX );
    style.setBorderStyle( BorderStyle.NONE );
    style.setBackgroundColor( "blue" );

    setPixelSize( RootPanel.get().getOffsetWidth(), RootPanel.get().getOffsetHeight() );
}
项目:atom    文件:LinkView.java   
public LinkView(String prefix, String suffix) {
    this.prefix = prefix;
    this.suffix = suffix;

    a = new Anchor();
    a.setTarget("_blank");

    Style anchorStyle = a.getElement().getStyle();
    anchorStyle.setLineHeight(26, Unit.PX);

    panel = new SimplePanel(a);
    Style style = panel.getElement().getStyle();

    style.setWidth(100, Unit.PCT);
    style.setHeight(26, Unit.PX);
    style.setPaddingLeft(3, Unit.PX);
    style.setFontSize(11, Unit.PX);
    style.setProperty("fontFamily", "Verdana, Arial, Helvetica");
    style.setBorderWidth(1, Unit.PX);
    style.setBorderStyle(BorderStyle.SOLID);
    style.setBorderColor("rgb(204, 204, 204) rgb(153, 153, 153) rgb(153, 153, 153)");
    style.setProperty("boxSizing", "border-box");

    this.initWidget(panel);
}
项目:opennmszh    文件:SnmpSelectListViewImpl.java   
public SnmpSelectListViewImpl() {
    initWidget(uiBinder.createAndBindUi(this));
    m_layoutPanel.setSize("100%", "500px");
    m_layoutPanel.getElement().getStyle().setBorderStyle(BorderStyle.SOLID);
    m_layoutPanel.getElement().getStyle().setBorderWidth(1, Unit.PX);
    m_layoutPanel.getElement().getStyle().setBorderColor("#D0D0D0");

    m_snmpSelectTable.setWidth("100%");
    m_snmpSelectTable.setCollectUpdateHandler(new SnmpSelectTableCollectUpdateHandler() {

        @Override
        public void onSnmpInterfaceCollectUpdated(int ifIndex, String oldValue, String newValue) {
            m_presenter.onSnmpInterfaceCollectUpdated(ifIndex, oldValue, newValue);
        }
    });

    m_simplePager = new SimplePager(TextLocation.CENTER, (Resources) GWT.create(OnmsSimplePagerResources.class), true, 1000, false);
    m_simplePager.setWidth("100%");
    m_simplePager.setDisplay(m_snmpSelectTable);
    m_pagerContainer.add(m_simplePager);

    m_dataList = new ListDataProvider<SnmpCellListItem>();
    m_dataList.addDataDisplay(m_snmpSelectTable);

}
项目:OpenNMS    文件:SnmpSelectListViewImpl.java   
public SnmpSelectListViewImpl() {
    initWidget(uiBinder.createAndBindUi(this));
    m_layoutPanel.setSize("100%", "500px");
    m_layoutPanel.getElement().getStyle().setBorderStyle(BorderStyle.SOLID);
    m_layoutPanel.getElement().getStyle().setBorderWidth(1, Unit.PX);
    m_layoutPanel.getElement().getStyle().setBorderColor("#D0D0D0");

    m_snmpSelectTable.setWidth("100%");
    m_snmpSelectTable.setCollectUpdateHandler(new SnmpSelectTableCollectUpdateHandler() {

        @Override
        public void onSnmpInterfaceCollectUpdated(int ifIndex, String oldValue, String newValue) {
            m_presenter.onSnmpInterfaceCollectUpdated(ifIndex, oldValue, newValue);
        }
    });

    m_simplePager = new SimplePager(TextLocation.CENTER, (Resources) GWT.create(OnmsSimplePagerResources.class), true, 1000, false);
    m_simplePager.setWidth("100%");
    m_simplePager.setDisplay(m_snmpSelectTable);
    m_pagerContainer.add(m_simplePager);

    m_dataList = new ListDataProvider<SnmpCellListItem>();
    m_dataList.addDataDisplay(m_snmpSelectTable);

}
项目:OpenNMS    文件:SnmpSelectListViewImpl.java   
public SnmpSelectListViewImpl() {
    initWidget(uiBinder.createAndBindUi(this));
    m_layoutPanel.setSize("100%", "500px");
    m_layoutPanel.getElement().getStyle().setBorderStyle(BorderStyle.SOLID);
    m_layoutPanel.getElement().getStyle().setBorderWidth(1, Unit.PX);
    m_layoutPanel.getElement().getStyle().setBorderColor("#D0D0D0");

    m_snmpSelectTable.setWidth("100%");
    m_snmpSelectTable.setCollectUpdateHandler(new SnmpSelectTableCollectUpdateHandler() {

        @Override
        public void onSnmpInterfaceCollectUpdated(int ifIndex, String oldValue, String newValue) {
            m_presenter.onSnmpInterfaceCollectUpdated(ifIndex, oldValue, newValue);
        }
    });

    m_simplePager = new SimplePager(TextLocation.CENTER, (Resources) GWT.create(OnmsSimplePagerResources.class), true, 1000, false);
    m_simplePager.setWidth("100%");
    m_simplePager.setDisplay(m_snmpSelectTable);
    m_pagerContainer.add(m_simplePager);

    m_dataList = new ListDataProvider<SnmpCellListItem>();
    m_dataList.addDataDisplay(m_snmpSelectTable);

}
项目:sig-seguimiento-vehiculos    文件:SimpleMapVerticalLegend.java   
private HorizontalPanel getColorPanel(Layer layer) {
    HorizontalPanel colorPanel = new HorizontalPanel();
    colorPanel.setSize("20px", "20px");
    colorPanel.getElement().getStyle()
            .setBackgroundColor(getColor(layer, "fillColor"));
    colorPanel.setBorderWidth(2);
    colorPanel.getElement().getStyle().setBorderStyle(BorderStyle.SOLID);
    colorPanel.getElement().getStyle()
            .setBorderColor(getColor(layer, "strokeColor"));
    return colorPanel;
}
项目:geowe-core    文件:SimpleMapVerticalLegend.java   
private HorizontalPanel getColorPanel(Layer layer) {
    HorizontalPanel colorPanel = new HorizontalPanel();
    colorPanel.setSize("20px", "20px");
    colorPanel.getElement().getStyle()
            .setBackgroundColor(getColor(layer, "fillColor"));
    colorPanel.setBorderWidth(2);
    colorPanel.getElement().getStyle().setBorderStyle(BorderStyle.SOLID);
    colorPanel.getElement().getStyle()
            .setBorderColor(getColor(layer, "strokeColor"));
    return colorPanel;
}
项目:daris    文件:SearchForm.java   
private void updateFilterTab() {
    if (_filterForm != null) {
        removeMustBeValid(_filterForm);
    }
    if (_filterTabId <= 0) {
        _filterSP = new SimplePanel();
        _filterSP.fitToParent();
        _filterSP.setBorderTop(1, BorderStyle.SOLID, new RGB(0x88, 0x88,
                0x88));
        _filterTabId = _tp.addTab("Filters", "filters", _filterSP);
    }
    _filterForm = CompositeFilterForm.create(_query.filter(), true);
    _filterForm.addChangeListener(new StateChangeListener() {

        @Override
        public void notifyOfChangeInState() {
            if (_filterForm.valid().valid()) {
                _query.setFilter(_filterForm.filter());
            }
        }
    });
    if (_filterForm instanceof ObjectCompositeFilterForm
            && _query.options() instanceof ObjectQueryOptions) {
        ((ObjectCompositeFilterForm) _filterForm)
                .addProjectChangeListener(new ProjectChangeListener() {

                    @Override
                    public void projectChanged(DObjectRef project) {
                        ((ObjectQueryOptions) _query.options())
                                .setProject(project);
                        if (_optForm != null) {
                            _optForm.refresh();
                        }
                    }
                });
    }
    addMustBeValid(_filterForm);
    _filterSP.setContent(_filterForm.gui());
}
项目:daris    文件:SearchForm.java   
private void updateOptionTab() {
    if (_optForm != null) {
        removeMustBeValid(_optForm);
    }
    if (_optTabId <= 0) {
        _optSP = new SimplePanel();
        _optSP.fitToParent();
        _optSP.setBorderTop(1, BorderStyle.SOLID, new RGB(0x88, 0x88, 0x88));
        _optTabId = _tp.addTab("Options", "query options", _optSP);
    }
    _optForm = new QueryOptionsForm(_query.options());
    addMustBeValid(_optForm);
    _optSP.setContent(_optForm.gui());
}
项目:daris    文件:SwitchButton.java   
private void updateState() {

        if (_on) {
            _offAP.style().removeBorder();
            _offAP.style().setBackgroundImage(null);

            _offAP.setCursor(Cursor.POINTER);
            _offText.setColour(FONT_COLOR_DISABLED);
            _offText.setCursor(Cursor.POINTER);
            _onAP.setBackgroundImage(new LinearGradient(LinearGradient.Orientation.TOP_TO_BOTTOM, BG_COLOR_ENABLED,
                    BG_COLOR_ENABLED_LIGHT));
            _onAP.setBorder(1, BorderStyle.SOLID, BORDER_COLOR_ENABLED);
            _onAP.setCursor(Cursor.DEFAULT);
            _onText.setColour(FONT_COLOR_ENABLED);
            _onText.setCursor(Cursor.DEFAULT);
        } else {
            _onAP.style().setBackgroundImage(null);
            _onAP.style().removeBorder();
            _onAP.setCursor(Cursor.POINTER);
            _onText.setColour(FONT_COLOR_DISABLED);
            _onText.setCursor(Cursor.POINTER);
            _offAP.setBackgroundImage(new LinearGradient(LinearGradient.Orientation.TOP_TO_BOTTOM, BG_COLOR_ENABLED,
                    BG_COLOR_ENABLED_LIGHT));
            _offAP.setBorder(1, BorderStyle.SOLID, BORDER_COLOR_ENABLED);
            _offAP.setCursor(Cursor.DEFAULT);
            _offText.setColour(FONT_COLOR_ENABLED);
            _offText.setCursor(Cursor.DEFAULT);
        }
    }
项目:hexa.tools    文件:PersonForm.java   
public PersonForm()
{
    initWidget( uiBinder.createAndBindUi( this ) );

    getElement().getStyle().setBorderWidth( 10, Unit.PX );
    getElement().getStyle().setBorderStyle( BorderStyle.SOLID );
}
项目:hexa.tools    文件:ProgressBar.java   
public ProgressBar()
{
    Element div = DOM.createDiv();
    div.getStyle().setWidth( 100, Unit.PX );
    div.getStyle().setHeight( 20, Unit.PX );
    div.getStyle().setBorderWidth( 1, Unit.PX );
    div.getStyle().setBorderColor( "black" );
    div.getStyle().setBorderStyle( BorderStyle.SOLID );
    div.getStyle().setPosition( Position.ABSOLUTE );

    progress.getStyle().setWidth( currentValue, Unit.PCT );
    progress.getStyle().setHeight( 100, Unit.PCT );
    progress.getStyle().setBackgroundColor( "grey" );

    text.getStyle().setColor( "white" );
    text.getStyle().setPosition( Position.ABSOLUTE );
    text.getStyle().setTop( 0, Unit.PX );
    text.getStyle().setLeft( 0, Unit.PX );

    div.appendChild( progress );
    div.appendChild( text );

    Element main = DOM.createDiv();
    main.appendChild( div );
    main.getStyle().setWidth( 102, Unit.PX );
    main.getStyle().setHeight( 22, Unit.PX );
    setElement( main );
}
项目:hexa.tools    文件:GrowingTextArea.java   
void applyStyle( Element element )
{
    element.getStyle().setPadding( 5, Unit.PX );
    element.getStyle().setBorderColor( "black" );
    element.getStyle().setBorderStyle( BorderStyle.SOLID );
    element.getStyle().setBorderWidth( 1, Unit.PX );

    element.getStyle().setProperty( "fontFamily", "Arial Unicode MS,Arial,sans-serif" );

    element.getStyle().setFontSize( 12, Unit.PT );
    element.getStyle().setFontStyle( FontStyle.NORMAL );
    element.getStyle().setFontWeight( FontWeight.NORMAL );
}
项目:ineform    文件:TransRowEditPopup.java   
public DialogContent(EditCallback callback) {
    this.callback = callback;

    VerticalPanel vp = new VerticalPanel();
    initWidget(vp);

    if (engVal != null && !engVal.equals("")) {
        vp.add(new Label(translatorappI18n.translateTableRow_engVal()));
        HTML lbl = new HTML(perNToBr(SafeHtmlUtils.htmlEscape(brToPerN(engVal))));
        lbl.getElement().getStyle().setBackgroundColor("#f2f2f2");
        lbl.getElement().getStyle().setWidth(blockWidth, Unit.PX);
        lbl.getElement().getStyle().setHeight(blockHeight, Unit.PX);
        lbl.getElement().getStyle().setOverflowY(Overflow.AUTO);
        lbl.getElement().getStyle().setBorderColor("#d0d0d0");
        lbl.getElement().getStyle().setBorderStyle(BorderStyle.SOLID);
        lbl.getElement().getStyle().setBorderWidth(2, Unit.PX);
        vp.add(lbl);
    }

    vp.add(new Label(translatorappI18n.translatedValue_value()));
    textArea = new TextArea();
    textArea.setText(brToPerN(translatedVal));
    textArea.getElement().getStyle().setWidth(blockWidth, Unit.PX);
    textArea.getElement().getStyle().setHeight(blockHeight, Unit.PX);
    vp.add(textArea);

    HorizontalPanel hp = new HorizontalPanel();
    hp.setSpacing(10);

    revertBtn = new IneButton(IneButtonType.CANCEL, IneFormI18n.CANCEL());
    hp.add(revertBtn);

    doneBtn = new IneButton(IneButtonType.ACTION, IneFormI18n.SAVE());
    hp.add(doneBtn);

    vp.add(hp);
}
项目:ineform    文件:PropTooltip.java   
public PropTooltip() {
    super(true);
    setWidget(panel);
    panel.getElement().getStyle().setPadding(3.0, Unit.PX);
    panel.getElement().getStyle().setBackgroundColor("white");
    panel.getElement().getStyle().setBorderColor("#CCCCCC");
    panel.getElement().getStyle().setBorderWidth(1.0, Unit.PX);
    panel.getElement().getStyle().setBorderStyle(BorderStyle.SOLID);
    getElement().getStyle().setZIndex(Integer.MAX_VALUE);
}
项目:gwt-chronoscope    文件:ChartDemoSamples.java   
public void onModuleLoad() {
  try {

    VerticalPanel v = new VerticalPanel();
    v.setSpacing(20);
    RootPanel.get().add(v);

    ChartPanel chartPanel = Chronoscope.createTimeseriesChartWithDatasetVarName(
        "interestRates01", "interestRates02");
    chartPanel.getElement().getStyle().setCursor(Cursor.POINTER);
    chartPanel.setViewReadyCallback(new ViewReadyCallback() {
      public void onViewReady(final View view) {
        Dataset<?> dataset = view.getChart().getPlot().getDatasets().get(0);
        final Marker m = new Marker(dataset.getDomainExtrema().midpoint(),
            "A", 0);
        m.addOverlayClickListener(new OverlayClickListener() {
          public void onOverlayClick(Overlay overlay, int x, int y) {
            m.openInfoWindow("Hello");
          }
        });

        XYPlot<?> plot = view.getChart().getPlot();
        plot.setOverviewVisible(true);
        plot.setDatasetRenderer(1, new LineXYRenderer());
        plot.addOverlay(m);
        ((DefaultXYPlot<?>)plot).redraw(true);
      }
    });
    v.add(chartPanel);

    final ChartPanel chartPanel2 = Chronoscope.createTimeseriesChartWithDatasetVarName(
        "interestRates01", "interestRates02");
    int chartWidth = 600;
    int chartHeight = (int) (chartWidth / GOLDEN__RATIO);
    chartPanel2.setDimensions(chartWidth, chartHeight);
    chartPanel2.getElement().getStyle().setBorderStyle(BorderStyle.SOLID);
    chartPanel2.getElement().getStyle().setPadding(5, Unit.PX);
    v.add(chartPanel2);

  } catch (Exception e) {
    e.printStackTrace();
  }
}
项目:daris    文件:TabPanel.java   
public void setBodyBorderTop(int w,BorderStyle s,Colour colour) {
    _sp.setBorderTop(w, s, colour);
}
项目:daris    文件:TabPanel.java   
public void setBodyBorderLeft(int w,BorderStyle s,Colour colour) {
    _sp.setBorderLeft(w, s, colour);
}
项目:daris    文件:TabPanel.java   
public void setBodyBorderRight(int w,BorderStyle s,Colour colour) {
    _sp.setBorderRight(w, s, colour);
}
项目:daris    文件:TabPanel.java   
public void setBodyBorderBottom(int w,BorderStyle s,Colour colour) {
    _sp.setBorderBottom(w, s, colour);
}
项目:daris    文件:AboutDialog.java   
public void show(Window owner) {

        final HTML html = new HTML();
        html.fitToParent();
        html.setFontSize(12);

        new ServerVersion().send(new ObjectMessageResponse<String>() {
            @Override
            public void responded(final String serverVersion) {
                _pkg.resolve(new ObjectResolveHandler<Package>() {

                    @Override
                    public void resolved(Package o) {
                        html.setHTML(generateHTML(o, serverVersion));
                    }
                });
            }
        });
        TabPanel tp = new TabPanel();
        tp.fitToParent();

        CenteringPanel cp = new CenteringPanel(Axis.BOTH);
        cp.fitToParent();
        cp.setContent(html);
        cp.setBorderTop(3, BorderStyle.SOLID, new RGB(0x88, 0x88, 0x88));
        tp.setActiveTabById(tp.addTab("General", "General information about DaRIS portal", cp));

        tp.addTab("Package", "Installed DaRIS packages.", new PackageGrid());

        ButtonBar bb = ButtonUtil.createButtonBar(Position.BOTTOM, Alignment.RIGHT, 28);
        Button okButton = bb.addButton("OK");
        okButton.setMarginRight(20);
        okButton.addClickHandler(new ClickHandler() {

            @Override
            public void onClick(ClickEvent event) {
                _win.close();
            }
        });

        VerticalPanel vp = new VerticalPanel();
        vp.fitToParent();

        vp.add(tp);
        vp.add(bb);

        WindowProperties wp = new WindowProperties();
        wp.setModal(true);
        wp.setCanBeResized(false);
        wp.setCanBeClosed(false);
        wp.setCanBeMoved(true);
        wp.setSize(0.4, 0.4);
        wp.setOwnerWindow(owner);
        wp.setTitle("About DaRIS Portal");
        _win = Window.create(wp);
        _win.setContent(vp);
        _win.centerInPage();
        _win.show();
    }
项目:daris    文件:ShoppingCartForm.java   
public ShoppingCartForm(ShoppingCart cart, FormEditMode mode, boolean showHeader) {

        _mode = mode;

        _vp = new VerticalPanel();
        _vp.fitToParent();

        /*
         * header
         */
        if (showHeader) {
            CenteringPanel headerSP = new CenteringPanel();
            headerSP.setWidth100();
            headerSP.setHeight(20);
            headerSP.setBackgroundImage(new LinearGradient(LinearGradient.Orientation.TOP_TO_BOTTOM,
                    ListGridHeader.HEADER_COLOUR_LIGHT, ListGridHeader.HEADER_COLOUR_DARK));
            _header = new HTML();
            _header.fitToParent();
            _header.setFontSize(11);
            _header.setFontWeight(FontWeight.BOLD);
            headerSP.setContent(_header);
            _vp.add(headerSP);
        }

        /*
         * tabs
         */
        _tp = new TabPanel() {
            protected void activated(int id) {
                _activeTabId = id;
                if (_activeTabId == _contentsTabId) {
                    contentsTabActivated();
                }
                if (_activeTabId == _settingsTabId) {
                    settingsTabActivated();
                }
            }
        };
        _tp.fitToParent();
        _tp.setBodyBorder(1, BorderStyle.SOLID, new RGB(0x97, 0x97, 0x97));

        /*
         * content tab
         */
        _contentsForm = new ShoppingCartContentsForm(null, _mode);
        _contentsTabId = _tp.addTab(TAB_NAME_CONTENTS, null, _contentsForm.gui());
        addMustBeValid(_contentsForm);

        /*
         * settings tab
         */
        _settingsForm = new ShoppingCartSettingsForm(null, _mode);
        _settingsTabId = _tp.addTab(TAB_NAME_SETTINGS, null, _settingsForm.gui());
        addMustBeValid(_settingsForm);

        _tp.setActiveTabById(_contentsTabId);
        _vp.add(_tp);

        setCart(cart);

    }
项目:ineform    文件:DialogBoxBase.java   
public DialogBoxBase() {
    super();

    getElement().getStyle().setBackgroundColor("white");
    getElement().getStyle().setPadding(15, Unit.PX);
    getElement().getStyle().setBorderColor("black");
    getElement().getStyle().setBorderStyle(BorderStyle.SOLID);
    getElement().getStyle().setBorderWidth(1, Unit.PX);

    setModal(true);
    setGlassEnabled(true);
    setAnimationEnabled(true);
    setAutoHideEnabled(false);

    panel.setSpacing(10);

    HorizontalPanel messagePanel = new HorizontalPanel();
    Image image = new Image(getImageResource());
    messagePanel.add(image);
    messagePanel.add(message);
    messagePanel.setCellVerticalAlignment(image, HorizontalPanel.ALIGN_MIDDLE);
    messagePanel.setCellVerticalAlignment(message, HorizontalPanel.ALIGN_MIDDLE);

    panel.add(messagePanel);

    buttonBar.setSpacing(5);
    buttonBar.add(okButton);

    panel.add(buttonBar);
    panel.setCellHorizontalAlignment(buttonBar, VerticalPanel.ALIGN_CENTER);

    okButton.addClickHandler(new ClickHandler() {
        @Override
        public void onClick(ClickEvent event) {
            hide();
        }
    });

    configureButtonBar();

    add(panel);
}
项目:ReflectionTool    文件:Landmark.java   
@SuppressWarnings("deprecation")
public Landmark(Date time, Vector<String> users, String resource,
        String planningToolMap, String tool, String landmarkType,
        String activityType, String sendingTool, String challengeName,
        String groupId, String token, String classification,
        String description, String nodeId, boolean started,
        boolean finished, boolean planningTool, String picture,
        String name, String category, String categoryColor,
        String landmarkColor, String l2l2Url) {
    super();

    logger.setLevel(Level.INFO);

    this.time = time;
    this.users = users;
    this.resource = resource;
    this.planningToolMap = planningToolMap;
    this.tool = tool;
    this.landmarkType = landmarkType;
    this.activityType = activityType;
    this.sendingTool = sendingTool;
    this.challengeName = challengeName;
    this.groupId = groupId;
    this.token = token;
    this.classification = classification;
    this.description = description;
    this.nodeId = nodeId;

    logger.log(Level.INFO, "Landmark: New Landmark " + nodeId);

    this.started = started;
    this.finished = finished;

    if (planningTool) {
        this.planningTool = true;
        this.planningToolName = name;
        this.planningToolCategory = category;
        this.planningToolPicture = picture;
        this.planningToolCategoryColor = categoryColor;
    }

    Date now = new Date();
    if (time.getTime() > now.getTime()) {
        long offset = time.getTime() - now.getTime();
        ReflectionToolHtml.reflectionToolInstance.getTimeline()
                .setCurrentTimeOffest(offset);
    }

    setTitle(description + " (" + time.getHours() + ":" + time.getMinutes()
            + ")");

    x = 0;
    y = 0;
    width = landmarkWidth;
    height = landmarkHeight;

    setSize(width + "px", height + "px");

    getElement().getStyle().setBackgroundColor(background);
    if (finished) {
        getElement().getStyle().setBackgroundColor(backgroundFinished);
    } else if (started) {
        getElement().getStyle().setBackgroundColor(backgroundStarted);
    } else if (landmarkColor != null) {
        getElement().getStyle().setBackgroundColor(landmarkColor);
    }

    getElement().getStyle().setBorderColor(borderColor);
    getElement().getStyle().setBorderStyle(BorderStyle.SOLID);
    getElement().getStyle().setBorderWidth(1, Unit.PX);

    if (l2l2Url != null) {
        setHTML("<img src=\"" + l2l2Url + "\" width=\"" + ((width * 3) / 4)
                + "\" style=\"position: absolute; top:0px; left:0px;\" />");
    }

    addMouseOverHandler(this);
    addMouseOutHandler(this);
    addMouseUpHandler(this);

}
项目:ReflectionTool    文件:LandmarkBar.java   
public LandmarkBar(Landmark landmark) {
    super();

    logger.setLevel(Level.INFO);

    logger.log(
            Level.INFO,
            "Planning: " + landmark.isPlanningTool() + ", "
                    + landmark.getPlanningToolName() + ", "
                    + landmark.getPlanningToolPicture());

    if (landmark.isPlanningTool()) {
        imageurl = landmark.getPlanningToolPicture();
        name = landmark.getPlanningToolName();
        category = landmark.getPlanningToolCategory();
    }

    landmarks = new Vector<Landmark>();
    landmarks.add(landmark);

    setTitle(landmark.getDescription());

    x = 0;
    y = 0;
    width = landmarkBarMinWidth;
    height = landmarkBarHeight;

    setSize(width + "px", height + "px");
    getElement().getStyle().setBackgroundColor(backgroundColor);
    getElement().getStyle().setBorderColor(borderColor);
    getElement().getStyle().setBorderStyle(BorderStyle.SOLID);
    getElement().getStyle().setBorderWidth(1, Unit.PX);

    addMouseOverHandler(this);
    addMouseOutHandler(this);
    addMouseUpHandler(this);

    if (landmark.isPlanningTool()) {
        setHTML("<img src=\"" + imageurl + "\" width=\"" + (height - 2)
                + "\" height=\"" + (height - 2)
                + "\" /> <span style=\"font-size: xx-small;\">" + name
                + " (" + category + ")</span>");
    }

}
项目:daris    文件:TabPanel.java   
/**
 * Sets the border for the tab panel body.
 * 
 * @param w
 * @param s
 * @param colour
 */
public void setBodyBorder(int w,BorderStyle s,Colour colour) {
    _sp.setBorder(w, s, colour);
}