use of com.kyj.fx.voeditor.visual.component.text.PagedSimpleTextView in project Gargoyle by callakrsos.
the class BigTextView method initialize.
@FXML
public void initialize() {
// javaTextArea = new TextArea();
// javaTextArea.setPrefSize(TextArea.USE_COMPUTED_SIZE, Double.MAX_VALUE);
hboxButtons.setVisible(showButtons);
pagination = new Pagination(TOTAL_PAGE);
pagination.setCache(true);
pagination.setPageFactory(new Callback<Integer, Node>() {
@Override
public Node call(Integer param) {
if (isUsePageCache && pageCache.containsValue(param)) {
return pageCache.get(param);
}
String readContent = readPage(param);
//new PagedSimpleTextView(BigTextView.this, readContent, false);
SimpleTextView simpleTextView = new SimpleTextView(readContent, false);
simpleTextView.setPrefSize(TextArea.USE_COMPUTED_SIZE, Double.MAX_VALUE);
if (isUsePageCache)
pageCache.put(param, simpleTextView);
return simpleTextView;
}
});
pagination.setPrefSize(Pagination.USE_COMPUTED_SIZE, Pagination.USE_COMPUTED_SIZE);
this.setCenter(pagination);
}
Aggregations