Changeset 1430 for trunk/src/org/expeditee/encryption/Actions.java
- Timestamp:
- 08/14/19 14:22:44 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/encryption/Actions.java
r1414 r1430 23 23 import org.expeditee.gui.Frame; 24 24 import org.expeditee.gui.FrameIO; 25 import org.expeditee.gui.MessageBay; 25 26 import org.expeditee.items.Item; 26 27 import org.expeditee.items.Text; … … 31 32 public class Actions implements CryptographyConstants { 32 33 33 public static void TestSurrogate(Item primary) { 34 System.out.println("Test surrogates: "); 34 public static void SetSurrogateFor(Text surrogate, Text action) { 35 Frame frame = DisplayController.getCurrentFrame(); 36 String[] split = action.getText().split(" "); 37 38 if (split.length >= 2) { 39 int primaryID = Integer.parseInt(split[1]); 40 Item itemWithID = frame.getItemWithID(primaryID); 41 if (itemWithID == null) { 42 MessageBay.displayMessage("No item with ID " + primaryID + " exists on this frame."); 43 return; 44 } else { 45 itemWithID.addToSurrogates(surrogate); 46 } 47 } else { 48 MessageBay.displayMessage("Usage: SetSurrogateFor Int, inject desired surrogate."); 49 } 35 50 } 36 51
Note:
See TracChangeset
for help on using the changeset viewer.