@Override protected void initiate() { mouseInteractionMenu = new TMenu(0, 0, Main.canvasWidth, 23, TMenu.HORIZONTAL); keyInteractionMenu = new TMenu(0, Main.canvasHeight - 23, Main.canvasWidth, 23, TMenu.HORIZONTAL); // Minimise wasted space in interactionMenus and align left mouseInteractionMenu.setBorderSize(1); mouseInteractionMenu.setTComponentSpacing(3); mouseInteractionMenu.setTComponentAlignment(TMenu.ALIGN_START); keyInteractionMenu.setBorderSize(1); keyInteractionMenu.setTComponentSpacing(3); keyInteractionMenu.setTComponentAlignment(TMenu.ALIGN_START); // Group RadioButtons in mouseInteraction menu leftClickSelections.add(leftSelectButton); rightClickSelections.add(rightConnectButton); rightClickSelections.add(rightDeleteButton); mouseDragSelections.add(dragMoveButton); mouseDragSelections.add(dragDeleteButton); // Add TComponents to mouseInteractionMenu mouseInteractionMenu.add(new TLabel("Left Click:")); mouseInteractionMenu.add(leftSelectButton); mouseInteractionMenu.add(new TLabel("Right Click:")); mouseInteractionMenu.add(rightConnectButton); mouseInteractionMenu.add(rightDeleteButton); mouseInteractionMenu.add(new TLabel("Mouse Drag:")); mouseInteractionMenu.add(dragMoveButton); mouseInteractionMenu.add(dragDeleteButton); // Add TComponents to keyInteractionMenu keyInteractionMenu.add(new TLabel("Show/Hide key")); keyInteractionMenu.add(expandContractKey, false); keyInteractionMenu.add(new TLabel("New Neuron key")); keyInteractionMenu.add(newNeuronKey, false); keyInteractionMenu.add(new TLabel("New Cluster key")); keyInteractionMenu.add(newClusterKey, false); keyInteractionMenu.add(new TLabel("Delete key")); keyInteractionMenu.add(deleteKey, false); keyInteractionMenu.add(newInputButton, false); keyInteractionMenu.add(newOutputButton, false); // Add interactionMenus to RenderableObject add(mouseInteractionMenu); add(keyInteractionMenu); // Set starting mouse interactions leftSelectButton.setChecked(true); rightConnectButton.setChecked(true); dragMoveButton.setChecked(true); // set starting key interactions expandContractKey.setText("s"); newNeuronKey.setText("n"); newClusterKey.setText("c"); deleteKey.setText("d"); organiseInputs(); organiseOutputs(); }