Example usage for java.awt Font getSize

List of usage examples for java.awt Font getSize

Introduction

In this page you can find the example usage for java.awt Font getSize.

Prototype

public int getSize() 

Source Link

Document

Returns the point size of this Font , rounded to an integer.

Usage

From source file:org.openmicroscopy.shoola.agents.metadata.editor.PropertiesUI.java

/**
 * Lays out the well fields.//  ww  w.ja  va2s . co m
 * 
 * @param well The well to handle.
 * @return See above.
 */
private JPanel layoutWellContent(WellData well) {
    JPanel content = new JPanel();
    content.setBackground(UIUtilities.BACKGROUND_COLOR);
    content.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 5));
    content.setLayout(new GridBagLayout());
    JLabel l = new JLabel();
    Font font = l.getFont();
    int size = font.getSize() - 2;

    Map<JLabel, JComponent> components = new LinkedHashMap<JLabel, JComponent>();
    String v = well.getWellType();
    JLabel value;
    if (v != null && v.trim().length() > 0) {
        l = UIUtilities.setTextFont(EditorUtil.TYPE, Font.BOLD, size);
        value = UIUtilities.createComponent(null);
        value.setFont(font.deriveFont(font.getStyle(), size));
        value.setForeground(UIUtilities.DEFAULT_FONT_COLOR);
        value.setText(v);
        components.put(l, value);
    }
    l = UIUtilities.setTextFont(EditorUtil.EXTERNAL_DESCRIPTION, Font.BOLD, size);
    value = UIUtilities.createComponent(null);
    value.setFont(font.deriveFont(font.getStyle(), size));
    value.setForeground(UIUtilities.DEFAULT_FONT_COLOR);
    v = well.getExternalDescription();
    if (v == null || v.length() == 0)
        v = NO_SET_TEXT;
    value.setText(v);
    components.put(l, value);
    l = UIUtilities.setTextFont(EditorUtil.STATUS, Font.BOLD, size);
    value = UIUtilities.createComponent(null);
    value.setFont(font.deriveFont(font.getStyle(), size));
    value.setForeground(UIUtilities.DEFAULT_FONT_COLOR);
    v = well.getStatus();
    if (v == null || v.length() == 0)
        v = NO_SET_TEXT;
    value.setText(v);
    components.put(l, value);
    layoutComponents(content, components);
    return content;
}

From source file:org.openmicroscopy.shoola.agents.fsimporter.util.FileImportComponent.java

/** Initializes the components. */
private void initComponents() {
    actionMenuButton = new JButton();
    actionMenuButton.setVisible(false);//  ww  w .  ja  v a 2 s.c  o  m
    actionMenuButton.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent ev) {
            JPopupMenu popup = createActionMenu();
            popup.show(actionMenuButton, 0, actionMenuButton.getHeight());
        }
    });

    adapter = new MouseAdapter() {

        /**
         * Views the image.
         * @see MouseListener#mousePressed(MouseEvent)
         */
        public void mousePressed(MouseEvent e) {
            if (e.getClickCount() == 1) {
                launchFullViewer();
            }
        }
    };

    setLayout(new FlowLayout(FlowLayout.LEFT));
    busyLabel = new JXBusyLabel(SIZE);
    busyLabel.setVisible(false);
    busyLabel.setBusy(false);

    cancelButton = new JButton("Cancel");
    cancelButton.setForeground(UIUtilities.HYPERLINK_COLOR);
    cancelButton.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent ev) {
            cancelLoading();
        }
    });
    cancelButton.setVisible(true);

    namePane = new JPanel();
    namePane.setLayout(new FlowLayout(FlowLayout.LEFT, 5, 5));
    IconManager icons = IconManager.getInstance();
    Icon icon;
    if (getFile().isFile())
        icon = icons.getIcon(IconManager.IMAGE);
    else
        icon = icons.getIcon(IconManager.DIRECTORY);
    imageLabel = new ThumbnailLabel(icon);
    imageLabel.addPropertyChangeListener(this);
    imageLabels = new ArrayList<ThumbnailLabel>();
    ThumbnailLabel label;
    for (int i = 0; i < MAX_THUMBNAILS; i++) {
        label = new ThumbnailLabel();
        if (i == MAX_THUMBNAILS - 1) {
            Font f = label.getFont();
            label.setFont(f.deriveFont(f.getStyle(), f.getSize() - 2));
        }
        label.setVisible(false);
        label.addPropertyChangeListener(this);
        imageLabels.add(label);
    }
    fileNameLabel = new JLabel(getFile().getName());
    namePane.add(imageLabel);
    Iterator<ThumbnailLabel> j = imageLabels.iterator();
    while (j.hasNext()) {
        namePane.add(j.next());
    }
    namePane.add(Box.createHorizontalStrut(4));
    namePane.add(fileNameLabel);
    namePane.add(Box.createHorizontalStrut(10));
    resultLabel = new JLabel();
    statusLabel = new StatusLabel(importable.getFile());
    statusLabel.addPropertyChangeListener(this);
    image = null;
    refButton = cancelButton;
    refLabel = busyLabel;
}

