Package org.apache.uima.tools.util.gui

Examples of org.apache.uima.tools.util.gui.ImageButton


    annotationFeaturesViewer = new AnnotationFeaturesViewer();
    annotationFeaturesPanel.add(annotationFeaturesViewer, BorderLayout.CENTER);

    JPanel iconPanel = new JPanel();

    addTableEntryButton = new ImageButton(Images.FORWARD);
    addTableEntryButton.setToolTipText("Create stylemap table entry");
    addTableEntryButton.addActionListener(this);

    iconPanel.add(addTableEntryButton);

    annotationFeaturesPanel.add(iconPanel, BorderLayout.EAST);

    JPanel tablePanel = new JPanel();
    tablePanel.setLayout(new BorderLayout());

    JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true,
            annotationFeaturesPanel, tablePanel);
    Dimension screenDimension = getToolkit().getScreenSize();
    splitPane.setDividerLocation((int) (screenDimension.width * 0.28));

    okButton.setToolTipText("Save stylemap and exit");
    cancelButton.setToolTipText("Exit without saving");
    resetButton.setToolTipText("Reset stylemap to that auto-generated from metadata");

    JPanel buttonsPanel = new JPanel();
    buttonsPanel.add(okButton);
    buttonsPanel.add(cancelButton);
    buttonsPanel.add(resetButton);

    getContentPane().add(splitPane, BorderLayout.CENTER);
    getContentPane().add(buttonsPanel, BorderLayout.SOUTH);

    // creating a jtable to hold the styles

    tableModel = new StyleMapTableModel(StyleConstants.columnNames);
    med = new TableGUIMediator();
    annotationsTable = new StyleMapTable(tableModel, annotationFeaturesViewer, this, med);
    med.setTable(annotationsTable);

    annotationsTable.setDefaultRenderer(Color.class, new ColorRenderer(annotationsTable));
    setUpColorEditor(annotationsTable);
    annotationsTable.setDefaultEditor(String.class, new LabelCellEditor());

    final JScrollPane scrollPane = new JScrollPane();
    scrollPane.getViewport().add(annotationsTable, null);

    tablePanel.add(scrollPane, BorderLayout.CENTER);

    JPanel tableButtonsPanel = new JPanel();
    moveRowUpButton = new ImageButton(Images.UP);
    moveRowUpButton.setToolTipText("Move Row Up");
    moveRowUpButton.addActionListener(this);
    tableButtonsPanel.add(moveRowUpButton);

    moveRowDownButton = new ImageButton(Images.DOWN);
    moveRowDownButton.setToolTipText("Move Row Down");
    moveRowDownButton.addActionListener(this);
    tableButtonsPanel.add(moveRowDownButton);

    removeTableRowButton = new ImageButton(Images.ROW_DELETE);
    removeTableRowButton.setToolTipText("Delete Row");
    removeTableRowButton.addActionListener(this);
    tableButtonsPanel.add(removeTableRowButton);

    // pass all these to the mediator which turns them on and off
View Full Code Here


    annotationFeaturesViewer = new AnnotationFeaturesViewer();
    annotationFeaturesPanel.add(annotationFeaturesViewer, BorderLayout.CENTER);

    JPanel iconPanel = new JPanel();

    addTableEntryButton = new ImageButton(Images.FORWARD);
    addTableEntryButton.setToolTipText("Create stylemap table entry");
    addTableEntryButton.addActionListener(this);

    iconPanel.add(addTableEntryButton);

    annotationFeaturesPanel.add(iconPanel, BorderLayout.EAST);

    JPanel tablePanel = new JPanel();
    tablePanel.setLayout(new BorderLayout());

    JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true,
            annotationFeaturesPanel, tablePanel);
    Dimension screenDimension = getToolkit().getScreenSize();
    splitPane.setDividerLocation((int) (screenDimension.width * 0.28));

    okButton.setToolTipText("Save stylemap and exit");
    cancelButton.setToolTipText("Exit without saving");
    resetButton.setToolTipText("Reset stylemap to that auto-generated from metadata");

    JPanel buttonsPanel = new JPanel();
    buttonsPanel.add(okButton);
    buttonsPanel.add(cancelButton);
    buttonsPanel.add(resetButton);

    getContentPane().add(splitPane, BorderLayout.CENTER);
    getContentPane().add(buttonsPanel, BorderLayout.SOUTH);

    // creating a jtable to hold the styles

    tableModel = new StyleMapTableModel(StyleConstants.columnNames);
    med = new TableGUIMediator();
    annotationsTable = new StyleMapTable(tableModel, annotationFeaturesViewer, this, med);
    med.setTable(annotationsTable);

    annotationsTable.setDefaultRenderer(Color.class, new ColorRenderer(annotationsTable));
    setUpColorEditor(annotationsTable);
    annotationsTable.setDefaultEditor(String.class, new LabelCellEditor());

    final JScrollPane scrollPane = new JScrollPane();
    scrollPane.getViewport().add(annotationsTable, null);

    tablePanel.add(scrollPane, BorderLayout.CENTER);

    JPanel tableButtonsPanel = new JPanel();
    moveRowUpButton = new ImageButton(Images.UP);
    moveRowUpButton.setToolTipText("Move Row Up");
    moveRowUpButton.addActionListener(this);
    tableButtonsPanel.add(moveRowUpButton);

    moveRowDownButton = new ImageButton(Images.DOWN);
    moveRowDownButton.setToolTipText("Move Row Down");
    moveRowDownButton.addActionListener(this);
    tableButtonsPanel.add(moveRowDownButton);

    removeTableRowButton = new ImageButton(Images.ROW_DELETE);
    removeTableRowButton.setToolTipText("Delete Row");
    removeTableRowButton.addActionListener(this);
    tableButtonsPanel.add(removeTableRowButton);

    // pass all these to the mediator which turns them on and off
