Here, have more javadocs.
This commit is contained in:
parent
7aa2957433
commit
5e25151641
@ -169,7 +169,9 @@ public class Pads extends javax.swing.JInternalFrame {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate a random pad ID.
|
* Generate a random pad ID with length 15.
|
||||||
|
* <br />There are about 7.6 x 10^26 possibilities (768 septillion).
|
||||||
|
* <br />If this starts giving used IDs, I'll be too rich to care.
|
||||||
*
|
*
|
||||||
* @return the ID.
|
* @return the ID.
|
||||||
*/
|
*/
|
||||||
@ -223,6 +225,12 @@ public class Pads extends javax.swing.JInternalFrame {
|
|||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set pad text.
|
||||||
|
*
|
||||||
|
* @param id Pad ID
|
||||||
|
* @param content Pad text
|
||||||
|
*/
|
||||||
public static void setPad(String id, String content) {
|
public static void setPad(String id, String content) {
|
||||||
try {
|
try {
|
||||||
getClient().setText(id, content);
|
getClient().setText(id, content);
|
||||||
@ -253,9 +261,14 @@ public class Pads extends javax.swing.JInternalFrame {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display a pad.
|
||||||
|
*
|
||||||
|
* @param pad the pad ID
|
||||||
|
*/
|
||||||
public static void loadPad(String pad) {
|
public static void loadPad(String pad) {
|
||||||
String theme = "";
|
String theme = "";
|
||||||
if (PrefStorage.getSetting("theme").equals("dark")) {
|
if (Theme.currentTheme == Theme.THEME_DARK) {
|
||||||
theme = "?theme=terminal";
|
theme = "?theme=terminal";
|
||||||
}
|
}
|
||||||
MainGUI.loadFrame(new WebBrowser("Pad " + pad,
|
MainGUI.loadFrame(new WebBrowser("Pad " + pad,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user