Crossfire JXClient, Trunk  R20561
AbstractSegment.java
Go to the documentation of this file.
1 /*
2  * This file is part of JXClient, the Fullscreen Java Crossfire Client.
3  *
4  * JXClient is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * JXClient is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with JXClient; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17  *
18  * Copyright (C) 2005-2008 Yann Chachkoff.
19  * Copyright (C) 2006-2011 Andreas Kirschbaum.
20  */
21 
22 package com.realtime.crossfire.jxclient.gui.log;
23 
28 public abstract class AbstractSegment implements Segment {
29 
33  private int x = -1;
34 
38  private int y = -1;
39 
43  private int width = -1;
44 
48  @Override
49  public void setX(final int x) {
50  this.x = x;
51  }
52 
57  protected int getX() {
58  return x;
59  }
60 
64  @Override
65  public void setY(final int y) {
66  this.y = y;
67  }
68 
73  protected int getY() {
74  return y;
75  }
76 
80  @Override
81  public void setWidth(final int width) {
82  this.width = width;
83  }
84 
89  protected int getWidth() {
90  return width;
91  }
92 
93 }
Abstract base class for Segment implementations.
void setWidth(final int width)
Sets the width to display the segment.the width
int y
The y-coordinate to display the segment.
int getX()
Returns the x-coordinate to display the segment.
int width
The width of the segment if displayed.
void setX(final int x)
Sets the x-coordinate to display the segment.the x-coordinate
One segment of a Line which should be displayed without changing text attributes. ...
Definition: Segment.java:34
int getWidth()
Returns the width to display the segment.
int getY()
Returns the y-coordinate to display the segment.
void setY(final int y)
Sets the y-coordinate to display the segment.the y-coordinate
int x
The x-coordinate to display the segment.