MCPcopy Index your code
hub / github.com/benfry/processing4 / nextEditor

Method nextEditor

app/src/processing/app/ui/EditorState.java:78–97  ·  view source on GitHub ↗

Create a fresh editor state object from the default screen device and set its placement relative to the last opened window. @param editors List of active editor objects

(List<Editor> editors)

Source from the content-addressed store, hash-verified

76 * @param editors List of active editor objects
77 */
78 static public EditorState nextEditor(List<Editor> editors) {
79 Editor lastEditor = null;
80 int editorCount = editors.size();
81 if (editorCount > 0) {
82 lastEditor = editors.get(editorCount-1);
83 }
84
85 // update lastConfig so it can be set for this Editor and
86 // for the next Editor created if the last window is closed.
87 if (lastEditor != null) {
88 lastConfig = lastEditor.getGraphicsConfiguration();
89 }
90 if (lastConfig == null) {
91 lastConfig = getDefaultConfig();
92 }
93
94 EditorState outgoing = new EditorState();
95 outgoing.initLocation(lastConfig, lastEditor);
96 return outgoing;
97 }
98
99
100 public String toString() {

Callers 1

handleOpenInternalMethod · 0.95

Calls 4

getDefaultConfigMethod · 0.95
initLocationMethod · 0.95
getMethod · 0.65
sizeMethod · 0.45

Tested by

no test coverage detected