-// else if (part instanceof DbkSectionTitle) {
-// DbkSectionTitle title = (DbkSectionTitle) part;
-// title.setStyle(title.getSection().getTitleStyle());
-// // use control AFTER setting style
-// if (title == getEdited())
-// title.setText(textInterpreter.read(title.getNode()));
-// else
-// title.setText(textInterpreter.readSimpleHtml(title.getNode()));
-// }
+ }
+
+ protected DbkSectionTitle newSectionTitle(TextSection parent, Content titleNode) {
+ int style = parent.getStyle();
+ Composite titleParent = newSectionHeader(parent);
+ if (parent.isTitleReadOnly())
+ style = style | SWT.READ_ONLY;
+ DbkSectionTitle title = new DbkSectionTitle(titleParent, style, titleNode);
+ updateContent(title);
+ title.setMouseListener(getMouseListener());
+ title.setFocusListener(getFocusListener());
+ return title;
+ }
+
+ /**
+ * To be overridden in order to provide additional processing at the section
+ * level.
+ *
+ * @return the parent to use for the {@link DbkSectionTitle}, by default
+ * {@link Section#getHeader()}
+ */
+ protected Composite newSectionHeader(TextSection section) {
+ return section.getHeader();
+ }
+
+ public TextSection getMainSection() {
+ return mainSection;
+ }
+
+ public void setShowMainTitle(boolean showMainTitle) {
+ this.showMainTitle = showMainTitle;
+ }
+
+ public String getDefaultSectionStyle() {
+ return defaultSectionStyle;
+ }
+
+ public void setDefaultSectionStyle(String defaultSectionStyle) {
+ this.defaultSectionStyle = defaultSectionStyle;