private void initDecoration() { if (doc instanceof NbDocument.CustomToolbar) { NbDocument.CustomToolbar ce = (NbDocument.CustomToolbar) doc; customToolbar = ce.createToolbar(tmp); if (customToolbar == null) { throw new IllegalStateException( "Document:" + doc // NOI18N +" implementing NbDocument.CustomToolbar may not" // NOI18N +" return null toolbar" ); // NOI18N } } }
customToolbar = ce.createToolbar(pane); if(customToolbar == null) { throw new IllegalStateException("Document:" + doc // NOI18N
customToolbar = ce.createToolbar(pane); if(customToolbar == null) { throw new IllegalStateException("Document:" + doc // NOI18N
public JComponent getToolbarRepresentation () { if (toolbar == null) { JEditorPane pane = editor.getEditorPane (); if (pane != null) { Document doc = pane.getDocument (); if (doc instanceof NbDocument.CustomToolbar) toolbar = ((NbDocument.CustomToolbar) doc).createToolbar (pane); } if (toolbar == null) toolbar = new JPanel (); } return toolbar; }