From source file:co.foldingmap.mapImportExport.SvgExporter.java

private void exportMapLabel(BufferedWriter outputStream, MapLabel label) {

    Color outlineColor, fillColor;
    float x, y;//from  w  w  w . j  a  va 2s  . c  om
    Font labelFont;
    String style, fontStyle;

    try {
        labelFont = label.getFont();

        //construct style
        if (label.getFillColor() != null) {
            fillColor = label.getFillColor();
        } else {
            fillColor = Color.BLACK;
        }

        if (label.getOutlineColor() != null) {
            outlineColor = label.getOutlineColor();
        } else {
            outlineColor = Color.WHITE;
        }

        if (labelFont.getStyle() == Font.BOLD) {
            fontStyle = "font-weight=\"bold\"";
        } else if (labelFont.getStyle() == Font.PLAIN) {
            fontStyle = "font-style=\"normal\"";
        } else if (labelFont.getStyle() == Font.ITALIC) {
            fontStyle = "font-style=\"italic\"";
        } else {
            fontStyle = "";
        }

        style = "font-family=\"" + labelFont.getFamily() + "\" font-size=\"" + labelFont.getSize() + "\" "
                + fontStyle + " ";

        outputStream.write(getIndent());
        outputStream.write("<g " + style + ">\n");
        addIndent();

        style = "fill:#" + getHexColor(fillColor) + ";stroke:#" + getHexColor(outlineColor);

        if (label instanceof PointLabel) {
            PointLabel pointLabel = (PointLabel) label;

            x = pointLabel.getLine1StartPoint().x;
            y = pointLabel.getLine1StartPoint().y;

            outputStream.write(getIndent());
            outputStream.write("<text x=\"");
            outputStream.write(Float.toString(x));
            outputStream.write("\" y=\"");
            outputStream.write(Float.toString(y));
            outputStream.write("\" style=\"");
            outputStream.write(style);
            outputStream.write("\">\n");

            addIndent();
            outputStream.write(getIndent());
            outputStream.write("<tspan x=\"");
            outputStream.write(Float.toString(x));
            outputStream.write("\" y=\"");
            outputStream.write(Float.toString(y));
            outputStream.write("\">");
            outputStream.write(pointLabel.getLine1Text());
            outputStream.write("</tspan>\n");

            if (pointLabel.getLine2Text() != null && pointLabel.getLine2Text().length() > 0) {
                x = pointLabel.getLine2StartPoint().x;
                y = pointLabel.getLine2StartPoint().y;

                if (x != 0 && y != 0) {
                    outputStream.write(getIndent());
                    outputStream.write("<tspan x=\"");
                    outputStream.write(Float.toString(x));
                    outputStream.write("\" y=\"");
                    outputStream.write(Float.toString(y));
                    outputStream.write("\">");
                    outputStream.write(pointLabel.getLine2Text());
                    outputStream.write("</tspan>\n");
                }
            }

            removeIndent();
            outputStream.write(getIndent());
            outputStream.write("</text>\n");

            removeIndent();
            outputStream.write(getIndent());
            outputStream.write("</g>\n");
        } else if (label instanceof LineStringLabel) {
            LineStringLabel lineLabel = (LineStringLabel) label;

        } else if (label instanceof PolygonLabel) {
            PolygonLabel polyLabel = (PolygonLabel) label;

        }

    } catch (Exception e) {
        Logger.log(Logger.ERR, "Error in SvgExporter.exportMapLabel(BufferedWriter, MapLabel) - " + e);
    }
}

