/**
   * Creates a new page selector from search results.
   *
   * @param wikiService the service used to search wiki pages
   */
  public SearchSelectorWizardStep(WikiServiceAsync wikiService) {
    super(wikiService);

    display().addStyleName("xPagesSearch");
    // create the search widget
    FlowPanel searchPanel = new FlowPanel();
    searchPanel.addStyleName("xSearchForm");
    searchBox = new TextBox();
    searchBox.setTitle(Strings.INSTANCE.linkWikipageSearchTooltip());
    Button searchButton = new Button(Strings.INSTANCE.linkWikipageSearchButton());
    searchButton.addClickHandler(this);
    searchBox.addKeyPressHandler(this);
    searchPanel.add(searchBox);
    searchPanel.add(searchButton);
    display().insert(searchPanel, 0);
  }
Esempio n. 2
0
  /**
   * Get table wizard pop-up.
   *
   * @return the table wizard pop-up instance.
   */
  public Wizard getWizard() {
    if (wizard == null) {
      TableConfigWizardStep configStep = new TableConfigWizardStep();
      configStep.setDirectionName(NavigationDirection.FINISH, Strings.INSTANCE.tableInsertButton());
      configStep.setValidDirections(EnumSet.of(NavigationDirection.FINISH));

      WizardStepMap insertSteps = new WizardStepMap();
      insertSteps.put(CONFIG_STEP_NAME, configStep);

      wizard =
          new Wizard(
              Strings.INSTANCE.tableInsertDialogCaption(),
              new Image(Images.INSTANCE.insertTable()));
      wizard.setProvider(insertSteps);
      wizard.addWizardListener(this);
    }
    return wizard;
  }
 /** {@inheritDoc} */
 @Override
 protected ListItem<WikiPage> getNewOptionListItem() {
   ListItem<WikiPage> item = new ListItem<WikiPage>();
   item.setData(null);
   Label newOptionPanel = new Label(Strings.INSTANCE.linkNewPageOptionLabel());
   newOptionPanel.addStyleName("xNewPagePreview");
   item.add(newOptionPanel);
   return item;
 }
 /** {@inheritDoc} */
 @Override
 protected ListItem<Attachment> getNewOptionListItem() {
   ListItem<Attachment> newImageOption = new ListItem<Attachment>();
   newImageOption.setData(null);
   FlowPanel newOptionPanel = new FlowPanel();
   newOptionPanel.addStyleName("xNewImagePreview");
   Label newOptionLabel = new Label(Strings.INSTANCE.imageUploadNewFileLabel());
   newOptionPanel.add(newOptionLabel);
   newImageOption.add(newOptionPanel);
   return newImageOption;
 }
  /** {@inheritDoc} */
  @Override
  protected ListItem<WikiPage> getListItem(WikiPage data) {
    ListItem<WikiPage> item = new ListItem<WikiPage>();
    item.setData(data);
    String documentReferenceAsString =
        serializeDocumentReference(new WikiPageReference(data.getReference()));
    Label pageName =
        new Label(Strings.INSTANCE.entityLocatedIn() + " " + documentReferenceAsString);
    pageName.addStyleName("xPagePreviewFullname");
    Label title = new Label(data.getTitle());
    title.addStyleName("xPagePreviewTitle");

    FlowPanel ui = new FlowPanel();
    if (!StringUtils.isEmpty(data.getTitle())) {
      ui.add(title);
    }
    ui.setTitle(data.getTitle());
    ui.add(pageName);
    ui.addStyleName("xPagePreview");
    item.add(ui);
    return item;
  }
Esempio n. 6
0
 /**
  * Initialize the feature. Table features needs to be aware of the plug-in (here the
  * ClickListener) since they hold their own PushButton.
  *
  * @param plugin table plug-in.
  */
 public InsertTable(TablePlugin plugin) {
   super(NAME, new Command(NAME), Strings.INSTANCE.insertTable(), plugin);
   insertBlockHTMLExecutable = new InsertBlockHTMLExecutable(rta);
 }
 /** {@inheritDoc} */
 @Override
 protected String getSelectErrorMessage() {
   return Strings.INSTANCE.linkNoPageSelectedError();
 }
 /** {@inheritDoc} */
 @Override
 protected String getSelectHelpLabel() {
   return Strings.INSTANCE.linkSelectWikipageHelpLabel();
 }
 /** {@inheritDoc} */
 public String getStepTitle() {
   return Strings.INSTANCE.linkSelectWikipageTitle();
 }
Esempio n. 10
0
 /**
  * Initialize the feature. Table features needs to be aware of the plug-in (here the
  * ClickListener) since they hold their own PushButton.
  *
  * @param plugin table plug-in.
  */
 public DeleteCol(TablePlugin plugin) {
   super(NAME, new Command(NAME), Strings.INSTANCE.deleteCol(), plugin);
 }
 /** {@inheritDoc} */
 @Override
 protected String getSelectHelpLabel() {
   return Strings.INSTANCE.imageSelectImageHelpLabel();
 }
 /** {@inheritDoc} */
 public String getStepTitle() {
   return Strings.INSTANCE.imageSelectImageTitle();
 }