All Downloads are FREE. Search and download functionalities are using the official Maven repository.

mmb.content.electric.MachineInfoTab Maven / Gradle / Ivy

Go to download

Dependency for the MultiMachineBuilder, a voxel game about building an industrial empire in a finite world. THIS RELEASE IS NOT PLAYABLE. To play the game, donwload from >ITCH.IO LINK HERE< or >GH releases link here<

There is a newer version: 0.6
Show newest version
/**
 * 
 */
package mmb.content.electric;

import javax.swing.Box;
import javax.swing.BoxLayout;
import javax.swing.JCheckBox;
import javax.swing.JLabel;

import mmb.content.electric.machines.ElectroMachine;
import mmb.menu.world.craft.*;

/**
 * @author oskar
 *
 */
public class MachineInfoTab extends Box {
	private static final long serialVersionUID = -7855159998857476643L;

	public MachineInfoTab(ElectroMachine machine) {
		super(BoxLayout.Y_AXIS);
		
		JLabel volt = new JLabel(CRConstants.VOLT+machine.voltage().name);
		add(volt);
		
		JLabel title = new JLabel(machine.machineName());
		add(title);
		
		JCheckBox autoextract = new JCheckBox(CRConstants.AUTO, machine.isAutoExtract());
		autoextract.addActionListener(e -> machine.setAutoExtract(autoextract.isSelected()));
		add(autoextract);
		
		JCheckBox pass = new JCheckBox(CRConstants.PASS, machine.isPass());
		pass.addActionListener(e -> machine.setPass(pass.isSelected()));
		add(pass);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy