input
stringlengths
10
828
output
stringlengths
5
107
private jbutton get btn criterio if btn criterio null btn criterio new jbutton btn criterio set bounds new rectangle 245 239 200 31 btn criterio set text guardar criterio produccion btn criterio add action listener new java awt event action listener public void action performed java awt event action event e guardar criterio return btn criterio
this method initializes btn criterio
private jscroll pane get jscroll pane if j scroll pane null j scroll pane new jscroll pane j scroll pane set bounds new rectangle 2 27 720 241 j scroll pane set viewport view get jtable return j scroll pane
this method initializes j scroll pane
private jbutton get btn imprimir if btn imprimir null btn imprimir new jbutton btn imprimir set bounds new rectangle 439 263 106 30 btn imprimir set text imprimir btn imprimir add action listener new java awt event action listener public void action performed java awt event action event e try get jtable print catch printer exception e1 gui utilities show error get jcontent pane e1 get message return btn imprimir
this method initializes btn imprimir
private jtable get jtable if j table null j table new jtable get tab model private static final long serial version uid 1 l public boolean is cell editable int row int column return false j table set default renderer object class new table render return j table
this method initializes j table
private jbutton get btn cant prod fab if btn cant prod fab null btn cant prod fab new jbutton btn cant prod fab set bounds new rectangle 12 6 163 25 btn cant prod fab set tool tip text listado de las cantidades de los productos que se deben fabricar btn cant prod fab set text productos a fabricar btn cant prod fab add action listener new java awt event action listener public void action performed java awt event action event e listadoget cant prod fab return btn cant prod fab
this method initializes btn cant prod fab
private jbutton get btn finalizar if btn finalizar null btn finalizar new jbutton btn finalizar set bounds new rectangle 415 274 131 25 btn finalizar set text finalizar pedido btn finalizar add action listener new java awt event action listener public void action performed java awt event action event e finalizar pedido modelo plan produccion has changed return btn finalizar
this method initializes btn finalizar
private jbutton get btn listados if btn listados null btn listados new jbutton btn listados set bounds new rectangle 263 77 90 25 btn listados set text listados btn listados add action listener new java awt event action listener public void action performed java awt event action event e uilistados ui listado new uilistados ui listado set visible true return btn listados
this method initializes btn listados
private jcombo box get jcombo box if j combo box null j combo box new jcombo box j combo box set bounds new rectangle 244 196 200 22 return j combo box
this method initializes j combo box
private jbutton get btn pedidos xfecha if btn pedidos xfecha null btn pedidos xfecha new jbutton btn pedidos xfecha set bounds new rectangle 195 5 146 27 btn pedidos xfecha set tool tip text dado un rango de fechas indica los pedidos que se han finalizado btn pedidos xfecha set text pedidos finalizados btn pedidos xfecha add action listener new java awt event action listener public void action performed java awt event action event e listado pedidos xfecha return btn pedidos xfecha
this method initializes btn pedidos xfecha
private jtext field get txt fecha hora if txt fecha hora null txt fecha hora new jtext field txt fecha hora set bounds new rectangle 136 273 86 27 return txt fecha hora
this method initializes txt fecha hora
private jtext field get txt hora if txt hora null txt hora new jtext field txt hora set bounds new rectangle 284 272 105 26 return txt hora
this method initializes txt hora
private void initialize this set size 497 452 this set content pane get jcontent pane this set title administracion productos actualizar lista
this method initializes this
private void initialize this set size 662 491 this set content pane get jcontent pane this set title abm pedidos
this method initializes this
private jtext field get txt fecha ini if txt fecha ini null txt fecha ini new jtext field txt fecha ini set bounds new rectangle 423 6 87 25 return txt fecha ini
this method initializes txt fecha ini
private jtext field get txt fecha fin if txt fecha fin null txt fecha fin new jtext field txt fecha fin set bounds new rectangle 584 8 90 23 return txt fecha fin
this method initializes txt fecha fin
private jtext field get txt nombre if txt nombre null txt nombre new jtext field txt nombre set bounds new rectangle 130 36 103 20 return txt nombre
this method initializes txt nombre
private void initialize this set size 497 452 this set content pane get jcontent pane this set title administracion clientes actualizar lista
this method initializes this
private jtext field get txt costo unidad if txt costo unidad null txt costo unidad new jtext field txt costo unidad set bounds new rectangle 130 61 103 20 return txt costo unidad
this method initializes txt apellido
private jscroll pane get jscroll pane if j scroll pane null j scroll pane new jscroll pane j scroll pane set bounds new rectangle 6 155 474 263 j scroll pane set viewport view get jtable return j scroll pane
this method initializes j scroll pane
private jtext field get txt nombre if txt nombre null txt nombre new jtext field txt nombre set bounds new rectangle 100 37 133 20 return txt nombre
this method initializes txt nombre
private jtext field get txt prioridad if txt prioridad null txt prioridad new jtext field txt prioridad set bounds new rectangle 100 63 133 20 return txt prioridad
this method initializes txt apellido
private jtext field get txt estado if txt estado null txt estado new jtext field txt estado set bounds new rectangle 100 18 127 20 txt estado set editable false return txt estado
this method initializes txt estado
private jtext field get txt fecha entrega if txt fecha entrega null txt fecha entrega new jtext field txt fecha entrega set bounds new rectangle 100 46 129 20 return txt fecha entrega
this method initializes txt fecha entrega
private jbutton get btn guardar if btn guardar null btn guardar new jbutton btn guardar set bounds new rectangle 268 11 89 21 btn guardar set text guardar btn guardar add action listener new java awt event action listener public void action performed java awt event action event e guardar pedido return btn guardar
this method initializes btn guardar
private jbutton get btn nuevo if btn nuevo null btn nuevo new jbutton btn nuevo set bounds new rectangle 335 16 139 25 btn nuevo set text nuevo btn nuevo add action listener new java awt event action listener public void action performed java awt event action event e nuevo cliente return btn nuevo
this method initializes btn nuevo
private jbutton get btn nuevo if btn nuevo null btn nuevo new jbutton btn nuevo set bounds new rectangle 335 16 139 25 btn nuevo set text nuevo btn nuevo add action listener new java awt event action listener public void action performed java awt event action event e nuevo producto return btn nuevo
this method initializes btn nuevo
private jbutton get btn agregar if btn agregar null btn agregar new jbutton btn agregar set bounds new rectangle 335 50 139 25 btn agregar set text agregar modificar btn agregar add action listener new java awt event action listener public void action performed java awt event action event e guardar return btn agregar
this method initializes btn agregar
private jbutton get btn eliminar if btn eliminar null btn eliminar new jbutton btn eliminar set bounds new rectangle 271 50 89 21 btn eliminar set text eliminar btn eliminar add action listener new java awt event action listener public void action performed java awt event action event e eliminar return btn eliminar
this method initializes btn eliminar
private jbutton get btn borrar if btn borrar null btn borrar new jbutton btn borrar set bounds new rectangle 335 84 139 25 btn borrar set text borrar btn borrar add action listener new java awt event action listener public void action performed java awt event action event e borrar selected return btn borrar
this method initializes btn borrar
private jbutton get btn cancelar if btn cancelar null btn cancelar new jbutton btn cancelar set bounds new rectangle 335 118 139 25 btn cancelar set text cancelar btn cancelar add action listener new java awt event action listener public void action performed java awt event action event e uicliente this dispose return btn cancelar
this method initializes btn cancelar
private jbutton get btn nuevo if btn nuevo null btn nuevo new jbutton btn nuevo set bounds new rectangle 267 89 89 21 btn nuevo set text nuevo btn nuevo add action listener new java awt event action listener public void action performed java awt event action event e borrar campos return btn nuevo
this method initializes btn nuevo
private jbutton get btn agregar if btn agregar null btn agregar new jbutton btn agregar set bounds new rectangle 183 351 74 24 btn agregar set font new font candara font bold 18 btn agregar set text btn agregar add action listener new java awt event action listener public void action performed java awt event action event e agregar producto return btn agregar
this method initializes btn agregar
private jbutton get btn buscar if btn buscar null btn buscar new jbutton btn buscar set bounds new rectangle 239 63 79 21 btn buscar set text buscar btn buscar add action listener new java awt event action listener public void action performed java awt event action event e buscar datos xnombre return btn buscar
this method initializes btn buscar
private jtext field get txt oid if txt oid null txt oid new jtext field txt oid set bounds new rectangle 100 11 133 20 txt oid set editable false return txt oid
this method initializes txt oid
private jbutton get btn cancelar if btn cancelar null btn cancelar new jbutton btn cancelar set bounds new rectangle 335 118 139 25 btn cancelar set text cancelar btn cancelar add action listener new java awt event action listener public void action performed java awt event action event e uiproducto this dispose return btn cancelar
this method initializes btn cancelar
private jbutton get btn quitar if btn quitar null btn quitar new jbutton btn quitar set bounds new rectangle 184 383 74 24 btn quitar set font new font candara font bold 18 btn quitar set text btn quitar add action listener new java awt event action listener public void action performed java awt event action event e quitar articulo return btn quitar
this method initializes btn quitar
private jbutton get btn buscar if btn buscar null btn buscar new jbutton btn buscar set bounds new rectangle 249 35 75 21 btn buscar set text buscar btn buscar add action listener new java awt event action listener public void action performed java awt event action event e buscar datos xnombre return btn buscar
this method initializes btn buscar
private jtext field get txt oid if txt oid null txt oid new jtext field txt oid set bounds new rectangle 130 11 103 20 txt oid set editable false return txt oid
this method initializes txt oid
private jtext field get txt precio venta if txt precio venta null txt precio venta new jtext field txt precio venta set bounds new rectangle 130 86 103 20 return txt precio venta
this method initializes txt precio venta
private jtext field get txt tiempo produccion if txt tiempo produccion null txt tiempo produccion new jtext field txt tiempo produccion set bounds new rectangle 130 111 103 20 txt tiempo produccion set editable true return txt tiempo produccion
this method initializes txt tiempo produccion
private jlist get jlist productos available if j list productos available null lista productos available new default list model j list productos available new jlist lista productos available return j list productos available
this method initializes j list productos available
private jlist get jlist raiz if j list raiz null lista raiz new default list model j list raiz new jlist lista raiz j list raiz add list selection listener new javax swing event list selection listener public void value changed javax swing event list selection event e if j list raiz get selected index 1 cargar productos pedido sel return j list raiz
this method initializes j list raiz
private jscroll pane get jscroll pane raiz if j scroll pane raiz null j scroll pane raiz new jscroll pane j scroll pane raiz set bounds new rectangle 457 52 184 385 j scroll pane raiz set viewport view get jlist raiz return j scroll pane raiz
this method initializes j scroll pane raiz
private jscroll pane get jscroll pane available if j scroll pane available null j scroll pane available new jscroll pane j scroll pane available set bounds new rectangle 278 212 171 231 j scroll pane available set viewport view get jlist productos available return j scroll pane available
this method initializes j scroll pane available
private jtext field get txt oid if txt oid null txt oid new jtext field txt oid set bounds new rectangle 100 99 127 20 txt oid set editable false return txt oid
this method initializes txt oid
private jscroll pane get jscroll pane used if j scroll pane used null j scroll pane used new jscroll pane j scroll pane used set bounds new rectangle 4 208 161 233 j scroll pane used set viewport view get jlist productos used return j scroll pane used
this method initializes j scroll pane used
private jlist get jlist productos used if j list productos used null lista productos used new default list model j list productos used new jlist lista productos used return j list productos used
this method initializes j list productos used
private jtext field get txt nombre cliente if txt nombre cliente null txt nombre cliente new jtext field txt nombre cliente set bounds new rectangle 100 126 127 20 return txt nombre cliente
this method initializes txt nombre cliente
private jbutton get btn buscar cliente if btn buscar cliente null btn buscar cliente new jbutton btn buscar cliente set bounds new rectangle 237 124 121 21 btn buscar cliente set tool tip text busca el cliente por su nombre btn buscar cliente set text buscar cliente btn buscar cliente add action listener new java awt event action listener public void action performed java awt event action event e buscar cliente xnombre return btn buscar cliente
this method initializes btn buscar cliente
private jtext field get txt id cliente if txt id cliente null txt id cliente new jtext field txt id cliente set bounds new rectangle 100 153 127 20 txt id cliente set editable false return txt id cliente
this method initializes txt id cliente
private jtext field get txt cantidad if txt cantidad null txt cantidad new jtext field txt cantidad set bounds new rectangle 196 233 46 24 return txt cantidad
this method initializes txt cantidad
private jbutton get btn cantidad if btn cantidad null btn cantidad new jbutton html center b actualizar cantidad b btn cantidad set bounds new rectangle 176 261 88 43 btn cantidad set horizontal alignment swing constants center btn cantidad set font new font dialog font bold 12 btn cantidad add action listener new java awt event action listener public void action performed java awt event action event e actalizar cantidad return btn cantidad
this method initializes btn cantidad
public string get type return text javascript
over the type
private string generate random string int width string buffer sb new string buffer width for int i 0 i width i string rand string value of random next int 10 sb append rand return sb to string
generate the random string
public void do get http servlet request request http servlet response response throws servlet exception ioexception response set content type content type response set header pragma no cache response set header cache control no cache response set date header expires 0 int width img width int height img height verification code generator verification code generator new verification code generator buffered image image verification code generator generate image img count width height http session session request get session session set attribute web constants session verify code verification code generator get random string this print image response get output stream image
todo move the draw logic to stategy
public void zoom image string source path string target path string image category throws exception text stamp text stamp this get text stamp image category render specification render spec this get render specification image category if text stamp null misc tool not empty render spec get size type image processor image processor new default image processor image processor set text stamp text stamp image processor zoom source path target path render spec
thumbnail or common image
private string read content text file string text file throws ioexception byte buffers new byte 1024 buffered input stream br new buffered input stream new file input stream text file byte array output stream baos new byte array output stream br available int len while len br read buffers 1 baos write buffers 0 len br close string result new string baos to byte array ministone config get file encoding baos close return result
inner method read content from txt file
private void validate path string abs string file path abs substring 0 abs last index of file separator file separator length file dir new file file path if dir exists dir mkdirs
if the abs exists then will do nothing
private string calculate web path string relative web uri string absolute path this spell full path get resource root convert uri2 local relative web uri return absolute path
get the real local path of the relative web uri
private string init web path string relative web uri string absolute path this spell full path get resource root convert uri2 local relative web uri validate path absolute path return absolute path
get the real local path of the relative web uri
public object load viewlet content map map throws exception string category id string map get org ministone mlets cms service cms service cms service null rule helper rule helper new rule helper rule helper set preferences map rule base rule base this read rule working memory working memory rule base new working memory working memory assert object rule helper working memory fire all rules return rule helper get content
load content rule of the viewlet
private rule base read rule throws exception read in the source reader source new input stream reader viewlet service rule class get resource as stream sample drl use package builder to build up a rule package package builder builder new package builder this wil parse and compile in one step builder add package from drl source get the compiled package which is serializable package pkg builder get package add the package to a rulebase deploy the rule package rule base rule base rule base factory new rule base rule base add package pkg return rule base
please note that this is the low level rule assembly api
public void generate file page page string target throws exception map map new hash map string template file template three column template html template template this template engine get template template file utf 8 map put page data page velocity context velocity context new velocity context map string writer string writer new string writer template merge velocity context string writer buffered writer file writer new buffered writer new file writer target file writer write string writer to string file writer close
generate file using the given data
protected portal handle get portal by name string name throws exception return portal name cache get name
using name as the xml file name
private void save article content string content uri article article throws exception content if article is asuri misc tool not empty article get content file service save content content uri article get content indexee indexee new indexee indexee add field title article get title indexee set uri portal read article aid article get id indexee set indexee content new plain text string content article get content this get index engine create index indexee
todo should index uri metadata too
private container construct container string decorator container container new container container set decorator decorator page page new page page set id test constants page id container set page page return container
private methods to build needed objects
public int execute total num throws org hibernate hibernate exception int total integer root criteria set projection org hibernate criterion projections row count unique result int value int total integer root criteria set projection org hibernate criterion projections count distinct id unique result int value root criteria set projection null return total
implements by sunwj
public top frame get main frame return main frame
getter of the property tt main frame tt
public void set main frame top frame main frame this main frame main frame
setter of the property tt main frame tt
public void set dom comp coll linked list igeneric comp dom comp coll this dom comp coll dom comp coll
setter of the property tt dom comp coll tt
public void set graph directed graph igeneric comp ibase dependency graph this graph graph
setter of the property tt graph tt
public jcomponent get out comp return out comp
getter of the property tt out comp tt
public void set out comp jcomponent out comp this out comp out comp
setter of the property tt out comp tt
public dependency aggregation get dependencies return dependencies
getter of the property tt dependencies tt
public void set dependencies dependency aggregation dependencies if dependencies null this dependencies dependencies
setter of the property tt dependencies tt
public boolean check component definition cycles throws graph traversal exception graph cycle finder fndr fndr new graph cycle finder graph new dc usage cycle finder factory builder factory instance fndr do cycle search this dep cycles add all fndr get detected cycles return fndr get detected cycles size 0
checks whether dependency cycles are found in the graph associated with this object
public mapping get mapping int id return mappings get id
returns the mapping with the given id
public void remove mapping int id mappings remove id
removes the mapping with the given id
public void remove mappings collection integer ids for int id ids remove mapping id
removes the mappings with the id in the given list
public void set mapping int id mapping m mappings put id m
adds a mapping to the list
public void output to file file f throws ioexception file writer fw new file writer f for indexed object mapping m this fw append m get value get source node get label m get value get target node get label m get value get similarity n fw close
output the current mapping to the given file
public labeled node get source node return source node
returns the source labeled node of the mapping
public labeled node get target node return target node
returns the target labeled node of the mapping
public float get similarity return similarity
returns the similarity of the mapping
public string get process informations return flooding process with last step nb flooding steps last euclidian distance last euclidian distance
returns informations about the flooding process
public void set similarity float similarity this similarity similarity
sets the similarity of the mapping
public int get max step nb return max step nb
returns the maximum allowed number of steps in the flooding process
public float get similarity int id return similarities get id
returns the similarity of the compatibility node with the given id
public int get last step nb return last step nb
returns the number of step done by the flooding process
public void set similarity int id float similarity similarities put id similarity
sets the similarity for the compatibility node with the given id
public float euclidian distance sigma s2 float sum 0 f for indexed float pair similarities sum math pow pair get value s2 get similarity pair get key 2 d return float math sqrt sum
computes the euclidian distance from a sigma to an other
public float get last euclidian distance return last euclidian distance
returns the euclidian distance between the two last iterations of the flooding process
public void normalize float value for indexed float pair similarities set similarity pair get key pair get value value
divides each similarity value of the sigma by the given value
public propagation graph get propagation graph return propagation graph
returns the propagation graph involved in the flooding process
public void output to file file f throws ioexception file writer fw new file writer f fw append to string fw close
output the sigma in the given file
public alignment get alignment return this alignment
returns the alignment computed by the flooder
public float get limit return this limit
returns the limit of the flooder
public void create edge compatibility node source node compatibility node target node float weight int target id target node get id if edges has key target id edges put target id new adj weighted comp nodes edges get target id add new adj weighted comp node source node weight
creates a propagation edge in the propagation graph
public void delete compatibility nodes list compatibility node nodes to delete for indexed object compatibility node pair nodes int key pair get key list adj weighted comp node to remove new linked list adj weighted comp node for adj weighted comp node lacn edges get key if nodes to delete contains lacn get node to remove add lacn for adj weighted comp node wacn to remove edges get key remove wacn for compatibility node cn nodes to delete nodes remove cn get id
deletes the given list of compatibility nodes from the graph
public sigma get sigma0 return this sigma0
returns the sigma 0 associated to the graph