convex.gui.manager.windows.actor.ActorInvokePanel Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of convex-gui Show documentation
Show all versions of convex-gui Show documentation
Convex desktop GUI and test applications
package convex.gui.manager.windows.actor;
import java.awt.BorderLayout;
import javax.swing.DefaultListModel;
import javax.swing.JPanel;
import convex.core.data.ASet;
import convex.core.data.AccountStatus;
import convex.core.data.Address;
import convex.core.data.Symbol;
import convex.gui.components.AccountChooserPanel;
import convex.gui.components.ScrollyList;
import convex.gui.manager.PeerGUI;
@SuppressWarnings("serial")
public class ActorInvokePanel extends JPanel {
protected PeerGUI manager;
protected Address contract;
AccountChooserPanel execPanel = new AccountChooserPanel();
DefaultListModel exportList = new DefaultListModel();
public ActorInvokePanel(PeerGUI manager, Address contract) {
this.manager = manager;
this.contract = contract;
setLayout(new BorderLayout());
AccountStatus as = PeerGUI.getLatestState().getAccount(contract);
ASet exports = as.getCallableFunctions();
for (Symbol s : exports) {
exportList.addElement(s);
}
ScrollyList scrollyList = new ScrollyList(exportList,
sym -> new SmartOpComponent(this, contract, sym));
add(scrollyList, BorderLayout.CENTER);
add(execPanel, BorderLayout.NORTH);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy