text
stringlengths
3
1.18M
package il.technion.cs236369.interfaces; import il.technion.cs236369.webserver.Request; import org.apache.http.HttpResponse; /** * ITypeHandler's constructor gets Properties * * @author gil * */ public interface ITypeHandler { /** * Handle the request * @param request The request to handle...
package il.technion.cs236369.webserver; import il.technion.cs236369.common.Common; import il.technion.cs236369.exceptions.BaseDirDoesntExist; import il.technion.cs236369.exceptions.FullQueueException; import il.technion.cs236369.exceptions.InvalidConfig; import il.technion.cs236369.exceptions.ParsingException; import ...
package il.technion.cs236369.webserver; import il.technion.cs236369.exceptions.BaseDirDoesntExist; import il.technion.cs236369.exceptions.SameExtensionDifferentHandler; import il.technion.cs236369.exceptions.WelcomeFileDoesntExist; import java.io.File; import java.util.Collection; import java.util.HashMap; i...
package il.technion.cs236369.webserver; import java.util.Collection; import java.util.Map; /** * Type Handler Container. * Contains TypeHandler's relevant information. * @author gil * */ public class TypeHandlerContainer { final private Class<?> _class; final private Map<String, String> _parameter...
package il.technion.cs236369.webserver; import java.io.IOException; import java.net.Socket; import org.apache.http.HttpResponse; import org.apache.http.impl.DefaultHttpServerConnection; import org.apache.http.params.BasicHttpParams; /** * Handles a timeout event in the ThreadPool. * Will return a TimedO...
package il.technion.cs236369.webserver; import il.technion.cs236369.common.Common; import il.technion.cs236369.exceptions.InvalidRequestMethod; import il.technion.cs236369.exceptions.InvalidRequestParams; import il.technion.cs236369.exceptions.NullEntityInPost; import java.io.File; import java.io.IOException;...
package il.technion.cs236369.webserver; import java.util.Properties; import javax.net.ServerSocketFactory; import javax.net.SocketFactory; import com.google.inject.AbstractModule; import com.google.inject.Scopes; import com.google.inject.name.Names; public class WebServerModule extends AbstractModule { private fi...
package il.technion.cs236369.webserver; import il.technion.cs236369.common.Common; import il.technion.cs236369.exceptions.ParsingException; import il.technion.cs236369.interfaces.ITypeHandler; import il.technion.cs236369.parsers.XMLToJson; import java.io.File; import java.io.FileNotFoundException; import jav...
package il.technion.cs236369.webserver; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Locale; import java.util.TimeZone; /** * Common place for date utils. * * @author dac@eng.sun.com * @author Jason Hunter [jch@eng.sun.com] * @author James Todd [gonzo@eng.sun.com]...
package il.technion.cs236369.webserver.typeHandlers; import il.technion.cs236369.interfaces.ICookie; /** * A cookie implementation that uses a long identifier * * @author Gal Lalouche * */ class CookieImpl implements ICookie { private final long cookie; /** * Create a new Cookie, using a str...
package il.technion.cs236369.webserver.typeHandlers; import static junit.framework.Assert.assertEquals; import static junit.framework.Assert.assertTrue; import il.technion.cs236369.exceptions.BaseDirDoesntExist; import il.technion.cs236369.exceptions.WelcomeFileDoesntExist; import il.technion.cs236369.webserver....
package il.technion.cs236369.webserver.typeHandlers; import il.technion.cs236369.interfaces.ICookie; import il.technion.cs236369.interfaces.ISession; import il.technion.cs236369.interfaces.ITypeHandler; import il.technion.cs236369.webserver.Request; import java.util.Properties; import org.apache.http.Header...
package il.technion.cs236369.webserver.typeHandlers; import il.technion.cs236369.interfaces.IObservable; import il.technion.cs236369.interfaces.IObserver; import il.technion.cs236369.interfaces.ISession; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; /** * A basic session implementat...
package il.technion.cs236369.webserver.typeHandlers; import static il.technion.cs236369.webserver.RequestHandler.generateErrorResponse; import static il.technion.cs236369.webserver.RequestHandler.generateResponse; import il.technion.cs236369.common.Common; import il.technion.cs236369.exceptions.ParsingException; ...
package il.technion.cs236369.webserver.typeHandlers; import il.technion.cs236369.interfaces.ICookie; import il.technion.cs236369.interfaces.IObserver; import il.technion.cs236369.interfaces.ISession; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; class CookieManager { private final M...
package il.technion.cs236369.webserver; import il.technion.cs236369.common.Common; import il.technion.cs236369.exceptions.InvalidRequestMethod; import il.technion.cs236369.exceptions.InvalidRequestParams; import il.technion.cs236369.exceptions.NullEntityInPost; import il.technion.cs236369.threadPool.ThreadPool; ...
package il.technion.cs236369.webserver.examples; public class B1 implements B { private String word; public B1(String word) { this.word = word; } @Override public void speak() { System.out.println("B1: "+word); } }
package il.technion.cs236369.webserver.examples; public class DynamicLoad { public static void main(String[] args) throws Exception { for (int i : new int[]{1, 2}) { B b = (B)Class.forName("cs236369.webserver.examples.B"+i).getConstructor(String.class).newInstance("Hi !!"); b.speak(); } // n...
package il.technion.cs236369.webserver.examples; import java.io.File; import java.lang.reflect.Method; import java.util.Arrays; import java.util.Properties; import javax.tools.JavaCompiler; import javax.tools.JavaFileObject; import javax.tools.StandardJavaFileManager; import javax.tools.ToolProvider; pub...
package il.technion.cs236369.webserver.examples; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.xpath.XPath; import javax.xml.xpath.XPathConstants; import javax.xml.xpath.XPathFactory; import org.w3c.dom.Document; import org.w3c.dom.NodeList; pu...
package il.technion.cs236369.webserver.examples; import java.util.Properties; public class A { public A() { System.out.println("AAAA !!!"); } public void test(Properties arg){ System.out.println("running test"); } }
package il.technion.cs236369.webserver.examples; public class B2 implements B { private String word; public B2(String word) { this.word = word; } @Override public void speak() { System.out.println("B2: "+word); } }
package il.technion.cs236369.webserver.examples; public interface B { public void speak(); }
package il.technion.cs236369.common; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.InputStream; import java.io.PrintStream; import java.util.Scanner; /** * Encompasses some basic functionalities * * @author Gal Lalouche * */ public class Common { private ...
package il.technion.cs236369.exceptions; /** * Thrown when the base dir of the server does not exist * @author gil * */ public class BaseDirDoesntExist extends Exception { /** * */ private static final long serialVersionUID = 8614979469444123553L; }
package il.technion.cs236369.exceptions; /** * Is thrown when an error occured while parsing * * @author Gal Lalouche * */ public class ParsingException extends Exception { /** * */ private static final long serialVersionUID = 7929582611859009388L; public ParsingException() { } ...
package il.technion.cs236369.exceptions; /** * Thrown when the config file is invalid * @author gil * */ public class InvalidConfig extends Exception { public InvalidConfig() { super(); } public InvalidConfig(String message, Throwable cause, boolean enableSuppression, boolean writableSt...
package il.technion.cs236369.exceptions; /** * Thrown when the request parameters could not be succesfully parsed * @author gil * */ public class InvalidRequestParams extends Exception { /** * */ private static final long serialVersionUID = 8419681629850181288L; public InvalidRequestPar...
package il.technion.cs236369.exceptions; /** * Thrown when the entity is null in a POST request * @author gil * */ public class NullEntityInPost extends Exception { /** * */ private static final long serialVersionUID = 2847555824540067172L; }
package il.technion.cs236369.exceptions; /** * Thrown when the same extension has more than one handler * @author gil * */ public class SameExtensionDifferentHandler extends Exception { /** * */ private static final long serialVersionUID = -2845447768520553661L; }
package il.technion.cs236369.exceptions; /** * Thrown when the requested method is not supported by the server * @author gil * */ public class InvalidRequestMethod extends Exception { /** * */ private static final long serialVersionUID = 2083315581283109806L; public InvalidRequestMethod(St...
package il.technion.cs236369.exceptions; /** * Thrown when the welcome file does not exist * @author gil * */ public class WelcomeFileDoesntExist extends Exception { /** * */ private static final long serialVersionUID = -4885790878087964310L; }
package il.technion.cs236369.exceptions; /** * Is thrown when no more elements can be added to the queue * * @author Gal Lalouche * */ public class FullQueueException extends Exception { /** * */ private static final long serialVersionUID = 6407113048469041298L; public FullQueueException(...
package il.technion.cs236369.threadPool; import java.util.concurrent.ConcurrentLinkedQueue; /** * A queue with a finite number of items * * @author Gal Lalouche * * @param <T> */ class FiniteQueue<T> extends ConcurrentLinkedQueue<T> { /** * */ private static final long serialVersionUID =...
//package il.technion.cs236369.threadPool; // //import il.technion.cs236369.exceptions.FullQueueException; //import junit.framework.Assert; // //import org.junit.Test; // //public class ThreadPoolTests { // private static final int NUMBER_OF_ITERATIONS = 100; // private static final Integer TIMEOUT = null...
package il.technion.cs236369.threadPool; import il.technion.cs236369.common.Common; import il.technion.cs236369.exceptions.FullQueueException; import java.util.Queue; import java.util.concurrent.ConcurrentLinkedQueue; /** * A pool of threads that holds a fixed number of threads waiting for a queue * Can ...
package il.technion.cs236369.threadPool; import il.technion.cs236369.interfaces.IObservable; import il.technion.cs236369.interfaces.IObserver; /** * A timer thread that runs a specified amount of time and then notifies when * the time is over USE: Start the new timer thread. Set the observer to be * called...
package il.technion.cs236369.threadPool; /** * A task from the pool. * Holds the normal task and optionally a task to run on timeout or null. * @author Gal Lalouche * */ class PoolTask { private final Runnable runnable; private final Runnable timeoutRunnable; /** * Creates a new task * @para...
package il.technion.cs236369.threadPool; import il.technion.cs236369.common.Common; import il.technion.cs236369.interfaces.IObserver; import java.io.PrintStream; /** * A thread that continuously polls a ThreadPool for new missions * * @author Gal Lalouche */ class PoolThread extends Thread implement...
package il.technion.cs236369.parsers; import il.technion.cs236369.exceptions.ParsingException; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.InputStream; /** * An abstract file/stream parsing file * @author Gal Lalouche * * @param <T> The r...
package il.technion.cs236369.parsers; import il.technion.cs236369.common.Common; import il.technion.cs236369.exceptions.ParsingException; import il.technion.cs236369.interfaces.ITSPWriter; import java.io.InputStream; import java.util.Arrays; import java.util.Scanner; import javax.tools.Diagnostic; import ...
package il.technion.cs236369.parsers; import java.net.URI; import javax.tools.SimpleJavaFileObject; /** * A file object used to represent source coming from a string. */ class JavaSourceFromString extends SimpleJavaFileObject { /** * The source code of this "file". */ final String code; /** ...
package il.technion.cs236369.parsers; import static junit.framework.Assert.assertEquals; import il.technion.cs236369.exceptions.ParsingException; import java.io.ByteArrayInputStream; import java.io.File; import java.io.FileNotFoundException; import java.io.InputStream; import org.json.JSONArray; import or...
package il.technion.cs236369.parsers; import il.technion.cs236369.common.Common; import il.technion.cs236369.exceptions.ParsingException; import java.io.File; import java.io.IOException; import java.io.InputStream; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; ...
package org.json; /* Copyright (c) 2006 JSON.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, ...
package org.json; /* Copyright (c) 2002 JSON.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, ...
package org.json; /* Copyright (c) 2002 JSON.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, ...
package org.json; /** * The JSONException is thrown by the JSON.org classes when things are amiss. * @author JSON.org * @version 2010-12-24 */ public class JSONException extends RuntimeException { private static final long serialVersionUID = 0; private Throwable cause; /** * Constructs a JS...
package org.json; /** * The <code>JSONString</code> interface allows a <code>toJSONString()</code> * method so that a class can change the behavior of * <code>JSONObject.toString()</code>, <code>JSONArray.toString()</code>, * and <code>JSONWriter.value(</code>Object<code>)</code>. The * <code>toJSONString...
package org.json; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.Reader; import java.io.StringReader; /* Copyright (c) 2002 JSON.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software a...
package org.json; /* Copyright (c) 2002 JSON.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, ...
package org.json; import java.io.IOException; import java.io.Writer; /* Copyright (c) 2006 JSON.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including witho...
package org.json; /* Copyright (c) 2002 JSON.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish,...
package org.json; /* Copyright (c) 2002 JSON.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, ...
package org.json; /* Copyright (c) 2002 JSON.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, ...
package org.json; /* Copyright (c) 2002 JSON.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish,...
package org.json; /* Copyright (c) 2008 JSON.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish,...
package org.json; /* Copyright (c) 2002 JSON.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, ...
package org.json; import java.io.StringWriter; import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; import java.util.List; import java.util.Map; import junit.framework.TestCase; /* Copyright (c) 2002 JSON.org Permission is hereby granted, free of charge, to any person obtaining a co...
package org.json; /* Copyright (c) 2002 JSON.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish,...
package hw2.cs236369.extensions; /** * An aggregator function from (S X T) -> S * @author Gal Lalouche */ public interface Aggregator<S, T> { S calculate(S currentValue, T newValue); }
package hw2.cs236369.extensions; /** * A functiom from T -> boolean * * @author Gal Lalouche */ public interface Predicate<T> extends Function<T, Boolean> { // only for inheritance }
package hw2.cs236369.extensions; import java.util.Collection; import java.util.Collections; import java.util.Comparator; import java.util.HashMap; import java.util.LinkedList; import java.util.List; import java.util.Map; /** * Proves LINQ like extension methods * * @author Gal Lalouche * */ pub...
package hw2.cs236369.extensions; /** * A predicate that always returns true * @author Gal Lalouche */ class Tautology<T> implements Predicate<T> { @Override public Boolean calculate(T element) { return true; } }
package hw2.cs236369.extensions; /** * A function from I to O * * @author Gal Lalouche */ public interface Function<I, O> { O calculate(I element); }
package hw2.cs236369.interfaces; import java.util.Collection; /** * An DBLP database * @author Gal Lalouche * */ public interface IDBLP { /** * Get all authors in the DB * @return A collection of all the authors in the DB, matching the regular expression */ public Collection<IAuthor> getFilt...
package hw2.cs236369.interfaces; /** * All the information on an author * @author Gal Lalouche * */ public interface IAuthor { /** * Get the author's name * @return The author's name */ public String getName(); }
package hw2.cs236369.interfaces; import java.util.Collection; /** * All the information on a paper * @author Gal Lalouche * */ public interface IPaper { /** * Get all authors that co-wrote the paper * @return A collection of all the authors that wrote the paper */ public Collection<IAuthor>...
package hw2.cs236369.interfaces; import java.util.Collection; /** * All the information on an author * * @author Gal Lalouche * */ public interface IDBLPInfo { /** * Returns the Author * @return The author */ IAuthor getAuthor (); /** * Returns the Author's papers * @return ...
package hw2.cs236369.interfaces; /** * A factory that creates an IDBLP * @author Gal Lalouche * */ public interface IDBFactory { /** * Create a new IDBLP * @param path The path to the XML DB * @param regExp The regular expression to filter the authors by * @return A new IDBLP instance */ ...
package hw2.cs236369.tests; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import hw2.cs236369.extensions.Extender; import hw2.cs236369.extensions.Predicate; import hw2.cs236369.filtering.Filter; import hw2.cs236369.interfaces.IAuthor; import hw2.cs236369.interfaces.IDB...
package hw2.cs236369.tests; import static org.junit.Assert.*; import hw2.cs236369.interfaces.IAuthor; import hw2.cs236369.parsing.Author; import hw2.cs236369.parsing.Paper; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import org.junit.After; import org.junit.AfterCl...
/** * */ package hw2.cs236369.tests; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import hw2.cs236369.interfaces.IAuthor; import hw2.cs236369.interfaces.IDBLP; import hw2.cs236369.interfaces.IPaper; import hw2.cs236369.parsing.Author; import hw2.cs236369.parsing...
/** * */ package hw2.cs236369.tests; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import hw2.cs236369.interfaces.IAuthor; import hw2.cs236369.interfaces.IPaper; import hw2.cs236369.parsing.Author; import hw2.cs236369.parsing.DBLPHandler; import java.io.IOExcep...
package hw2.cs236369.tests; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import hw2.cs236369.parsing.Author; import org.junit.Test; public class AuthorTest { @Test public void testAuthor() { Author a = new Auth...
package hw2.cs236369.parsing; import hw2.cs236369.interfaces.IAuthor; import hw2.cs236369.interfaces.IPaper; import java.util.Collection; /** * Paper class, implements IPaper. * * @author gil * */ public class Paper implements IPaper { private Collection<IAuthor> _authors; //authors who wrote...
package hw2.cs236369.parsing; import hw2.cs236369.interfaces.IAuthor; /** * Author Class. * * @author gil * */ public class Author implements IAuthor { private String _name; /* * (non-Javadoc) * * @see java.lang.Object#hashCode() */ @Override public int hashCode() { final in...
package hw2.cs236369.parsing; import hw2.cs236369.interfaces.IAuthor; import hw2.cs236369.interfaces.IPaper; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.HashMap; import java.util.LinkedList; import java.util.Map; import org.xml.sax.Attributes; impor...
package hw2.cs236369.parsing; import hw2.cs236369.interfaces.IDBFactory; import hw2.cs236369.interfaces.IDBLP; /** * DBLP Factory. Produces a DBLP Parser. * * @author gil * */ public class DBFactory implements IDBFactory { @Override public IDBLP produce(String path, String regExp) { return ...
package hw2.cs236369.parsing; import hw2.cs236369.interfaces.IAuthor; import hw2.cs236369.interfaces.IDBLP; import hw2.cs236369.interfaces.IPaper; import java.io.IOException; import java.util.Collection; import org.xml.sax.SAXException; import org.xml.sax.XMLReader; /** * DBLP XML's Parser * * @a...
package hw2.cs236369.filtering; import hw2.cs236369.extensions.Extender; import hw2.cs236369.extensions.Function; import hw2.cs236369.interfaces.IAuthor; import hw2.cs236369.interfaces.IDBLPInfo; import hw2.cs236369.interfaces.IPaper; import java.math.RoundingMode; import java.text.DecimalFormat; import jav...
package hw2.cs236369.filtering; import hw2.cs236369.interfaces.IAuthor; import hw2.cs236369.interfaces.IDBFactory; import hw2.cs236369.interfaces.IDBLP; import hw2.cs236369.interfaces.IDBLPInfo; import hw2.cs236369.parsing.DBFactory; public class Main { private final static IDBFactory factory = new DBFact...
package hw2.cs236369.filtering; import hw2.cs236369.interfaces.IAuthor; import hw2.cs236369.interfaces.IDBLP; import hw2.cs236369.interfaces.IDBLPInfo; import java.util.Collection; /** * A Filter class, implementing the logic and getting the required data on the authors * @author Gal Lalouche * */ p...
package controlador; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.List; import modelo.*; import vista.*; public class ControladorVentanaListadoVenta implements ActionListener{ private VentanaListadoVenta ventanaListadoVentas; public ControladorVentanaLi...
package controlador; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import vista.VentanaProducto; import modelo.*; public class ControladorVentanaProducto implements ActionListener { private VentanaProducto ventanaProducto; private CategoriaDAO categoriaDAO = new CategoriaDA...
package controlador; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import vista.VentanaOrden; import modelo.*; public class ControladorVentanaOrden implements ActionListener { private VentanaOrden ventanaOrden; private ClienteDAO clienteDAO = new ClienteDAO(); private Cat...
package controlador; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.List; import modelo.*; import vista.*; public class ControladorVentanaListadoIngrediente implements ActionListener{ private VentanaListadoIngrediente ventanaListadoIngredientes; public ...
package controlador; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import vista.VentanaCompra; import modelo.*; public class ControladorVentanaCompra implements ActionListener { private VentanaCompra ventanaCompra; private CompraDAO compraDAO = new CompraDAO(); private Co...
package controlador; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import vista.VentanaCategoria; import modelo.*; public class ControladorVentanaCategoria implements ActionListener { private VentanaCategoria ventanaCategoria; private CategoriaDAO categoriaDAO = new Categor...
package controlador; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import vista.VentanaPrincipal;; public class ControladorVentanaPrincipal implements ActionListener { private VentanaPrincipal ventanaMenu; public ControladorVentanaPrincipal() { super(); this.ventanaMe...
package vista; import java.util.*; import javax.swing.table.AbstractTableModel; public class VentanaDetalleCompraModeloTabla extends AbstractTableModel { private static String[] titulos = {"Codigo de la Compra", "Codigo del Ingrediente", "Nombre", "Cantidad", "Costo U.", "Monto"}; private List<Vector<Str...
package vista; import java.awt.BorderLayout; import java.awt.event.ActionListener; import java.util.Vector; import javax.swing.ComboBoxModel; import javax.swing.DefaultComboBoxModel; import javax.swing.JButton; import javax.swing.JComboBox; import javax.swing.JLabel; import javax.swing.JOptionPane; import javax.swing....
package vista; import java.util.ArrayList; import java.util.List; import java.util.*; import javax.swing.table.AbstractTableModel; public class VentanaDetalleProductoModeloTabla extends AbstractTableModel { private static String[] titulos = {"Codigo del Producto", "Codigo del Ingrediente", "Nombre", "Can...
package vista; import java.util.*; import javax.swing.table.AbstractTableModel; import modelo.Producto; public class VentanaListadoVentasModeloTabla extends AbstractTableModel { private static String[] titulos = {"Codigo del Producto", "Nombre", "Precio", "Cantidad"}; private List<Producto> produ...
package vista; import java.awt.BorderLayout; import java.awt.event.ActionListener; import javax.swing.ComboBoxModel; import javax.swing.DefaultComboBoxModel; import javax.swing.JButton; import javax.swing.JComboBox; import javax.swing.JLabel; import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swin...
package vista; import java.awt.BorderLayout; import java.awt.event.*; import javax.swing.*; /** * This code was edited or generated using CloudGarden's Jigloo * SWT/Swing GUI Builder, which is free for non-commercial * use. If Jigloo is being used commercially (ie, by a corporation, * company or business for any pur...
package vista; import java.awt.BorderLayout; import java.awt.event.ActionListener; import javax.swing.ImageIcon; import javax.swing.JLabel; import javax.swing.JMenu; import javax.swing.JMenuBar; import javax.swing.JMenuItem; import javax.swing.JPanel; import javax.swing.WindowConstants; /** * This code was edited ...
package vista; import java.util.*; import javax.swing.table.AbstractTableModel; public class VentanaDetalleOrdenModeloTabla extends AbstractTableModel { private static String[] titulos = {"Codigo de la Orden", "Codigo del Producto", "Nombre", "Cantidad", "Precio Unitario", "Monto"}; private List<Vector...
package vista; import java.awt.BorderLayout; import java.awt.event.ActionListener; import javax.swing.JButton; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTable; import javax.swing.WindowConstants; import javax.swing.table.AbstractTableModel; import javax....
package vista; import java.awt.BorderLayout; import java.awt.event.ActionListener; import javax.swing.JButton; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTable; import javax.swing.WindowConstants; import javax.swing.table.AbstractTableModel; import javax....