Examples of ListDecorator


Examples of org.jitterbit.ui.util.decorator.ListDecorator

    private ListModel createListModel(FileUi[] files) {
        if (files.length == 0) {
            Font font = TextStyles.DefaultListText.getFont();
            String text = getString("SourceDataFileProvider.NoFilesAvailable");
            ListDecorator data = new ItalicTextListDecorator(text, null, null, font);
            return ListUtils.createModel(data);
        } else {
            return ListUtils.createModel((Object[]) files);
        }
    }
View Full Code Here

Examples of org.jitterbit.ui.util.decorator.ListDecorator

        insertCaptionItem();
    }

    private void insertCaptionItem() {
        DefaultComboBoxModel model = (DefaultComboBoxModel) comboBox.getModel();
        Object item = new ListDecorator() {

            @Override
            public void decorate(ListDecor decor, boolean selected) {
                decor.setText(caption);
                decor.setToolTip(caption);
View Full Code Here

Examples of org.jitterbit.ui.util.decorator.ListDecorator

    @Override
    public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected,
                    boolean cellHasFocus) {
        this.list = list;
        super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
        ListDecorator decorator = null;
        if (value instanceof IntegrationEntity) {
            decorator = getDecorator((IntegrationEntity) value);
        } else if (value instanceof ListDecorator) {
            decorator = (ListDecorator) value;
        }
        if (decorator != null) {
            decorator.decorate(this, isSelected);
        }
        if (insets != null) {
            setBorder(new BorderBuilder(getBorder()).empty(insets));
        }
        return this;
View Full Code Here

Examples of org.jitterbit.ui.util.decorator.ListDecorator

                                                   int row,
                                                   int column) {
        this.table = table;
        super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
        if (value instanceof IntegrationEntity) {
            ListDecorator decorator = ((IntegrationEntity) value).getExtensionObject(ListDecorator.class);
            decorator.decorate(this, isSelected);
        }
        return this;
    }
View Full Code Here

Examples of org.odftoolkit.simple.text.list.ListDecorator

  @Test
  public void testAddRemoveIterateList() {
    try {
      TextDocument doc = TextDocument.newTextDocument();
      Table table = Table.newTable(doc, 3, 3);
      ListDecorator bulletDecorator = new BulletDecorator(doc);
      ListDecorator numberDecorator = new NumberDecorator(doc);
      ListDecorator imageDecorator = new ImageDecorator(doc, ResourceUtilities.getURI("image_list_item.png"));
      String[] numberItemContents = { "number item 1", "number item 2", "number item 3" };

      // add list.
      ListContainer container = table.getCellByPosition(0, 0);
      org.odftoolkit.simple.text.list.List bulletList = container.addList(bulletDecorator);
View Full Code Here

Examples of org.odftoolkit.simple.text.list.ListDecorator

  @Test
  public void testAddRemoveIterateList() {
    try {
      TextDocument doc = TextDocument.newTextDocument();
      Table table = Table.newTable(doc, 3, 3);
      ListDecorator bulletDecorator = new BulletDecorator(doc);
      ListDecorator numberDecorator = new NumberDecorator(doc);
      ListDecorator imageDecorator = new ImageDecorator(doc, ResourceUtilities.getURI("image_list_item.png"));
      String[] numberItemContents = { "number item 1", "number item 2", "number item 3" };

      // add list.
      ListContainer container = table.getCellByPosition(0, 0);
      org.odftoolkit.simple.text.list.List bulletList = container.addList(bulletDecorator);
View Full Code Here

Examples of org.odftoolkit.simple.text.list.ListDecorator

  @Test
  public void testAddRemoveIterateSubList() {
    try {
      doc = PresentationDocument.loadDocument(ResourceUtilities
          .getTestResourceAsStream(TEST_PRESENTATION_FILE_MAIN));
      ListDecorator bulletDecorator = new BulletDecorator(doc);
      ListDecorator numberDecorator = new NumberDecorator(doc);
      ListDecorator imageDecorator = new ImageDecorator(doc, ResourceUtilities.getURI("image_list_item.png"));
      String[] numberItemContents = { "number item 1", "number item 2", "number item 3" };

      // add list.
      Slide slide = doc.newSlide(0, "test0", Slide.SlideLayout.TITLE_OUTLINE);
      ListContainer container = slide.getNotesPage();
View Full Code Here

Examples of org.odftoolkit.simple.text.list.ListDecorator

    try {
      TextDocument doc = TextDocument.newTextDocument();
      Section sect = doc.appendSection("List Section");

      ListDecorator numberDecorator = new NumberDecorator(doc);
      ListDecorator outLineDecorator = new OutLineDecorator(doc);
      String[] subItemContents = { "sub list item 1", "sub list item 2",
          "sub list item 3" };

      List list1 = new List(sect);
      boolean removeResult = sect.removeList(list1);
View Full Code Here

Examples of org.odftoolkit.simple.text.list.ListDecorator

    try {

      TextDocument doc = TextDocument.newTextDocument();
      Section sect = doc.appendSection("List Section");

      ListDecorator numberDecorator = new NumberDecorator(doc);
      ListDecorator outLineDecorator = new OutLineDecorator(doc);
      String[] subItemContents = { "sub list item 1", "sub list item 2",
          "sub list item 3" };

      // create 2 lists
      new List(sect, numberDecorator);
View Full Code Here

Examples of org.odftoolkit.simple.text.list.ListDecorator

  @Test
  public void testAddRemoveIterateList() {
    try {
      TextDocument doc = TextDocument.newTextDocument();
      Table table = Table.newTable(doc, 3, 3);
      ListDecorator bulletDecorator = new BulletDecorator(doc);
      ListDecorator numberDecorator = new NumberDecorator(doc);
      ListDecorator imageDecorator = new ImageDecorator(doc, ResourceUtilities.getURI("image_list_item.png"));
      String[] numberItemContents = { "number item 1", "number item 2", "number item 3" };

      // add list.
      ListContainer container = table.getCellByPosition(0, 0);
      org.odftoolkit.simple.text.list.List bulletList = container.addList(bulletDecorator);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.