1 /* 2 * Licensed to the Apache Software Foundation (ASF) under one or more 3 * contributor license agreements. See the NOTICE file distributed with 4 * this work for additional information regarding copyright ownership. 5 * The ASF licenses this file to You under the Apache License, Version 2.0 6 * (the "License"); you may not use this file except in compliance with 7 * the License. You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 */ 17 18 /* $Id: SpaceArea.java 1479969 2013-05-07 16:23:13Z vhennebert $ */ 19 20 package org.apache.fop.area.inline; 21 22 /** 23 * A space 24 */ 25 public class SpaceArea extends InlineArea { 26 27 private static final long serialVersionUID = 2218803009825411416L; 28 29 /** 30 * The space for this space area 31 */ 32 protected char space; 33 34 /** 35 * Is this space adjustable? 36 */ 37 protected boolean isAdjustable; 38 39 /** 40 * Create a space area 41 * @param space the space character 42 * @param blockProgressionOffset the offset for the next area 43 * @param adjustable is this space adjustable? 44 * @param bidiLevel the bidirectional embedding level (or -1 if not defined) 45 */ SpaceArea(int blockProgressionOffset, int bidiLevel, char space, boolean adjustable)46 public SpaceArea(int blockProgressionOffset, int bidiLevel, char space, boolean adjustable) { 47 super(blockProgressionOffset, bidiLevel); 48 this.space = space; 49 this.isAdjustable = adjustable; 50 } 51 52 /** @return Returns the space. */ getSpace()53 public String getSpace() { 54 return String.valueOf(space); 55 } 56 57 /** @return true if the space is adjustable (WRT word-space processing) */ isAdjustable()58 public boolean isAdjustable() { 59 return this.isAdjustable; 60 } 61 62 } 63