Java tutorial
/* Copyright 2012-2015 Michael Pozhidaev <michael.pozhidaev@gmail.com> This file is part of the LUWRAIN. LUWRAIN is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. LUWRAIN is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. */ package org.luwrain.app.writer; import java.util.*; import org.apache.poi.xwpf.usermodel.*; import org.luwrain.core.*; import org.luwrain.controls.*; class Base { private Luwrain luwrain; private XWPFDocument doc; private BodyView bodyView; boolean init(Luwrain luwrain) { this.luwrain = luwrain; return true; } BodyView getRootBodyView() { if (bodyView == null) bodyView = new BodyView(doc); return bodyView; } void createNewDoc() { doc = new XWPFDocument(); doc.createParagraph(); } }