private boolean hasFontSizeChanged() { int currentSize = OWLRendererPreferences.getInstance().getFontSize(); if(currentSize != lastFontSize) { lastFontSize = currentSize; return true; } return false; }
public IRI getIRI() { final List<IRI> iris = OWLRendererPreferences.getInstance().getAnnotationIRIs(); if (!iris.isEmpty()){ return iris.get(0); } return null; } }
public String getLanguage() { final List<IRI> iris = OWLRendererPreferences.getInstance().getAnnotationIRIs(); if (!iris.isEmpty()){ List<String> langs = OWLRendererPreferences.getInstance().getAnnotationLangs(); if (!langs.isEmpty()){ return langs.get(0); } } return null; }
private void addRenderer(String label, RendererPlugin plugin) { RendererPlugin currentPlugin = OWLRendererPreferences.getInstance().getRendererPlugin(); JRadioButton button = new JRadioButton(label, plugin.equals(currentPlugin)); buttonToRendererMap.put(button, plugin); }
protected void resetFont() { OWLRendererPreferences prefs = OWLRendererPreferences.getInstance(); prefs.setFontSize(OWLRendererPreferences.DEFAULT_FONT_SIZE); fontSizeSpinner.setValue(OWLRendererPreferences.DEFAULT_FONT_SIZE); }
private void setupFont() { plainFont = OWLRendererPreferences.getInstance().getFont(); boldFont = plainFont.deriveFont(Font.BOLD); textPane.setFont(plainFont); }
private void setupFonts() { Font sysFont = OWLRendererPreferences.getInstance().getFont(); if(!plainFont.equals(sysFont)) { plainFont = sysFont; boldFont = plainFont.deriveFont(Font.BOLD); } }
@Override protected void configure(RendererPlugin plugin) { OWLRendererPreferences.getInstance().setAnnotations(Collections.singletonList(LABEL.getIRI())); }
private void setupFont() { plainFont = OWLRendererPreferences.getInstance().getFont(); boldFont = plainFont.deriveFont(Font.BOLD); textPane.setFont(plainFont); }
protected boolean isConfigured(RendererPlugin plugin) { List<IRI> annotations = OWLRendererPreferences.getInstance().getAnnotationIRIs(); return annotations.size() == 1 && !annotations.iterator().next().equals(LABEL.getIRI()); }
private void setupFont() { plainFont = OWLRendererPreferences.getInstance().getFont(); plainFontHeight = iconLabel.getFontMetrics(plainFont).getHeight(); boldFont = plainFont.deriveFont(Font.BOLD); textPane.setFont(plainFont); }
private Paragraph(AttributedString paragraphText, List<LinkSpan> linkSpans) { this.paragraphText = paragraphText; Font font = OWLRendererPreferences.getInstance().getFont(); this.paragraphText.addAttribute(TextAttribute.FAMILY, font.getFamily()); this.linkSpans.addAll(linkSpans); computePlainString(); int fontSize = OWLRendererPreferences.getInstance().getFontSize(); setSize(fontSize); }
private Paragraph(AttributedString paragraphText, List<LinkSpan> linkSpans) { this.paragraphText = paragraphText; this.linkSpans.addAll(linkSpans); computePlainString(); int fontSize = OWLRendererPreferences.getInstance().getFontSize(); setSize(fontSize); }
public OWLAnnotationProperty getPreferredLabel() { final List<IRI> iris = OWLRendererPreferences.getInstance().getAnnotationIRIs(); IRI iri = iris.isEmpty() ? OWLRDFVocabulary.RDFS_LABEL.getIRI() : iris.get(0); return mngr.getOWLDataFactory().getOWLAnnotationProperty(iri); }
private boolean isRenderingProperty() { if (!isMyRendererPlugin(OWLRendererPreferences.getInstance().getRendererPlugin())) { return false; } List<IRI> annotations = OWLRendererPreferences.getInstance().getAnnotationIRIs(); for (IRI iri : annotations) { if (iri.equals(property.getIRI())) { return true; } } return false; }
private boolean isRenderingProperty() { if (!isMyRendererPlugin(OWLRendererPreferences.getInstance().getRendererPlugin())) { return false; } List<IRI> annotations = OWLRendererPreferences.getInstance().getAnnotationIRIs(); for (IRI iri : annotations) { if (iri.equals(property.getIRI())) { return true; } } return false; }
private void resetRendering() { OWLRendererPreferences preferences = OWLRendererPreferences.getInstance(); preferences.setRendererPlugin(preferences.getRendererPluginByClassName(OWLEntityRendererImpl.class.getName())); getOWLModelManager().refreshRenderer(); }
public OWLAnnotationProperty getPreferredLabel() { final List<IRI> iris = OWLRendererPreferences.getInstance().getAnnotationIRIs(); IRI iri = iris.isEmpty() ? IRI.create(OWLRDFVocabulary.RDFS_LABEL.getURI()) : iris.get(0); return mngr.getOWLDataFactory().getOWLAnnotationProperty(iri); }
private void updateCheckedStatus() { if (menu != null) { RendererPlugin plugin = OWLRendererPreferences.getInstance().getRendererPlugin(); markCheckedMenu(isMyRendererPlugin(plugin) && isConfigured(plugin)); } }
private void resetStyles(StyledDocument doc) { doc.setParagraphAttributes(0, doc.getLength(), plainStyle, true); StyleConstants.setFontSize(fontSizeStyle, getFontSize()); Font f = OWLRendererPreferences.getInstance().getFont(); StyleConstants.setFontFamily(fontSizeStyle, f.getFamily()); doc.setParagraphAttributes(0, doc.getLength(), fontSizeStyle, false); setupFont(); }