@Override public void onResize() { final int height = getParent().getOffsetHeight() - VERTICAL_MARGIN; row.setHeight((height > 0 ? height : 0) + "px"); drlContainer.setHeight(((height > 0 ? height : 0) + SCROLL_BAR_SIZE) + "px"); drlEditor.onResize(); }
@Override public void setContent(final String drl, final List<String> fullyQualifiedClassNames) { dslConditionsBrowser.setVisible(false); dslActionsBrowser.setVisible(false); factTypeBrowser.setFullyQualifiedClassNames(fullyQualifiedClassNames); factTypeBrowser.setDSLR(false); drlEditor.setText(drl); }
@Override public void setContent( final String dslr, final List<String> fullyQualifiedClassNames, final List<DSLSentence> dslConditions, final List<DSLSentence> dslActions) { dslConditionsBrowser.setVisible(true); dslActionsBrowser.setVisible(true); factTypeBrowser.setFullyQualifiedClassNames(fullyQualifiedClassNames); factTypeBrowser.setDSLR(true); dslConditionsBrowser.setDSLSentences(dslConditions); dslActionsBrowser.setDSLSentences(dslActions); drlEditor.setText(dslr); }
@Override public void setReadOnly(final boolean readOnly) { drlEditor.setReadOnly(readOnly); }
@Override public String getContent() { return drlEditor.getText(); }