w2phtml/source/java/writer2latex/office/TableLine.java
henrikjust 44f4c68801 Change license to GPLv3
git-svn-id: svn://svn.code.sf.net/p/writer2latex/code/trunk@272 f0f2a975-2e09-46c8-9428-3b39399b9f3c
2018-03-06 20:06:05 +00:00

65 lines
2.2 KiB
Java

/************************************************************************
*
* TableLine.java
*
* Copyright: 2002-2008 by Henrik Just
*
* This file is part of Writer2LaTeX.
*
* Writer2LaTeX 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.
*
* Writer2LaTeX 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.
*
* You should have received a copy of the GNU General Public License
* along with Writer2LaTeX. If not, see <http://www.gnu.org/licenses/>.
*
* Version 1.0 (2008-09-04)
*
*/
package writer2latex.office;
import org.w3c.dom.Node;
import writer2latex.util.Misc;
/**
* <p> This class represents the properties of a row or column in a table</p>
*/
public class TableLine {
private String sStyleName;
private String sVisibility;
private String sDefaultCellStyleName;
private boolean bDisplay;
private boolean bHeader;
public TableLine(Node node, boolean bHeader, boolean bDisplay) {
// Node must be table:table-column or table:table-row
sStyleName = Misc.getAttribute(node,XMLString.TABLE_STYLE_NAME);
sVisibility = Misc.getAttribute(node,XMLString.TABLE_VISIBILITY);
if (sVisibility==null) { sVisibility = "visible"; }
sDefaultCellStyleName = Misc.getAttribute(node,XMLString.TABLE_DEFAULT_CELL_STYLE_NAME);
this.bDisplay = bDisplay;
this.bHeader = bHeader;
}
public String getStyleName() { return sStyleName; }
public String getVisibility() { return sVisibility; }
public boolean isCollapse() { return "collapse".equals(sVisibility); }
public boolean isFilter() { return "filter".equals(sVisibility); }
public String getDefaultCellStyleName() { return sDefaultCellStyleName; }
public boolean isDisplay() { return bDisplay; }
public boolean isHeader() { return bHeader; }
}