Package org.openpnp.machine.reference.feeder

Source Code of org.openpnp.machine.reference.feeder.ReferenceTubeFeeder

/*
   Copyright (C) 2011 Jason von Nieda <jason@vonnieda.org>
  
   This file is part of OpenPnP.
  
  OpenPnP is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    OpenPnP is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with OpenPnP.  If not, see <http://www.gnu.org/licenses/>.
  
   For more information about OpenPnP visit http://openpnp.org
*/

package org.openpnp.machine.reference.feeder;

import javax.swing.Action;

import org.openpnp.gui.support.PropertySheetWizardAdapter;
import org.openpnp.gui.support.Wizard;
import org.openpnp.machine.reference.ReferenceFeeder;
import org.openpnp.machine.reference.feeder.wizards.ReferenceTubeFeederConfigurationWizard;
import org.openpnp.model.Location;
import org.openpnp.spi.Nozzle;
import org.openpnp.spi.PropertySheetHolder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* Implementation of Feeder that always picks from the same location. This
* can be used with a gravity feed or vibratory tube feeder.
*/
public class ReferenceTubeFeeder extends ReferenceFeeder {
  private final static Logger logger = LoggerFactory.getLogger(ReferenceTubeFeeder.class);
 
  @Override
    public Location getPickLocation() throws Exception {
      return location;
    }

    @Override
    public void feed(Nozzle nozzle) throws Exception {
    }

    @Override
  public boolean canFeedToNozzle(Nozzle nozzle) {
    return true;
  }

  @Override
  public Wizard getConfigurationWizard() {
    return new ReferenceTubeFeederConfigurationWizard(this);
  }
   
    @Override
    public String getPropertySheetHolderTitle() {
        return getClass().getSimpleName() + " " + getId();
    }

    @Override
    public PropertySheetHolder[] getChildPropertySheetHolders() {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public PropertySheet[] getPropertySheets() {
        return new PropertySheet[] {
                new PropertySheetWizardAdapter(getConfigurationWizard())
        };
    }
   
    @Override
    public Action[] getPropertySheetHolderActions() {
        // TODO Auto-generated method stub
        return null;
    }     
}
TOP

Related Classes of org.openpnp.machine.reference.feeder.ReferenceTubeFeeder

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.