From source file:org.openmicroscopy.shoola.agents.metadata.editor.PropertiesUI.java

/**
 * Lays out the screen fields.//from  w  w w  .  j  a  va 2s  .  c o  m
 * 
 * @param screen The screen to handle.
 * @return See above.
 */
private JPanel layoutScreenContent(ScreenData screen) {
    JPanel content = new JPanel();
    content.setBackground(UIUtilities.BACKGROUND_COLOR);
    content.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 5));
    content.setLayout(new GridBagLayout());
    JLabel l = new JLabel();
    Font font = l.getFont();
    int size = font.getSize() - 2;

    Map<JLabel, JComponent> components = new LinkedHashMap<JLabel, JComponent>();

    l = UIUtilities.setTextFont("Protocol Identifier:", Font.BOLD, size);
    JLabel value = UIUtilities.createComponent(null);
    value.setForeground(UIUtilities.DEFAULT_FONT_COLOR);
    String v = screen.getProtocolIdentifier();
    if (v == null || v.length() == 0)
        v = NO_SET_TEXT;
    value.setText(v);
    components.put(l, value);

    l = UIUtilities.setTextFont("Protocol Description:", Font.BOLD, size);
    value = UIUtilities.createComponent(null);
    value.setFont(font.deriveFont(font.getStyle(), size));
    value.setForeground(UIUtilities.DEFAULT_FONT_COLOR);
    v = screen.getProtocolDescription();
    if (v == null || v.length() == 0)
        v = NO_SET_TEXT;
    value.setText(v);
    components.put(l, value);

    l = UIUtilities.setTextFont("ReagentSet Identifier:", Font.BOLD, size);
    value = UIUtilities.createComponent(null);
    value.setFont(font.deriveFont(font.getStyle(), size));
    value.setForeground(UIUtilities.DEFAULT_FONT_COLOR);
    v = screen.getReagentSetIdentifier();
    if (v == null || v.length() == 0)
        v = NO_SET_TEXT;
    value.setText(v);
    components.put(l, value);

    l = UIUtilities.setTextFont("ReagentSet Description:", Font.BOLD, size);
    value = UIUtilities.createComponent(null);
    value.setForeground(UIUtilities.DEFAULT_FONT_COLOR);
    value.setFont(font.deriveFont(font.getStyle(), size));
    v = screen.getReagentSetDescripion();
    if (v == null || v.length() == 0)
        v = NO_SET_TEXT;
    value.setText(v);
    components.put(l, value);

    layoutComponents(content, components);
    return content;
}

From source file:Main.Interface_Main.java

