+ protected DbkVideo newVideo(TextSection parent, Node node) {
+ try {
+ DbkVideo video = new DbkVideo(parent, getCmsEditable().canEdit() ? SWT.NONE : SWT.READ_ONLY, node);
+ GridData gd;
+ if (maxMediaWidth != null) {
+ gd = new GridData(SWT.CENTER, SWT.FILL, false, false);
+ // TODO, manage size
+// gd.widthHint = maxMediaWidth;
+// gd.heightHint = (int) (gd.heightHint * 0.5625);
+ } else {
+ gd = new GridData(SWT.CENTER, SWT.FILL, false, false);
+// gd.widthHint = video.getWidth();
+// gd.heightHint = video.getHeight();
+ }
+ video.setLayoutData(gd);
+ updateContent(video);
+ return video;
+ } catch (RepositoryException e) {
+ throw new JcrException("Cannot add new image " + node, e);
+ }
+ }
+
+ protected DbkSectionTitle newSectionTitle(TextSection parent, Node titleNode) throws RepositoryException {