MCPcopy Create free account
hub / github.com/akeranen/the-one / addInfoButton

Method addInfoButton

gui/EventLogPanel.java:214–223  ·  view source on GitHub ↗

Adds a new button to a log entry panel and attaches a client property into it @param panel Panel where to add the button @param o Client property object to add @param clientProp Client property key to use for the object

(JPanel panel, Object o, String clientProp)

Source from the content-addressed store, hash-verified

212 * @param clientProp Client property key to use for the object
213 */
214 private void addInfoButton(JPanel panel, Object o, String clientProp) {
215 JButton hButton;
216 hButton = new JButton(o.toString());
217 hButton.putClientProperty(clientProp, o);
218 hButton.addActionListener(this);
219 hButton.setFont(font);
220 hButton.setMargin(new Insets(0,0,0,0));
221 hButton.setBackground(LOG_BUTTON_BG);
222 panel.add(hButton);
223 }
224
225 /**
226 * Processes a log event

Callers 1

addEventMethod · 0.95

Calls 2

addMethod · 0.80
toStringMethod · 0.65

Tested by

no test coverage detected