private void btnAboutActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAboutActionPerformed

    // for copying style
    JLabel label = new JLabel();
    Font font = label.getFont();

    // create some css from the label's font
    StringBuffer style = new StringBuffer("font-family:" + font.getFamily() + ";");
    style.append("font-weight:" + (font.isBold() ? "bold" : "normal") + ";");
    style.append("font-size:" + font.getSize() + "pt;");

    // html content
    JEditorPane ep = new JEditorPane("text/html", "<html><body style=\"" + style + "\">" //
            + "This application was designed by <A HREF=http://www.friedcircuits.us>FriedCircuits</A> for the USB Tester." //
            + "<br><br><center>App Version: " + appVersion + "<br>FW Version: " + FW_VERSION
            + "</center><br><br>*Connect once to get FW version.</body></html>");

    // handle link events
    ep.addHyperlinkListener(new HyperlinkListener() {
        @Override/*ww w . j  a va  2s .  c  o  m*/
        public void hyperlinkUpdate(HyperlinkEvent e) {
            if (e.getEventType().equals(HyperlinkEvent.EventType.ACTIVATED)) {
                java.awt.Desktop desktop = java.awt.Desktop.getDesktop();

                URI uri;
                try {
                    uri = new java.net.URI("www.friedcircuits.us");
                    if (desktop.isSupported(Desktop.Action.BROWSE)) {
                        try {
                            desktop.browse(uri);
                        } catch (IOException ex) {
                            Logger.getLogger(Interface_Main.class.getName()).log(Level.SEVERE, null, ex);
                        }
                    }
                } catch (URISyntaxException ex) {
                    Logger.getLogger(Interface_Main.class.getName()).log(Level.SEVERE, null, ex);
                }

            } // roll your own link launcher or use Desktop if J6+
        }
    });
    Color bgColor = label.getBackground();
    UIDefaults defaults = new UIDefaults();
    defaults.put("EditorPane[Enabled].backgroundPainter", bgColor);
    ep.putClientProperty("Nimbus.Overrides", defaults);
    ep.putClientProperty("Nimbus.Overrides.InheritDefaults", true);
    ep.setEditable(false);
    ep.setBackground(bgColor);

    // show
    ImageIcon myCustomIcon = new ImageIcon(getClass().getResource("/faviconbot2edit.png"));
    JOptionPane.showMessageDialog(plCurrent, ep, "About", JOptionPane.INFORMATION_MESSAGE, myCustomIcon);
}

From source file:userinterface.graph.Graph.java

/**
 * Allows graphs to be saved to the PRISM 'gra' file format.
 * /*from   ww w . j a  v a  2s .  co  m*/
 * @param file
 *            The file to save the graph to.
 * @throws GraphException
 *             If the file cannot be written.
 */
public void save(File file) throws PrismException {
    try {
        JFreeChart chart = getChart();
        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
        DocumentBuilder builder = factory.newDocumentBuilder();
        Document doc = builder.newDocument();

        Element chartFormat = doc.createElement("chartFormat");

        chartFormat.setAttribute("versionString", prism.Prism.getVersion());
        chartFormat.setAttribute("graphTitle", getTitle());

        Font titleFont = getTitleFont().f;
        chartFormat.setAttribute("titleFontName", titleFont.getName());
        chartFormat.setAttribute("titleFontSize", "" + titleFont.getSize());
        chartFormat.setAttribute("titleFontStyle", "" + titleFont.getStyle());

        Color titleFontColor = (Color) getTitleFont().c;
        chartFormat.setAttribute("titleFontColourR", "" + titleFontColor.getRed());
        chartFormat.setAttribute("titleFontColourG", "" + titleFontColor.getGreen());
        chartFormat.setAttribute("titleFontColourB", "" + titleFontColor.getBlue());

        chartFormat.setAttribute("legendVisible", isLegendVisible() ? "true" : "false");

        Font legendFont = getLegendFont().f;
        chartFormat.setAttribute("legendFontName", "" + legendFont.getName());
        chartFormat.setAttribute("legendFontSize", "" + legendFont.getSize());
        chartFormat.setAttribute("legendFontStyle", "" + legendFont.getStyle());

        Color legendFontColor = getLegendFont().c;

        chartFormat.setAttribute("legendFontColourR", "" + legendFontColor.getRed());
        chartFormat.setAttribute("legendFontColourG", "" + legendFontColor.getGreen());
        chartFormat.setAttribute("legendFontColourB", "" + legendFontColor.getBlue());

        switch (getLegendPosition()) {
        case LEFT:
            chartFormat.setAttribute("legendPosition", "left");
            break;
        case BOTTOM:
            chartFormat.setAttribute("legendPosition", "bottom");
            break;
        case TOP:
            chartFormat.setAttribute("legendPosition", "top");
            break;
        default:
            chartFormat.setAttribute("legendPosition", "right");
        }

        Element layout = doc.createElement("layout");
        chartFormat.appendChild(layout);

        Element xAxis = doc.createElement("axis");
        getXAxisSettings().save(xAxis);
        chartFormat.appendChild(xAxis);

        Element yAxis = doc.createElement("axis");
        getYAxisSettings().save(yAxis);
        chartFormat.appendChild(yAxis);

        synchronized (getSeriesLock()) {
            /* Make sure we preserve ordering. */
            for (int i = 0; i < seriesList.getSize(); i++) {
                SeriesKey key = seriesList.getKeyAt(i);

                Element series = doc.createElement("graph");
                SeriesSettings seriesSettings = getGraphSeries(key);
                seriesSettings.save(series);

                XYSeries seriesData = getXYSeries(key);

                for (int j = 0; j < seriesData.getItemCount(); j++) {
                    Element point = doc.createElement("point");

                    point.setAttribute("x", "" + seriesData.getX(j));
                    point.setAttribute("y", "" + seriesData.getY(j));

                    series.appendChild(point);
                }

                chartFormat.appendChild(series);
            }
        }

        doc.appendChild(chartFormat);

        // File writing 
        Transformer t = TransformerFactory.newInstance().newTransformer();
        t.setOutputProperty("doctype-system", "chartformat.dtd");
        t.setOutputProperty("indent", "yes");
        t.transform(new DOMSource(doc), new StreamResult(new FileOutputStream(file)));
    } catch (IOException e) {
        throw new PrismException(e.getMessage());
    } catch (DOMException e) {
        throw new PrismException("Problem saving graph: DOM Exception: " + e);
    } catch (ParserConfigurationException e) {
        throw new PrismException("Problem saving graph: Parser Exception: " + e);
    } catch (TransformerConfigurationException e) {
        throw new PrismException("Problem saving graph: Error in creating XML: " + e);
    } catch (TransformerException e) {
        throw new PrismException("Problem saving graph: Transformer Exception: " + e);
    } catch (SettingException e) {
        throw new PrismException(e.getMessage());
    }
}

From source file:org.openmicroscopy.shoola.agents.fsimporter.chooser.ImportDialog.java

/**
 * Builds and lays out the component displaying the options for the
 * metadata./*from  w  w w .j  av  a2s.  c o  m*/
 * 
 * @return See above.
 */
private JXTaskPane buildMetadataComponent() {
    JXTaskPane pane = new JXTaskPane();
    Font font = pane.getFont();
    pane.setFont(font.deriveFont(font.getStyle(), font.getSize() - 2));
    pane.setCollapsed(true);
    pane.setTitle(TEXT_METADATA_DEFAULTS);
    pane.add(buildPixelSizeComponent());
    return pane;
}

From source file:org.openmicroscopy.shoola.agents.metadata.editor.PropertiesUI.java

/**
  * Builds the panel hosting the information
  * //from ww  w .  j a va2  s.  c  o  m
  * @param details The information to display.
  * @param image     The image of reference.
  * @return See above.
  */
private JPanel buildContentPanel(Map details, ImageData image) {
    JPanel content = new JPanel();
    content.setBackground(UIUtilities.BACKGROUND_COLOR);
    content.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 5));
    content.setLayout(new GridBagLayout());
    GridBagConstraints c = new GridBagConstraints();
    c.fill = GridBagConstraints.HORIZONTAL;
    c.anchor = GridBagConstraints.WEST;
    c.insets = new Insets(0, 2, 2, 0);
    c.gridy = 0;
    c.gridx = 0;
    JLabel l = new JLabel();
    Font font = l.getFont();
    int size = font.getSize() - 2;
    JLabel label = UIUtilities.setTextFont(EditorUtil.ARCHIVED, Font.BOLD, size);
    JCheckBox box = new JCheckBox();
    box.setEnabled(false);
    box.setBackground(UIUtilities.BACKGROUND);
    box.setSelected(model.isArchived());
    content.add(label, c);
    c.gridx = c.gridx + 2;
    content.add(box, c);
    c.gridy++;
    c.gridx = 0;
    label = UIUtilities.setTextFont(EditorUtil.ACQUISITION_DATE, Font.BOLD, size);
    JLabel value = UIUtilities.createComponent(null);
    String v = model.formatDate(image);
    value.setText(v);
    content.add(label, c);
    c.gridx = c.gridx + 2;
    content.add(value, c);
    c.gridy++;
    c.gridx = 0;
    try { //just to be on the save side
        label = UIUtilities.setTextFont(EditorUtil.IMPORTED_DATE, Font.BOLD, size);
        value = UIUtilities.createComponent(null);
        v = UIUtilities.formatShortDateTime(image.getInserted());
        value.setText(v);
        content.add(label, c);
        c.gridx = c.gridx + 2;
        content.add(value, c);
        c.gridy++;
    } catch (Exception e) {

    }
    label = UIUtilities.setTextFont(EditorUtil.XY_DIMENSION, Font.BOLD, size);
    value = UIUtilities.createComponent(null);
    v = (String) details.get(EditorUtil.SIZE_X);
    v += " x ";
    v += (String) details.get(EditorUtil.SIZE_Y);
    value.setText(v);
    c.gridx = 0;
    content.add(label, c);
    c.gridx = c.gridx + 2;
    content.add(value, c);
    c.gridy++;
    label = UIUtilities.setTextFont(EditorUtil.PIXEL_TYPE, Font.BOLD, size);
    value = UIUtilities.createComponent(null);
    value.setText((String) details.get(EditorUtil.PIXEL_TYPE));
    c.gridx = 0;
    content.add(label, c);
    c.gridx = c.gridx + 2;
    content.add(value, c);

    value = UIUtilities.createComponent(null);
    String s = formatPixelsSize(details, value);
    if (s != null) {
        c.gridy++;
        label = UIUtilities.setTextFont(s, Font.BOLD, size);
        c.gridx = 0;
        content.add(label, c);
        c.gridx = c.gridx + 2;
        content.add(value, c);
    }
    //parse modulo T.
    Map<Integer, ModuloInfo> modulo = model.getModulo();
    ModuloInfo moduloT = modulo.get(ModuloInfo.T);
    c.gridy++;
    label = UIUtilities.setTextFont(EditorUtil.Z_T_FIELDS, Font.BOLD, size);
    value = UIUtilities.createComponent(null);
    v = (String) details.get(EditorUtil.SECTIONS);
    v += " x ";
    if (moduloT != null) {
        String time = (String) details.get(EditorUtil.TIMEPOINTS);
        int t = Integer.parseInt(time);
        v += "" + (t / moduloT.getSize());
    } else {
        v += (String) details.get(EditorUtil.TIMEPOINTS);
    }
    value.setText(v);
    c.gridx = 0;
    content.add(label, c);
    c.gridx = c.gridx + 2;
    content.add(value, c);
    c.gridy++;
    if (moduloT != null) {
        label = UIUtilities.setTextFont(EditorUtil.SMALL_T_VARIABLE, Font.BOLD, size);
        value = UIUtilities.createComponent(null);
        value.setText("" + moduloT.getSize());
        c.gridx = 0;
        content.add(label, c);
        c.gridx = c.gridx + 2;
        content.add(value, c);
        c.gridy++;
    }
    if (!model.isNumerousChannel() && model.getRefObjectID() > 0) {
        label = UIUtilities.setTextFont(EditorUtil.CHANNELS, Font.BOLD, size);
        c.gridx = 0;
        c.anchor = GridBagConstraints.NORTHEAST;
        content.add(label, c);
        c.anchor = GridBagConstraints.CENTER;
        c.gridx++;
        content.add(editChannel, c);
        c.gridx++;
        content.add(channelsPane, c);
    }
    JPanel p = UIUtilities.buildComponentPanel(content);
    p.setBackground(UIUtilities.BACKGROUND_COLOR);
    return p;
}