View Full Code Here

    annotationFeaturesViewer = new AnnotationFeaturesViewer();
    annotationFeaturesPanel.add(annotationFeaturesViewer, BorderLayout.CENTER);

    JPanel iconPanel = new JPanel();

    addTableEntryButton = new ImageButton(Images.FORWARD);
    addTableEntryButton.setToolTipText("Create stylemap table entry");
    addTableEntryButton.addActionListener(this);

    iconPanel.add(addTableEntryButton);

    annotationFeaturesPanel.add(iconPanel, BorderLayout.EAST);

    JPanel tablePanel = new JPanel();
    tablePanel.setLayout(new BorderLayout());

    JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true,
            annotationFeaturesPanel, tablePanel);
    Dimension screenDimension = getToolkit().getScreenSize();
    splitPane.setDividerLocation((int) (screenDimension.width * 0.28));

    okButton.setToolTipText("Save stylemap and exit");
    cancelButton.setToolTipText("Exit without saving");
    resetButton.setToolTipText("Reset stylemap to that auto-generated from metadata");

    JPanel buttonsPanel = new JPanel();
    buttonsPanel.add(okButton);
    buttonsPanel.add(cancelButton);
    buttonsPanel.add(resetButton);

    getContentPane().add(splitPane, BorderLayout.CENTER);
    getContentPane().add(buttonsPanel, BorderLayout.SOUTH);

    // creating a jtable to hold the styles

    tableModel = new StyleMapTableModel(StyleConstants.columnNames);
    med = new TableGUIMediator();
    annotationsTable = new StyleMapTable(tableModel, annotationFeaturesViewer, this, med);
    med.setTable(annotationsTable);

    annotationsTable.setDefaultRenderer(Color.class, new ColorRenderer(annotationsTable));
    setUpColorEditor(annotationsTable);
    annotationsTable.setDefaultEditor(String.class, new LabelCellEditor());

    final JScrollPane scrollPane = new JScrollPane();
    scrollPane.getViewport().add(annotationsTable, null);

    tablePanel.add(scrollPane, BorderLayout.CENTER);

    JPanel tableButtonsPanel = new JPanel();
    moveRowUpButton = new ImageButton(Images.UP);
    moveRowUpButton.setToolTipText("Move Row Up");
    moveRowUpButton.addActionListener(this);
    tableButtonsPanel.add(moveRowUpButton);

    moveRowDownButton = new ImageButton(Images.DOWN);
    moveRowDownButton.setToolTipText("Move Row Down");
    moveRowDownButton.addActionListener(this);
    tableButtonsPanel.add(moveRowDownButton);

    removeTableRowButton = new ImageButton(Images.ROW_DELETE);
    removeTableRowButton.setToolTipText("Delete Row");
    removeTableRowButton.addActionListener(this);
    tableButtonsPanel.add(removeTableRowButton);

    // pass all these to the mediator which turns them on and off
View Full Code Here

TOP

Related Classes of org.apache.uima.tools.util.gui.ImageButton

Copyright © 2018 www.massapicom. 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.