| Method from com.sshtools.j2ssh.forwarding.XDisplay Detail: |
public int getDisplay() {
return display;
}
|
public String getHost() {
return host;
}
|
public int getPort() {
return (getDisplay() < getPortOffset())
? (getDisplay() + getPortOffset()) : getDisplay();
}
|
public int getPortOffset() {
return portOffset;
}
|
public int getScreen() {
return screen;
}
|
public void setDisplay(int display) {
this.display = display;
}
|
public void setHost(String host) {
this.host = host;
}
|
public void setPortOffset(int portOffset) {
this.portOffset = portOffset;
}
|
public void setScreen(int screen) {
this.screen = screen;
}
|
public void setString(String string) {
int idx = string.indexOf(':");
if (idx == -1) {
display = 0;
host = string;
} else {
host = string.substring(0, idx);
String s = string.substring(idx + 1);
idx = s.indexOf(".");
if (idx == -1) {
screen = 0;
try {
display = Integer.parseInt(s);
} catch (NumberFormatException nfe) {
display = 0;
}
} else {
try {
display = Integer.parseInt(s.substring(0, idx));
} catch (NumberFormatException nfe) {
display = 0;
}
try {
screen = Integer.parseInt(s.substring(idx + 1));
} catch (NumberFormatException nfe) {
screen = 0;
}
}
}
}
|
public String toString() {
return getHost() + ":" + getDisplay() +
((getScreen() == 0) ? "" : ("." + getScreen()));
}
|