From source file:net.ontopia.topicmaps.viz.VizTopicMapConfigurationManager.java

private String serializeFont(Font font) {
    // Fonts are serialized to the form:
    // "<family name>-<style>-<size>"

    StringBuilder buffer = new StringBuilder();
    buffer.append(font.getFamily());//from w  w w.j a v a  2 s.  c om
    buffer.append("-");
    buffer.append(font.getStyle());
    buffer.append("-");
    buffer.append(font.getSize());

    String result = buffer.toString();

    fontCache.put(result, font);

    return result;
}

From source file:org.openmicroscopy.shoola.agents.metadata.editor.PropertiesUI.java

/** Initializes the components composing this display. */
private void initComponents() {
    setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
    setBackground(UIUtilities.BACKGROUND_COLOR);
    Font f;
    parentLabel = new JLabel();
    f = parentLabel.getFont();//  www  . jav  a 2 s  . c  om
    Font newFont = f.deriveFont(f.getStyle(), f.getSize() - 2);
    parentLabel.setOpaque(false);
    parentLabel.setFont(newFont);
    parentLabel.setBackground(UIUtilities.BACKGROUND_COLOR);
    gpLabel = new JLabel();
    gpLabel.setOpaque(false);
    gpLabel.setFont(newFont);
    gpLabel.setBackground(UIUtilities.BACKGROUND_COLOR);

    wellLabel = new JLabel();
    wellLabel.setOpaque(false);
    wellLabel.setFont(newFont);
    wellLabel.setBackground(UIUtilities.BACKGROUND_COLOR);

    idLabel = UIUtilities.setTextFont("");
    idLabel.setName("ID label");
    inplaceIcon = new JLabel(IconManager.getInstance().getIcon(IconManager.INPLACE_IMPORT));
    ClickableTooltip inplaceIconTooltip = new ClickableTooltip(INPLACE_IMPORT_TOOLTIP_TEXT,
            createInplaceIconAction());
    inplaceIconTooltip.attach(inplaceIcon);

    ownerLabel = new JLabel();
    ownerLabel.setBackground(UIUtilities.BACKGROUND_COLOR);
    namePane = createTextPane();
    namePane.setEditable(false);
    editableName = false;
    typePane = createTextPane();
    typePane.setEditable(false);
    namePane.addFocusListener(this);
    f = namePane.getFont();
    newFont = f.deriveFont(f.getStyle(), f.getSize() - 2);

    descriptionWiki = new OMEWikiComponent(false);
    descriptionWiki.installObjectFormatters();
    descriptionWiki.setFont(newFont);
    descriptionWiki.setEnabled(false);
    descriptionWiki.setAllowOneClick(true);
    descriptionWiki.addFocusListener(this);
    descriptionWiki.addPropertyChangeListener(this);

    defaultBorder = namePane.getBorder();
    namePane.setFont(f.deriveFont(Font.BOLD));
    typePane.setFont(f.deriveFont(Font.BOLD));
    typePane.setFont(f.deriveFont(f.getStyle(), f.getSize() - 2));

    f = parentLabel.getFont();
    parentLabel.setFont(f.deriveFont(Font.BOLD));
    parentLabel.setForeground(UIUtilities.DEFAULT_FONT_COLOR);
    f = gpLabel.getFont();
    gpLabel.setFont(f.deriveFont(Font.BOLD));
    gpLabel.setForeground(UIUtilities.DEFAULT_FONT_COLOR);
    f = wellLabel.getFont();
    wellLabel.setFont(f.deriveFont(Font.BOLD));
    wellLabel.setForeground(UIUtilities.DEFAULT_FONT_COLOR);

    f = ownerLabel.getFont();
    ownerLabel.setFont(f.deriveFont(Font.BOLD, f.getSize() - 2));
    channelsArea = UIUtilities.createComponent(null);

    channelsPane = channelsArea;
    IconManager icons = IconManager.getInstance();
    editName = new JButton(icons.getIcon(IconManager.EDIT_12));
    formatButton(editName, EDIT_NAME_TEXT, EDIT_NAME);
    descriptionButtonEdit = new JButton(icons.getIcon(IconManager.EDIT_12));
    formatButton(descriptionButtonEdit, EDIT_DESC_TEXT, EDIT_DESC);
    editChannel = new JButton(icons.getIcon(IconManager.EDIT_12));
    formatButton(editChannel, EDIT_CHANNEL_TEXT, EDIT_CHANNEL);
    editChannel.setEnabled(false);
    descriptionWiki.setEnabled(false);
}