query
stringlengths 7
33.1k
| document
stringlengths 7
335k
| metadata
dict | negatives
sequencelengths 3
101
| negative_scores
sequencelengths 3
101
| document_score
stringlengths 3
10
| document_rank
stringclasses 102
values |
---|---|---|---|---|---|---|
Metodo....: atualizaFiltroMsisdnTempoWig Descricao.: Realiza atualizacao no Banco de Dados das informacoes do Assinante/Filtro | public static void atualizaFiltroMsisdnTempoWig(Session session, FiltroMsisdnTempoWig filtro)
{
session.saveOrUpdate(filtro);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void evento_cambioEstadoFiltrosLocales() {\r\n\t\tfinal List<PataBidireccional> allPatas = getPatas();\r\n\t\tfor (final PataBidireccional pataConectora : allPatas) {\r\n\t\t\tfinal Condicion nuevoFiltro = calcularFiltroDeEntradaPara(pataConectora);\r\n\t\t\tpataConectora.actualizarFiltroDeEntrada(nuevoFiltro);\r\n\t\t}\r\n\t}",
"@Command\n\t@NotifyChange(\"*\")\n\tpublic void aplicarFiltro(){\n\t\tcambiarAnalistas(0, null, null);\n\t}",
"public void inativarMovimentacoes() {\n\n\t\ttry {\n\n\t\t\tif (((auxMovimentacao.getDataMovimentacao())\n\t\t\t\t\t.before(permitirCadastrarMovimentacao(movimentacao.getAlunoTurma()).getDataMovimentacao()))\n\t\t\t\t\t|| (auxMovimentacao.getDataMovimentacao()).equals(\n\t\t\t\t\t\t\tpermitirCadastrarMovimentacao(movimentacao.getAlunoTurma()).getDataMovimentacao())\n\t\t\t\t\t) {\n\t\t\t\tExibirMensagem.exibirMensagem(Mensagem.MOVIMENTACOES_ANTERIORES);\n\t\t\t} else {\n\n\t\t\t\tDate dataFinal = auxMovimentacao.getDataMovimentacao();\n\t\t\t\tCalendar calendarData = Calendar.getInstance();\n\t\t\t\tcalendarData.setTime(dataFinal);\n\t\t\t\tcalendarData.add(Calendar.DATE, -1);\n\t\t\t\tDate dataInicial = calendarData.getTime();\n\n\t\t\t\tMovimentacao mov = new Movimentacao();\n\t\t\t\tmov = (Movimentacao) movimentacaoAlunoDAO.listarTodos(Movimentacao.class,\n\t\t\t\t\t\t\" a.dataMovimentacao = (select max(b.dataMovimentacao) \"\n\t\t\t\t\t\t\t\t+ \" from Movimentacao b where b.alunoTurma = a.alunoTurma) \"\n\t\t\t\t\t\t\t\t+ \" and a.status is true and a.alunoTurma.status = true and dataMovimentacaoFim = null and a.alunoTurma = \"\n\t\t\t\t\t\t\t\t+ movimentacao.getAlunoTurma().getId())\n\t\t\t\t\t\t.get(0);\n\n\t\t\t\tmov.setControle(false);\n\t\t\t\tmov.setDataMovimentacaoFim(dataInicial);\n\t\t\t\tmovimentacaoService.inserirAlterar(mov);\n\n\t\t\t\tAlunoTurma aluno = new AlunoTurma();\n\t\t\t\taluno = daoAlunoTurma.buscarPorId(AlunoTurma.class, movimentacao.getAlunoTurma().getId());\n\t\t\t\taluno.setControle(0);\n\t\t\t\t\n\n\t\t\t\tauxMovimentacao.setAlunoTurma(movimentacao.getAlunoTurma());\n\t\t\t\tauxMovimentacao.setStatus(true);\n\t\t\t\tauxMovimentacao.setControle(false);\n\n\t\t\t\tmovimentacaoService.inserirAlterar(auxMovimentacao);\n\t\t\t\t\n\t\t\t\tif(auxMovimentacao.getSituacao()==5){\n//\t\t\t\t\t\n//\t\t\t\t\tCurso cursoAluno = new Curso();\n//\t\t\t\t\tcursoAluno = daoCurso.buscarPorId(Curso.class, auxMovimentacao.getAlunoTurma().getTurma().getCurso().getId());\n\t\t\t\t\t\n\t\t\t\t\taluno.setSituacao(5);\n\t\t\t\t\taluno.setLiberado(false);\n\t\t\t\t\talunoTurmaService.inserirAlterar(aluno);\n\t\t\t\t\t\n\t\t\t\t\t//liberar para responder o questionário\n\t\t\t\t\tAluno alunoResponde = new Aluno(); \n\t\t\t\t\talunoResponde = daoAluno.buscarPorId(Aluno.class, aluno.getAluno().getId());\n\t\t\t\t\t \n\t\t\t\t // email.setCursos(auxMovimentacao.getAlunoTurma().getTurma().getCurso());\n\t\t\t\t\t//email.setTurma(auxMovimentacao.getAlunoTurma().getTurma());\n\t\t\t\t\temail.setEnviado(false);\n\t\t\t\t\temail.setStatus(true);\n\t\t\t\t\temail.setAlunoTurma(auxMovimentacao.getAlunoTurma());\n\t\t\t\t\t\n\t\t\t\t\t//email.setAluno(alunoResponde);\n\t\t\t\t\temailService.inserirAlterar(email);\n\t\t\t\t\t//enviar o email para responder \n\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\taluno.setSituacao(0);\n\t\t\t\t\talunoTurmaService.inserirAlterar(aluno);\n\t\t\t\t}\n\t\t\t\taluno = new AlunoTurma();\n\t\t\t\temail = new Email();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tFecharDialog.fecharDialogAlunoCursoEditar();\n\t\t\t\tFecharDialog.fecharDialogAlunoEditarCurso();\n\t\t\t\tFecharDialog.fecharDialogAlunoTrancamento();\n\t\t\t\talterar(movimentacao);\n\n\t\t\t\tExibirMensagem.exibirMensagem(Mensagem.SUCESSO);\n\t\t\t\tauxMovimentacao = new Movimentacao();\n\n\t\t\t\talunoTurmaService.update(\" AlunoTurma set permiteCadastroCertificado = 2 where id = \"\n\t\t\t\t\t\t+ movimentacao.getAlunoTurma().getId());\n\n\t\t\t\n\t\t\t\tcriarNovoObjetoAluno();\n\t\t\t\tatualizarListas();\n\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tExibirMensagem.exibirMensagem(Mensagem.ERRO);\n\t\t}\n\n\t}",
"private static void statACricri() {\n \tSession session = new Session();\n \tNSTimestamp dateRef = session.debutAnnee();\n \tNSArray listAffAnn = EOAffectationAnnuelle.findAffectationsAnnuelleInContext(session.ec(), null, null, dateRef);\n \tLRLog.log(\">> listAffAnn=\"+listAffAnn.count() + \" au \" + DateCtrlConges.dateToString(dateRef));\n \tlistAffAnn = LRSort.sortedArray(listAffAnn, \n \t\t\tEOAffectationAnnuelle.INDIVIDU_KEY + \".\" + EOIndividu.NOM_KEY);\n \t\n \tEOEditingContext ec = new EOEditingContext();\n \tCngUserInfo ui = new CngUserInfo(new CngDroitBus(ec), new CngPreferenceBus(ec), ec, new Integer(3065));\n \tStringBuffer sb = new StringBuffer();\n \tsb.append(\"service\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"agent\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"contractuel\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"travaillees\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"conges\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"dues\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"restant\");\n \tsb.append(ConstsPrint.CSV_NEW_LINE);\n \t\n \n \tfor (int i = 0; i < listAffAnn.count(); i++) {\n \t\tEOAffectationAnnuelle itemAffAnn = (EOAffectationAnnuelle) listAffAnn.objectAtIndex(i);\n \t\t//\n \t\tEOEditingContext edc = new EOEditingContext();\n \t\t//\n \t\tNSArray array = EOAffectationAnnuelle.findSortedAffectationsAnnuellesForOidsInContext(\n \t\t\t\tedc, new NSArray(itemAffAnn.oid()));\n \t\t// charger le planning pour forcer le calcul\n \t\tPlanning p = Planning.newPlanning((EOAffectationAnnuelle) array.objectAtIndex(0), ui, dateRef);\n \t\t// quel les contractuels\n \t\t//if (p.affectationAnnuelle().individu().isContractuel(p.affectationAnnuelle())) {\n \t\ttry {p.setType(\"R\");\n \t\tEOCalculAffectationAnnuelle calcul = p.affectationAnnuelle().calculAffAnn(\"R\");\n \t\tint minutesTravaillees3112 = calcul.minutesTravaillees3112().intValue();\n \t\tint minutesConges3112 = calcul.minutesConges3112().intValue();\n \t\t\n \t\t// calcul des minutes dues\n \t\tint minutesDues3112 = /*0*/ 514*60;\n \t\t/*\tNSArray periodes = p.affectationAnnuelle().periodes();\n \t\tfor (int j=0; j<periodes.count(); j++) {\n \t\t\tEOPeriodeAffectationAnnuelle periode = (EOPeriodeAffectationAnnuelle) periodes.objectAtIndex(j);\n \t\tminutesDues3112 += periode.valeurPonderee(p.affectationAnnuelle().minutesDues(), septembre01, decembre31);\n \t\t}*/\n \t\tsb.append(p.affectationAnnuelle().structure().libelleCourt()).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(p.affectationAnnuelle().individu().nomComplet()).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(p.affectationAnnuelle().individu().isContractuel(p.affectationAnnuelle())?\"O\":\"N\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesTravaillees3112)).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesConges3112)).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesDues3112)).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesTravaillees3112 - minutesConges3112 - minutesDues3112)).append(ConstsPrint.CSV_NEW_LINE);\n \t\tLRLog.log((i+1)+\"/\"+listAffAnn.count() + \" (\" + p.affectationAnnuelle().individu().nomComplet() + \")\");\n \t\t} catch (Throwable e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t\tedc.dispose();\n \t\t//}\n \t}\n \t\n\t\tString fileName = \"/tmp/stat_000_\"+listAffAnn.count()+\".csv\";\n \ttry {\n\t\t\tBufferedWriter fichier = new BufferedWriter(new FileWriter(fileName));\n\t\t\tfichier.write(sb.toString());\n\t\t\tfichier.close();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tLRLog.log(\"writing \" + fileName);\n\t\t}\n }",
"public void actualizarFechaComprobantes() {\r\n if (utilitario.isFechasValidas(cal_fecha_inicio.getFecha(), cal_fecha_fin.getFecha())) {\r\n tab_tabla1.setCondicion(\"fecha_trans_cnccc between '\" + cal_fecha_inicio.getFecha() + \"' and '\" + cal_fecha_fin.getFecha() + \"' and ide_cntcm=\" + com_tipo_comprobante.getValue());\r\n tab_tabla1.ejecutarSql();\r\n tab_tabla2.ejecutarValorForanea(tab_tabla1.getValorSeleccionado());\r\n utilitario.addUpdate(\"tab_tabla1,tab_tabla2\");\r\n calcularTotal();\r\n utilitario.addUpdate(\"gri_totales\");\r\n } else {\r\n utilitario.agregarMensajeInfo(\"Rango de fechas no válidas\", \"\");\r\n }\r\n\r\n }",
"public void editarData(){\n\t\talunoTurmaService.inserirAlterar(alunoTurmaAltera);\n\t\t\n\t\t\n\t\tmovimentacao.setDataMovimentacao(alunoTurmaAltera.getDataMudanca());\n\t\tmovimentacaoService.inserirAlterar(movimentacao);\n\t\t\n\t\tFecharDialog.fecharDialogDATAAluno();\n\t\tExibirMensagem.exibirMensagem(Mensagem.SUCESSO);\n\t\talunoTurmaAltera = new AlunoTurma();\n\t\tmovimentacao = new Movimentacao();\n\t\t\n\t\tatualizarListas();\n\t}",
"public void eventoFiltrar() {\n if (index >= 0) {\n if (tipoLista == 0) {\n tipoLista = 1;\n }\n RequestContext context = RequestContext.getCurrentInstance();\n infoRegistro = \"Cantidad de registros : \" + filtrarListFormulasProcesos.size();\n context.update(\"form:informacionRegistro\");\n }\n }",
"public boolean modificarRegistro(int codigoCiclo, int codigoPlan, int codigoMeta, int codigoObjetivo, String descripcion, String justificacion, double valorMeta, double valorMinimo, double valorMaximo, String tipoMedicion, String estado, String fuenteDato, String aplicaEn, String unidadMedida, String tipoGrafica, String mes01, String mes02, String mes03, String mes04, String mes05, String mes06, String mes07, String mes08, String mes09, String mes10, String mes11, String mes12, Collection arrResponsables, Collection arrRecursos, String usuarioModificacion) {\n/* */ try {\n/* 810 */ String s = \"update cal_plan_metas set codigo_objetivo=\" + codigoObjetivo + \",\" + \" descripcion='\" + descripcion + \"',\" + \" justificacion='\" + justificacion + \"',\" + \" valor_meta=\" + valorMeta + \",\" + \" valor_minimo=\" + valorMinimo + \",\" + \" valor_maximo=\" + valorMaximo + \",\" + \" tipo_medicion='\" + tipoMedicion + \"',\" + \" estado='\" + estado + \"',\" + \" fuente_dato='\" + fuenteDato + \"',\" + \" aplica_en='\" + aplicaEn + \"',\" + \" unidad_medida='\" + unidadMedida + \"',\" + \" tipo_grafica='\" + tipoGrafica + \"',\" + \" mes01='\" + mes01 + \"',\" + \" mes02='\" + mes02 + \"',\" + \" mes03='\" + mes03 + \"',\" + \" mes04='\" + mes04 + \"',\" + \" mes05='\" + mes05 + \"',\" + \" mes06='\" + mes06 + \"',\" + \" mes07='\" + mes07 + \"',\" + \" mes08='\" + mes08 + \"',\" + \" mes09='\" + mes09 + \"',\" + \" mes10='\" + mes10 + \"',\" + \" mes11='\" + mes11 + \"',\" + \" mes12='\" + mes12 + \"',\" + \" fecha_modificacion=\" + Utilidades.getFechaBD() + \",\" + \" usuario_modificacion='\" + usuarioModificacion + \"'\" + \" where\" + \" codigo_meta=\" + codigoMeta + \" and codigo_ciclo=\" + codigoCiclo + \" and codigo_plan=\" + codigoPlan;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 842 */ boolean rta = this.dat.executeUpdate(s);\n/* */ \n/* */ \n/* */ \n/* 846 */ if (rta) {\n/* */ \n/* 848 */ s = \"update cal_plan_recursos_meta set estado='X', fecha_modificacion=\" + Utilidades.getFechaBD() + \",\" + \" usuario_modificacion='\" + usuarioModificacion + \"'\" + \" where\" + \" codigo_ciclo=\" + codigoCiclo + \" and codigo_plan=\" + codigoPlan + \" and codigo_meta=\" + codigoMeta;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 857 */ this.dat.executeUpdate(s);\n/* 858 */ Iterator iterator = arrRecursos.iterator();\n/* 859 */ while (iterator.hasNext()) {\n/* 860 */ Integer codigo = (Integer)iterator.next();\n/* 861 */ crearRecurso(codigoCiclo, codigoPlan, codigoMeta, codigo.intValue(), \"A\", usuarioModificacion);\n/* */ } \n/* */ \n/* 864 */ s = \"delete from cal_plan_recursos_meta where codigo_ciclo=\" + codigoCiclo + \" and codigo_plan=\" + codigoPlan + \" and codigo_meta=\" + codigoMeta + \" and estado='X'\";\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 870 */ this.dat.executeUpdate(s);\n/* */ \n/* 872 */ s = \"update cal_plan_responsables_meta set estado='X', fecha_modificacion=\" + Utilidades.getFechaBD() + \",\" + \" usuario_modificacion='\" + usuarioModificacion + \"'\" + \" where codigo_ciclo=\" + codigoCiclo + \" and codigo_plan=\" + codigoPlan + \" and codigo_meta=\" + codigoMeta;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 880 */ this.dat.executeUpdate(s);\n/* */ \n/* 882 */ Iterator iterator2 = arrResponsables.iterator();\n/* 883 */ while (iterator2.hasNext()) {\n/* 884 */ Integer codigo = (Integer)iterator2.next();\n/* 885 */ crearResponsable(codigoCiclo, codigoPlan, codigoMeta, codigo.intValue(), \"A\", usuarioModificacion);\n/* */ } \n/* */ \n/* 888 */ s = \"delete from cal_plan_responsables_meta where codigo_ciclo=\" + codigoCiclo + \" and codigo_plan=\" + codigoPlan + \" and codigo_meta=\" + codigoMeta + \" and estado='X'\";\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 895 */ this.dat.executeUpdate(s);\n/* */ } \n/* */ \n/* */ \n/* 899 */ return rta;\n/* */ }\n/* 901 */ catch (Exception e) {\n/* 902 */ e.printStackTrace();\n/* 903 */ Utilidades.writeError(\"CalMetasDAO:modificarRegistro \", e);\n/* */ \n/* 905 */ return false;\n/* */ } \n/* */ }",
"@Override\n public void actualizar(DycpCompensacionDTO compensacion) throws SIATException {\n try {\n List<Object> params = new ArrayList<Object>();\n boolean comma = false;\n StringBuilder valoresSettear = new StringBuilder();\n\n if (compensacion.getDyccEstadoCompDTO() != null) {\n valoresSettear.append(\" IDESTADOCOMP = ?\");\n params.add(compensacion.getDyccEstadoCompDTO().getIdEstadoComp());\n comma = Boolean.TRUE;\n }\n\n if (compensacion.getDyccAprobadorDTO() != null) {\n if (comma) {\n valoresSettear.append(\",\");\n }\n valoresSettear.append(\" NUMEMPLEADOAPROB = ?\");\n params.add(compensacion.getDyccAprobadorDTO().getNumEmpleado());\n }\n\n String sentencia = \" UPDATE DYCP_COMPENSACION SET \" + valoresSettear.toString() + \" WHERE NUMCONTROL = ?\";\n log.info(\"sentencia ->\" + sentencia);\n\n params.add(compensacion.getNumControl());\n\n Object[] p = new Object[params.size()];\n int i = ConstantesDyCNumerico.VALOR_0;\n\n for (Object o : params) {\n p[i] = o;\n log.info(\"parametro en update compensacion ->\" + o + \"<-\");\n i++;\n }\n\n jdbcTemplateDYC.update(sentencia, p);\n } catch (Exception dae) {\n log.error(ConstantesDyC1.TEXTO_1_ERROR_DAO + dae.getMessage() + ConstantesDyC1.TEXTO_3_ERROR_DAO +\n ExtractorUtil.ejecutar(compensacion) + ConstantesDyC1.TEXTO_8_CAUSAS + dae);\n throw new SIATException(dae);\n }\n }",
"private void atualizarSituacaoArquivo(HttpServletResponse response, \r\n\t\tOutputStream out, long idArquivoTextoVisitaCampo) throws IOException {\r\n\t\ttry {\r\n\t\t\t//Atualiza o arquivo em campo\r\n\t\t\tSystem.out.println(\"INICIO: Atualizando a situacao do arquivo ID: \"+idArquivoTextoVisitaCampo);\r\n\t\t\t\r\n\t\t\tFiltroArquivoTextoVisitaCampo filtro = new FiltroArquivoTextoVisitaCampo();\r\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroArquivoTextoVisitaCampo.ID, idArquivoTextoVisitaCampo));\r\n\t\t\t\r\n\t\t\tCollection<ArquivoTextoVisitaCampo> colArquivoTexto = \r\n\t\t\t\t\tthis.getFachada().pesquisar(filtro, ArquivoTextoVisitaCampo.class.getName());\r\n\t\t\t\r\n\t\t\tArquivoTextoVisitaCampo arquivoTextoVisitaCampo = (ArquivoTextoVisitaCampo) Util.retonarObjetoDeColecao(colArquivoTexto);\r\n\t\t\t\r\n\t\t\tif(arquivoTextoVisitaCampo != null){\r\n\t\t\t\tSituacaoTransmissaoLeitura situacao = new SituacaoTransmissaoLeitura(SituacaoTransmissaoLeitura.EM_CAMPO);\r\n\t\t\t\tarquivoTextoVisitaCampo.setSituacaoTransmissaoLeitura(situacao);\r\n\t\t\t\tarquivoTextoVisitaCampo.setDataEnvioArquivo(new Date());\r\n\t\t\t\t\r\n\t\t\t\tthis.getFachada().atualizar(arquivoTextoVisitaCampo);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tout.write(RESPOSTA_OK);\r\n\t\t\tout.flush();\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"FIM: Atualizando a situacao do arquivo ID: \"+idArquivoTextoVisitaCampo);\r\n\t\t\t\r\n\t\t} catch(Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.out.println(\"ERROR: Ao atualizar situacao do arquivo em campo ID:\"+idArquivoTextoVisitaCampo);\r\n\t\t\tresponse.setContentLength(1);\r\n\t\t\t\r\n\t\t\tout.write(RESPOSTA_ERRO);\r\n\t\t\tout.flush();\r\n\t\t}\r\n\r\n\r\n\r\n\t}",
"private void PreencherFormulario(int acao) throws SQLException {\n \n Funcionario_id.setText(String.valueOf(acao)); \n obj_Funcionario = bd_Funcionario.getFuncionarioID(acao);\n campo_nome.setText(obj_Funcionario.getNome());\n campo_endereco.setText(obj_Funcionario.getEndereco());\n campo_bairro.setText(obj_Funcionario.getBairro());\n campo_estado.setText(obj_Funcionario.getUf());\n campo_cpf.setText(obj_Funcionario.getCpf());\n campo_idt.setText(obj_Funcionario.getIdt()); \n campo_login.setText(obj_Funcionario.getLogin());\n campo_senha.setText(obj_Funcionario.getSenha());\n campo_cidade.setText(obj_Funcionario.getCidade()); \n campo_numero.setText(obj_Funcionario.getNumero()); \n campo_cep.setText(String.valueOf((obj_Funcionario.getCep()==0)?\"\":obj_Funcionario.getCep()));\n campo_ddd.setText(String.valueOf((obj_Funcionario.getDdd()==0)?\"\":obj_Funcionario.getDdd()));\n campo_telefone.setText(String.valueOf((obj_Funcionario.getTelefone()==0)?\"\":obj_Funcionario.getTelefone()));\n \n Nivel_id.setText(String.valueOf(obj_Funcionario.getNivel().getNivel_id()));\n combo_nivel.setSelectedItem(obj_Funcionario.getNivel().getNome().toUpperCase());\n \n if(obj_Funcionario.getData_admissao()!=null){\n String strdata1 = new SimpleDateFormat(\"dd/MM/yyyy\").format(obj_Funcionario.getData_admissao());\n String vet1[] = strdata1.split(\"/\");\n campo_adm_dia.setText(vet1[0]);\n campo_adm_mes.setText(vet1[1]);\n campo_adm_ano.setText(vet1[2]);\n }\n /*\n if(!obj_Funcionario.getData_demissao().equals(\"0000-00-00\")){\n String strdata2 = new SimpleDateFormat(\"dd/MM/yyyy\").format(obj_Funcionario.getData_demissao());\n String vet2[] = strdata2.split(\"/\");\n campo_dm_dia.setText(vet2[0]);\n campo_dm_mes.setText(vet2[1]);\n campo_dm_ano.setText(vet2[2]);\n }\n * \n */ \n }",
"private void updateEstArrivalTimeCharacteristic() {\n String editTextValue = ((EditText) view.findViewById(R.id.estArrivalTimeEditText)).getText().toString();\n byte[] estArrivalTime = editTextValue.getBytes();\n\n //Check if the entered distance is too long or too short -> modify it\n if (estArrivalTime.length > 8) {\n estArrivalTime = Arrays.copyOfRange(estArrivalTime, 0, 7);\n }\n if (estArrivalTime.length < 8) {\n byte[] estArrivalTime_new = new byte[8];\n\n for (int i = 0; i < estArrivalTime.length; i++) {\n estArrivalTime_new[i] = estArrivalTime[i];\n }\n\n for (int i = estArrivalTime.length; i < 8; i++) {\n estArrivalTime_new[i] = 0;\n }\n\n estArrivalTime = estArrivalTime_new;\n }\n\n //Fill the characteristic array with the 8 bytes (from 17 to 24)\n int i1 = 0;\n for (int i2 = 17; i2 <= 24; i2++) {\n estArrivalTimeCharacteristic_value[i2] = estArrivalTime[i1];\n i1++;\n }\n\n //Set the visibility (byte 17) and set the value\n estArrivalTimeCharacteristic_value[16] = visibility;\n estArrivalTimeCharacteristic.setValue(estArrivalTimeCharacteristic_value);\n }",
"@Override\r\n\tpublic void funcionalidad(boolean aceptado) {\r\n\t\tif (aceptado) {\r\n\t\t\tbtn_guardar.removeAll();\r\n\t\t\tbtn_cancelar.removeAll();\r\n\t\t\tbtn_cancelar.setVisible(false);\r\n\t\t\tbtn_guardar.setVisible(false);\r\n\t\t\tbtnEliminar.setVisible(true);\r\n\t\t\tbutton_Editar.setVisible(true);\r\n\t\t\tbtnRetirar.setVisible(true);\r\n\t\t\tbtn_crear.setVisible(true);\r\n\r\n\t\t\tif (validarDatos()) {\r\n\t\t\t\t// Actualizar miOferta\r\n\t\t\t\tmiOferta.setDescripcion(txArea_descripcion.getText());\r\n\t\t\t\tmiOferta.setLugar(txField_lugar.getText());\r\n\t\t\t\tmiOferta.setExperiencia(Float.parseFloat(txField_experiencia.getText()));\r\n\t\t\t\tmiOferta.setContrato(((Contrato) combo_contrato.getSelectedItem()));\r\n\t\t\t\tmiOferta.setSalarioMax(Integer.parseInt(txField_sueldoMax.getText()));\r\n\t\t\t\tmiOferta.setSalarioMin(Integer.parseInt(txField_sueldoMin.getText()));\r\n\t\t\t\tmiOferta.setAspectosImprescindibles(txArea_aspectosImpres.getText());\r\n\t\t\t\tmiOferta.setAspectosAValorar(txArea_aspectosValorar.getText());\r\n\t\t\t\tmiOferta.setConocimientos(pa_conocimientos.getConocimientosAnadidos());\r\n\t\t\t}\r\n\r\n\t\t\ttry {\r\n\t\t\t\tUtilidadesBD.actualizarOferta(miOferta);\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void anulaAvaluo() {\r\n try {\r\n if (\"\".equals(mBRadicacion.Radi.getObservacionAnulaAvaluo())) {\r\n mbTodero.setMens(\"Falta informacion por Llenar\");\r\n mbTodero.warn();\r\n } else {\r\n int CodRad = mBRadicacion.Radi.getCodAvaluo();\r\n mBRadicacion.Radi.AnulaRadicacion(mBsesion.codigoMiSesion());\r\n mbTodero.setMens(\"El Avaluo N*: \" + CodRad + \" ha sido anulada\");\r\n mbTodero.info();\r\n mbTodero.resetTable(\"FRMSeguimiento:SeguimientoTable\");\r\n mbTodero.resetTable(\"FormMisAsignados:RadicadosSegTable\");\r\n RequestContext.getCurrentInstance().execute(\"PF('DLGAnuAvaluo').hide()\");\r\n ListSeguimiento = Seg.ConsulSeguimAvaluos(mBsesion.codigoMiSesion());//VARIABLES DE SESION\r\n }\r\n } catch (Exception e) {\r\n mbTodero.setMens(\"Error en el metodo '\" + this.getClass() + \".anulaAvaluo()' causado por: \" + e.getMessage());\r\n mbTodero.error();\r\n }\r\n }",
"public int actualizarTiempo(int empresa_id,int idtramite, int usuario_id) throws ParseException {\r\n\t\tint update = 0;\r\n\t\t\r\n\t\tDate date = new Date();\r\n\t\tSimpleDateFormat formateador = new SimpleDateFormat(\"yyyy-MM-dd hh:mm:ss\");\r\n\t\tString timeNow = formateador.format(date);\r\n\t\tSimpleDateFormat formateador2 = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n\t\tString fecha = formateador2.format(date);\r\n\t\tSimpleDateFormat formateador3 = new SimpleDateFormat(\"hh:mm:ss\");\r\n\t\tString hora = formateador3.format(date);\r\n\t\tSystem.out.println(timeNow +\" \"+ fecha+\" \"+hora );\r\n\t\t\r\n\t\t List<Map<String, Object>> rows = listatks(empresa_id, idtramite);\t\r\n\t\t System.out.println(rows);\r\n\t\t if(rows.size() > 0 ) {\r\n\t\t\t String timeCreate = rows.get(0).get(\"TIMECREATE_HEAD\").toString();\r\n\t\t\t System.out.println(\" timeCreate \" +timeCreate+\" timeNow: \"+ timeNow );\r\n\t\t\t Date fechaInicio = formateador.parse(timeCreate); // Date\r\n\t\t\t Date fechaFinalizo = formateador.parse(timeNow); //Date\r\n\t\t\t long horasFechas =(long)((fechaInicio.getTime()- fechaFinalizo.getTime())/3600000);\r\n\t\t\t System.out.println(\" horasFechas \"+ horasFechas);\r\n\t\t\t long diferenciaMils = fechaFinalizo.getTime() - fechaInicio.getTime();\r\n\t\t\t //obtenemos los segundos\r\n\t\t\t long segundos = diferenciaMils / 1000;\t\t\t \r\n\t\t\t //obtenemos las horas\r\n\t\t\t long horas = segundos / 3600;\t\t\t \r\n\t\t\t //restamos las horas para continuar con minutos\r\n\t\t\t segundos -= horas*3600;\t\t\t \r\n\t\t\t //igual que el paso anterior\r\n\t\t\t long minutos = segundos /60;\r\n\t\t\t segundos -= minutos*60;\t\t\t \r\n\t\t\t System.out.println(\" horas \"+ horas +\" min\"+ minutos+ \" seg \"+ segundos );\r\n\t\t\t double tiempoTotal = Double.parseDouble(horas+\".\"+minutos);\r\n\t\t\t // actualizar cabecera \r\n\t\t\t updateHeaderOut( idtramite, fecha, hora, tiempoTotal, usuario_id);\r\n\t\t\t for (Map<?, ?> row : rows) {\r\n\t\t\t\t Map<String, Object> mapa = new HashMap<String, Object>();\r\n\t\t\t\tint idd = Integer.parseInt(row.get(\"IDD\").toString());\r\n\t\t\t\tint idtramite_d = Integer.parseInt(row.get(\"IDTRAMITE\").toString());\r\n\t\t\t\tint cantidaMaletas = Integer.parseInt(row.get(\"CANTIDAD\").toString());\r\n\t\t\t\tdouble precio = Double.parseDouble(row.get(\"PRECIO\").toString());\t\t\t\t\r\n\t\t\t\tdouble subtotal = subtotal(precio, tiempoTotal, cantidaMaletas);\r\n\t\t\t\tString tipoDescuento = \"\";\r\n\t\t\t\tdouble porcDescuento = 0;\r\n\t\t\t\tdouble descuento = descuento(subtotal, porcDescuento);\r\n\t\t\t\tdouble precioNeto = precioNeto(subtotal, descuento);\r\n\t\t\t\tdouble iva = 0;\r\n\t\t\t\tdouble montoIVA = montoIVA(precioNeto, iva);\r\n\t\t\t\tdouble precioFinal = precioFinal(precioNeto, montoIVA);\r\n\t\t\t\t//actualizar detalle\r\n\t\t\t\tupdateBodyOut( idd, idtramite_d, tiempoTotal , subtotal, tipoDescuento, porcDescuento, descuento, precioNeto, iva, montoIVA, precioFinal );\r\n\t\t\t }\r\n\t\t\t \r\n\t\t }\r\n\t\treturn update;\r\n\t}",
"public void funcFinalizaAtd(){ \n \n \n AtendimentosDAO atd = new AtendimentosDAO();\n int codAtd = Integer.parseInt(txtCodAtd.getText());\n Atendimentos at = atd.PesquisaAtd(codAtd);\n at.setDescricao(txtDescricao.getText());\n atd.AlterarAtendimentoMtData(at);\n atd.AlterarStatus(codAtd, atd.retornaStatusID(\"Finalizado\"));\n inicializacao(1);\n }",
"private void dardebajaResponsables (Long oidPeriodo, int indUA) throws MareException {\n UtilidadesLog.info(\"DAOZON.dardebajaResponsables (Long oidPeriodo, int indUA): Entrada\");\n\n StringBuffer consulta = new StringBuffer();\n Vector parametros = new Vector();\n\n if(indUA == 1) { //para SGV\n consulta.append(\" UPDATE ZON_HISTO_GEREN \"); \n consulta.append(\" SET\t FEC_HAST = ? \"); \n consulta.append(\" WHERE OID_HIST_GERE IN \"); \n consulta.append(\" \t\t(SELECT OID_HIST_GERE FROM ZON_HISTO_GEREN \");\n consulta.append(\" \t\tWHERE (PAIS_OID_PAIS,MARC_OID_MARC, CANA_OID_CANA, UA) \");\n consulta.append(\" \t\tIN (SELECT ZON_SUB_GEREN_VENTA.PAIS_OID_PAIS, \");\n consulta.append(\" \t\t\t \t ZON_SUB_GEREN_VENTA.MARC_OID_MARC, \");\n consulta.append(\" \t\t \t ZON_SUB_GEREN_VENTA.CANA_OID_CANA, \"); \n consulta.append(\" \t\t\t ZON_SUB_GEREN_VENTA.COD_SUBG_VENT \");\n consulta.append(\" \t\t\tFROM ZON_SUB_GEREN_VENTA, MAE_CLIEN \");\n consulta.append(\" \t\t\tWHERE ZON_SUB_GEREN_VENTA.PERD_OID_PERI_FINA = ?) \");\n consulta.append(\" \t\tAND FEC_HAST IS NULL) \");\n } else if(indUA == 2) { //para Region\n consulta.append(\" UPDATE ZON_HISTO_GEREN \"); \n consulta.append(\" SET\t FEC_HAST = ? \"); \n consulta.append(\" WHERE OID_HIST_GERE IN \"); \n consulta.append(\" \t\t(SELECT OID_HIST_GERE FROM ZON_HISTO_GEREN \");\n consulta.append(\" \t\tWHERE (PAIS_OID_PAIS,MARC_OID_MARC, CANA_OID_CANA, UA) \");\n consulta.append(\" \t\tIN (SELECT ZON_REGIO.PAIS_OID_PAIS, \");\n consulta.append(\" \t\t \t ZON_REGIO.MARC_OID_MARC, \");\n consulta.append(\" \t\t \t ZON_REGIO.CANA_OID_CANA, \");\n consulta.append(\" \t\t \t ZON_SUB_GEREN_VENTA.COD_SUBG_VENT || ZON_REGIO.COD_REGI \");\n consulta.append(\" \t\t FROM ZON_SUB_GEREN_VENTA, ZON_REGIO \");\n consulta.append(\" \t \tWHERE ZON_REGIO.ZSGV_OID_SUBG_VENT = ZON_SUB_GEREN_VENTA.OID_SUBG_VENT \"); \n consulta.append(\" \t \t AND ZON_REGIO.PERD_OID_PERI_FINA = ?) \");\n consulta.append(\" \t\tAND FEC_HAST IS NULL) \"); \n } else if(indUA == 3) { //para Zona\n consulta.append(\" UPDATE ZON_HISTO_GEREN \"); \n consulta.append(\" SET\t FEC_HAST = ? \"); \n consulta.append(\" WHERE OID_HIST_GERE IN \"); \n consulta.append(\" \t\t(SELECT OID_HIST_GERE FROM ZON_HISTO_GEREN \");\n consulta.append(\" \t\tWHERE (PAIS_OID_PAIS,MARC_OID_MARC, CANA_OID_CANA, UA) \");\n consulta.append(\" \t\tIN (SELECT ZON_ZONA.PAIS_OID_PAIS, \");\n consulta.append(\" \t\t\t\t\t ZON_ZONA.MARC_OID_MARC, \");\n consulta.append(\" \t\t\t\t\t ZON_ZONA.CANA_OID_CANA, \");\n consulta.append(\" \t\t\t ZON_SUB_GEREN_VENTA.COD_SUBG_VENT \");\n consulta.append(\" \t\t\t || ZON_REGIO.COD_REGI \");\n consulta.append(\" \t\t\t || ZON_ZONA.COD_ZONA \"); \n consulta.append(\" \t\t\tFROM ZON_SUB_GEREN_VENTA, ZON_REGIO, ZON_ZONA \");\n consulta.append(\" \t\t\tWHERE ZON_REGIO.ZSGV_OID_SUBG_VENT = ZON_SUB_GEREN_VENTA.OID_SUBG_VENT \");\n consulta.append(\" \t\t\t AND ZON_ZONA.ZORG_OID_REGI = ZON_REGIO.OID_REGI \");\n consulta.append(\" \t\t\t AND ZON_ZONA.PERD_OID_PERI_FINA = ?) \"); \n consulta.append(\" \t\tAND FEC_HAST IS NULL) \"); \n } else if(indUA == 4) { //para Seccion\n consulta.append(\" UPDATE ZON_HISTO_GEREN \"); \n consulta.append(\" SET\t FEC_HAST = ? \"); \n consulta.append(\" WHERE OID_HIST_GERE IN \"); \n consulta.append(\" \t\t(SELECT OID_HIST_GERE FROM ZON_HISTO_GEREN \");\n consulta.append(\" \t\tWHERE (PAIS_OID_PAIS,MARC_OID_MARC, CANA_OID_CANA, UA) \");\n consulta.append(\" \t\tIN (SELECT ZON_ZONA.PAIS_OID_PAIS, \");\n consulta.append(\" \t\t\t\t\t ZON_ZONA.MARC_OID_MARC, \");\n consulta.append(\" \t\t\t\t\t ZON_ZONA.CANA_OID_CANA, \");\n consulta.append(\" \t\t\t ZON_SUB_GEREN_VENTA.COD_SUBG_VENT \");\n consulta.append(\" \t\t\t || ZON_REGIO.COD_REGI \");\n consulta.append(\" \t\t\t || ZON_ZONA.COD_ZONA \"); \n consulta.append(\" || ZON_SECCI.COD_SECC \");\n consulta.append(\" \t\t\tFROM ZON_SUB_GEREN_VENTA, ZON_REGIO, ZON_ZONA, ZON_SECCI \"); \n consulta.append(\" \t\t\tWHERE ZON_REGIO.ZSGV_OID_SUBG_VENT = ZON_SUB_GEREN_VENTA.OID_SUBG_VENT \");\n consulta.append(\" \t\t\t AND ZON_ZONA.ZORG_OID_REGI = ZON_REGIO.OID_REGI \");\n consulta.append(\" AND ZON_SECCI.ZZON_OID_ZONA = ZON_ZONA.OID_ZONA \"); \n consulta.append(\" \t\t\t AND ZON_SECCI.PERD_OID_PERI_FINA = ?) \"); \n consulta.append(\" \t\tAND FEC_HAST IS NULL) \"); \n }\n\n // Parametros de la consulta\n parametros.add(new Timestamp(new Date(System.currentTimeMillis()).getTime())); \n parametros.add(oidPeriodo);\n\n // Se ejecuta la consulta \n BelcorpService bs = UtilidadesEJB.getBelcorpService();\n\n try {\n bs.dbService.executePreparedUpdate(consulta.toString(), parametros);\n } catch (Exception e) {\n codigoError = CodigosError.ERROR_DE_ACCESO_A_BASE_DE_DATOS;\n throw new MareException(e, UtilidadesError.armarCodigoError(codigoError));\n }\n\n UtilidadesLog.info(\"DAOZON.dardebajaResponsables (Long oidPeriodo, int indUA): Salida\");\n }",
"private void inizia() throws Exception {\n /* variabili e costanti locali di lavoro */\n Campo campoDataInizio;\n Campo campoDataFine;\n Campo campoConto;\n Date dataIniziale;\n Date dataFinale;\n int numPersone;\n ContoModulo modConto;\n\n\n String titolo = \"Esecuzione addebiti fissi\";\n AddebitoFissoPannello pannello;\n Date dataInizio;\n Pannello panDate;\n Campo campoStato;\n Filtro filtro;\n int codConto;\n int codCamera;\n\n\n try { // prova ad eseguire il codice\n\n /* recupera dati generali */\n modConto = Albergo.Moduli.Conto();\n codConto = this.getCodConto();\n codCamera = modConto.query().valoreInt(Conto.Cam.camera.get(), codConto);\n numPersone = CameraModulo.getNumLetti(codCamera);\n\n /* crea il pannello servizi e vi registra la camera\n * per avere l'anteprima dei prezzi*/\n pannello = new AddebitoFissoPannello();\n this.setPanServizi(pannello);\n pannello.setNumPersone(numPersone);\n this.setTitolo(titolo);\n\n// /* regola date suggerite */\n// dataFinale = Progetto.getDataCorrente();\n// dataInizio = Lib.Data.add(dataFinale, -1);\n\n /* pannello date */\n campoDataInizio = CampoFactory.data(nomeDataIni);\n campoDataInizio.decora().obbligatorio();\n// campoDataInizio.setValore(dataInizio);\n\n campoDataFine = CampoFactory.data(nomeDataFine);\n campoDataFine.decora().obbligatorio();\n// campoDataFine.setValore(dataFinale);\n\n /* conto */\n campoConto = CampoFactory.comboLinkSel(nomeConto);\n campoConto.setNomeModuloLinkato(Conto.NOME_MODULO);\n campoConto.setLarScheda(180);\n campoConto.decora().obbligatorio();\n campoConto.decora().etichetta(\"conto da addebitare\");\n campoConto.setUsaNuovo(false);\n campoConto.setUsaModifica(false);\n\n /* inizializza e assegna il valore (se non inizializzo\n * il combo mi cambia il campo dati e il valore si perde)*/\n campoConto.inizializza();\n campoConto.setValore(this.getCodConto());\n\n /* filtro per vedere solo i conti aperti dell'azienda corrente */\n campoStato = modConto.getCampo(Conto.Cam.chiuso.get());\n filtro = FiltroFactory.crea(campoStato, false);\n filtro.add(modConto.getFiltroAzienda());\n campoConto.getCampoDB().setFiltroCorrente(filtro);\n\n panDate = PannelloFactory.orizzontale(this.getModulo());\n panDate.creaBordo(\"Periodo da addebitare\");\n panDate.add(campoDataInizio);\n panDate.add(campoDataFine);\n panDate.add(campoConto);\n\n this.addPannello(panDate);\n this.addPannello(this.getPanServizi());\n\n this.regolaCamera();\n\n /* recupera la data iniziale (oggi) */\n dataIniziale = AlbergoLib.getDataProgramma();\n\n /* recupera la data di partenza prevista dal conto */\n modConto = ContoModulo.get();\n dataFinale = modConto.query().valoreData(Conto.Cam.validoAl.get(),\n this.getCodConto());\n\n /* recupera il numero di persone dal conto */\n numPersone = modConto.query().valoreInt(Conto.Cam.numPersone.get(),\n this.getCodConto());\n\n /* regola date suggerite */\n campoDataInizio = this.getCampo(nomeDataIni);\n campoDataInizio.setValore(dataIniziale);\n\n campoDataFine = this.getCampo(nomeDataFine);\n campoDataFine.setValore(dataFinale);\n\n /* conto */\n campoConto = this.getCampo(nomeConto);\n campoConto.setAbilitato(false);\n\n /* regola la data iniziale di riferimento per l'anteprima dei prezzi */\n Date data = (Date)campoDataInizio.getValore();\n this.getPanServizi().setDataPrezzi(data);\n\n /* regola il numero di persone dal conto */\n this.getPanServizi().setNumPersone(numPersone);\n\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n }",
"public void atualizar() {\n System.out.println(\"Metodo atualizar chamado!\");\n setR1(0);\n setR2(0);\n setR3(0);\n setN(0);\n\n //context.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, \"Atualizado!\", \"\"));\n }",
"public int ModificarAnuncioTematico(AnuncioDTO anuncioDTO){\n int status=0;\n try{\n Connection conect = getConection();\n Properties sqlProp = new Properties();\n InputStream is = new FileInputStream(sqlPropertiesPath);\n sqlProp.load(is);\n PreparedStatement ps = conect.prepareStatement(sqlProp.getProperty(\"modificar.AnuncioTematico\"));\n ps.setString(1, anuncioDTO.getTitulo());\n ps.setString(2, anuncioDTO.getCuerpo());\n ps.setString(3, anuncioDTO.getEstadoAnuncio().toString()); \n String intereses=\"\"; \n \n for(String interes : anuncioDTO.getTemas()){\n intereses+=interes.toLowerCase()+\",\";\n }\n \n if(intereses.length()>0){\n \n intereses=intereses.substring(0,intereses.length()-1);\n }\n \n ps.setString(4, intereses);\n\n ps.setInt(5, anuncioDTO.getId());\n\n status=ps.executeUpdate();\n\n BorrarAnuncioDestinatarios(anuncioDTO.getId());\n\n PreparedStatement psAddDestinatario = conect.prepareStatement(sqlProp.getProperty(\"insertar.Destinatario\"));\n psAddDestinatario.setInt(1, anuncioDTO.getId());\n for(String destinatario : anuncioDTO.getDestinatarios()){\n psAddDestinatario.setString(2, destinatario);\n ps.executeUpdate();\n } \n\n }catch(Exception e){\n e.printStackTrace();\n }\n\n return status;\n }",
"@Override\n\tpublic void updateEncuestaConExito() {\n\n\t}",
"@Override\r\n\tpublic void atualizar(TituloEleitoral tituloVO) throws Exception {\n\t\t\r\n\t}",
"void actualizarNotaIngresoPorHacer(Integer codigoCompania, Long codigoNotaIngreso, String estadoPorHacer, String observacion, String codigoUsuario)throws SICException;",
"public void processActualizar() {\n }",
"public boolean actualizarInventario(List<Talla> tallas, List<String> bajas, String descripcion) {\r\n List<Integer> bajasInteger = new ArrayList<>();\r\n int bandera = 0;\r\n\r\n try {\r\n for (int i = 0; i < bajas.size(); i++) {\r\n int numero = Integer.parseInt(bajas.get(i));\r\n\r\n if (bandera == 0) {\r\n if (numero >= 1) {\r\n bandera = 1;\r\n }\r\n }\r\n\r\n if (numero < 0) {\r\n JOptionPane.showMessageDialog(null, \"No se pueden introducir numeros negativos.\");\r\n return false;\r\n }\r\n bajasInteger.add(new Integer(bajas.get(i)));\r\n \r\n if(tallas.get(i).getInventarioRegular() < Integer.parseInt(bajas.get(i))){\r\n JOptionPane.showMessageDialog(null, \"La cantidad a dar de baja no puede ser mayor a la cantidad que hay en el inventario\");\r\n return false;\r\n }\r\n }\r\n\r\n if (bandera == 0) {\r\n JOptionPane.showMessageDialog(null, \"No se selecciono que se diera de baja ningun producto, si no desea dar de baja ni un producto seleccione cancelar\");\r\n return false;\r\n }\r\n } catch (Exception e) {\r\n JOptionPane.showMessageDialog(null, \"Solamente se admiten numeros en los campos numericos.\");\r\n }\r\n\r\n try {\r\n IntAdmInventario inv = new FacAdmInventario();\r\n inv.bajaEnInventario(tallas, bajasInteger, descripcion);\r\n\r\n return true;\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n\r\n return false;\r\n }",
"private void actualizarEstado(){\n //--------------- Calcular tiempo transcurrido ---------------\n Date tiempoAnterior = tiempoActual;\n tiempoActual = new Date();\n double transcurridoAux = (tiempoActual.getTime() - tiempoAnterior.getTime());\n double transcurrido = transcurridoAux/1000.0;\n \n boolean puedeCrearTropas = false;\n boolean puedeRecogerRecursos = false;\n //--------------- Recorrer edificios ---------------\n for(Edificio e: aldea.edificios){\n \n // Actualizar minas y recolectores\n if(e.generadorRecursos() && e.estaHabilitado()){\n e.actualizarRecursos(transcurrido);\n puedeRecogerRecursos = true;\n if(e.tipo == vg.MINA){\n jTextFieldOroMina.setText(String.valueOf(e.cantidadRecurso));\n }\n else\n jTextFieldElixRec.setText(String.valueOf(e.cantidadRecurso));\n }\n \n // Verificar si hay un cuartel habilitado para poder crear tropas\n if(e.tipo == vg.CUARTEL && e.habilitado)\n puedeCrearTropas = true;\n \n }\n // Habilitar/deshabilitar boton crear tropas\n jButtonCrearTropa.setEnabled(puedeCrearTropas);\n \n // Habilitar/deshabilitar boton recoger recursos\n jButtonRecogerRecursos.setEnabled(puedeRecogerRecursos);\n \n // Verificar si hay constuctores libres para permitir la creacion de tropas\n if(aldea.constructoresLibres() > 0){\n jButtonCrearEdificio.setEnabled(true);\n jButtonMejorarEdificio.setEnabled(true);\n }\n else{\n jButtonCrearEdificio.setEnabled(false);\n jButtonMejorarEdificio.setEnabled(false);\n }\n \n //--------------- Revisar LEF ---------------\n // Recorrer en sentido inverso\n for(int i=LEF.size()-1;i>=0;i--){\n Date tiempoActual = new Date();\n // Si ocurre un evento\n if(tiempoActual.after(LEF.get(i).tiempo)){\n // Si el evento es culminar edificio\n if(LEF.get(i).tipo == vg.EV_CULMINAR_EDIF){\n culminarEdificio(aldea.edificios.get(LEF.get(i).id));\n LEF.remove(i); // Remover evento futuro de la lista\n }\n else if(LEF.get(i).tipo == vg.EV_CULMINAR_TROPA){\n boolean romperCiclo = false;\n // Recorrer edificio para buscar tropa en colaTropas\n for(Edificio e: aldea.edificios){\n // Buscar tropa\n for(Tropa t: e.colaTropas){\n if(t.id == LEF.get(i).id){\n culminarTropa(e, t); // En este evento se agrega la tropa a la aldea\n e.colaTropas.remove(t);// Remover tropa de colaTropas en edificio\n LEF.remove(i); // Remover evento futuro de la lista\n romperCiclo = true;\n break;\n }\n }\n if(romperCiclo)\n break;\n }\n }\n }\n }\n }",
"public String savePromotionCustAtt() throws Exception {\n\t\tactionStartTime = new Date();\n\t\tresetToken(result);\n\t\tboolean error = true;\n\t\tList<PromotionCustAttUpdateVO> listPromotionCustAttUpdateVO = new ArrayList<PromotionCustAttUpdateVO>();\n\t\ttry {\n\t\t\tPromotionProgram promotionProgram = promotionProgramMgr.getPromotionProgramById(promotionId);\n\t\t\tif (promotionProgram == null) {\n\t\t\t\tresult.put(ERROR, error);\n\t\t\t\tresult.put(\"errMsg\", Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"system.error\"));//Loi ko dung id promotionProgram\n\t\t\t\treturn JSON;\n\t\t\t}\n\t\t\tif (lstId != null && lstId.size() > 0 && lstAttDataInField != null && lstAttDataInField.size() > 0) {\n\t\t\t\tLong attributeI;\n\t\t\t\tPromotionCustAttr promotionCustAttr;\n\t\t\t\tPromotionCustAttr pca;\n\t\t\t\tCustomerAttribute attribute;\n\t\t\t\tString dataI;\n\t\t\t\tAttributeColumnType attColType;\n\t\t\t\tPromotionCustAttUpdateVO promotionCustAttUpdateVO;\n\t\t\t\tfor (int i = 0, sz = lstId.size(); i < sz; i++) {\n\t\t\t\t\tif (lstId.get(i) != null && lstId.get(i).equals(-2l)) {//-2 la customerType\n\t\t\t\t\t\tlstCustomerType = checkLstCustomerType(lstCustomerType);\n\t\t\t\t\t\tif (lstCustomerType != null && lstCustomerType.size() > 0) {\n\t\t\t\t\t\t\tpca = promotionProgramMgr.getPromotionCustAttrByPromotion(promotionId, 2, null);\n\t\t\t\t\t\t\tif (pca != null) {\n\t\t\t\t\t\t\t\tpromotionCustAttr = pca;\n\t\t\t\t\t\t\t\tpromotionCustAttr.setUpdateUser(currentUser.getUserName());\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tpromotionCustAttr = new PromotionCustAttr();\n\t\t\t\t\t\t\t\tpromotionCustAttr.setCreateUser(currentUser.getUserName());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tpromotionCustAttr.setPromotionProgram(promotionProgram);\n\t\t\t\t\t\t\tpromotionCustAttr.setObjectType(2);\n\t\t\t\t\t\t\tpromotionCustAttr.setSeq(i);//set seq theo chi so trong List.\n\t\t\t\t\t\t\tList<PromotionCustAttrDetail> listPromotionCustAttrDetail = new ArrayList<PromotionCustAttrDetail>();\n\t\t\t\t\t\t\tif (pca != null && pca.getId() != null) {\n\t\t\t\t\t\t\t\tPromotionCustAttrDetail tmpPCAD;\n\t\t\t\t\t\t\t\tLong promotionCustAttrId = pca.getId();\n\t\t\t\t\t\t\t\tfor (Long chanelTypeId : lstCustomerType) {\n\t\t\t\t\t\t\t\t\tPromotionCustAttrDetail promotionCustAttrDetail = new PromotionCustAttrDetail();\n\t\t\t\t\t\t\t\t\tpromotionCustAttrDetail.setObjectType(2);\n\t\t\t\t\t\t\t\t\tpromotionCustAttrDetail.setObjectId(chanelTypeId);\n\t\t\t\t\t\t\t\t\ttmpPCAD = promotionProgramMgr.getPromotionCustAttrDetail(promotionCustAttrId, 2L, chanelTypeId);\n\t\t\t\t\t\t\t\t\tif (tmpPCAD != null) {\n\t\t\t\t\t\t\t\t\t\tpromotionCustAttrDetail.setCreateUser(tmpPCAD.getCreateUser());\n\t\t\t\t\t\t\t\t\t\tpromotionCustAttrDetail.setUpdateUser(currentUser.getUserName());\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tpromotionCustAttrDetail.setCreateUser(currentUser.getUserName());\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//\t\t\t\t\t\t\t\t\ttmpPCAD = null;\n\t\t\t\t\t\t\t\t\tlistPromotionCustAttrDetail.add(promotionCustAttrDetail);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tfor (Long chanelTypeId : lstCustomerType) {\n\t\t\t\t\t\t\t\t\tPromotionCustAttrDetail promotionCustAttrDetail = new PromotionCustAttrDetail();\n\t\t\t\t\t\t\t\t\tpromotionCustAttrDetail.setObjectType(2);\n\t\t\t\t\t\t\t\t\tpromotionCustAttrDetail.setObjectId(chanelTypeId);\n\t\t\t\t\t\t\t\t\tpromotionCustAttrDetail.setCreateUser(currentUser.getUserName());\n\t\t\t\t\t\t\t\t\tlistPromotionCustAttrDetail.add(promotionCustAttrDetail);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tpromotionCustAttUpdateVO = new PromotionCustAttUpdateVO();\n\t\t\t\t\t\t\tpromotionCustAttUpdateVO.setPromotionCustAttr(promotionCustAttr);\n\t\t\t\t\t\t\tpromotionCustAttUpdateVO.setLstPromotionCustAttrDetail(listPromotionCustAttrDetail);\n\t\t\t\t\t\t\tlistPromotionCustAttUpdateVO.add(promotionCustAttUpdateVO);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (lstId.get(i) != null && lstId.get(i).equals(-3l)) {//-3 la saleLevel\n\t\t\t\t\t\tif (lstSaleLevelCatId != null && lstSaleLevelCatId.size() > 0) {\n\t\t\t\t\t\t\tpca = promotionProgramMgr.getPromotionCustAttrByPromotion(promotionId, 3, null);\n\t\t\t\t\t\t\tif (pca != null) {\n\t\t\t\t\t\t\t\tpromotionCustAttr = pca;\n\t\t\t\t\t\t\t\tpromotionCustAttr.setUpdateUser(currentUser.getUserName());\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tpromotionCustAttr = new PromotionCustAttr();\n\t\t\t\t\t\t\t\tpromotionCustAttr.setCreateUser(currentUser.getUserName());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tpromotionCustAttr.setPromotionProgram(promotionProgram);\n\t\t\t\t\t\t\tpromotionCustAttr.setObjectType(3);\n\t\t\t\t\t\t\tpromotionCustAttr.setSeq(i);//set seq de load len cho dung thu tu\n\t\t\t\t\t\t\tList<PromotionCustAttrDetail> listPromotionCustAttrDetail = new ArrayList<PromotionCustAttrDetail>();\n\t\t\t\t\t\t\tif (pca != null && pca.getId() != null) {\n\t\t\t\t\t\t\t\tPromotionCustAttrDetail tmpPCAD;\n\t\t\t\t\t\t\t\tLong promotionCustAttrId = pca.getId();\n\t\t\t\t\t\t\t\tfor (Long saleLevelCatId : lstSaleLevelCatId) {\n\t\t\t\t\t\t\t\t\tif (saleLevelCatId > -1L) {\n\t\t\t\t\t\t\t\t\t\tPromotionCustAttrDetail promotionCustAttrDetail = new PromotionCustAttrDetail();\n\t\t\t\t\t\t\t\t\t\tpromotionCustAttrDetail.setObjectType(3);\n\t\t\t\t\t\t\t\t\t\tpromotionCustAttrDetail.setObjectId(saleLevelCatId);\n\t\t\t\t\t\t\t\t\t\ttmpPCAD = promotionProgramMgr.getPromotionCustAttrDetail(promotionCustAttrId, 3L, saleLevelCatId);\n\t\t\t\t\t\t\t\t\t\tif (tmpPCAD != null) {\n\t\t\t\t\t\t\t\t\t\t\tpromotionCustAttrDetail.setCreateUser(tmpPCAD.getCreateUser());\n\t\t\t\t\t\t\t\t\t\t\tpromotionCustAttrDetail.setUpdateUser(currentUser.getUserName());\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tpromotionCustAttrDetail.setCreateUser(currentUser.getUserName());\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t//\t\t\t\t\t\t\t\t\t\ttmpPCAD = null;\n\t\t\t\t\t\t\t\t\t\tlistPromotionCustAttrDetail.add(promotionCustAttrDetail);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tfor (Long saleLevelCatId : lstSaleLevelCatId) {\n\t\t\t\t\t\t\t\t\tif (saleLevelCatId > -1L) {\n\t\t\t\t\t\t\t\t\t\tPromotionCustAttrDetail promotionCustAttrDetail = new PromotionCustAttrDetail();\n\t\t\t\t\t\t\t\t\t\tpromotionCustAttrDetail.setObjectType(3);\n\t\t\t\t\t\t\t\t\t\tpromotionCustAttrDetail.setObjectId(saleLevelCatId);\n\t\t\t\t\t\t\t\t\t\tpromotionCustAttrDetail.setCreateUser(currentUser.getUserName());\n\t\t\t\t\t\t\t\t\t\tlistPromotionCustAttrDetail.add(promotionCustAttrDetail);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tpromotionCustAttUpdateVO = new PromotionCustAttUpdateVO();\n\t\t\t\t\t\t\tpromotionCustAttUpdateVO.setPromotionCustAttr(promotionCustAttr);\n\t\t\t\t\t\t\tpromotionCustAttUpdateVO.setLstPromotionCustAttrDetail(listPromotionCustAttrDetail);\n\t\t\t\t\t\t\tlistPromotionCustAttUpdateVO.add(promotionCustAttUpdateVO);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tattributeI = lstId.get(i);\n\t\t\t\t\t\tattribute = customerAttributeMgr.getCustomerAttributeById(attributeI);\n\t\t\t\t\t\t//set vao entity:\n\t\t\t\t\t\tpca = promotionProgramMgr.getPromotionCustAttrByPromotion(promotionId, 1, attributeI);\n\t\t\t\t\t\tif (pca != null) {\n\t\t\t\t\t\t\tpromotionCustAttr = pca;\n\t\t\t\t\t\t\tpromotionCustAttr.setUpdateUser(currentUser.getUserName());\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tpromotionCustAttr = new PromotionCustAttr();\n\t\t\t\t\t\t\tpromotionCustAttr.setCreateUser(currentUser.getUserName());\n\t\t\t\t\t\t}\n\t\t\t\t\t\tpromotionCustAttr.setPromotionProgram(promotionProgram);\n\t\t\t\t\t\tpromotionCustAttr.setObjectType(1);\n\t\t\t\t\t\tpromotionCustAttr.setObjectId(attribute.getId());\n\t\t\t\t\t\tpromotionCustAttr.setSeq(i);\n\t\t\t\t\t\t//\n\t\t\t\t\t\tdataI = lstAttDataInField.get(i);\n\t\t\t\t\t\tattColType = attribute.getValueType();\n\t\t\t\t\t\tif (attColType == AttributeColumnType.CHARACTER) {\n\t\t\t\t\t\t\tpromotionCustAttr.setFromValue(dataI);\n\t\t\t\t\t\t\t// set vao VO to save:\n\t\t\t\t\t\t\tpromotionCustAttUpdateVO = new PromotionCustAttUpdateVO();\n\t\t\t\t\t\t\tpromotionCustAttUpdateVO.setPromotionCustAttr(promotionCustAttr);\n\t\t\t\t\t\t\tpromotionCustAttUpdateVO.setLstPromotionCustAttrDetail(null);\n\t\t\t\t\t\t\tlistPromotionCustAttUpdateVO.add(promotionCustAttUpdateVO);\n\t\t\t\t\t\t} else if (attColType == AttributeColumnType.NUMBER) {\n\t\t\t\t\t\t\t//\t\t\t\t\t\t\tif (arr != null && arr.length == 2) {\n\t\t\t\t\t\t\t//\t\t\t\t\t\t\t\tpromotionCustAttr.setFromValue(arr[0]);\n\t\t\t\t\t\t\t//\t\t\t\t\t\t\t\tpromotionCustAttr.setToValue(arr[1]);\n\t\t\t\t\t\t\t//\t\t\t\t\t\t }\n\t\t\t\t\t\t\tString[] arr = dataI.split(\",\");\n\t\t\t\t\t\t\tif (arr != null) {\n\t\t\t\t\t\t\t\tif (arr.length == 2) {\n\t\t\t\t\t\t\t\t\tpromotionCustAttr.setFromValue(arr[0]);\n\t\t\t\t\t\t\t\t\tpromotionCustAttr.setToValue(arr[1]);\n\t\t\t\t\t\t\t\t} else if (arr.length == 1) {\n\t\t\t\t\t\t\t\t\tpromotionCustAttr.setFromValue(arr[0]);\n\t\t\t\t\t\t\t\t\tpromotionCustAttr.setToValue(\"\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// set vao VO to save:\n\t\t\t\t\t\t\tpromotionCustAttUpdateVO = new PromotionCustAttUpdateVO();\n\t\t\t\t\t\t\tpromotionCustAttUpdateVO.setPromotionCustAttr(promotionCustAttr);\n\t\t\t\t\t\t\tpromotionCustAttUpdateVO.setLstPromotionCustAttrDetail(null);\n\t\t\t\t\t\t\tlistPromotionCustAttUpdateVO.add(promotionCustAttUpdateVO);\n\n\t\t\t\t\t\t} else if (attColType == AttributeColumnType.DATE_TIME) {\n\t\t\t\t\t\t\tString[] arr = dataI.split(\",\");\n\t\t\t\t\t\t\tif (arr != null) {\n\t\t\t\t\t\t\t\tif (arr.length == 2) {\n\t\t\t\t\t\t\t\t\tString fromValueTmp = DateUtil.convertFormatAttFromStr(arr[0]);\n\t\t\t\t\t\t\t\t\tString toValueTmp = DateUtil.convertFormatAttFromStr(arr[1]);\n\t\t\t\t\t\t\t\t\tpromotionCustAttr.setFromValue(fromValueTmp);\n\t\t\t\t\t\t\t\t\tpromotionCustAttr.setToValue(toValueTmp);\n\t\t\t\t\t\t\t\t} else if (arr.length == 1) {\n\t\t\t\t\t\t\t\t\tString fromValueTmp = DateUtil.convertFormatAttFromStr(arr[0]);\n\t\t\t\t\t\t\t\t\tpromotionCustAttr.setFromValue(fromValueTmp);\n\t\t\t\t\t\t\t\t\tpromotionCustAttr.setToValue(\"\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// set vao VO to save:\n\t\t\t\t\t\t\tpromotionCustAttUpdateVO = new PromotionCustAttUpdateVO();\n\t\t\t\t\t\t\tpromotionCustAttUpdateVO.setPromotionCustAttr(promotionCustAttr);\n\t\t\t\t\t\t\tpromotionCustAttUpdateVO.setLstPromotionCustAttrDetail(null);\n\t\t\t\t\t\t\tlistPromotionCustAttUpdateVO.add(promotionCustAttUpdateVO);\n\t\t\t\t\t\t} else if (attColType == AttributeColumnType.CHOICE || attColType == AttributeColumnType.MULTI_CHOICE) {\n\t\t\t\t\t\t\tList<PromotionCustAttrDetail> listPromotionCustAttrDetail = new ArrayList<PromotionCustAttrDetail>();\n\t\t\t\t\t\t\tString[] arr = dataI.split(\",\");\n\t\t\t\t\t\t\tif (pca != null && pca.getId() != null) {\n\t\t\t\t\t\t\t\tPromotionCustAttrDetail tmpPCAD;\n\t\t\t\t\t\t\t\tLong promotionCustAttrId = pca.getId();\n\t\t\t\t\t\t\t\tif (arr != null && arr.length > 0) {\n\t\t\t\t\t\t\t\t\tfor (int k = 0, szk = arr.length; k < szk; k++) {\n\t\t\t\t\t\t\t\t\t\tPromotionCustAttrDetail promotionCustAttrDetail = new PromotionCustAttrDetail();\n\t\t\t\t\t\t\t\t\t\tpromotionCustAttrDetail.setObjectType(1);\n\t\t\t\t\t\t\t\t\t\tpromotionCustAttrDetail.setObjectId(Long.valueOf(arr[k]));\n\t\t\t\t\t\t\t\t\t\ttmpPCAD = promotionProgramMgr.getPromotionCustAttrDetail(promotionCustAttrId, 1L, Long.valueOf(arr[k]));\n\t\t\t\t\t\t\t\t\t\tif (tmpPCAD != null) {\n\t\t\t\t\t\t\t\t\t\t\tpromotionCustAttrDetail.setCreateUser(tmpPCAD.getCreateUser());\n\t\t\t\t\t\t\t\t\t\t\tpromotionCustAttrDetail.setUpdateUser(currentUser.getUserName());\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tpromotionCustAttrDetail.setCreateUser(currentUser.getUserName());\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t//\t\t\t\t\t\t\t\t\t\ttmpPCAD = null;\n\t\t\t\t\t\t\t\t\t\tlistPromotionCustAttrDetail.add(promotionCustAttrDetail);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tif (arr != null && arr.length > 0) {\n\t\t\t\t\t\t\t\t\tfor (int k = 0, szk = arr.length; k < szk; k++) {\n\t\t\t\t\t\t\t\t\t\tPromotionCustAttrDetail promotionCustAttrDetail = new PromotionCustAttrDetail();\n\t\t\t\t\t\t\t\t\t\tpromotionCustAttrDetail.setObjectType(1);\n\t\t\t\t\t\t\t\t\t\tpromotionCustAttrDetail.setObjectId(Long.valueOf(arr[k]));\n\t\t\t\t\t\t\t\t\t\tpromotionCustAttrDetail.setCreateUser(currentUser.getUserName());\n\t\t\t\t\t\t\t\t\t\tlistPromotionCustAttrDetail.add(promotionCustAttrDetail);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tpromotionCustAttUpdateVO = new PromotionCustAttUpdateVO();\n\t\t\t\t\t\t\tpromotionCustAttUpdateVO.setPromotionCustAttr(promotionCustAttr);\n\t\t\t\t\t\t\tpromotionCustAttUpdateVO.setLstPromotionCustAttrDetail(listPromotionCustAttrDetail);\n\t\t\t\t\t\t\tlistPromotionCustAttUpdateVO.add(promotionCustAttUpdateVO);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tpromotionProgramMgr.createOrUpdatePromotionCustAttVO(promotionId, listPromotionCustAttUpdateVO, getLogInfoVO());\n\t\t\tresult.put(ERROR, false);\n\t\t} catch (Exception ex) {\n\t\t\tLogUtility.logErrorStandard(ex, R.getResource(\"web.log.message.error\", \"vnm.web.action.program.PromotionCatalogAction.savePromotionCustAtt\"), createLogErrorStandard(actionStartTime));\n\t\t\tresult.put(\"errMsg\", ValidateUtil.getErrorMsg(ConstantManager.ERR_SYSTEM));\n\t\t\tresult.put(ERROR, true);\n\t\t}\n\t\treturn JSON;\n\t}",
"public void beforeEdit(Librerias.ZafTblUti.ZafTblEvt.ZafTableEvent evt) {\n// strEstCncDia=tblDat.getValueAt(tblDat.getSelectedRow(), INT_TBL_DAT_EST_CON)==null?\"\":tblDat.getValueAt(tblDat.getSelectedRow(), INT_TBL_DAT_EST_CON).toString();\n// if(strEstCncDia.equals(\"S\")){\n// mostrarMsgInf(\"<HTML>La cuenta ya fue conciliada.<BR>Desconcilie la cuenta en el documento a modificar y vuelva a intentarlo.</HTML>\");\n//// fireAsiDiaListener(new ZafAsiDiaEvent(this), INT_BEF_EDI_CEL);\n// objTblCelEdiTxtVcoCta.setCancelarEdicion(true);\n// }\n// else if(strEstCncDia.equals(\"B\")){\n// mostrarMsgInf(\"<HTML>No se puede cambiar el valor de la cuenta<BR>Este valor proviene de la transferencia ingresada.</HTML>\");\n// objTblCelEdiTxtVcoCta.setCancelarEdicion(true);\n// }\n// else{\n// //Permitir de manera predeterminada la operaci�n.\n// blnCanOpe=false;\n// //Generar evento \"beforeEditarCelda()\".\n// fireAsiDiaListener(new ZafAsiDiaEvent(this), INT_BEF_EDI_CEL);\n// //Permitir/Cancelar la edici�n de acuerdo a \"cancelarOperacion\".\n// if (blnCanOpe)\n// {\n// objTblCelEdiTxtVcoCta.setCancelarEdicion(true);\n// }\n// }\n }",
"private void actualizaUsuario() {\n\t\t\n\t\tInteger edad=miCoordinador.validarEdad(campoEdad.getText().trim());\n\t\t\n\t\tif (edad!=null) {\n\t\t\t\n\t\t\tUsuarioVo miUsuarioVo=new UsuarioVo();\n\t\t\t//se asigna cada dato... el metodo trim() del final, permite eliminar espacios al inicio y al final, en caso de que se ingresen datos con espacio\n\t\t\tmiUsuarioVo.setDocumento(campoDocumento.getText().trim());\n\t\t\tmiUsuarioVo.setNombre(campoNombre.getText().trim());\n\t\t\tmiUsuarioVo.setEdad(Integer.parseInt(campoEdad.getText().trim()));\n\t\t\tmiUsuarioVo.setProfesion(campoProfesion.getText().trim());\n\t\t\tmiUsuarioVo.setTelefono(campoTelefono.getText().trim());\n\t\t\tmiUsuarioVo.setDireccion(campoDireccion.getText().trim());\n\t\t\t\n\t\t\tString actualiza=\"\";\n\t\t\t//se llama al metodo validarCampos(), este retorna true o false, dependiendo de eso ingresa a una de las opciones\n\t\t\tif (miCoordinador.validarCampos(miUsuarioVo)) {\n\t\t\t\t//si se retornó true es porque todo está correcto y se llama a actualizar\n\t\t\t\tactualiza=miCoordinador.actualizaUsuario(miUsuarioVo);//en registro se almacena ok o error, dependiendo de lo que retorne el metodo\n\t\t\t}else{\n\t\t\t\tactualiza=\"mas_datos\";//si validarCampos() retorna false, entonces se guarda la palabra mas_datos para indicar que hace falta diligenciar los campos obligatorios\n\t\t\t}\n\t\t\t\n\t\t\t//si el registro es exitoso muestra un mensaje en pantalla, sino, se valida si necesita mas datos o hay algun error\n\t\t\tif (actualiza.equals(\"ok\")) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \" Se ha Modificado Correctamente \",\"Confirmación\",JOptionPane.INFORMATION_MESSAGE);\t\t\t\n\t\t\t}else{\n\t\t\t\tif (actualiza.equals(\"mas_datos\")) {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Debe Ingresar los campos obligatorios\",\"Faltan Datos\",JOptionPane.WARNING_MESSAGE);\t\t\t\n\t\t\t\t}else{\n\t\t JOptionPane.showMessageDialog(null, \"Error al Modificar\",\"Error\",JOptionPane.ERROR_MESSAGE);\n\t\t\t\t}\n\t\t\t}\t\t\t\t\t\n\t\t\t\n\t\t}else{\n\t\t\tJOptionPane.showMessageDialog(null, \"Debe ingresar una edad Valida!!!\",\"Advertencia\",JOptionPane.ERROR_MESSAGE);\n\t\t}\n\n\t\t\t\t\n\t}",
"public void atualizar(Funcionario funcionario) throws Exception {\n\t\topenDatabase();\n\t\tSQL = \"UPDATE tb_funcionario SET nome=?, email=?, tel=? \"\n\t\t\t+ \"WHERE idfuncionario=?\";\n\t\tps = con.prepareStatement(SQL);\n\t\tps.setString(1, funcionario.getNome());\n\t\tps.setString(2, funcionario.getEmail());\n\t\tps.setString(3, funcionario.getTelefone());\n\t\tps.setInt(4, funcionario.getId());\n\t\tps.execute();\n\t\tcloseDatabase();\n\t}",
"private void updateALUTableTomasulo() {\n\t\t// Get a copy of the memory stations\n\t\tALUStation[] temp_alu = alu_rsTomasulo;\n\n\t\t// Update the table with current values for the stations\n\t\tfor (int i = 0; i < temp_alu.length; i++) {\n\t\t\t// generate a meaningfull representation of busy\n\t\t\tString busy_desc = (temp_alu[i].isBusy() ? \"Yes\" : \"No\");\n\n\t\t\tReservationStationModelTomasulo\n\t\t\t\t\t.setValueAt(((temp_alu[i].isReady() && temp_alu[i].isBusy()) ? temp_alu[i].getCycle() : \"0\"), i, 0);\n\n\t\t\tReservationStationModelTomasulo.setValueAt(temp_alu[i].getName(), i, 1);\n\t\t\tReservationStationModelTomasulo.setValueAt(busy_desc, i, 2);\n\t\t\tReservationStationModelTomasulo.setValueAt(((temp_alu[i].isBusy()) ? temp_alu[i].getOperation() : \" \"), i,\n\t\t\t\t\t3);\n\t\t\tReservationStationModelTomasulo.setValueAt(temp_alu[i].getVj(), i, 4);\n\t\t\tReservationStationModelTomasulo.setValueAt(temp_alu[i].getVk(), i, 5);\n\t\t\tReservationStationModelTomasulo.setValueAt(temp_alu[i].getQj(), i, 6);\n\t\t\tReservationStationModelTomasulo.setValueAt(temp_alu[i].getQk(), i, 7);\n\t\t}\n\t}",
"public void actualizarActividad (Actividad act) {\r\n String query = \"UPDATE actividad SET identificacion_navegate = \\\"\" + act.getIdentificacionNavegante() \r\n + \"\\\", numero_matricula = \\\"\" + act.getNumeroMatricula() \r\n + \"\\\", fecha = \\\"\" + act.getFecha() \r\n + \"\\\", hora = \\\"\" + act.getHora() \r\n + \"\\\", destino = \\\"\" + act.getDestino() \r\n + \"\\\" WHERE id_salida = \\\"\" + act.getIdentificacionSalida() + \"\\\"\";\r\n try {\r\n Statement st = con.createStatement();\r\n st.executeUpdate(query);\r\n st.close();\r\n JOptionPane.showMessageDialog(null, \"Actividad actualizada\", \"Operación exitosa\", JOptionPane.INFORMATION_MESSAGE);\r\n } catch (SQLException ex) {\r\n Logger.getLogger(PActividad.class.getName()).log(Level.SEVERE, null, ex);\r\n } \r\n }",
"void actualizarAsistencia(Asistencia asistencia);",
"private void atualizarTela() {\n\t\tSystem.out.println(\"\\n*** Refresh da Pagina / Consultando Todos os Registro da Tabela PressaoArterial\\n\");\n\t\tpressaoArterial = new PressaoArterial();\n\t\tlistaPressaoArterial = pressaoArterialService.buscarTodos();\n\n\t}",
"public void atualizaAltaObitoProcessaAlta(\r\n\t\t\tfinal AinTiposAltaMedica tipoAltaMedica, final AipPacientes paciente,\r\n\t\t\tfinal Date dataAltaMedica, String nomeMicrocomputador, final Date dataFimVinculoServidor) throws ApplicationBusinessException {\r\n\t\tfinal String codTipoAltaMedica = tipoAltaMedica == null ? null\r\n\t\t\t\t: tipoAltaMedica.getCodigo();\r\n\t\tif (Objects.equals(codTipoAltaMedica, getCodTipoAltaObito())\r\n\t\t\t\t|| Objects.equals(codTipoAltaMedica,\r\n\t\t\t\t\t\tgetCodTipoAltaObitoMais48h())) {\r\n\t\t\tpaciente.setDtObito(dataAltaMedica);\r\n\t\t\tthis.getCadastroPacienteFacade().atualizarPacienteParcial(paciente, nomeMicrocomputador, dataFimVinculoServidor);\r\n\t\t}\r\n\t}",
"@PostMapping(value = \"/updateSoftwareFilter\")\n\tpublic @ResponseBody ResultVO updateSoftwareFilter(HttpServletRequest req) {\n\n\t\tString objId = StringUtils.defaultString(req.getParameter(\"objId\"));\n\t\tString objName = StringUtils.defaultString(req.getParameter(\"objName\"));\n\t\tString objComment = StringUtils.defaultString(req.getParameter(\"objComment\"));\n\n\t\tString[] swList = req.getParameterValues(\"swList[]\");\n\n\t\tResultVO resultVO = new ResultVO();\n\n\t\ttry {\n\n\t\t\t// read before data.\n\t\t\t// ResultVO oldData = ctrlMstService.readCtrlItem(objId);\n\n\t\t\tCtrlItemVO itemVo = new CtrlItemVO();\n\t\t\titemVo.setObjId(objId);\n\t\t\titemVo.setObjNm(objName);\n\t\t\titemVo.setMngObjTp(GPMSConstants.CTRL_ITEM_SWFILTER_RULE);\n\t\t\titemVo.setComment(objComment);\n\t\t\titemVo.setModUserId(LoginInfoHelper.getUserId());\n\n\t\t\tArrayList<CtrlPropVO> propList = new ArrayList<CtrlPropVO>();\n\t\t\tint propSeq = 1;\n\t\t\tif (swList != null && swList.length > 0) {\n\t\t\t\tfor (String sw : swList) {\n\t\t\t\t\tpropList.add(new CtrlPropVO(\"\", String.valueOf(propSeq++), GPMSConstants.CTRL_ITEM_FILTEREDSOFTWARE,\n\t\t\t\t\t\t\tsw, \"\", LoginInfoHelper.getUserId()));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tCtrlPropVO[] props = new CtrlPropVO[propList.size()];\n\t\t\tprops = propList.toArray(props);\n\n\t\t\tStatusVO status = ctrlMstService.updateCtrlItem(itemVo, props);\n\t\t\tresultVO.setStatus(status);\n\n\t\t\tif (GPMSConstants.MSG_SUCCESS.equals(status.getResult())) {\n\t\t\t\t// 이전값과 비교 할지????\n\t\t\t\tjobMaker.createJobForUserConf(objId, GPMSConstants.JOB_FILTEREDSOFTWARE_RULE_CHANGE,\n\t\t\t\t\t\tGPMSConstants.TYPE_FILTEREDSOFTWARE);\n\t\t\t}\n\n\t\t} catch (Exception ex) {\n\t\t\tlogger.error(\"error in updateSecurityRule : {}, {}, {}\", GPMSConstants.CODE_SYSERROR,\n\t\t\t\t\tMessageSourceHelper.getMessage(GPMSConstants.MSG_SYSERROR), ex.toString());\n\t\t\tif (resultVO != null) {\n\t\t\t\tresultVO.setStatus(new StatusVO(GPMSConstants.MSG_FAIL, GPMSConstants.CODE_SYSERROR,\n\t\t\t\t\t\tMessageSourceHelper.getMessage(GPMSConstants.MSG_SYSERROR)));\n\t\t\t}\n\t\t}\n\n\t\treturn resultVO;\n\t}",
"private boolean puedeModificarAprRepOtroUsuario(String empresa, String local, String tipoDocumento, String codigoDocumento, String codigoVistoBueno, boolean checkSeleccionado, int fila, int columna){\n boolean blnRes=false;\n String strArlVisBueDbCodEmp=\"\", strArlVisBueDbCodLoc=\"\", strArlVisBueDbCodTipDoc=\"\", strArlVisBueDbCodDoc=\"\";\n String strArlVisBueDbCodVisBue=\"\", strArlVisBueDbEstVisBue=\"\", strArlVisBueDbCodUsr=\"\";\n String strTblVisBueDbCodEmp=empresa;\n String strTblVisBueDbCodLoc=local;\n String strTblVisBueDbCodTipDoc=tipoDocumento;\n String strTblVisBueDbCodDoc=codigoDocumento;\n String strTblVisBueDbCodVisBue=codigoVistoBueno;\n boolean blnChkSel=checkSeleccionado;\n int intFil=fila;\n int intCol=columna;\n int w=0;\n //System.out.println(\"puedeModificarAprRepOtroUsuario: \" + arlDatCodVisBueDB.toString());\n try{\n for(int k=0; k<arlDatCodVisBueDB.size(); k++){\n w=0;\n strArlVisBueDbCodEmp=objUti.getStringValueAt(arlDatCodVisBueDB, k, INT_ARL_VIS_BUE_DB_COD_EMP_DB);\n strArlVisBueDbCodLoc=objUti.getStringValueAt(arlDatCodVisBueDB, k, INT_ARL_VIS_BUE_DB_COD_LOC_DB);\n strArlVisBueDbCodTipDoc=objUti.getStringValueAt(arlDatCodVisBueDB, k, INT_ARL_VIS_BUE_DB_COD_TIP_DOC_DB);\n strArlVisBueDbCodDoc=objUti.getStringValueAt(arlDatCodVisBueDB, k, INT_ARL_VIS_BUE_DB_COD_DOC_DB);\n strArlVisBueDbCodVisBue=objUti.getStringValueAt(arlDatCodVisBueDB, k, INT_ARL_VIS_BUE_DB_COD_VIS_BUE_DB)==null?\"\":objUti.getStringValueAt(arlDatCodVisBueDB, k, INT_ARL_VIS_BUE_DB_COD_VIS_BUE_DB);\n strArlVisBueDbEstVisBue=objUti.getStringValueAt(arlDatCodVisBueDB, k, INT_ARL_VIS_BUE_DB_EST_VIS_BUE_DB)==null?\"\":objUti.getStringValueAt(arlDatCodVisBueDB, k, INT_ARL_VIS_BUE_DB_EST_VIS_BUE_DB);\n strArlVisBueDbCodUsr=objUti.getStringValueAt(arlDatCodVisBueDB, k, INT_ARL_VIS_BUE_DB_COD_USR_DB)==null?\"\":objUti.getStringValueAt(arlDatCodVisBueDB, k, INT_ARL_VIS_BUE_DB_COD_USR_DB);\n\n if(strTblVisBueDbCodEmp.equals(strArlVisBueDbCodEmp)){\n if(strTblVisBueDbCodLoc.equals(strArlVisBueDbCodLoc)){\n if(strTblVisBueDbCodTipDoc.equals(strArlVisBueDbCodTipDoc)){\n if(strTblVisBueDbCodDoc.equals(strArlVisBueDbCodDoc)){\n if(strArlVisBueDbCodVisBue.equals(strTblVisBueDbCodVisBue)){\n if( (strArlVisBueDbEstVisBue.equals(\"A\")) || (strArlVisBueDbEstVisBue.equals(\"D\")) ){\n if(! strArlVisBueDbCodUsr.equals(\"\"+objParSis.getCodigoUsuario())){\n objTblMod.setChecked(blnChkSel, intFil, intCol);\n mostrarMsgInf(\"<HTML>El visto bueno que intenta modificar ya fue Aprobado/Reprobado por otro usuario.<BR>El otro usuario debe reversar para que ud. pueda realizar la Aprobación/Reprobación,<BR> o dicho usuario deberá modificarlo. </HTML>\");\n blnRes=true;\n break;\n }\n }\n\n }\n }\n }\n }\n }\n }\n }\n catch(Exception e){\n objUti.mostrarMsgErr_F1(this, e);\n }\n return blnRes;\n }",
"public void cargaDatosInicialesSoloParaModificacionDeCuenta() throws Exception {\n GestionContableWrapper gestionContableWrapper = parParametricasService.factoryGestionContable();\n gestionContableWrapper.getNormaContable3();\n parAjustesList = parParametricasService.listaTiposDeAjuste(obtieneEnumTipoAjuste(gestionContableWrapper.getNormaContable3()));\n selectAuxiliarParaAsignacionModificacion = cntEntidadesService.listaDeAuxiliaresPorEntidad(selectedEntidad);\n //Obtien Ajuste Fin\n\n //Activa formulario para automatico modifica \n switch (selectedEntidad.getNivel()) {\n case 1:\n swParAutomatico = true;\n numeroEspaciador = 200;\n break;\n case 2:\n swParAutomatico = true;\n swActivaBoton = true;\n numeroEspaciador = 200;\n break;\n case 3:\n swParAutomatico = false;\n numeroEspaciador = 1;\n break;\n default:\n break;\n }\n\n cntEntidad = (CntEntidad) getCntEntidadesService().find(CntEntidad.class, selectedEntidad.getIdEntidad());\n }",
"public int enviaAtualizacaoSimcard(WsmAtualizacaoSim wsmAtualizacao)\r\n\t{\r\n\t\t// CLASSES NECESSARIAS PARA REALIZAR UMA ATUALIZACAO\r\n\t\t// ActionList actionList\r\n\t\t// WsmSimcardIdentifierList + WsmSimcardIdentifier\r\n\t\t// WsmServiceManagerJni.getServiceId()\r\n\t\t// WsmDownloadParameters\r\n\t\t\r\n\t\t// Inicializa o gerenciador de servicos do WSM\r\n\t\tWsmServiceManagerJni gerenciadorServicos = new WsmServiceManagerJni();\r\n\t\t// Cria os seguintes objetos para envio das atualizacos:\r\n\t\t// (1) - WsmSimUpdateActionList\r\n\t\t// (2) - WsmSimcardIdentifierList\r\n\t\t// (3) - requestId\r\n\t\t// (4) - WsmDownloadParameters\r\n\t\tWsmSimUpdateActionList acionList = getListaDeAcoes(wsmAtualizacao.getAcoes());\r\n\t\tWsmSimcardIdentifierList simIdList = getListaIdentificadorSimcardByIccid(wsmAtualizacao.getIccid());\r\n\t\tint requestId = gerenciadorServicos.getNewRequestId();\r\n\t\tWsmDownloadParameters parameters = getParametros();\r\n\t\t\r\n\t\t// Realizacao do download dos servicos para atualizacao\r\n\t\t// XXX: ERRO FATAL :XXX\r\n\t\tint retorno = gerenciadorServicos.downloadSimUpdateActions(acionList, simIdList, requestId, parameters);\r\n\t\t\r\n\t\t// Procedimento de LOG apos a atualizacao do simcard\r\n\t\t// == 1 - OK\r\n\t\t// <> 1 - NOK\r\n\t\tif (retorno == 1)\r\n\t\t\tlogger.debug(\"Atualizacao de simcard realizada com sucesso para o iccid: \" + wsmAtualizacao.getIccid());\r\n\t\telse\r\n\t\t{\r\n\t\t\tWsmError wsmError = gerenciadorServicos.getError();\r\n\t\t\tlogger.error(\"Erro na tentativa de atualizar o simcard \" + wsmAtualizacao.getIccid() + \".\\n\" +\r\n\t\t\t\t\t\t \"Descricao do erro no WSM: \" + wsmError.getErrorDescription());\r\n\t\t}\r\n\t\t\r\n\t\t// Retorna o codigo de atualizacao no WSM\r\n\t\treturn retorno;\r\n\t}",
"public void atualizarStatusSolicitacaoServicoSara() {\n\t\tList<SolicitacaoServico> solicitacoes = new ArrayList<>();\n\t\ttry {\n\t\tgetSolicitacaoServicoDAO().beginTransaction();\n\t\tsolicitacoes = getSolicitacaoServicoDAO().getSolicitacaoServicoNaoFinalizadas();\n\t\tgetSolicitacaoServicoDAO().closeTransaction();\n\t\t\n\t\tfor(SolicitacaoServico s : solicitacoes) {\n\t\t\tif(s.getStatusServicos() != StatusServicos.CRIA_OS_SARA) {\n\t\t\tString status = getSolicitacaoServicoDAO().getStatusServerSara(s.getSolicitacao().getNumeroATI(), s.getOS());\n\t\t\tif(status.equals(\"OS_GERADA\")) {\n\t\t\t\ts.setStatusServicos(StatusServicos.OS_GERADA);\n\t\t\t}else \n\t\t\t\tif(status.equals(\"OS_INICIADA\")) {\n\t\t\t\t\ts.setStatusServicos(StatusServicos.OS_INICIADA);\n\t\t\t\t}\n\t\t\t\telse \n\t\t\t\t\tif(status.equals(\"FINALIZADO\")) {\n\t\t\t\t\t\ts.setStatusServicos(StatusServicos.FINALIZADO);\n\t\t\t\t\t}\n\t\t\tgetDAO().beginTransaction();\n\t\t\talterar(s.getSolicitacao(), \"Alteração de Status do serviço\",s.getSolicitacao().getUltResponsavel());\n\t\t\tgetDAO().commitAndCloseTransaction();\n\t\t\t}\n\t\t\n\t\t}\n\t\t}catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}",
"@Override\r\n public void atualizarFuncionario(Funcionario funcionario) throws Exception {\n rnFuncionario.atualizar(funcionario);\r\n }",
"private void btnActualizarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnActualizarActionPerformed\n boolean respuesta = false;\n int id =Integer.parseInt(this.txtCodigoPlatDia.getText());\n String valor = this.txtValueModified.getText();\n String atributo = \"\";\n switch (this.cbxTypeModified.getSelectedIndex()) {\n case 1: atributo = \"PDIA_NOMBRE\"; break;\n case 2: atributo = \"PDIA_DESCRIPCION\"; break;\n case 3: atributo = \"PDIA_ENTRADA\"; break;\n case 4: atributo = \"PDIA_PRINCIPIO\"; break;\n case 5: atributo = \"PDIA_BEBIDA\"; break;\n case 6: atributo = \"PDIA_CARNE\"; break;\n case 7: atributo = \"PDIA_PRECIO\"; break;\n default: break;\n }\n if(atributo.equals(\"PDIA_PRECIO\")){\n if(!Utilities.isNumeric(valor)){\n JOptionPane.showMessageDialog(null, \"el precio debe contener valores numericos, VERIFIQUE\");\n return;\n }\n }\n try {\n respuesta = this.servicioRestaurante.updatePlatoDia(id, atributo, valor);\n if(!respuesta){\n JOptionPane.showMessageDialog(null, \"verifique los datos, ITEM NO ENCONTRADO\");\n }else{\n this.listar();\n }\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(null, \"ha fallado el servicio, intentelo de nuevo\");\n }\n this.txtCodigoPlatDia.setText(null);\n this.cbxTypeModified.setSelectedIndex(0);\n this.txtValueModified.setText(null);\n this.btnActualizar.setEnabled(false);\n }",
"private void actualizarFondo() {\n actualizaEstadoMapa();\n if (modificacionFondoBase == true && estadoJuego != EstadoJuego.PAUSADO && estadoJuego != EstadoJuego.PIERDE){\n moverFondo();\n } else if (modificacionFondoBase == false && estadoJuego != EstadoJuego.PAUSADO && estadoJuego != EstadoJuego.PIERDE ){\n texturaFondoBase= texturaFondo1_1;\n texturaFondoApoyo= texturaFondo1_2;\n moverFondo();\n }\n }",
"private void atualizarTela() {\n\t\tSystem.out.println(\"\\n*** Refresh da Pagina / Consultando Todos os Registro da Tabela Paciente\\n\");\n\t\tpaciente = new Paciente();\n\t\tlistaPaciente = pacienteService.buscarTodos();\n\t\t\n\t}",
"private void AtulizaBanco(String cod, int matricula, double valor, int qte) {\n try {\n venda.Atualizar(cod, matricula, valor);\n Produto.ProdAtualizarQte(cod, qte);\n } catch (Exception ex) {\n Logger.getLogger(ViewCaixa.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"public void zapisUrok() {\r\n\r\n\t\taktualnyZostatok = getZostatok() * urokovaSadzba / 100;\r\n\t\tsetVklad(aktualnyZostatok);\r\n\r\n\t}",
"@Override\n\tpublic int updateVisitaTecnica(VisitaTecnica bean) {\n\t\treturn 0;\n\t}",
"private static void registrarAuditoriaDetallesValorPorUnidad(Connexion connexion,ValorPorUnidad valorporunidad)throws Exception {\n\t\t\r\n\t\tString strValorActual=null;\r\n\t\tString strValorNuevo=null;\r\n\t\t\r\n\t\t\t\r\n\t\t\tif(valorporunidad.getIsNew()||!valorporunidad.getid_empresa().equals(valorporunidad.getValorPorUnidadOriginal().getid_empresa()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(valorporunidad.getValorPorUnidadOriginal().getid_empresa()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=valorporunidad.getValorPorUnidadOriginal().getid_empresa().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(valorporunidad.getid_empresa()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=valorporunidad.getid_empresa().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),ValorPorUnidadConstantesFunciones.IDEMPRESA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(valorporunidad.getIsNew()||!valorporunidad.getid_unidad().equals(valorporunidad.getValorPorUnidadOriginal().getid_unidad()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(valorporunidad.getValorPorUnidadOriginal().getid_unidad()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=valorporunidad.getValorPorUnidadOriginal().getid_unidad().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(valorporunidad.getid_unidad()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=valorporunidad.getid_unidad().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),ValorPorUnidadConstantesFunciones.IDUNIDAD,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(valorporunidad.getIsNew()||!valorporunidad.getvalor().equals(valorporunidad.getValorPorUnidadOriginal().getvalor()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(valorporunidad.getValorPorUnidadOriginal().getvalor()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=valorporunidad.getValorPorUnidadOriginal().getvalor().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(valorporunidad.getvalor()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=valorporunidad.getvalor().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),ValorPorUnidadConstantesFunciones.VALOR,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t}",
"@Override\n\tprotected void setViewAtributes() throws Exception {\n\t\tif (log.isDebugEnabled()) {\n\t\t\tlog.debug(\"Entering 'save' method\");\n\t\t}\n\t\tlog.debug(\"setAddAttributes method ....\");\n\t\tMantenimientoCRAMatrizDiasSearchForm f = (MantenimientoCRAMatrizDiasSearchForm) this.formBusqueda;\n\t\tPais pais = this.mPantallaPrincipalBean.getCurrentCountry();\n\n\t\tf.setCodigoPais(pais.getCodigo());\n\n\t\tf.setActividad(null);\n\t\tf.setGrupoZona(null);\n\n\t\tReporteService reporteService = (ReporteService) getBean(\"scsicc.reporteService\");\n\n\t\t// obteniendo las lista de grupode facturacion y actividad\n\t\tMantenimientoMAEClienteService clienteService = (MantenimientoMAEClienteService) getBean(\"spusicc.mantenimientoMAEClienteService\");\n\t\tLong oidMarca = clienteService\n\t\t\t\t.getOidMarca(Constants.CODIGO_MARCA_DEFAULT);\n\t\tLong oidCanal = clienteService\n\t\t\t\t.getOidCanal(Constants.CODIGO_CANAL_DEFAULT);\n\n\t\tMap params = new HashMap();\n\t\tparams.put(\"codigoPais\", pais.getCodigo());\n\t\tparams.put(\n\t\t\t\t\"oidPais\",\n\t\t\t\tnew Long(reporteService.getOidString(\"getOidPaisByCodigoPais\",\n\t\t\t\t\t\tparams)));\n\t\tparams.put(\"oidMarca\", oidMarca);\n\t\tparams.put(\"oidCanal\", oidCanal);\n\n\t\tsiccGrupoFacturacionList = reporteService.getGrupoFacturacion(params);\n\t\tsiccActividadList = reporteService.getActividad(params);\n\t\tfindList(f);\n\n\t\tthis.mostrarBotonBuscar = false;\n\t\tthis.mostrarBotonModificar = false;\n\t\tthis.mostrarBotonNuevo = false;\n\t\tthis.mostrarBotonEliminar = false;\n\t\tthis.mostrarBotonConsultar = false;\n\n\t}",
"public void encerraServico(Servico servico) throws SQLException {\r\n\r\n servico.setStatus(0);\r\n servico.setDtEncerramento(LocalDateTime.now().format(DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH:mm:ss\")));\r\n\r\n System.out.println(servico.toString());\r\n update(servico);\r\n String sql = \"UPDATE solicitacoes SET em_chamado=4 WHERE servico_id_servico= \" + servico.getCell(0).getValue();\r\n\r\n stmt = conn.createStatement();\r\n stmt.execute(sql);\r\n stmt.close();\r\n\r\n }",
"public void acionarInadimplencia(InstrumentoFinanceiroDO ativo);",
"private void modi() { \n try {\n cvo.getId_cliente();\n cvo.setNombre_cliente(vista.txtNombre.getText());\n cvo.setApellido_cliente(vista.txtApellido.getText());\n cvo.setDireccion_cliente(vista.txtDireccion.getText());\n cvo.setCorreo_cliente(vista.txtCorreo.getText());\n cvo.setClave_cliente(vista.txtClave.getText());\n cdao.actualizar(cvo);\n vista.txtNombre.setText(\"\");\n vista.txtApellido.setText(\"\");\n vista.txtDireccion.setText(\"\");\n vista.txtCorreo.setText(\"\");\n vista.txtClave.setText(\"\");\n JOptionPane.showMessageDialog(null, \"Registro Modificado\");\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Debe ingresar Datos para Modificar registro!\");\n }\n }",
"@Override\n\tprotected void entrada(WebRequestContext request, Ocorrencia form) throws Exception {\t\t\n\t\tif (!\"true\".equals(request.getParameter(\"reload\"))) {\n\t\t\tFiltroUtils.preencheFiltroPlanoGestaoUnidadeUsuario(form);\n\t\t}\n\t\t\n\t\t//Se for uma nova ocorrência será dada a opção de gerar uma anomalia.\n\t\tif(form.getId() == null){\n\t\t\trequest.setAttribute(\"opcaoCriarAnomalia\", true);\n\n\t\t\t//seta a data e o usuario que esta logado\n\t\t\tform.setDataLancamento(new Date(System.currentTimeMillis()));\n\t\t\tform.setRelator((Usuario)request.getUser());\t\t\t\n\t\t}\n\t\t//Senão será apenas editada.\n\t\telse {\n\t\t\trequest.setAttribute(\"opcaoCriarAnomalia\", false);\n\t\t\tif(!anomaliaService.fazParteAnomalia(form)){\n\t\t\t\trequest.setAttribute(\"opcaoCriarAnomalia\", true);\n\t\t\t}\n\t\t\t\n\t\t\tif (!usuarioService.isUsuarioLogadoAdmin()) {\n\t\t\t\trequest.setAttribute(\"editarSomenteSituacao\", Boolean.TRUE);\n\t\t\t}\t\t\t\n\t\t}\n\t\t\n\t}",
"public void atualizarStatusAgendamento() {\n\n if (agendamentoLogic.editarStatusTbagendamento(tbagendamentoSelected, tbtipostatusagendamento)) {\n AbstractFacesContextUtils.addMessageInfo(\"Status atualizado com sucesso.\");\n } else {\n AbstractFacesContextUtils.addMessageWarn(\"Falhar ao alterar status do agendamento.\");\n }\n }",
"public void modifica(DTOAcreditacionGafetes acreGafete) throws Exception ;",
"private final void clearTRFilter() {\r\n\t\tadvanceFilterTRModel.setObjIdFilter(\"\");\r\n\t\tadvanceFilterTRModel.setAirplaneModelFilter(\"\");\r\n\t\tadvanceFilterTRModel.setObjTypeFilter(\"\");\r\n\t\tadvanceFilterTRModel.setObjNoFilter(\"\");\r\n\t\tadvanceFilterTRModel.setObjHeadingFilter(\"\");\r\n\t\tadvanceFilterTRModel.setObjTextFilter(\"\");\r\n\t\tadvanceFilterTRModel.setAssumptionFilter(\"\");\r\n\t\tadvanceFilterTRModel.setOwnerFilter(\"\");\r\n\t\tadvanceFilterTRModel.setDeviationsFilter(\"\");\r\n\t\tadvanceFilterTRModel.setModifiedAplicableFilter(\"\");\r\n\t\tadvanceFilterTRModel.setExpReqMtPhaseFilter(\"\");\r\n\t\tadvanceFilterTRModel.setAssgndToAssyPhaseFilter(\"\");\r\n\t\tadvanceFilterTRModel.setAssgndToFTPhaseFilter(\"\");\r\n\t\tadvanceFilterTRModel.setFocalFilter(\"\");\r\n\t\tadvanceFilterTRModel.setStsAssmblyPhaseFilter(\"\");\r\n\t\tadvanceFilterTRModel.setReqFirstFlightFilter(\"\");\r\n\t\tadvanceFilterTRModel.setRationaleForFunctionFilter(\"\");\r\n\t\tadvanceFilterTRModel.setFuncExcepFilter(\"\");\r\n\t\tadvanceFilterTRModel.setFunctionFilter(\"\");\r\n\t\tadvanceFilterTRModel.setApplicableDAASystemsFilter(\"\");\r\n\t\tadvanceFilterTRModel.setDevAssurApplicableFilter(\"\");\r\n\t\tadvanceFilterTRModel.setAllocationsFilter(\"\");\r\n\t\tadvanceFilterTRModel.setTraceReqmtsIDFilter(\"\");\r\n\t\tadvanceFilterTRModel.setDervdReqmtsFilter(\"\");\r\n\t\tadvanceFilterTRModel.setScdChildFilter(\"\");\r\n\t\tadvanceFilterTRModel.setRationaleforDerivedreqmtsFilter(\"\");\r\n\t\tadvanceFilterTRModel.setReqmt8reqdFilter(\"\");\r\n\t\tadvanceFilterTRModel.setReqmt8verfCloseOutFilter(\"\");\r\n\t\tadvanceFilterTRModel.setReqmt9reqdFilter(\"\");\r\n\t\tadvanceFilterTRModel.setReqmt9verfCloseOutFilter(\"\");\r\n\t\tadvanceFilterTRModel.setReqmt7reqdFilter(\"\");\r\n\t\tadvanceFilterTRModel.setReqmt7verfCloseOutFilter(\"\");\r\n\t\tadvanceFilterTRModel.setEstWorkFilter(\"\");\r\n\t\tadvanceFilterTRModel.setStatusWithSEFilter(\"\");\r\n\t\tadvanceFilterTRModel.setLinkStatusTRFilter(\"\");\r\n\t\tadvanceFilterTRModel.setMinorModFilter(\"\");\r\n\t\twsrdUtilController.pageSize((long) 0);\r\n\t\twsrdUtilController.getPageNumberByList();\r\n\t}",
"void actualizarCampania(GestionPrecioDTO campania, String user);",
"@ApiOperation(\n\t value = \"Metodo auxiliar para agregar citas de forma masiva\")\n\t@GetMapping(\"agregar_muchas\")\n\tpublic void agregar_muchas() throws Exception{\n\t\tcitaService.agendar_muchas();\n\t}",
"@Override\r\n public boolean ActualizarDatosCliente() {\r\n try {\r\n puente.executeUpdate(\"UPDATE `cliente` SET `Nombre` = '\"+Nombre+\"', `Apellido` = '\"+Apellido+\"', `Telefono` = '\"+Telefono+\"', `Fecha_Nacimiento` = '\"+Fecha_Nacimiento+\"', `Email` = '\"+Email+\"', `Direccion` = '\"+Direccion+\"', `Ciudad` = '\"+Ciudad+\"' WHERE `cliente`.`Cedula` = '\"+Cedula+\"';\");\r\n listo = true;\r\n } catch (Exception e) {\r\n Logger.getLogger(DaoCliente.class.getName()).log(Level.SEVERE, null, e);\r\n }\r\n return listo;\r\n }",
"public void actualizar() {\n\n try {\n\n servtpDocumento.actualizarTipoDocumento(tipoDocumento);\n req = RequestContext.getCurrentInstance();\n req.execute(\"PF('dialogoTpDocuActualizar').hide();\");//Cierra el dialogo para actualizar\n req = null;\n tipoDocumento = new TipoDocumento();\n MensajesFaces.informacion(\"Actualizado\", \"Exitoso\");\n\n } catch (Exception e) {\n MensajesFaces.error(\"Error\", \"detalle\" + e);\n\n }\n\n }",
"@Override\r\n public void aceptarReporte() {\n if (rep_reporte.getReporteSelecionado().equals(\"Libro Diario\")) {\r\n if (rep_reporte.isVisible()) {\r\n parametro = new HashMap();\r\n rep_reporte.cerrar();\r\n sec_rango_reporte.setMultiple(true);\r\n sec_rango_reporte.dibujar();\r\n utilitario.addUpdate(\"rep_reporte,sec_rango_reporte\");\r\n\r\n } else if (sec_rango_reporte.isVisible()) {\r\n String estado = \"\" + utilitario.getVariable(\"p_con_estado_comprobante_normal\") + \",\" + utilitario.getVariable(\"p_con_estado_comp_inicial\") + \",\" + utilitario.getVariable(\"p_con_estado_comp_final\");\r\n parametro.put(\"fecha_inicio\", sec_rango_reporte.getFecha1());\r\n parametro.put(\"fecha_fin\", sec_rango_reporte.getFecha2());\r\n\r\n parametro.put(\"ide_cneco\", estado);\r\n parametro.put(\"ide_cnlap_haber\", p_con_lugar_haber);\r\n parametro.put(\"ide_cnlap_debe\", p_con_lugar_debe);\r\n sec_rango_reporte.cerrar();\r\n sel_rep.setSeleccionFormatoReporte(parametro, rep_reporte.getPath());\r\n sel_rep.dibujar();\r\n utilitario.addUpdate(\"sel_rep,sec_rango_reporte\");\r\n }\r\n } else if (rep_reporte.getReporteSelecionado().equals(\"Balance General Consolidado\")) {\r\n if (rep_reporte.isVisible()) {\r\n parametro = new HashMap();\r\n rep_reporte.cerrar();\r\n sec_rango_reporte.setMultiple(true);\r\n sec_rango_reporte.dibujar();\r\n utilitario.addUpdate(\"rep_reporte,sec_rango_reporte\");\r\n } else if (sec_rango_reporte.isVisible()) {\r\n if (sec_rango_reporte.getFecha1String() != null && !sec_rango_reporte.getFecha1String().isEmpty()) {\r\n if (sec_rango_reporte.getFecha2String() != null && !sec_rango_reporte.getFecha2String().isEmpty()) {\r\n fecha_fin = sec_rango_reporte.getFecha2String();\r\n fecha_inicio = con.getFechaInicialPeriodo(fecha_fin);\r\n if (fecha_inicio != null && !fecha_inicio.isEmpty()) {\r\n sec_rango_reporte.cerrar();\r\n sel_tab_nivel.dibujar();\r\n utilitario.addUpdate(\"sec_rango_reporte,sel_tab_nivel\");\r\n } else {\r\n utilitario.agregarMensajeError(\"Atencion\", \"El rango de fechas seleccionado no se encuentra en ningun Periodo Contable\");\r\n }\r\n } else {\r\n utilitario.agregarMensajeError(\"Atencion\", \"No ha seleccionado la fecha final\");\r\n }\r\n } else {\r\n utilitario.agregarMensajeError(\"Atencion\", \"No ha seleccionado la fecha inicial\");\r\n }\r\n } else if (sel_tab_nivel.isVisible()) {\r\n if (sel_tab_nivel.getValorSeleccionado() != null) {\r\n System.out.println(\"fecha fin \" + fecha_fin);\r\n parametro.put(\"p_activo\", utilitario.getVariable(\"p_con_tipo_cuenta_activo\"));\r\n parametro.put(\"p_pasivo\", utilitario.getVariable(\"p_con_tipo_cuenta_pasivo\"));\r\n parametro.put(\"p_patrimonio\", utilitario.getVariable(\"p_con_tipo_cuenta_patrimonio\"));\r\n TablaGenerica tab_datos = utilitario.consultar(\"SELECT * FROM sis_empresa e, sis_sucursal s where s.ide_empr=e.ide_empr and s.ide_empr=\" + utilitario.getVariable(\"ide_empr\") + \" and s.ide_sucu=\" + utilitario.getVariable(\"ide_sucu\"));\r\n if (tab_datos.getTotalFilas() > 0) {\r\n parametro.put(\"logo\", tab_datos.getValor(0, \"logo_empr\"));\r\n parametro.put(\"empresa\", tab_datos.getValor(0, \"nom_empr\"));\r\n parametro.put(\"sucursal\", tab_datos.getValor(0, \"nom_sucu\"));\r\n parametro.put(\"direccion\", tab_datos.getValor(0, \"direccion_sucu\"));\r\n parametro.put(\"telefono\", tab_datos.getValor(0, \"telefonos_sucu\"));\r\n parametro.put(\"ruc\", tab_datos.getValor(0, \"identificacion_empr\"));\r\n\r\n }\r\n parametro.put(\"fecha_inicio\", getFormatoFecha(fecha_inicio));\r\n parametro.put(\"fecha_fin\", getFormatoFecha(fecha_fin));\r\n TablaGenerica tab_balance = con.generarBalanceGeneral(true, fecha_inicio, fecha_fin, Integer.parseInt(sel_tab_nivel.getValorSeleccionado()));\r\n parametro.put(\"titulo\", \"BALANCE GENERAL CONSOLIDADO\");\r\n if (tab_balance.getTotalFilas() > 0) {\r\n List lis_totales = con.obtenerTotalesBalanceGeneral(true, fecha_inicio, fecha_fin);\r\n double tot_activo = Double.parseDouble(lis_totales.get(0) + \"\");\r\n double tot_pasivo = Double.parseDouble(lis_totales.get(1) + \"\");\r\n double tot_patrimonio = Double.parseDouble(lis_totales.get(2) + \"\");\r\n double utilidad_perdida = tot_activo - tot_pasivo - tot_patrimonio;\r\n double total = tot_pasivo + tot_patrimonio + utilidad_perdida;\r\n parametro.put(\"p_tot_activo\", tot_activo);\r\n parametro.put(\"p_total\", total);\r\n parametro.put(\"p_utilidad_perdida\", utilidad_perdida);\r\n parametro.put(\"p_tot_pasivo\", tot_pasivo);\r\n parametro.put(\"p_tot_patrimonio\", (tot_patrimonio));\r\n }\r\n sel_tab_nivel.cerrar();\r\n ReporteDataSource data = new ReporteDataSource(tab_balance);\r\n sel_rep.setSeleccionFormatoReporte(parametro, rep_reporte.getPath(), data);\r\n sel_rep.dibujar();\r\n\r\n utilitario.addUpdate(\"sel_rep,sel_tab_nivel\");\r\n }\r\n }\r\n } else if (rep_reporte.getReporteSelecionado().equals(\"Balance General\")) {\r\n if (rep_reporte.isVisible()) {\r\n parametro = new HashMap();\r\n rep_reporte.cerrar();\r\n sec_rango_reporte.setMultiple(true);\r\n sec_rango_reporte.dibujar();\r\n utilitario.addUpdate(\"rep_reporte,sec_rango_reporte\");\r\n } else if (sec_rango_reporte.isVisible()) {\r\n if (sec_rango_reporte.getFecha1String() != null && !sec_rango_reporte.getFecha1String().isEmpty()) {\r\n if (sec_rango_reporte.getFecha2String() != null && !sec_rango_reporte.getFecha2String().isEmpty()) {\r\n fecha_fin = sec_rango_reporte.getFecha2String();\r\n fecha_inicio = con.getFechaInicialPeriodo(fecha_fin);\r\n if (fecha_inicio != null && !fecha_inicio.isEmpty()) {\r\n sec_rango_reporte.cerrar();\r\n sel_tab_nivel.dibujar();\r\n utilitario.addUpdate(\"sec_rango_reporte,sel_tab_nivel\");\r\n } else {\r\n utilitario.agregarMensajeError(\"Atencion\", \"El rango de fechas seleccionado no se encuentra en ningun Periodo Contable\");\r\n }\r\n\r\n } else {\r\n utilitario.agregarMensajeError(\"Atencion\", \"No ha seleccionado la fecha final\");\r\n }\r\n } else {\r\n utilitario.agregarMensajeError(\"Atencion\", \"No ha seleccionado la fecha inicial\");\r\n }\r\n } else if (sel_tab_nivel.isVisible()) {\r\n if (sel_tab_nivel.getValorSeleccionado() != null) {\r\n System.out.println(\"fecha fin \" + fecha_fin);\r\n parametro.put(\"p_activo\", utilitario.getVariable(\"p_con_tipo_cuenta_activo\"));\r\n parametro.put(\"p_pasivo\", utilitario.getVariable(\"p_con_tipo_cuenta_pasivo\"));\r\n parametro.put(\"p_patrimonio\", utilitario.getVariable(\"p_con_tipo_cuenta_patrimonio\"));\r\n TablaGenerica tab_datos = utilitario.consultar(\"SELECT * FROM sis_empresa e, sis_sucursal s where s.ide_empr=e.ide_empr and s.ide_empr=\" + utilitario.getVariable(\"ide_empr\") + \" and s.ide_sucu=\" + utilitario.getVariable(\"ide_sucu\"));\r\n if (tab_datos.getTotalFilas() > 0) {\r\n parametro.put(\"logo\", tab_datos.getValor(0, \"logo_empr\"));\r\n parametro.put(\"empresa\", tab_datos.getValor(0, \"nom_empr\"));\r\n parametro.put(\"sucursal\", tab_datos.getValor(0, \"nom_sucu\"));\r\n parametro.put(\"direccion\", tab_datos.getValor(0, \"direccion_sucu\"));\r\n parametro.put(\"telefono\", tab_datos.getValor(0, \"telefonos_sucu\"));\r\n parametro.put(\"ruc\", tab_datos.getValor(0, \"identificacion_empr\"));\r\n\r\n }\r\n parametro.put(\"fecha_inicio\", getFormatoFecha(fecha_inicio));\r\n parametro.put(\"fecha_fin\", getFormatoFecha(fecha_fin));\r\n TablaGenerica tab_balance = con.generarBalanceGeneral(false, fecha_inicio, fecha_fin, Integer.parseInt(sel_tab_nivel.getValorSeleccionado()));\r\n parametro.put(\"titulo\", \"BALANCE GENERAL\");\r\n if (tab_balance.getTotalFilas() > 0) {\r\n List lis_totales = con.obtenerTotalesBalanceGeneral(false, fecha_inicio, fecha_fin);\r\n double tot_activo = Double.parseDouble(lis_totales.get(0) + \"\");\r\n double tot_pasivo = Double.parseDouble(lis_totales.get(1) + \"\");\r\n double tot_patrimonio = Double.parseDouble(lis_totales.get(2) + \"\");\r\n double utilidad_perdida = tot_activo - tot_pasivo - tot_patrimonio;\r\n double total = tot_pasivo + tot_patrimonio + utilidad_perdida;\r\n parametro.put(\"p_tot_activo\", tot_activo);\r\n parametro.put(\"p_total\", total);\r\n parametro.put(\"p_utilidad_perdida\", utilidad_perdida);\r\n parametro.put(\"p_tot_pasivo\", tot_pasivo);\r\n parametro.put(\"p_tot_patrimonio\", (tot_patrimonio));\r\n }\r\n sel_tab_nivel.cerrar();\r\n ReporteDataSource data = new ReporteDataSource(tab_balance);\r\n sel_rep.setSeleccionFormatoReporte(parametro, rep_reporte.getPath(), data);\r\n sel_rep.dibujar();\r\n\r\n utilitario.addUpdate(\"sel_rep,sel_tab_nivel\");\r\n }\r\n }\r\n } else if (rep_reporte.getReporteSelecionado().equals(\"Estado de Resultados Consolidado\")) {\r\n if (rep_reporte.isVisible()) {\r\n parametro = new HashMap();\r\n rep_reporte.cerrar();\r\n sec_rango_reporte.setMultiple(true);\r\n sec_rango_reporte.dibujar();\r\n utilitario.addUpdate(\"rep_reporte,sec_rango_reporte\");\r\n } else if (sec_rango_reporte.isVisible()) {\r\n if (sec_rango_reporte.getFecha1String() != null && !sec_rango_reporte.getFecha1String().isEmpty()) {\r\n if (sec_rango_reporte.getFecha2String() != null && !sec_rango_reporte.getFecha2String().isEmpty()) {\r\n fecha_fin = sec_rango_reporte.getFecha2String();\r\n fecha_inicio = con.getFechaInicialPeriodo(fecha_fin);\r\n if (fecha_inicio != null && !fecha_inicio.isEmpty()) {\r\n sec_rango_reporte.cerrar();\r\n sel_tab_nivel.dibujar();\r\n utilitario.addUpdate(\"sec_rango_reporte,sel_tab_nivel\");\r\n }\r\n } else {\r\n utilitario.agregarMensajeError(\"Atencion\", \"No ha seleccionado la fecha fin\");\r\n }\r\n } else {\r\n utilitario.agregarMensajeError(\"Atencion\", \"No ha seleccionado la fecha inicio\");\r\n }\r\n } else if (sel_tab_nivel.isVisible()) {\r\n if (sel_tab_nivel.getValorSeleccionado() != null) {\r\n parametro.put(\"p_ingresos\", utilitario.getVariable(\"p_con_tipo_cuenta_ingresos\"));\r\n parametro.put(\"p_gastos\", utilitario.getVariable(\"p_con_tipo_cuenta_gastos\"));\r\n parametro.put(\"p_costos\", utilitario.getVariable(\"p_con_tipo_cuenta_costos\"));\r\n TablaGenerica tab_datos = utilitario.consultar(\"SELECT * FROM sis_empresa e, sis_sucursal s where s.ide_empr=e.ide_empr and s.ide_empr=\" + utilitario.getVariable(\"ide_empr\") + \" and s.ide_sucu=\" + utilitario.getVariable(\"ide_sucu\"));\r\n if (tab_datos.getTotalFilas() > 0) {\r\n parametro.put(\"logo\", tab_datos.getValor(0, \"logo_empr\"));\r\n parametro.put(\"empresa\", tab_datos.getValor(0, \"nom_empr\"));\r\n parametro.put(\"sucursal\", tab_datos.getValor(0, \"nom_sucu\"));\r\n parametro.put(\"direccion\", tab_datos.getValor(0, \"direccion_sucu\"));\r\n parametro.put(\"telefono\", tab_datos.getValor(0, \"telefonos_sucu\"));\r\n parametro.put(\"ruc\", tab_datos.getValor(0, \"identificacion_empr\"));\r\n }\r\n\r\n parametro.put(\"fecha_inicio\", getFormatoFecha(fecha_inicio));\r\n parametro.put(\"fecha_fin\", getFormatoFecha(fecha_fin));\r\n TablaGenerica tab_estado = con.generarEstadoResultados(true, fecha_inicio, fecha_fin, Integer.parseInt(sel_tab_nivel.getValorSeleccionado()));\r\n if (tab_estado.getTotalFilas() > 0) {\r\n List lis_totales = con.obtenerTotalesEstadoResultados(true, fecha_inicio, fecha_fin);\r\n double tot_ingresos = Double.parseDouble(lis_totales.get(0) + \"\");\r\n double tot_gastos = Double.parseDouble(lis_totales.get(1) + \"\");\r\n double tot_costos = Double.parseDouble(lis_totales.get(2) + \"\");\r\n double utilidad_perdida = tot_ingresos - (tot_gastos + tot_costos);\r\n parametro.put(\"p_tot_ingresos\", tot_ingresos);\r\n parametro.put(\"p_tot_gastos\", tot_gastos);\r\n parametro.put(\"p_tot_costos\", tot_costos);\r\n parametro.put(\"p_utilidad\", utilidad_perdida);\r\n }\r\n parametro.put(\"titulo\", \"ESTADO DE RESULTADOS CONSOLIDADO\");\r\n ReporteDataSource data = new ReporteDataSource(tab_estado);\r\n sel_tab_nivel.cerrar();\r\n sel_rep.setSeleccionFormatoReporte(parametro, rep_reporte.getPath(), data);\r\n sel_rep.dibujar();\r\n utilitario.addUpdate(\"sel_rep,sel_tab_nivel\");\r\n }\r\n }\r\n\r\n } else if (rep_reporte.getReporteSelecionado().equals(\"Estado de Resultados\")) {\r\n if (rep_reporte.isVisible()) {\r\n parametro = new HashMap();\r\n rep_reporte.cerrar();\r\n sec_rango_reporte.setMultiple(true);\r\n sec_rango_reporte.dibujar();\r\n utilitario.addUpdate(\"rep_reporte,sec_rango_reporte\");\r\n } else if (sec_rango_reporte.isVisible()) {\r\n if (sec_rango_reporte.getFecha1String() != null && !sec_rango_reporte.getFecha1String().isEmpty()) {\r\n if (sec_rango_reporte.getFecha2String() != null && !sec_rango_reporte.getFecha2String().isEmpty()) {\r\n fecha_fin = sec_rango_reporte.getFecha2String();\r\n fecha_inicio = con.getFechaInicialPeriodo(fecha_fin);\r\n if (fecha_inicio != null && !fecha_inicio.isEmpty()) {\r\n sec_rango_reporte.cerrar();\r\n sel_tab_nivel.dibujar();\r\n utilitario.addUpdate(\"sec_rango_reporte,sel_tab_nivel\");\r\n }\r\n } else {\r\n utilitario.agregarMensajeError(\"Atencion\", \"No ha seleccionado la fecha fin\");\r\n }\r\n } else {\r\n utilitario.agregarMensajeError(\"Atencion\", \"No ha seleccionado la fecha inicio\");\r\n }\r\n } else if (sel_tab_nivel.isVisible()) {\r\n if (sel_tab_nivel.getValorSeleccionado() != null) {\r\n parametro.put(\"p_ingresos\", utilitario.getVariable(\"p_con_tipo_cuenta_ingresos\"));\r\n parametro.put(\"p_gastos\", utilitario.getVariable(\"p_con_tipo_cuenta_gastos\"));\r\n parametro.put(\"p_costos\", utilitario.getVariable(\"p_con_tipo_cuenta_costos\"));\r\n TablaGenerica tab_datos = utilitario.consultar(\"SELECT * FROM sis_empresa e, sis_sucursal s where s.ide_empr=e.ide_empr and s.ide_empr=\" + utilitario.getVariable(\"ide_empr\") + \" and s.ide_sucu=\" + utilitario.getVariable(\"ide_sucu\"));\r\n if (tab_datos.getTotalFilas() > 0) {\r\n parametro.put(\"logo\", tab_datos.getValor(0, \"logo_empr\"));\r\n parametro.put(\"empresa\", tab_datos.getValor(0, \"nom_empr\"));\r\n parametro.put(\"sucursal\", tab_datos.getValor(0, \"nom_sucu\"));\r\n parametro.put(\"direccion\", tab_datos.getValor(0, \"direccion_sucu\"));\r\n parametro.put(\"telefono\", tab_datos.getValor(0, \"telefonos_sucu\"));\r\n parametro.put(\"ruc\", tab_datos.getValor(0, \"identificacion_empr\"));\r\n }\r\n\r\n parametro.put(\"fecha_inicio\", getFormatoFecha(fecha_inicio));\r\n parametro.put(\"fecha_fin\", getFormatoFecha(fecha_fin));\r\n TablaGenerica tab_estado = con.generarEstadoResultados(false, fecha_inicio, fecha_fin, Integer.parseInt(sel_tab_nivel.getValorSeleccionado()));\r\n if (tab_estado.getTotalFilas() > 0) {\r\n List lis_totales = con.obtenerTotalesEstadoResultados(false, fecha_inicio, fecha_fin);\r\n double tot_ingresos = Double.parseDouble(lis_totales.get(0) + \"\");\r\n double tot_gastos = Double.parseDouble(lis_totales.get(1) + \"\");\r\n double tot_costos = Double.parseDouble(lis_totales.get(2) + \"\");\r\n double utilidad_perdida = tot_ingresos - (tot_gastos + tot_costos);\r\n parametro.put(\"p_tot_ingresos\", tot_ingresos);\r\n parametro.put(\"p_tot_gastos\", tot_gastos);\r\n parametro.put(\"p_tot_costos\", tot_costos);\r\n parametro.put(\"p_utilidad\", utilidad_perdida);\r\n }\r\n ReporteDataSource data = new ReporteDataSource(tab_estado);\r\n parametro.put(\"titulo\", \"ESTADO DE RESULTADOS\");\r\n sel_tab_nivel.cerrar();\r\n sel_rep.setSeleccionFormatoReporte(parametro, rep_reporte.getPath(), data);\r\n sel_rep.dibujar();\r\n utilitario.addUpdate(\"sel_rep,sel_tab_nivel\");\r\n }\r\n }\r\n\r\n } else if (rep_reporte.getReporteSelecionado().equals(\"Libro Mayor\")) {\r\n if (rep_reporte.isVisible()) {\r\n parametro = new HashMap();\r\n rep_reporte.cerrar();\r\n lis_ide_cndpc_sel.clear();\r\n lis_ide_cndpc_deseleccionados.clear();\r\n int_count_deseleccion = 0;\r\n int_count_seleccion = 0;\r\n sel_tab.getTab_seleccion().setSeleccionados(null);\r\n// utilitario.ejecutarJavaScript(sel_tab.getTab_seleccion().getId() + \".clearFilters();\");\r\n sel_tab.dibujar();\r\n utilitario.addUpdate(\"rep_reporte,sel_tab\");\r\n } else {\r\n if (sel_tab.isVisible()) {\r\n\r\n if (sel_tab.getSeleccionados() != null && !sel_tab.getSeleccionados().isEmpty()) {\r\n System.out.println(\"nn \" + sel_tab.getSeleccionados());\r\n parametro.put(\"ide_cndpc\", sel_tab.getSeleccionados());//lista sel \r\n sel_tab.cerrar();\r\n String estado = \"\" + utilitario.getVariable(\"p_con_estado_comprobante_normal\") + \",\" + utilitario.getVariable(\"p_con_estado_comp_inicial\") + \",\" + utilitario.getVariable(\"p_con_estado_comp_final\");\r\n parametro.put(\"ide_cneco\", estado);\r\n sec_rango_reporte.setMultiple(true);\r\n sec_rango_reporte.dibujar();\r\n utilitario.addUpdate(\"sel_tab,sec_rango_reporte\");\r\n\r\n } else {\r\n utilitario.agregarMensajeInfo(\"Debe seleccionar al menos una cuenta contable\", \"\");\r\n }\r\n// if (lis_ide_cndpc_deseleccionados.size() == 0) {\r\n// System.out.println(\"sel tab lis \" + sel_tab.getSeleccionados());\r\n// parametro.put(\"ide_cndpc\", sel_tab.getSeleccionados());//lista sel \r\n// } else {\r\n// System.out.println(\"sel tab \" + utilitario.generarComillasLista(lis_ide_cndpc_deseleccionados));\r\n// parametro.put(\"ide_cndpc\", utilitario.generarComillasLista(lis_ide_cndpc_deseleccionados));//lista sel \r\n// }\r\n } else if (sec_rango_reporte.isVisible()) {\r\n if (sec_rango_reporte.isFechasValidas()) {\r\n parametro.put(\"fecha_inicio\", sec_rango_reporte.getFecha1());\r\n parametro.put(\"fecha_fin\", sec_rango_reporte.getFecha2());\r\n parametro.put(\"ide_cnlap_haber\", p_con_lugar_haber);\r\n parametro.put(\"ide_cnlap_debe\", p_con_lugar_debe);\r\n sec_rango_reporte.cerrar();\r\n sel_rep.setSeleccionFormatoReporte(parametro, rep_reporte.getPath());\r\n sel_rep.dibujar();\r\n utilitario.addUpdate(\"sel_rep,sec_rango_reporte\");\r\n } else {\r\n utilitario.agregarMensajeInfo(\"Las fechas seleccionadas no son correctas\", \"\");\r\n }\r\n }\r\n }\r\n } else if (rep_reporte.getReporteSelecionado().equals(\"Balance de Comprobacion\")) {\r\n if (rep_reporte.isVisible()) {\r\n parametro = new HashMap();\r\n rep_reporte.cerrar();\r\n sec_rango_reporte.setMultiple(true);\r\n sec_rango_reporte.dibujar();\r\n utilitario.addUpdate(\"rep_reporte,sec_rango_reporte\");\r\n\r\n } else {\r\n if (sec_rango_reporte.isVisible()) {\r\n if (sec_rango_reporte.getFecha1String() != null && !sec_rango_reporte.getFecha1String().isEmpty()) {\r\n if (sec_rango_reporte.getFecha2String() != null && !sec_rango_reporte.getFecha2String().isEmpty()) {\r\n String fecha_fin1 = sec_rango_reporte.getFecha2String();\r\n String fecha_inicio1 = sec_rango_reporte.getFecha1String();\r\n System.out.println(\"fecha fin \" + fecha_fin1);\r\n sec_rango_reporte.cerrar();\r\n\r\n TablaGenerica tab_datos = utilitario.consultar(\"SELECT * FROM sis_empresa e, sis_sucursal s where s.ide_empr=e.ide_empr and s.ide_empr=\" + utilitario.getVariable(\"ide_empr\") + \" and s.ide_sucu=\" + utilitario.getVariable(\"ide_sucu\"));\r\n if (tab_datos.getTotalFilas() > 0) {\r\n parametro.put(\"logo\", tab_datos.getValor(0, \"logo_empr\"));\r\n parametro.put(\"empresa\", tab_datos.getValor(0, \"nom_empr\"));\r\n parametro.put(\"sucursal\", tab_datos.getValor(0, \"nom_sucu\"));\r\n parametro.put(\"direccion\", tab_datos.getValor(0, \"direccion_sucu\"));\r\n parametro.put(\"telefono\", tab_datos.getValor(0, \"telefonos_sucu\"));\r\n parametro.put(\"ruc\", tab_datos.getValor(0, \"identificacion_empr\"));\r\n }\r\n String fechaPeriodoActivo = con.obtenerFechaInicialPeriodoActivo();\r\n// if (fechaPeriodoActivo != null && !fechaPeriodoActivo.isEmpty()) {\r\n parametro.put(\"fecha_inicio\", getFormatoFecha(fecha_inicio1));\r\n parametro.put(\"fecha_fin\", getFormatoFecha(fecha_fin1));\r\n TablaGenerica tab_bal = con.generarBalanceComprobacion(fechaPeriodoActivo, fecha_fin1);\r\n double suma_debe = 0;\r\n double suma_haber = 0;\r\n double suma_deudor = 0;\r\n double suma_acreedor = 0;\r\n for (int i = 0; i < tab_bal.getTotalFilas() - 1; i++) {\r\n suma_debe = Double.parseDouble(tab_bal.getValor(i, \"debe\")) + suma_debe;\r\n suma_haber = Double.parseDouble(tab_bal.getValor(i, \"haber\")) + suma_haber;\r\n suma_deudor = Double.parseDouble(tab_bal.getValor(i, \"deudor\")) + suma_deudor;\r\n suma_acreedor = Double.parseDouble(tab_bal.getValor(i, \"acreedor\")) + suma_acreedor;\r\n }\r\n parametro.put(\"tot_debe\", suma_debe);\r\n parametro.put(\"tot_haber\", suma_haber);\r\n parametro.put(\"tot_deudor\", suma_deudor);\r\n parametro.put(\"tot_acreedor\", suma_acreedor);\r\n ReporteDataSource data = new ReporteDataSource(tab_bal);\r\n sel_rep.setSeleccionFormatoReporte(parametro, rep_reporte.getPath(), data);\r\n sel_rep.dibujar();\r\n utilitario.addUpdate(\"sel_rep,sec_rango_reporte\");\r\n }\r\n// }\r\n } else {\r\n utilitario.agregarMensajeError(\"Atencion\", \"No ha seleccionado la fecha fin\");\r\n }\r\n } else {\r\n utilitario.agregarMensajeError(\"Atencion\", \"No ha seleccionado la fecha inicio\");\r\n }\r\n }\r\n\r\n } else if (rep_reporte.getReporteSelecionado().equals(\"Comprobante Contabilidad\")) {\r\n if (rep_reporte.isVisible()) {\r\n if (tab_tabla1.getValor(\"ide_cnccc\") != null) {\r\n parametro = new HashMap();\r\n rep_reporte.cerrar();\r\n parametro.put(\"ide_cnccc\", Long.parseLong(tab_tabla1.getValor(\"ide_cnccc\")));\r\n parametro.put(\"ide_cnlap_haber\", p_con_lugar_haber);\r\n parametro.put(\"ide_cnlap_debe\", p_con_lugar_debe);\r\n sel_rep.setSeleccionFormatoReporte(parametro, rep_reporte.getPath());\r\n sel_rep.dibujar();\r\n utilitario.addUpdate(\"rep_reporte,sel_rep\");\r\n } else {\r\n utilitario.agregarMensajeInfo(\"No se puede generar el reporte\", \"La fila seleccionada no tiene compraqbante de contabilidad\");\r\n }\r\n\r\n }\r\n }\r\n }",
"public void actualizarFinalizacionConvocatorias()\r\n\t{\r\n\t\tint numeroconvocatorias = 0;//numero de convocatorias en la BD\r\n\t\tList convocatorias = null;\r\n\t\ttry\r\n {\r\n Conector conector = new Conector();\r\n conector.iniciarConexionBaseDatos();\r\n convocatorias= ConvocatoriaBD.listar(conector);\r\n conector.terminarConexionBaseDatos();\r\n }\r\n catch (Exception e)\r\n\t\t{\r\n \tJOptionPane.showMessageDialog(this,\"Error al conectar con la Base de Datos.\",\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/error.PNG\"));\r\n\t\t}\r\n if(convocatorias != null)\r\n {\r\n \tnumeroconvocatorias = convocatorias.size();\r\n }\r\n for (int i = 0; i < numeroconvocatorias; i++)\r\n\t\t{\r\n\t\t\tConvocatoria convocatoriaaux = (Convocatoria)convocatorias.get(i);\r\n\t\t\tString fechafinal = convocatoriaaux.getFechafinal();\r\n\t\t\tString horafinal = convocatoriaaux.getHorafinal();\r\n\t\t\tboolean esvigente = fechaVigente(fechafinal, horafinal);\r\n\t\t\tif(esvigente == false)\r\n\t\t\t{\r\n\t\t\t\tconvocatoriaaux.setFinalizada(\"Si\");\r\n\t\t\t\ttry \r\n\t \t\t{\r\n\t \t\t\tConector conector = new Conector();\r\n\t \t\t\tconector.iniciarConexionBaseDatos();\r\n\t \t\t\tConvocatoriaBD.actualizar(convocatoriaaux, conector);\r\n\t \t\t\tconector.terminarConexionBaseDatos();\r\n\t \t\t}\r\n\t \t\tcatch (Exception e)\r\n\t \t\t{\r\n\t \t\t\tJOptionPane.showMessageDialog(this,\"Error al conectar con la Base de Datos.\",\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/error.PNG\"));\r\n\t \t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void cargaDatosInicialesSoloParaAdicionDeCuenta() throws Exception {\n GestionContableWrapper gestionContableWrapper = parParametricasService.factoryGestionContable();\n gestionContableWrapper.getNormaContable3();\n parAjustesList = parParametricasService.listaTiposDeAjuste(obtieneEnumTipoAjuste(gestionContableWrapper.getNormaContable3()));\n //Obtien Ajuste Fin\n //Activa formulario para automatico modifica \n if (selectedEntidad.getNivel() >= 3) {\n numeroEspaciadorAdicionar = 260;\n }\n\n if (selectedEntidad.getNivel() == 3) {\n swParAutomatico = false;\n numeroEspaciadorAdicionar = 230;\n }\n if (selectedEntidad.getNivel() == 2) {\n swParAutomatico = true;\n swActivaBoton = true;\n numeroEspaciadorAdicionar = 200;\n }\n if (selectedEntidad.getNivel() == 1) {\n swParAutomatico = true;\n numeroEspaciadorAdicionar = 130;\n cntParametroAutomaticoDeNivel2 = cntParametroAutomaticoService.obtieneObjetoDeParametroAutomatico(selectedEntidad);\n }\n\n mascaraNuevoOpcion = \"N\";\n cntEntidad = (CntEntidad) getCntEntidadesService().find(CntEntidad.class, selectedEntidad.getIdEntidad());\n mascaraNivel = getCntEntidadesService().generaCodigoNivelesSubAndPadre(selectedEntidad, \"N\");\n mascaraSubNivel = getCntEntidadesService().generaCodigoNivelesSubAndPadre(selectedEntidad, \"S\");\n longitudNivel = getCntEntidadesService().controlaLongitudNumero(selectedEntidad, \"N\");\n longitudSubNivel = getCntEntidadesService().controlaLongitudNumero(selectedEntidad, \"S\");\n }",
"private void defaultPerAllegatoAtto() {\n\t\tif(allegatoAtto.getFlagRitenute() == null) {\n\t\t\tallegatoAtto.setFlagRitenute(Boolean.FALSE);\n\t\t}\n\t\t//SIAC-6426\n\t\tif(allegatoAtto.getVersioneInvioFirma() == null){\n\t\t\tallegatoAtto.setVersioneInvioFirma(0);\n\t\t}\n\t}",
"void actualizarAjusteAutomaticoFacturaEstado(Integer codigoCompania, Long codigoFacturaEstado, String userId, Boolean ajusteAutomatico, BigDecimal valorDiferenciaRangoTolerancia) throws SICException ;",
"public void btnActualizarSecuencia()\r\n/* 653: */ {\r\n/* 654:727 */ AutorizacionDocumentoSRI autorizacionDocumentoSRI = null;\r\n/* 655:728 */ PuntoDeVenta puntoDeVenta = AppUtil.getPuntoDeVenta();\r\n/* 656: */ try\r\n/* 657: */ {\r\n/* 658:731 */ if (puntoDeVenta != null) {\r\n/* 659:732 */ autorizacionDocumentoSRI = this.servicioDocumento.cargarDocumentoConAutorizacion(getFacturaProveedorSRI().getDocumento(), puntoDeVenta, this.facturaProveedorSRI\r\n/* 660:733 */ .getFechaEmisionRetencion());\r\n/* 661: */ }\r\n/* 662:735 */ String numero = this.servicioSecuencia.obtenerSecuencia(getFacturaProveedorSRI().getDocumento().getSecuencia(), this.facturaProveedorSRI\r\n/* 663:736 */ .getFechaEmisionRetencion());\r\n/* 664: */ \r\n/* 665:738 */ this.facturaProveedorSRI.setNumeroRetencion(numero);\r\n/* 666:739 */ this.facturaProveedorSRI.setAutorizacionRetencion(autorizacionDocumentoSRI.getAutorizacion());\r\n/* 667: */ }\r\n/* 668: */ catch (ExcepcionAS2 e)\r\n/* 669: */ {\r\n/* 670:741 */ addErrorMessage(getLanguageController().getMensaje(e.getCodigoExcepcion()) + e.getMessage());\r\n/* 671: */ }\r\n/* 672: */ }",
"private void agregarFiltrosAdicionales() {\r\n if ((Utilidades.validarNulo(parametroUsuario) == true) && (!parametroUsuario.isEmpty())) {\r\n filtros.put(\"parametroUsuario\", parametroUsuario);\r\n }\r\n if ((Utilidades.validarNulo(parametroNombre) == true) && (!parametroNombre.isEmpty())) {\r\n filtros.put(\"parametroNombre\", parametroNombre);\r\n }\r\n if ((Utilidades.validarNulo(parametroApellido) == true) && (!parametroApellido.isEmpty())) {\r\n filtros.put(\"parametroApellido\", parametroApellido);\r\n }\r\n if ((Utilidades.validarNulo(parametroDocumento) == true) && (!parametroDocumento.isEmpty())) {\r\n filtros.put(\"parametroDocumento\", parametroDocumento);\r\n }\r\n if ((Utilidades.validarNulo(parametroCorreo) == true) && (!parametroCorreo.isEmpty())) {\r\n filtros.put(\"parametroCorreo\", parametroCorreo);\r\n }\r\n if (1 == parametroEstado) {\r\n filtros.put(\"parametroEstado\", \"true\");\r\n } else {\r\n if (parametroEstado == 2) {\r\n filtros.put(\"parametroEstado\", \"false\");\r\n }\r\n }\r\n if (1 == parametroGenero) {\r\n filtros.put(\"parametroGenero\", \"M\");\r\n } else {\r\n if (parametroGenero == 2) {\r\n filtros.put(\"parametroGenero\", \"F\");\r\n }\r\n }\r\n if (!\"TODOS\".equalsIgnoreCase(parametroTipoDocumento)) {\r\n filtros.put(\"parametroTipoDocumento\", parametroTipoDocumento);\r\n }\r\n }",
"@Override\n\tpublic void actualizarLinComClienImp(LineaComercialClienteImportacionDTO linComCliImpDTO)throws SICException{\n\t\ttry {\n\t\t\tLogeable.LOG_SICV2.info(\"Metodo actualizarLinComClienImp \");\n\t\t\tLogeable.LOG_SICV2.info(\"Parametros : \");\n\t\t\tLogeable.LOG_SICV2.info(\"userId : \"+linComCliImpDTO.getUserId());\n\t\t\tLogeable.LOG_SICV2.info(\"estado : \"+linComCliImpDTO.getEstado());\n\t\t\tLogeable.LOG_SICV2.info(\"codigoLineaComercial : \"+ linComCliImpDTO.getId().getCodigoLineaComercial());\n\t\t\tLogeable.LOG_SICV2.info(\"codigoClienteImportacion : \"+ linComCliImpDTO.getId().getCodigoClienteImportacion());\n\t\t\t\n\t\t\tStringBuilder query = new StringBuilder();\n\t\t\tQuery update;\n\t\t\t\t\n\t\t\thibernateH.getHibernateSession().clear();\n\t\t\t\t\n\t\t\tquery.append(\"update \").append(LineaComercialClienteImportacionDTO.class.getName()).append(\" d \")\n\t\t\t\t.append(\" set \")\n\t\t\t\t.append(\" d.fechaModificacion = CURRENT_TIMESTAMP, \")\n\t\t\t\t.append(\" d.estado = :pEstado, \")\n\t\t\t\t.append(\"d.idUsuarioModificacion = :pUsuarioModificacion \");\n\t\t\t\n\t\t\tquery.append(\" where \")\n\t\t\t\t.append(\" d.id.codigoLineaComercial = :pCodigoLineaComercial \");\n\t\t\t\n\t\t\tif(linComCliImpDTO.getId().getCodigoClienteImportacion() != null){\n\t\t\t\tquery.append(\" and d.id.codigoClienteImportacion = :pCodigoClienteImportacion \");\n\t\t\t}else{\n\t\t\t\tquery.append(\" and d.estado = :pEstadoDiferente \");\n\t\t\t}\n\t\t\t\n\t\t\tupdate = hibernateH.getHibernateSession().createQuery(query.toString());\n\t\t\t\n\t\t\tupdate.setString(\"pUsuarioModificacion\", linComCliImpDTO.getUserId());\n\t\t\tupdate.setString(\"pEstado\",linComCliImpDTO.getEstado());\n\t\t\tupdate.setLong(\"pCodigoLineaComercial\", linComCliImpDTO.getId().getCodigoLineaComercial());\n\t\t\tif(linComCliImpDTO.getId().getCodigoClienteImportacion() != null){\n\t\t\t\tupdate.setLong(\"pCodigoClienteImportacion\",linComCliImpDTO.getId().getCodigoClienteImportacion());\n\t\t\t}else{\n\t\t\t\tupdate.setString(\"pEstadoDiferente\",(SICConstantes.ESTADO_ACTIVO_NUMERICO.equals(linComCliImpDTO.getEstado())?SICConstantes.ESTADO_INACTIVO_NUMERICO:SICConstantes.ESTADO_ACTIVO_NUMERICO));\n\t\t\t}\n\t\t\tupdate.executeUpdate();\t\n\t\t\t\n\t\t\t\n\t\t} catch (SICException e) {\n\t\t\tthrow new SICException(\"Error actualizarLinComClienImp: \",e);\n\t\t}\n\t}",
"public void salir() {\n if (bandera == 1) {\n altoTabla = \"310\";\n formulaProceso = (Column) FacesContext.getCurrentInstance().getViewRoot().findComponent(\"form:datosFormulaProceso:formulaProceso\");\n formulaProceso.setFilterStyle(\"display: none; visibility: hidden;\");\n\n formulaPeriodicidad = (Column) FacesContext.getCurrentInstance().getViewRoot().findComponent(\"form:datosFormulaProceso:formulaPeriodicidad\");\n formulaPeriodicidad.setFilterStyle(\"display: none; visibility: hidden;\");\n\n RequestContext.getCurrentInstance().update(\"form:datosFormulaProceso\");\n bandera = 0;\n filtrarListFormulasProcesos = null;\n tipoLista = 0;\n }\n listFormulasProcesosBorrar.clear();\n listFormulasProcesosCrear.clear();\n listFormulasProcesosModificar.clear();\n index = -1;\n secRegistro = null;\n k = 0;\n listFormulasProcesos = null;\n guardado = true;\n RequestContext.getCurrentInstance().update(\"form:ACEPTAR\");\n formulaActual = null;\n lovProcesos = null;\n }",
"public void acutualizarInfo(){\n String pibId = String.valueOf(comentario.getId());\n labelId.setText(\"#\" + pibId);\n\n String autor = comentario.getAutor().toString();\n labelAutor.setText(autor);\n\n String fecha = comentario.getFechaCreacion().toString();\n labelFecha.setText(fecha);\n \n String contenido = comentario.getContenido();\n textAreaContenido.setText(contenido);\n \n String likes = ((Integer)comentario.totalLikes()).toString();\n labelLikes.setText(likes);\n \n Collection<Comentario> comments = socialNetwork.searchSubComentarios(comentario);\n panelSubComentarios.loadItems(comments, 15);\n \n if(comentario.isSubcomentario()){\n jButton4.setEnabled(true);\n }\n else{\n jButton4.setEnabled(false);\n }\n }",
"@Override\r\n\tpublic void atualizar(Celular celular) throws Exception {\n\t\t\r\n\t}",
"@RequestMapping(value = \"/modificarusuarioisoft\", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)\n public CommonsResponse modifyuser(@RequestParam String llave_seguridad, @RequestBody NewUserInputDTO request, HttpServletRequest requestTransaction)\n {\n CommonsResponse response = new CommonsResponse();\n Map<String, String> mapConfiguration = null;\n try\n {\n logger.debug(\"Se valida la licencia si puede consumir los procesos.\");\n mapConfiguration = GatewayBaseBean.validateLicenceToWS(llave_seguridad, webUtils.getClientIp(requestTransaction));\n\n /*Log.getInstance().debug(ModulesIsoft.ISOFT_PROFILE.getCodigo(), mapConfiguration.get(MAP_USER_TRANSACTION), \"Se validan los parametros de entrada.\");\n GatewayBaseBean.validarParametrosGenericos(request.getUsuario(), request.getNombres());\n GatewayBaseBean.validarEmail(request.getCorreo());\n Usuarios user = GatewayBaseBean.clonUsersRequest(request);*/\n\n userServices.modifyUser(mapConfiguration, new Usuarios());\n }\n catch (LicenseException ex)\n {\n response.toLicenceWarn(messageSource, KEY_ERRORS_GENERIC + ex.getCode(), llave_seguridad);\n logger.error(\"Parametros de Licencia Errados WS [modificarusuarioisoft], key[\"+llave_seguridad+\"].\", ex);\n return response;\n }\n catch (ServiceException ex)\n {\n response.toParamsWarn(messageSource, KEY_ERRORS_GENERIC + ex.getCode());\n logger.warn(\"Error de Servicio WS [modificarusuarioisoft].\", ex);\n return response;\n }\n catch (Exception ex)\n {\n logger.warn(\"Error Generico en WS [modificarusuarioisoft].\", ex);\n GatewayBaseBean.matchToResponses(response);\n return response;\n }\n logger.info(\"Se retorna respuesta efectiva del WS [modificarusuarioisoft].\");\n return response.toOk();\n }",
"public void treatment()\n {\n\t\tCommunicationManagerServer cms = CommunicationManagerServer.getInstance();\n\t\tDataServerToComm dataInterface = cms.getDataInterface();\n\t\t/** On récupère et stocke l'adresse IP du serveur\n\t\t */\n\t\tdataInterface.updateUserChanges(user);\n\n\t /** Création du message pour le broadcast des informations**/\n\t updatedAccountMsg message = new updatedAccountMsg(this.user);\n\t\tmessage.setPort(this.getPort());\n\t cms.broadcast(message);\n\t}",
"public String aceptarEntregaMateriales_action() {\n try {\n\n\n if (codEstadoSolicitudMateriales.equals(\"2\") || codEstadoSolicitudMateriales.equals(\"3\")) {\n String consulta = \"UPDATE SOLICITUDES_MANTENIMIENTO SET COD_ESTADO_SOLICITUD_MANTENIMIENTO = '5'\" +\n \" WHERE COD_SOLICITUD_MANTENIMIENTO = '\" + codSolicitudMantenimiento + \"'\";\n System.out.println(\"consulta \"+consulta);\n Statement st = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n st.executeUpdate(consulta);\n st.close();\n\n //redireccion a la pagina principal\n FacesContext facesContext = FacesContext.getCurrentInstance();\n ExternalContext ext = facesContext.getExternalContext();\n ext.redirect(\"navegador_solicitud_mantenimiento_usuario.jsf\");\n\n } else {\n FacesContext facesContext = FacesContext.getCurrentInstance();\n facesContext.addMessage(alert.getClientId(facesContext),\n new FacesMessage(FacesMessage.SEVERITY_INFO, itemIteracionMateriales.getNombreMaterial() +\n \" no hubo entrega de materiales \", \"\"));\n }\n\n\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }",
"public int saveHeadControl(int idTramite, int empresa_id, int almacen_id, String serie, int folio, String serieBoleto, int folioBoleto, \r\n\t\t\t int cliente_id, String identificacion,String cveIdentificacion,int numitems, String fecha, String hora, int usuario_id, String timecreate ,double tiempoMinimo ,String obs ) {\r\n\t\tString sql = \"UPDATE `cabcontrol` SET `EMPRESA_ID`='\"+empresa_id+\"',`ALMACEN_ID`='\"+almacen_id+\"',`SERIE`='\"+serie+\"',`FOLIO`='\"+folio+\"',\"\r\n\t\t\t\t+ \"`SERIEBOLETO`='\"+serieBoleto+\"',`FOLIOBOLETO`='\"+folioBoleto+\"',`CLIENTE_ID`='\"+cliente_id+\"',`CLIENTECOD`='\"+identificacion+\"', `IDENTIFICACION`='\"+cveIdentificacion+\"',`NUMITEMS`='\"+numitems+\"',\"\r\n\t\t\t + \"`FECHAIN`='\"+fecha+\"',`HORAIN`='\"+hora+\"',`USUARIO_IDIN`='\"+usuario_id+\"',`TIMECREATE`='\"+timecreate+\"', TIEMPOTOTALOUT='\"+tiempoMinimo+\"' ,`OBSERVACION`='\"+obs+\"' WHERE `IDTRAMITE` ='\"+idTramite+\"' \";\r\n\t\treturn template.update(sql);\r\n\t}",
"public static String alterarFornecedor(Fornecedor fornecedor) {\r\n DateFormat dc = new SimpleDateFormat(\"yyyy-MM-dd\");//Formata data para o formato Mysql\r\n String sql = \"UPDATE fornecedor SET nome_fornecedor='\" + fornecedor.getNome().toUpperCase()\r\n + \"',data_cadastro_fornecedor='\" + dc.format(Date.parse((fornecedor.getData_cadastro())))\r\n + \"',cnpj_fornecedor='\" + fornecedor.getN_documento()\r\n + \"',email_fornecedor='\" + fornecedor.getEmail().toUpperCase()\r\n + \"',endereco_fornecedor='\" + fornecedor.getEndereço().toUpperCase() + \"',numero_fornecedor=\" + fornecedor.getNumero()\r\n + \",bairro_fornecedor='\" + fornecedor.getBairro().toUpperCase() + \"',cep_fornecedor='\" + fornecedor.getCep()\r\n + \"',telefone_fornecedor='\" + fornecedor.getTelefone() + \"',estado_fornecedor='\" + fornecedor.getEstado()\r\n + \"',cidade_fornecedor='\" + fornecedor.getCidade().toUpperCase() + \"' WHERE cod_fornecedor=\" + fornecedor.getCódigo() + \";\";\r\n //.toUpperCase() para salvar os dados em maiusculo no BD\r\n try {\r\n BD.comando.executeUpdate(sql);\r\n return null;\r\n } catch (SQLException e) {\r\n return \"Erro na alteração do Fornecedor no Banco de Dados\\n\" + e.getMessage();\r\n }\r\n }",
"void actualizarRondaCancion( Cancion cancion, Date fecha) throws ExceptionDao;",
"public static boolean modif(Forma form, String tipo, String operador) {\n if(operador.equals(\"resta\")){\n String disp = \"\";\n String tabla = tipo;\n String query = \"\";\n \n switch (tipo) {\n case \"alumnoMaterial\":\n case \"profeMaterial\":\n tabla = \"material\";\n break;\n case \"profeEquipo\":\n case \"alumnoEquipo\":\n tabla = \"equipo\";\n break;\n case \"profeConsumible\":\n tabla = \"consumible\";\n break;\n case \"profeReactivo\":\n tabla = \"reactivo\";\n break;\n default:\n break;\n }\n try {\n Statement statement = connection.createStatement();\n query = \"SELECT Disponibilidad FROM \" + tabla +\n \" WHERE Nombre = '\" + form.getDesc() + \"'\";\n ResultSet result = statement.executeQuery(query);\n while (result.next()) {\n disp = result.getString(1);\n }\n } catch (SQLException ex) {\n Logger.getLogger(ManejoBasesDatos.class.getName()).log(Level.SEVERE, null, ex);\n return false;\n }\n //checo que haya suficientes\n int iDisp = Integer.parseInt(disp);\n int iCant = Integer.parseInt(form.getCant());\n iDisp = iDisp - iCant;\n //si no hay, regreso falso para fallar\n if(iDisp < 0) {\n return false;\n } else {\n //si si hay, inserto la nueva dipobilidad en el inventario\n try {\n query = \"UPDATE \" + tabla + \" SET Disponibilidad = ? WHERE Nombre = ?\";\n PreparedStatement preparedStmt = connection.prepareStatement(query);\n preparedStmt.setInt (1, iDisp);\n preparedStmt.setString(2, form.getDesc());\n preparedStmt.executeUpdate();\n \n if (preparedStmt.executeUpdate() == 1) {\n return true;\n }\n } catch (SQLException ex) {\n Logger.getLogger(ManejoBasesDatos.class.getName()).log(Level.SEVERE, null, ex);\n return false;\n }\n }\n return false;\n } else {\n String disp = \"\";\n String tabla = tipo;\n String query = \"\";\n \n try {\n Statement statement = connection.createStatement();\n query = \"SELECT Disponibilidad FROM \" + tabla +\n \" WHERE Nombre = '\" + form.getDesc() + \"'\";\n ResultSet result = statement.executeQuery(query);\n while (result.next()) {\n disp = result.getString(1);\n }\n } catch (SQLException ex) {\n Logger.getLogger(ManejoBasesDatos.class.getName()).log(Level.SEVERE, null, ex);\n return false;\n }\n //checo que haya suficientes\n int iDisp = Integer.parseInt(disp);\n int iCant = Integer.parseInt(form.getCant());\n iDisp = iDisp + iCant;\n //si no hay, regreso falso para fallar\n \n //si si hay, inserto la nueva dipobilidad en el inventario\n try {\n query = \"UPDATE \" + tabla + \" SET Disponibilidad = ? WHERE Nombre = ?\";\n PreparedStatement preparedStmt = connection.prepareStatement(query);\n preparedStmt.setInt (1, iDisp);\n preparedStmt.setString(2, form.getDesc());\n preparedStmt.executeUpdate();\n \n if (preparedStmt.executeUpdate() == 1) {\n return true;\n }\n } catch (SQLException ex) {\n Logger.getLogger(ManejoBasesDatos.class.getName()).log(Level.SEVERE, null, ex);\n return false;\n }\n }\n return false;\n }",
"public void modifier(){\r\n try {\r\n //affectation des valeur \r\n echeance_etudiant.setIdEcheanceEtu(getViewEtudiantInscripEcheance().getIdEcheanceEtu()); \r\n \r\n echeance_etudiant.setAnneeaca(getViewEtudiantInscripEcheance().getAnneeaca());\r\n echeance_etudiant.setNumetu(getViewEtudiantInscripEcheance().getNumetu());\r\n echeance_etudiant.setMatricule(getViewEtudiantInscripEcheance().getMatricule());\r\n echeance_etudiant.setCodeCycle(getViewEtudiantInscripEcheance().getCodeCycle());\r\n echeance_etudiant.setCodeNiveau(getViewEtudiantInscripEcheance().getCodeNiveau());\r\n echeance_etudiant.setCodeClasse(getViewEtudiantInscripEcheance().getCodeClasse());\r\n echeance_etudiant.setCodeRegime(getViewEtudiantInscripEcheance().getCodeRegime());\r\n echeance_etudiant.setDrtinscri(getViewEtudiantInscripEcheance().getInscriptionAPaye());\r\n echeance_etudiant.setDrtforma(getViewEtudiantInscripEcheance().getFormationAPaye()); \r\n \r\n echeance_etudiant.setVers1(getViewEtudiantInscripEcheance().getVers1());\r\n echeance_etudiant.setVers2(getViewEtudiantInscripEcheance().getVers2());\r\n echeance_etudiant.setVers3(getViewEtudiantInscripEcheance().getVers3());\r\n echeance_etudiant.setVers4(getViewEtudiantInscripEcheance().getVers4());\r\n echeance_etudiant.setVers5(getViewEtudiantInscripEcheance().getVers5());\r\n echeance_etudiant.setVers6(getViewEtudiantInscripEcheance().getVers6()); \r\n \r\n //modification de l'utilisateur\r\n echeance_etudiantFacadeL.edit(echeance_etudiant); \r\n } catch (Exception e) {\r\n System.err.println(\"Erreur de modification capturée : \"+e);\r\n } \r\n }",
"@FXML\r\n\tpublic void applicaFiltro(ActionEvent event) {\r\n\t\tprodotti = ac.getProdotti();\r\n\t\t\r\n\t\tint codice = -1; \r\n\t\tfloat pMin = Float.MIN_VALUE;\r\n\t\tfloat pMax = Float.MAX_VALUE;\r\n\t\ttry{\r\n\t\t\tcodice = Integer.parseInt(codiceProdotto.getText());\r\n\t\t}\r\n\t\tcatch(Exception e) {\r\n\t\t\tif(!codiceProdotto.getText().equals(\"\"))\r\n\t\t\t\talert(\"Errore di conversione\",\"Attenzione!\",\"Il codice prodotto inserito non risulta essere un valore numerico valido\");\r\n\t\t\tcodiceProdotto.setText(\"\");\r\n\t\t}\r\n\t\ttry{\r\n\t\t\tpMin = Float.parseFloat(prezzoMin.getText());\r\n\t\t}\r\n\t\tcatch(Exception e) {\r\n\t\t\tif(!prezzoMin.getText().equals(\"\"))\r\n\t\t\t\talert(\"Errore di conversione\",\"Attenzione!\",\"Il prezzo minimo inserito non risulta essere un valore numerico valido\");\r\n\t\t\tprezzoMin.setText(\"\");\r\n\t\t}\r\n\t\ttry{\r\n\t\t\t pMax = Float.parseFloat(prezzoMax.getText());\r\n\t\t}\r\n\t\tcatch(Exception e) {\r\n\t\t\tif(!prezzoMax.getText().equals(\"\"))\r\n\t\t\t\talert(\"Errore di conversione\",\"Attenzione!\",\"Il prezzo massimo inserito non risulta essere un valore numerico valido\");\r\n\t\t\tprezzoMax.setText(\"\");\r\n\t\t}\r\n\t\tString prod = nomeProdotto.getText();\t\r\n\t\t\r\n\t\tprodotti = ac.applicaFiltro(prodotti, OptionalInt.of(codice), prod,\r\n\t\t\t\t\t\t\t\t\tOptional.of(pMin), Optional.of(pMax));\r\n\t\t\r\n\t\tcodiceCol.setCellValueFactory(new PropertyValueFactory<Prodotto, Integer>(\"codice\"));\r\n prodottoCol.setCellValueFactory(new PropertyValueFactory<Prodotto, String>(\"nome\"));\r\n descCol.setCellValueFactory(new PropertyValueFactory<Prodotto, String>(\"descrizione\"));\r\n prezzoCol.setCellValueFactory(new PropertyValueFactory<Prodotto, Float>(\"prezzo\"));\r\n disponibilitaCol.setCellValueFactory(new PropertyValueFactory<Prodotto, Integer>(\"disponibilita\"));\r\n \r\n Collections.sort(prodotti);\r\n tabellaProdotti.getItems().setAll(prodotti);\r\n}",
"public void reversarComprobante() {\r\n if (tab_tabla1.getTotalFilas() > 0) {\r\n String ide_cnccc_anular = tab_tabla1.getValor(\"ide_cnccc\");\r\n // realizo el asiento de reversa\r\n con.reversar(ide_cnccc_anular, \"Asiento de reversa de la transaccion num: \" + ide_cnccc_anular, con);\r\n String ide_cnccc_nuevo = con.getTab_cabecera().getValor(\"ide_cnccc\");\r\n if (ide_cnccc_nuevo != null && !ide_cnccc_nuevo.isEmpty()) {\r\n // cambio el estado de libro bancos a anulado\r\n utilitario.getConexion().agregarSqlPantalla(\"update tes_cab_libr_banc set ide_teelb=1 where ide_cnccc=\" + ide_cnccc_anular);\r\n // consulto si tiene Documentos por Pagar\r\n TablaGenerica tab_cxp_cab_fact = utilitario.consultar(\"select * from cxp_cabece_factur where ide_cnccc=\" + ide_cnccc_anular);\r\n if (tab_cxp_cab_fact.getTotalFilas() > 0) {\r\n // cambio elestado a anulado de la factura\r\n utilitario.getConexion().agregarSqlPantalla(\"update cxp_cabece_factur set ide_cpefa=1 where ide_cnccc=\" + ide_cnccc_anular);\r\n cls_cuentas_x_pagar cxp = new cls_cuentas_x_pagar();\r\n // reverso la transaccion CxP\r\n cxp.reversar(ide_cnccc_nuevo, tab_cxp_cab_fact.getValor(0, \"ide_cpcfa\"), \"Reversa CxP de fact. num:\" + tab_cxp_cab_fact.getValor(0, \"numero_cpcfa\") + \" y asiento num:\" + ide_cnccc_anular, null);\r\n // hago reversa de inventario\r\n TablaGenerica tab_inv_cab_inv = utilitario.consultar(\"select * from inv_cab_comp_inve where ide_cnccc=\" + ide_cnccc_anular);\r\n if (tab_inv_cab_inv.getTotalFilas() > 0) {\r\n cls_inventario inv = new cls_inventario();\r\n inv.reversar_menos(ide_cnccc_nuevo, tab_inv_cab_inv.getValor(0, \"ide_cnccc\"), \"Reversa de comprobante num:\" + ide_cnccc_anular);\r\n }\r\n }\r\n\r\n boolean boo_asiento_costos = false;\r\n String ide_asiento_costos = \"-1\";\r\n // consulto si tiene CXC\r\n\r\n TablaGenerica tab_cxc_cab_fact = utilitario.consultar(\"select * from cxc_cabece_factura where ide_cnccc=\" + ide_cnccc_anular);\r\n if (tab_cxc_cab_fact.getTotalFilas() > 0) {\r\n // cambio elestado a anulado de la factura cxc si tiene\r\n utilitario.getConexion().agregarSqlPantalla(\"update cxc_cabece_factura set ide_ccefa=1 where ide_cnccc=\" + ide_cnccc_anular);\r\n cls_cuentas_x_cobrar cxc = new cls_cuentas_x_cobrar();\r\n //cxc.reversar(ide_cnccc_nuevo, tab_cxc_cab_fact.getValor(0, \"ide_cccfa\"), \"Reversa CxP de fact. num:\" + tab_cxc_cab_fact.getValor(0, \"secuencial_cccfa\") + \" y asiento num:\" + ide_cnccc_anular);\r\n TablaGenerica tab_inv_cab_inv = utilitario.consultar(\"select * from inv_cab_comp_inve where ide_incci in ( \"\r\n + \"select ide_incci from inv_det_comp_inve where ide_cccfa=\" + tab_cxc_cab_fact.getValor(0, \"ide_cccfa\") + \" GROUP BY ide_incci)\");\r\n if (tab_inv_cab_inv.getTotalFilas() > 0) {\r\n cls_inventario inv = new cls_inventario();\r\n // reverso inventario\r\n inv.reversar_mas(ide_cnccc_nuevo, tab_inv_cab_inv.getValor(0, \"ide_cnccc\"), \"Reversa de comprobante num:\" + ide_cnccc_anular);\r\n // reverso el comprobante de costos\r\n boo_asiento_costos = true;\r\n ide_asiento_costos = tab_inv_cab_inv.getValor(0, \"ide_cnccc\");\r\n }\r\n }\r\n\r\n utilitario.getConexion().guardarPantalla();\r\n tab_tabla1.setFilaActual(con.getTab_cabecera().getValor(\"ide_cnccc\"));\r\n tab_tabla1.ejecutarSql();\r\n if (boo_asiento_costos == true) {\r\n con.limpiar();\r\n con.reversar(ide_asiento_costos, \"Asiento de reversa asiento costos de la transaccion num: \" + ide_cnccc_anular, con);\r\n utilitario.getConexion().guardarPantalla();\r\n }\r\n }\r\n }\r\n }",
"public String update() throws Exception {\r\n\t\tlog.info(\"updateGeneral()\");\r\n\t\tlog.info(\" id cliente \" + objClienteSie.getIdcliente() + \" nombre \"\t+ objClienteSie.getNombrecliente());\r\n\r\n\t\tsetTipoDocumento(objClienteSie.getTbTipoDocumentoIdentidad().getIdtipodocumentoidentidad());\r\n\t\tlog.info(\"TIPO DE DOCUMENTO-DNI=1 -->\"+ objClienteSie.getTbTipoDocumentoIdentidad().getIdtipodocumentoidentidad());\r\n\r\n\t\t/*******DOMICILIO ES PARA EDITAR PARECE***********************/\r\n\t\tlog.info(\"buscar al momento que se hace editar -->\");\r\n\t\tobjDomicilio = objDomicilioService.buscarDomicilioXIdcliente(objClienteSie.getIdcliente());\r\n\t\tlog.info(\" --Id-- \" + objDomicilio.getIddomiciliopersona()+ \" --IdCLIENTE-- \" + objDomicilio.getIdcliente()+ \" --Ubicacion-- \"+ objDomicilio.getUbicacion() );\r\n\t\t\r\n\t\t/**********NUEVO DOMICILIO********************************/\r\n\t\tlog.info(\"Antes de llegar al objDomicilioNew---> \");\r\n\t\tobjDomicilioNew = objDomicilioService.buscarDomicilioXIdcliente(objClienteSie.getIdcliente());\r\n\t\tlog.info(\"despues de llegar al objDomicilioNew\"+ objDomicilioNew.getIdcliente());\r\n\t \r\n /*seteo domicilio*/\r\n\tif(objDomicilio!=null){\r\n\t\tif (objDomicilio.getTbUbigeo()!=null) {\r\n\t\tlog.info(\"Dentro del IF\");\t\r\n setIdDepartamento(objDomicilio.getTbUbigeo().getCoddepartamento());\r\n log.info(\"setIdDepartamento---> \"+ objDomicilio.getTbUbigeo().getCoddepartamento());\r\n comboManager.setIdDepartamento(idDepartamento);\r\n setIdProvincia(objDomicilio.getTbUbigeo().getCodprovincia());\r\n comboManager.setIdProvincia(idProvincia);\r\n setIdUbigeo1(objDomicilio.getTbUbigeo().getIdubigeo().toString());\r\n setIdDistrito(objDomicilio.getTbUbigeo().getCoddistrito());\t \r\n setTipo(objDomicilio.getTbTipoCasa().getIdtipocasa());\r\n log.info(\" tipo casa \"+objDomicilio.getTbTipoCasa().getIdtipocasa());\t \r\n objDomicilio.setTbEstadoGeneral(objDomicilio.getTbEstadoGeneral());\t \r\n\t\t}\r\n\telse{\r\n\t\tlog.info(\"Dentro del Else\");\r\n\t\t objDomicilio.setUbicacion(objDomicilio.getUbicacion());\r\n\t log.info(\"--UBICACION--\"+ objDomicilio.getUbicacion());\r\n\t setTipo(objDomicilio.getTbTipoCasa().getIdtipocasa());\r\n\t log.info(\" tipo casa \"+objDomicilio.getTbTipoCasa().getIdtipocasa());\t\t\t \t\t\t \r\n\t objDomicilio.setTbEstadoGeneral(objDomicilio.getTbEstadoGeneral());\r\n\t\t}\r\n \t} \r\n /*****************TELEFONO************************/\r\n \r\n\t\tTelefonoPersonaSie t = objTelefonoService.buscarTelefonoXIdcliente(objClienteSie.getIdcliente());\r\n\t\tlog.info(\" id \" + t.getIdtelefonopersona()+ \" numero Telefonico \" + t.getTelefono() );\r\n\t\t /***seteo teléfono***/\r\n TelefonoPersonaList = objTelefonoService.listarTelefonoEmpleadosXidcliente(objClienteSie.getIdcliente()); \r\n\tfor (int i = 0; i < TelefonoPersonaList.size(); i++) {\r\n \tTelefonoPersonaList.get(i).setItem(\"Agregado\");\r\n }\r\n\t\r\n\t\t/*******************NUEVO DOMICILIO***************************/\r\n\t\tDomicilioPersonaSie d = objDomicilioService.buscarDomicilioXIdcliente(objClienteSie.getIdcliente());\r\n\t\tlog.info(\"ID-DOMICILIO--> \"+ d.getIddomiciliopersona()+ \" DOMICILIO---> \" + d.getDomicilio());\r\n\t\t/*****Lista Domicilio***/\r\n\t\tDomicilioPersonaList = objDomicilioService.listarDomicilioCliente(objClienteSie.getIdcliente());\r\n\tfor (int i = 0; i < DomicilioPersonaList.size(); i++) {\r\n\t\tDomicilioPersonaList.get(i).setItem(\"Agregado\");\t\t\r\n\t\t}\r\n\t\t\r\n\t\tsetNewRecord(false);\r\n\t\treturn getViewMant();\r\n\t\t}",
"void actualizarCampania(GestionPrecioDTO campania, UserDto user);",
"public void updateChamados() {\n FilterAction action = comboFilter.getValue();\n if (action != null) {\n action.execute();\n }\n }",
"private void RealizarAccion() {\n if (ValidarCampos()) {\n\n persona.setPrimerNombre(txtPrimerNombre.getText());\n persona.setSegundoNombre(txtSegundoNombre.getText());\n persona.setPrimerApellido(txtPrimerApellido.getText());\n persona.setSegundoApellido(txtSegundoApellido.getText());\n persona.setTelefono(txtTelefono.getText());\n persona.setCedula(txtCedula.getText());\n persona.setCorreo(txtCorreo.getText());\n persona.setDireccion(txtDireccion.getText());\n\n empleado.setFechaInicio(dcFechaInicio.getDate());\n empleado.setSalario(Double.parseDouble(txtSalario.getText()));\n empleado.setCargo(txtCargo.getText());\n empleado.setUsuarioByUserModificacion(SessionHelper.usuario);\n empleado.setFechaModificacion(new Date());\n empleado.setRegAnulado(false);\n\n switch (btnAction.getText()) {\n case \"Guardar\":\n int maxid = personaBean.MaxId() + 1;\n persona.setIdPersona(maxid);\n\n Dbcontext.guardar(persona);\n\n empleado.setIdEmpleado(maxid);\n empleado.setPersona(persona);\n empleado.setUsuarioByUserCreacion(SessionHelper.usuario);\n empleado.setFechaCreacion(new Date());\n\n Dbcontext.guardar(empleado);\n break;\n\n case \"Actualizar\":\n\n Dbcontext.actualizar(persona);\n\n Dbcontext.actualizar(empleado);\n break;\n }\n if (ifrRegistroEmpleados.isActive) {\n ifrRegistroEmpleados.CargarTabla();\n }\n\n Mensajes.OperacionExitosa(this);\n dispose();\n } else {\n Mensajes.InformacionIncompleta(this);\n }\n }",
"@Override\r\n\tpublic void updateforSTA(ManufacturersVO ManufacturersVO) {\n\t\t\r\n\t}",
"private void actualizarVentanaOperadores() throws SQLException {\n Sistema.getControladorVentanaOperadores().actualizarTablaOperadores(\"SELECT * FROM operador WHERE activo=TRUE ORDER BY id ASC;\");\n }",
"public void actualizar() {\n\n\t}",
"public void ingresaAdministrativo() {\n\tEstableceDatosAdministrativos();\n\tint cambio=0;\n\tdo {\n\t\t\n\t\ttry {\n\t\t\tsetMontoCredito(Double.parseDouble(JOptionPane.showInputDialog(\"Ingrese el monto del credito (�3 600 000 maximo)\")));\n\t\t\tcambio=1;\n\t\t\tif(getMontoCredito()<0||getMontoCredito()>3600000) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"El monto debe ir de �0 a �3600000\");\n\t\t\t}\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tJOptionPane.showMessageDialog(null, \"Ingrese solo numeros\");\n\t\t}\n\t}while(getMontoCredito()<0||getMontoCredito()>3600000||cambio==0);\n\tsetInteres(12);\n\tsetPlazo(60);\n\tsetCuotaPagar(calculoCuotaEspecialOrdinario());\n\testableceEquipoComputo();\n}",
"public boolean ActualizarInformacionInmueble(String id,String direccion,String lugarReferencia,String tamano, String estrato,String tipo,String habitaciones,String usuario,String precio){\n\t\ttry{\n\t\t\tPreparedStatement statement=getConnection().prepareStatement(\"update inmuebles set direccion=?,lugarReferencia=?,tamano=?,estrato=?,tipo=?,habitaciones=?,idUsuario=?,precio=? where id=\"+id);\n\t\t\tstatement.setString(1, direccion);\n\t\t\tstatement.setString(2, lugarReferencia);\n\t\t\tstatement.setInt(3, Integer.parseInt(tamano));\n\t\t\tstatement.setInt(4, Integer.parseInt(estrato));\n\t\t\tstatement.setString(5, tipo);\n\t\t\tstatement.setInt(6, Integer.parseInt(habitaciones));\n\t\t\tstatement.setString(7, usuario);\n\t\t\tstatement.setInt(8, Integer.parseInt(precio));\n\t\t\tstatement.execute();\n\t\t\tstatement.close();\n\t\t\treturn true;\n\t\t}catch(SQLException exception){\n\t\t\tSystem.err.println(exception);\n\t\t\treturn false;\n\t\t}\n\t}",
"public static void main(String[] args){\n \r\n Log.registroTraza( \"Iniciando ejecución de la tarea SolicitudesAVencerse\");\r\n \r\n String strSQL, strFechaRecibo, strReqRpta, strRadicado, strIdResp = \"\";\r\n int totalSolAlertadas=0, totalSolVencidas=0;\r\n String[] strTemp = null;\r\n int lgTiempoRpta, lgRestante, lgTiempoConfig; \r\n Vector arrConsecutivos = new Vector();\r\n Vector arrFechasCreacion = new Vector();\r\n Vector arrReqRpta = new Vector();\r\n Vector arrTiempoRpta = new Vector();\r\n Vector arrIdsResp = new Vector();\r\n Comunes comun = new Comunes();\r\n Notificacion n = new Notificacion();\r\n Calendar fechaRecibo = null;\r\n Calendar fechaRpta = null;\r\n Calendar fechaActual = null;\r\n \r\n try{\r\n strSQL = \"select g.txtNroDiasAlerta from buzon.buzon_generales g where g.txtCodigo = 'frmGeneral'\";\r\n String[] strDatosGral = GestionSQL.getFila(strSQL, \"Buzon\");\r\n lgTiempoConfig = Integer.parseInt(strDatosGral[0]);\r\n \r\n strSQL = \"select DISTINCT p.txtRadicado, p.dtFechaCreacion, r.txtReqRpta, r.txtTiempoRpta, p.txtNomCargo from buzon_pqrs p INNER JOIN buzon_retroalimentacion r on (p.txtTipoPQRS = r.txtCodigo) where (p.txtIdEstado <> 'AT' and p.txtIdEstado <> 'CPU') ORDER BY CAST(p.txtRadicado AS SIGNED)\";\r\n Vector arrSols = GestionSQL.consultaSQL(strSQL,\"Buzon\",\"ALERTASSOLS\");\r\n \r\n if (arrSols != null){ \r\n for (int i=0;i<arrSols.size();i++){\r\n strTemp = arrSols.get(i).toString().split(\",\");\r\n arrConsecutivos.add(strTemp[0]);\r\n arrFechasCreacion.add(strTemp[1]);\r\n arrReqRpta.add(strTemp[2]);\r\n arrTiempoRpta.add(strTemp[3]); \r\n arrIdsResp.add(strTemp[4]);\r\n } \r\n\r\n //Obtener los feriados.\r\n\r\n Vector arrFechas = new Vector();\r\n strSQL = \"SELECT d.dtFecha from users.users_dias_no_habiles d order by d.dtFecha\";\r\n arrFechas = GestionSQL.consultaSQL(strSQL, \"Users\", \"FECHAS\"); \r\n\r\n for(int i=0;i<arrConsecutivos.size();i++){\r\n strRadicado = arrConsecutivos.get(i).toString(); \r\n strReqRpta = arrReqRpta.get(i).toString();\r\n strIdResp = arrIdsResp.get(i).toString();\r\n lgRestante = 0; \r\n fechaRecibo = null;\r\n fechaRpta = null;\r\n fechaActual = comun.calcularFechaActual();\r\n\r\n if (strReqRpta.equals(\"S\")){ \r\n lgTiempoRpta = Integer.parseInt(arrTiempoRpta.get(i).toString());\r\n fechaRecibo = Calendar.getInstance(); \r\n\r\n strFechaRecibo = arrFechasCreacion.get(i).toString();\r\n strTemp = strFechaRecibo.split(\"-\"); \r\n fechaRecibo.set(Integer.parseInt(strTemp[0]),(Integer.parseInt(strTemp[1])-1),Integer.parseInt(strTemp[2]));\r\n fechaRecibo.set(Calendar.SECOND, 0);\r\n fechaRecibo.set(Calendar.MILLISECOND, 0); \r\n\r\n fechaRpta= Calendar.getInstance();\r\n fechaRpta.set(Calendar.SECOND, 0);\r\n fechaRpta.set(Calendar.MILLISECOND, 0); \r\n fechaRpta = comun.incrementarDiasHabiles(fechaRecibo, lgTiempoRpta, arrFechas); \r\n\r\n lgRestante = (comun.getDiasHabiles(fechaActual, fechaRpta, arrFechas)-1); \r\n\r\n if ((lgRestante <= lgTiempoConfig) && (lgRestante > 0)){ \r\n n.NotificacionSolAVencer(strRadicado, Long.valueOf(lgRestante + 1), strIdResp); \r\n totalSolAlertadas = totalSolAlertadas + 1;\r\n }else{\r\n if (lgRestante<0){\r\n n.NotificacionSolVencidas(strRadicado, fechaRpta, strIdResp);\r\n totalSolVencidas = totalSolVencidas + 1;\r\n } \r\n } \r\n } \r\n }\r\n }\r\n }catch(Exception e){\r\n Log.registroTraza(\"Se generó un error en la tarea SolicitudesAVencerse: \" + e.getMessage());\r\n }\r\n\r\n SimpleDateFormat formato = new SimpleDateFormat(\"hh:mm:ss\");\r\n Log.registroTraza( \"Tarea SolicitudesAVencerse invocada a la hora: \" + formato.format(new Date()) + \". Solicitudes alertadas: \" + totalSolAlertadas + \". Solicitudes vencidas: \" + totalSolVencidas);\r\n\r\n }",
"void guardarActualizarEstados(FichaDocente selectDcnt, TipoHuella selectTp, boolean flagMovil,\n\t\t\tboolean flagSinHuella);",
"public int ModificarAnuncioFlash(AnuncioDTO anuncioDTO){\n int status=0;\n try{\n Connection conect = getConection();\n Properties sqlProp = new Properties();\n InputStream is = new FileInputStream(sqlPropertiesPath);\n sqlProp.load(is);\n PreparedStatement ps = conect.prepareStatement(sqlProp.getProperty(\"modificar.AnuncioFlash\"));\n ps.setString(1, anuncioDTO.getTitulo());\n ps.setString(2, anuncioDTO.getCuerpo());\n ps.setString(3, anuncioDTO.getEstadoAnuncio().toString());\n java.sql.Date fecha_fin=new java.sql.Date(anuncioDTO.getFechaFin().getTime());\n ps.setDate(4, fecha_fin);\n ps.setInt(5, anuncioDTO.getId());\n \n status=ps.executeUpdate();\n\n BorrarAnuncioDestinatarios(anuncioDTO.getId());\n\n PreparedStatement psAddDestinatario = conect.prepareStatement(sqlProp.getProperty(\"insertar.Destinatario\"));\n psAddDestinatario.setInt(1, anuncioDTO.getId());\n for(String destinatario : anuncioDTO.getDestinatarios()){\n psAddDestinatario.setString(2, destinatario);\n ps.executeUpdate();\n } \n\n }catch(Exception e){\n e.printStackTrace();\n }\n\n return status;\n }",
"public void atualizarContaGeral(ApagarDadosFaturamentoHelper helper) throws ErroRepositorioException;",
"@Override\r\n\tpublic void update(Activitat activitat) {\r\n\t\tqueryString = \"UPDATE\" + ACTIVITATTABLENAME + \"SET NOM = ?, DESCRIPCIO = ?, DIA= ?, HORA = ? ,ESPAI = ?,WHERE ID_ACTIVITAT = ?\";\r\n\t\t\r\n\t\ttry {\r\n\t\t\ts = conexio.prepareStatement(queryString);\r\n\t\t\t\r\n\t\t\ts.setString(0, activitat.getNom());\r\n\t\t\ts.setString(1, activitat.getDescripcio());\r\n\t\t\ts.setDate(2, new java.sql.Date(activitat.getData_realitzacio().getTime().getTime()));\r\n\t\t\ts.setTimestamp(3, new java.sql.Timestamp(activitat.getHora().getTime()));\r\n\t\t\ts.setString(4, activitat.getEspai());\r\n\t\t\t\r\n\t\t\ts.executeUpdate();\r\n\t\t\t\r\n\t\t\ts.close();\r\n\t\t\tconexio.close();\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}",
"private void adjustMessierData()\n\t{\n\t\tfor(int i = 0; i < messierList.size(); i++)\n\t\t{\n\t\t\tMessier aMessier = messierList.get(i);\n\t\t\tdouble rightAsc = aMessier.getRADecimalHour();\n\t\t\tdouble hourAngle = theCalculator.findHourAngle(rightAsc, userLocalTime);\n\t\t\taMessier.setHourAngle(hourAngle);\n\t\t\tmessierList.set(i, aMessier);\n\t\t}\n\t}",
"public String iniciarJustificacion() {\n try {\n justificacionHelper.setArchivoCargado(null);\n Justificacion justificacion = administracionServicio.buscarJustificacionPorMovimeintoYTipoMovimientoRegla(\n justificacionHelper.getJustificacionVO().getReglaMensaje().getMovimiento().getId(),\n justificacionHelper.getJustificacionVO().getReglaMensaje().getTipoMovimientoRegla().getId());\n LOG.info(UtilCadena.concatenar(\"ID MOVIMIENTO \",\n justificacionHelper.getJustificacionVO().getReglaMensaje().getMovimiento().getId()));\n LOG.info(UtilCadena.concatenar(\"ID TIPO MOVIMIENTO REGLA \",\n justificacionHelper.getJustificacionVO().getReglaMensaje().getTipoMovimientoRegla().getId()));\n LOG.info(UtilCadena.concatenar(\"JUSTIFICACION CONSULTADA \", justificacion));\n if (justificacion == null) {\n System.out.println(\"Entra al if\");\n justificacionHelper.setEsNuevo(Boolean.TRUE);\n justificacionHelper.setArchivoRequerido(Boolean.TRUE);\n LOG.info(\"El archivo es requerido\");\n justificacionHelper.getJustificacionVO().setJustificacion(new Justificacion());\n } else {\n System.out.println(\"Entra al else\");\n justificacionHelper.setEsNuevo(Boolean.FALSE);\n LOG.info(\"El archivo NO es requerido\");\n justificacionHelper.setArchivoRequerido(Boolean.FALSE);\n justificacionHelper.getJustificacionVO().setJustificacion(justificacion);\n }\n reglaNavegacionDirecta(FORMULARIO_ENTIDAD);\n } catch (ServicioException ex) {\n mostrarMensajeEnPantalla(ERROR_CONSULTA, FacesMessage.SEVERITY_ERROR);\n error(getClass().getName(), \"Error la procesar la busqueda\", ex);\n }\n return null;\n }",
"private static void registrarAuditoriaDetallesDatoGeneralEmpleado(Connexion connexion,DatoGeneralEmpleado datogeneralempleado)throws Exception {\n\t\t\r\n\t\tString strValorActual=null;\r\n\t\tString strValorNuevo=null;\r\n\t\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getid_numero_patronal().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_numero_patronal()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_numero_patronal()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_numero_patronal().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getid_numero_patronal()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getid_numero_patronal().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.IDNUMEROPATRONAL,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getid_tipo_afiliacion().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_tipo_afiliacion()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_tipo_afiliacion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_tipo_afiliacion().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getid_tipo_afiliacion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getid_tipo_afiliacion().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.IDTIPOAFILIACION,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getcarnet_iess().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getcarnet_iess()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getcarnet_iess()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getcarnet_iess();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getcarnet_iess()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getcarnet_iess() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.CARNETIESS,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getsectorial_iess().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getsectorial_iess()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getsectorial_iess()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getsectorial_iess();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getsectorial_iess()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getsectorial_iess() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.SECTORIALIESS,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getid_pais().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_pais()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_pais()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_pais().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getid_pais()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getid_pais().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.IDPAIS,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getid_provincia().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_provincia()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_provincia()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_provincia().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getid_provincia()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getid_provincia().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.IDPROVINCIA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getid_canton().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_canton()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_canton()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_canton().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getid_canton()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getid_canton().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.IDCANTON,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getid_parroquia().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_parroquia()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_parroquia()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_parroquia().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getid_parroquia()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getid_parroquia().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.IDPARROQUIA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getfecha_nacimiento().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getfecha_nacimiento()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getfecha_nacimiento()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getfecha_nacimiento().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getfecha_nacimiento()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getfecha_nacimiento().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.FECHANACIMIENTO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getfecha_fallece().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getfecha_fallece()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getfecha_fallece()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getfecha_fallece().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getfecha_fallece()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getfecha_fallece().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.FECHAFALLECE,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getvalor_evaluacion().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor_evaluacion()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor_evaluacion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor_evaluacion().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getvalor_evaluacion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getvalor_evaluacion().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.VALOREVALUACION,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getnumero_horas().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getnumero_horas()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getnumero_horas()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getnumero_horas().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getnumero_horas()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getnumero_horas().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.NUMEROHORAS,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getvalor_hora().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor_hora()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor_hora()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor_hora().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getvalor_hora()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getvalor_hora().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.VALORHORA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getsalario().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getsalario()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getsalario()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getsalario().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getsalario()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getsalario().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.SALARIO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getid_moneda().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_moneda()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_moneda()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_moneda().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getid_moneda()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getid_moneda().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.IDMONEDA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getnumero_contrato().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getnumero_contrato()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getnumero_contrato()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getnumero_contrato();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getnumero_contrato()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getnumero_contrato() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.NUMEROCONTRATO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getid_tipo_contrato().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_tipo_contrato()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_tipo_contrato()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_tipo_contrato().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getid_tipo_contrato()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getid_tipo_contrato().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.IDTIPOCONTRATO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getvalor1().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor1()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor1()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor1().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getvalor1()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getvalor1().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.VALOR1,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getvalor2().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor2()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor2()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor2().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getvalor2()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getvalor2().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.VALOR2,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getvalor3().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor3()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor3()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor3().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getvalor3()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getvalor3().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.VALOR3,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getvalor4().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor4()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor4()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor4().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getvalor4()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getvalor4().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.VALOR4,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getvalor5().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor5()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor5()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor5().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getvalor5()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getvalor5().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.VALOR5,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getvalor6().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor6()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor6()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor6().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getvalor6()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getvalor6().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.VALOR6,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getcon_aporta_seguro_social().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getcon_aporta_seguro_social()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getcon_aporta_seguro_social()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getcon_aporta_seguro_social().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getcon_aporta_seguro_social()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getcon_aporta_seguro_social().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.CONAPORTASEGUROSOCIAL,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getcon_recibe_horas_extras().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getcon_recibe_horas_extras()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getcon_recibe_horas_extras()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getcon_recibe_horas_extras().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getcon_recibe_horas_extras()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getcon_recibe_horas_extras().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.CONRECIBEHORASEXTRAS,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getcon_descuento_impuestos().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getcon_descuento_impuestos()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getcon_descuento_impuestos()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getcon_descuento_impuestos().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getcon_descuento_impuestos()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getcon_descuento_impuestos().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.CONDESCUENTOIMPUESTOS,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getpension_alimenticia().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getpension_alimenticia()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getpension_alimenticia()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getpension_alimenticia().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getpension_alimenticia()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getpension_alimenticia().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.PENSIONALIMENTICIA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getcon_pago_por_horas().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getcon_pago_por_horas()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getcon_pago_por_horas()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getcon_pago_por_horas().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getcon_pago_por_horas()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getcon_pago_por_horas().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.CONPAGOPORHORAS,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getcon_anticipo().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getcon_anticipo()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getcon_anticipo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getcon_anticipo().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getcon_anticipo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getcon_anticipo().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.CONANTICIPO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getid_tipo_libreta_mili().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_tipo_libreta_mili()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_tipo_libreta_mili()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_tipo_libreta_mili().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getid_tipo_libreta_mili()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getid_tipo_libreta_mili().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.IDTIPOLIBRETAMILI,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getlibreta_militar().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getlibreta_militar()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getlibreta_militar()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getlibreta_militar();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getlibreta_militar()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getlibreta_militar() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.LIBRETAMILITAR,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getid_tipo_grupo_forma_pago().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_tipo_grupo_forma_pago()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_tipo_grupo_forma_pago()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_tipo_grupo_forma_pago().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getid_tipo_grupo_forma_pago()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getid_tipo_grupo_forma_pago().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.IDTIPOGRUPOFORMAPAGO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getid_banco().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_banco()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_banco()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_banco().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getid_banco()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getid_banco().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.IDBANCO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getid_tipo_cuenta_banco_global().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_tipo_cuenta_banco_global()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_tipo_cuenta_banco_global()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_tipo_cuenta_banco_global().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getid_tipo_cuenta_banco_global()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getid_tipo_cuenta_banco_global().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.IDTIPOCUENTABANCOGLOBAL,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getnumero_cuenta().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getnumero_cuenta()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getnumero_cuenta()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getnumero_cuenta();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getnumero_cuenta()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getnumero_cuenta() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.NUMEROCUENTA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getid_tipo_sangre().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_tipo_sangre()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_tipo_sangre()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_tipo_sangre().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getid_tipo_sangre()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getid_tipo_sangre().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.IDTIPOSANGRE,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t}",
"@Test\n\t@Order(9)\n\tpublic void alterarDatasReserva() throws Exception {\n\t\tLocacao locacao = locacoes.get(1);\n\t\tLocacao alterarDatasReserva = locacaoService.alterarDatasReserva(locacao, gerarData(\"01/02/2020\"), gerarData(\"09/03/2020\"));\n\n\t\tassertNotNull(alterarDatasReserva);\n\t}",
"private static void registrarAuditoriaDetallesTarjetaCredito(Connexion connexion,TarjetaCredito tarjetacredito)throws Exception {\n\t\t\r\n\t\tString strValorActual=null;\r\n\t\tString strValorNuevo=null;\r\n\t\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getid_empresa().equals(tarjetacredito.getTarjetaCreditoOriginal().getid_empresa()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getid_empresa()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getid_empresa().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getid_empresa()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getid_empresa().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.IDEMPRESA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getid_sucursal().equals(tarjetacredito.getTarjetaCreditoOriginal().getid_sucursal()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getid_sucursal()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getid_sucursal().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getid_sucursal()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getid_sucursal().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.IDSUCURSAL,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getid_banco().equals(tarjetacredito.getTarjetaCreditoOriginal().getid_banco()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getid_banco()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getid_banco().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getid_banco()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getid_banco().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.IDBANCO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getcodigo().equals(tarjetacredito.getTarjetaCreditoOriginal().getcodigo()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getcodigo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getcodigo();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getcodigo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getcodigo() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.CODIGO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getnombre().equals(tarjetacredito.getTarjetaCreditoOriginal().getnombre()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getnombre()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getnombre();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getnombre()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getnombre() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.NOMBRE,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getnombre_corto().equals(tarjetacredito.getTarjetaCreditoOriginal().getnombre_corto()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getnombre_corto()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getnombre_corto();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getnombre_corto()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getnombre_corto() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.NOMBRECORTO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getdigito_valido().equals(tarjetacredito.getTarjetaCreditoOriginal().getdigito_valido()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getdigito_valido()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getdigito_valido().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getdigito_valido()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getdigito_valido().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.DIGITOVALIDO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getdigito_tarjeta().equals(tarjetacredito.getTarjetaCreditoOriginal().getdigito_tarjeta()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getdigito_tarjeta()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getdigito_tarjeta().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getdigito_tarjeta()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getdigito_tarjeta().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.DIGITOTARJETA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getcomision().equals(tarjetacredito.getTarjetaCreditoOriginal().getcomision()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getcomision()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getcomision().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getcomision()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getcomision().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.COMISION,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getinteres().equals(tarjetacredito.getTarjetaCreditoOriginal().getinteres()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getinteres()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getinteres().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getinteres()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getinteres().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.INTERES,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getmonto_minimo().equals(tarjetacredito.getTarjetaCreditoOriginal().getmonto_minimo()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getmonto_minimo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getmonto_minimo().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getmonto_minimo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getmonto_minimo().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.MONTOMINIMO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getporcentaje_retencion().equals(tarjetacredito.getTarjetaCreditoOriginal().getporcentaje_retencion()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getporcentaje_retencion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getporcentaje_retencion().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getporcentaje_retencion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getporcentaje_retencion().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.PORCENTAJERETENCION,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getcomision_retencion().equals(tarjetacredito.getTarjetaCreditoOriginal().getcomision_retencion()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getcomision_retencion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getcomision_retencion().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getcomision_retencion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getcomision_retencion().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.COMISIONRETENCION,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getes_retencion_redondeo().equals(tarjetacredito.getTarjetaCreditoOriginal().getes_retencion_redondeo()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getes_retencion_redondeo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getes_retencion_redondeo().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getes_retencion_redondeo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getes_retencion_redondeo().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.ESRETENCIONREDONDEO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getes_pago_banco_redondeo().equals(tarjetacredito.getTarjetaCreditoOriginal().getes_pago_banco_redondeo()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getes_pago_banco_redondeo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getes_pago_banco_redondeo().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getes_pago_banco_redondeo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getes_pago_banco_redondeo().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.ESPAGOBANCOREDONDEO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getes_comision_redondeo().equals(tarjetacredito.getTarjetaCreditoOriginal().getes_comision_redondeo()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getes_comision_redondeo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getes_comision_redondeo().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getes_comision_redondeo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getes_comision_redondeo().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.ESCOMISIONREDONDEO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getid_tipo_retencion().equals(tarjetacredito.getTarjetaCreditoOriginal().getid_tipo_retencion()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getid_tipo_retencion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getid_tipo_retencion().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getid_tipo_retencion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getid_tipo_retencion().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.IDTIPORETENCION,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getid_cuenta_contable().equals(tarjetacredito.getTarjetaCreditoOriginal().getid_cuenta_contable()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getid_cuenta_contable()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getid_cuenta_contable().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getid_cuenta_contable()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getid_cuenta_contable().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.IDCUENTACONTABLE,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getid_tipo_retencion_iva().equals(tarjetacredito.getTarjetaCreditoOriginal().getid_tipo_retencion_iva()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getid_tipo_retencion_iva()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getid_tipo_retencion_iva().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getid_tipo_retencion_iva()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getid_tipo_retencion_iva().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.IDTIPORETENCIONIVA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getid_cuenta_contable_comision().equals(tarjetacredito.getTarjetaCreditoOriginal().getid_cuenta_contable_comision()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getid_cuenta_contable_comision()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getid_cuenta_contable_comision().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getid_cuenta_contable_comision()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getid_cuenta_contable_comision().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.IDCUENTACONTABLECOMISION,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getid_formula_pago_banco().equals(tarjetacredito.getTarjetaCreditoOriginal().getid_formula_pago_banco()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getid_formula_pago_banco()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getid_formula_pago_banco().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getid_formula_pago_banco()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getid_formula_pago_banco().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.IDFORMULAPAGOBANCO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getid_cuenta_contable_diferencia().equals(tarjetacredito.getTarjetaCreditoOriginal().getid_cuenta_contable_diferencia()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getid_cuenta_contable_diferencia()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getid_cuenta_contable_diferencia().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getid_cuenta_contable_diferencia()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getid_cuenta_contable_diferencia().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.IDCUENTACONTABLEDIFERENCIA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getid_formula_retencion().equals(tarjetacredito.getTarjetaCreditoOriginal().getid_formula_retencion()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getid_formula_retencion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getid_formula_retencion().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getid_formula_retencion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getid_formula_retencion().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.IDFORMULARETENCION,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getid_formula_comision().equals(tarjetacredito.getTarjetaCreditoOriginal().getid_formula_comision()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getid_formula_comision()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getid_formula_comision().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getid_formula_comision()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getid_formula_comision().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.IDFORMULACOMISION,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t}"
] | [
"0.5866839",
"0.5824873",
"0.57251203",
"0.5722132",
"0.5605297",
"0.5519703",
"0.55098474",
"0.5468998",
"0.5422978",
"0.53922457",
"0.5379189",
"0.5377374",
"0.5374515",
"0.53684956",
"0.5336374",
"0.53122544",
"0.530342",
"0.52895176",
"0.5283914",
"0.52807873",
"0.52693945",
"0.5267802",
"0.5248179",
"0.5238622",
"0.52357113",
"0.5228669",
"0.5214909",
"0.52118057",
"0.5207627",
"0.52043587",
"0.52016485",
"0.52013063",
"0.5199538",
"0.5194045",
"0.5187431",
"0.5176332",
"0.51661295",
"0.5160545",
"0.5155706",
"0.5153222",
"0.51429343",
"0.5140481",
"0.5123324",
"0.5122833",
"0.51026607",
"0.51001054",
"0.50960916",
"0.50951946",
"0.50888056",
"0.50872934",
"0.5086376",
"0.50829524",
"0.5081765",
"0.50809324",
"0.50772667",
"0.50769895",
"0.5071428",
"0.5069572",
"0.5066634",
"0.5066",
"0.506555",
"0.5063512",
"0.5055147",
"0.50477755",
"0.5047036",
"0.5046356",
"0.50448215",
"0.50422",
"0.50235415",
"0.5021366",
"0.5020603",
"0.5019771",
"0.5012143",
"0.50038946",
"0.500261",
"0.50016016",
"0.5000612",
"0.5000373",
"0.49996307",
"0.49970895",
"0.49932912",
"0.4991411",
"0.4989072",
"0.49863154",
"0.49852994",
"0.498351",
"0.49811217",
"0.49793965",
"0.49777147",
"0.4976202",
"0.49696395",
"0.4967698",
"0.49616128",
"0.4959498",
"0.49571255",
"0.4948609",
"0.49438706",
"0.49431032",
"0.49404484",
"0.49380264"
] | 0.59254813 | 0 |
Creates new form DeveloperPrefsPanel | public DeveloperPrefsPanel(DeveloperPreferences prefs) {
this.prefs = prefs;
initComponents();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Object createPrefsEditor()\n \t{\n \t\treturn this.createPrefsEditor(true, false);\n \t}",
"private void showPreference(){\r\n if(userPreferencesForm == null) {\r\n userPreferencesForm = new UserPreferencesForm(mdiForm,true);\r\n }\r\n userPreferencesForm.loadUserPreferences(mdiForm.getUserId());\r\n userPreferencesForm.setUserName(mdiForm.getUserName());\r\n userPreferencesForm.display();\r\n }",
"public CreateJPanel(ProfileInfo profileInfo) {\n initComponents();\n \n this.profileInfo = profileInfo;\n btnSave.setEnabled(false);\n \n }",
"public PreferencesPanel() {\n initComponents();\n }",
"public static void openSettingsForm(){\n\n }",
"public static PreferencesView createPreferencesView() {\n // Retrieve application preferences and attach them to their view\n // (This instance must be instanciated after dependencies)\n final LinkedHashMap<String, JPanel> panels = new LinkedHashMap<String, JPanel>(2);\n panels.put(\"General settings\", new PreferencePanel());\n\n final PreferencesView preferencesView = new PreferencesView(getFrame(), Preferences.getInstance(), panels);\n preferencesView.init();\n\n return preferencesView;\n }",
"public FundsVolunteerCreate(AppState appState) {\n initComponents();\n setDefaultCloseOperation(DISPOSE_ON_CLOSE);\n btCancelar.setVisible(false);\n btSave.setVisible(false);\n btnRemove.setVisible(false);\n btnSaveEdit.setVisible(false);\n enableFields(false);\n this.appState = appState;\n }",
"private void createpanel2() {\r\n\t\tpanels[1].setLayout(new GridLayout(1, 2));\r\n\r\n\t\tdescription[0] = new JLabel(\"Accountname: \");\r\n\t\tdescription[0].setFont(smallfont);\r\n\t\tdescription[0].setHorizontalAlignment(JLabel.CENTER);\r\n\t\tuserinfo = new JTextField() {\r\n\t\t\tprivate static final long serialVersionUID = 1L;\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void paint(Graphics g) {\r\n\t\t\t\tg.drawImage(ImageLoader.getImage(\"black_0.4\"), 0, 0, null);\r\n\t\t\t\tsuper.paint(g);\r\n\t\t\t}\r\n\t\t};\r\n\t\tif (System.getProperty(\"os.name\").startsWith(\"Windows\")) {\r\n\t\t\tuserinfo.setForeground(Color.WHITE);\r\n\t\t} else {\r\n\t\t\tuserinfo.setForeground(Color.BLACK);\r\n\t\t}\r\n\t\tuserinfo.setOpaque(false);\r\n\t\tuserinfo.setFont(smallfont);\r\n\t\tpanels[1].add(description[0]);\r\n\t\tpanels[1].add(userinfo);\r\n\t\tpanels[1].setOpaque(false);\r\n\t\tallComponents.add(panels[1]);\r\n\t\tpanels[0].revalidate();\r\n\t}",
"public EditTokenDialog() {\r\n \t\tsuper(\"net/rptools/maptool/client/ui/forms/tokenPropertiesDialog.jfrm\");\r\n \r\n \t\tpanelInit();\r\n \t}",
"@DISPID(1611005968) //= 0x60060010. The runtime will prefer the VTID if present\n @VTID(43)\n boolean newWithPanel();",
"public Preferences(BlueJ bluej) {\r\n this.bluej = bluej;\r\n myPanel = new JPanel();\r\n myPanel.add(new JLabel(\"Favorite Colour\"));\r\n color = new JTextField(40);\r\n myPanel.add(color);\r\n // Load the default value\r\n loadValues();\r\n }",
"public PreferencesDialog (JFrame owner)\n {\n this (owner, \"OPENMARKOV User Preferences\",\n OpenMarkovPreferences.OPENMARKOV_NODE_PREFERENCES, true/*\n * ,\n * OpenMarkovPreferences\n * .\n * OPENMARKOV_KERNEL_PREFERENCES\n * , false\n */);\n }",
"protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.addShellListener(new ShellAdapter() {\n\t\t\t@Override\n\t\t\tpublic void shellActivated(ShellEvent e) {\n\t\t\t\tloadSettings();\n\t\t\t}\n\t\t});\n\t\tshell.setSize(450, 160);\n\t\tshell.setText(\"Settings\");\n\t\t\n\t\ttextUsername = new Text(shell, SWT.BORDER);\n\t\ttextUsername.setBounds(118, 10, 306, 21);\n\t\t\n\t\ttextPassword = new Text(shell, SWT.BORDER | SWT.PASSWORD);\n\t\ttextPassword.setBounds(118, 38, 306, 21);\n\t\t\n\t\tCLabel lblLogin = new CLabel(shell, SWT.NONE);\n\t\tlblLogin.setBounds(10, 10, 61, 21);\n\t\tlblLogin.setText(\"Login\");\n\t\t\n\t\tCLabel lblPassword = new CLabel(shell, SWT.NONE);\n\t\tlblPassword.setText(\"Password\");\n\t\tlblPassword.setBounds(10, 38, 61, 21);\n\t\t\n\t\tButton btnSave = new Button(shell, SWT.NONE);\n\t\tbtnSave.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tApplicationSettings as = new ApplicationSettings();\n\t\t as.savePassword(textPassword.getText());\n\t\t as.saveUsername(textUsername.getText());\n\t\t \n\t\t connectionOK = WSHandler.setAutoFillDailyReports(btnAutomaticDailyReport.getSelection());\n\t\t \n\t\t shell.close();\n\t\t if (!(parentDialog == null)) {\n\t\t \tparentDialog.reloadTable();\n\t\t }\n\t\t\t}\n\t\t});\n\t\tbtnSave.setBounds(10, 87, 414, 25);\n\t\tbtnSave.setText(\"Save\");\n\n\t}",
"public NewFetureKeyPanel() {\n initComponents();\n }",
"public Object createPrefsEditor(final boolean createJFrame, final boolean isStandalone)\n \t{\n \t\tObject result = null;\n \t\tif (metaPrefSet != null)\n \t\t{\n \t\t\tif (prefSet == null)\n \t\t\t\tprefSet = new PrefSet();\n \t\t\tresult = FundamentalPlatformSpecifics.get().getOrCreatePrefsEditor(metaPrefSet, prefSet, prefsPURL, createJFrame, isStandalone);\n \t\t}\n \t\treturn result;\n \t}",
"public GroupChatPreferencePanel() {\n // Build the UI\n createUI();\n }",
"private void putPanels() {\n\t\tfrmUserDesign.getContentPane().add(userDesignPanel, \"userDesign\");\n\t\tfrmUserDesign.getContentPane().add(vendasClass.getVendas(), \"Vendas\");\n\t\tfrmUserDesign.getContentPane().add(maquinaClass.getMaquinas(), \"Maquinas\");\n\t\tfrmUserDesign.getContentPane().add(funcionarioClasse.getFuncionarios(), \"Funcionarios\");\n\t\tfrmUserDesign.getContentPane().add(produtoClass.getProdutos(), \"Produtos\");\n\t\tfrmUserDesign.getContentPane().add(chart.getGrafico(), \"Grafico\");\n\t\tcl.show(frmUserDesign.getContentPane(), \"userDesign\");// mostrar o main menu\n\t}",
"public void actionPerformed(ActionEvent e) {\r\n\t\t// create an instance of NewPage\r\n\t\tNewPage newPage = new NewPage(canvas);\r\n\t\t// create new WhiteBoard Page\r\n\t\tnewPage.createNewWbPage();\r\n\t\t// create an instance PresentationInfoListData object to \r\n\t\t//add to PresentationList.\r\n\t\tPresentationInfoListData data =\r\n\t\t\tnew PresentationInfoListData(0, false, newPage.getKey());\r\n\t\tpresentationInfo.add(data);\r\n\t\t// notify all the participants that a new WhiteBoard has been opened\r\n\t\t// and selected\r\n\t\tDataEvent.notifySender(\r\n\t\t\tcanvas.getApplicationType(),\r\n\t\t\tpresentationInfo.getListModel().getSize(),\r\n\t\t\tnewPage.getKey(),\r\n\t\t\tgetToolString());\r\n\t\t\t\r\n\t\t// select the current new WhiteBoard\r\n\t\tpresentationInfo.getPresentationList().setSelectedValue(data, true);\r\n\r\n\t}",
"public CreateAccountPanel() {\n initComponents();\n initializeDateChooser();\n }",
"public SetupScreen() \r\n { \r\n _userLabel = new LabelField(Ipoki._resources.getString(LBL_USER), DrawStyle.ELLIPSIS);\r\n add(_userLabel);\r\n _userEdit = new EditField(\"\", Ipoki._user, 20, Field.EDITABLE);\r\n add(_userEdit);\r\n _passLabel = new LabelField(Ipoki._resources.getString(LBL_PASSWORD), DrawStyle.ELLIPSIS);\r\n add(_passLabel);\r\n _passEdit = new PasswordEditField(\"\", Ipoki._pass, 20, Field.EDITABLE);\r\n add(_passEdit);\r\n _freqLabel = new LabelField(Ipoki._resources.getString(LBL_FREQ), DrawStyle.ELLIPSIS);\r\n add(_freqLabel);\r\n _freqEdit = new EditField(\"\", String.valueOf(Ipoki._freq), 20, Field.EDITABLE | EditField.FILTER_INTEGER);\r\n add(_freqEdit);\r\n }",
"public PreferencesPanel()\n {\n initComponents();\n CB_CHECK_NEW.setSelected( Main.get_long_prop(Preferences.CHECK_NEWS) > 0);\n CB_CACHE_MAILS.setSelected( Main.get_long_prop(Preferences.CACHE_MAILFILES) > 0);\n\n\n\n COMBO_UI.removeAllItems();\n ArrayList<String> ui_names = UI_Generic.get_ui_names();\n for (int i = 0; i < ui_names.size(); i++)\n {\n String string = ui_names.get(i);\n COMBO_UI.addItem(string);\n }\n\n last_ui = (int)Main.get_long_prop(Preferences.UI, 0l);\n if (last_ui < COMBO_UI.getItemCount())\n COMBO_UI.setSelectedIndex( last_ui );\n else\n COMBO_UI.setSelectedIndex( 0 );\n\n String ds = Main.get_prop( Preferences.DEFAULT_STATION );\n if (ds != null && ds.length() > 0)\n {\n ParseToken pt = new ParseToken(ds);\n String ip = pt.GetString(\"IP:\");\n long po = pt.GetLongValue(\"PO:\");\n boolean only_this = pt.GetBoolean(\"OT:\");\n TXT_SERVER_IP.setText(ip);\n if (po > 0)\n TXT_SERVER_PORT.setText(Long.toString(po) );\n CB_NO_SCANNING.setSelected(only_this);\n }\n\n String l_code = Main.get_prop( Preferences.COUNTRYCODE, \"DE\");\n\n if (l_code.compareTo(\"DE\") == 0)\n COMBO_LANG.setSelectedIndex(0);\n if (l_code.compareTo(\"EN\") == 0)\n COMBO_LANG.setSelectedIndex(1); \n }",
"public SettingsForm() {\n initComponents();\n }",
"public void newSupplierMode() {\n\n\t\tsupplierList.setEnabled(false);\n\t\taddressTF.setBackground(SystemColor.white);\n\n\t\tnameTF.setEditable(true);\n\t\tidTF.setEditable(false);\n\t\teMailTF.setEditable(true);\n\t\tnameTF.setEditable(true);\n\t\taddressTF.setEditable(true);\n\t\ttelTF.setEditable(true);\n\n\t\teditItemButton.setEnabled(false);\n\t\tremoveItemButton.setEnabled(false);\n\t\tsaveItemButton.setVisible(true);\n\t\tcancelBtn.setVisible(true);\n\n\t\tclearTextFields();\n\t}",
"public MainForm() {\n initComponents();\n\n String oldAuthor = prefs.get(\"AUTHOR\", \"\");\n if(oldAuthor != null) {\n this.authorTextField.setText(oldAuthor);\n }\n String oldBook = prefs.get(\"BOOK\", \"\");\n if(oldBook != null) {\n this.bookTextField.setText(oldBook);\n }\n String oldDisc = prefs.get(\"DISC\", \"\");\n if(oldDisc != null) {\n try {\n int oldDiscNum = Integer.parseInt(oldDisc);\n oldDiscNum++;\n this.discNumberTextField.setText(Integer.toString(oldDiscNum));\n } catch (Exception ex) {\n this.discNumberTextField.setText(oldDisc);\n }\n this.bookTextField.setText(oldBook);\n }\n\n\n }",
"public SettingsPanel() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n Title = new javax.swing.JLabel();\n NAME = new javax.swing.JLabel();\n txt_name = new javax.swing.JTextField();\n PROVIDER = new javax.swing.JLabel();\n ComboBox_provider = new javax.swing.JComboBox<>();\n CATEGORY = new javax.swing.JLabel();\n ComboBox_category = new javax.swing.JComboBox<>();\n Trademark = new javax.swing.JLabel();\n ComboBox_trademark = new javax.swing.JComboBox<>();\n COLOR = new javax.swing.JLabel();\n ComboBox_color = new javax.swing.JComboBox<>();\n SIZE = new javax.swing.JLabel();\n ComboBox_size = new javax.swing.JComboBox<>();\n MATERIAL = new javax.swing.JLabel();\n ComboBox_material = new javax.swing.JComboBox<>();\n PRICE = new javax.swing.JLabel();\n txt_price = new javax.swing.JTextField();\n SAVE = new javax.swing.JButton();\n CANCEL = new javax.swing.JButton();\n Background = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n Title.setFont(new java.awt.Font(\"Dialog\", 1, 24)); // NOI18N\n Title.setForeground(new java.awt.Color(255, 255, 255));\n Title.setText(\"NEW PRODUCT\");\n getContentPane().add(Title, new org.netbeans.lib.awtextra.AbsoluteConstraints(200, 33, -1, -1));\n\n NAME.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n NAME.setForeground(new java.awt.Color(255, 255, 255));\n NAME.setText(\"Name\");\n getContentPane().add(NAME, new org.netbeans.lib.awtextra.AbsoluteConstraints(40, 150, 70, 30));\n\n txt_name.setBackground(new java.awt.Color(51, 51, 51));\n txt_name.setForeground(new java.awt.Color(255, 255, 255));\n getContentPane().add(txt_name, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 150, 100, 30));\n\n PROVIDER.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n PROVIDER.setForeground(new java.awt.Color(255, 255, 255));\n PROVIDER.setText(\"Provider\");\n getContentPane().add(PROVIDER, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 200, 70, 30));\n\n ComboBox_provider.setBackground(new java.awt.Color(51, 51, 51));\n ComboBox_provider.setForeground(new java.awt.Color(255, 255, 255));\n ComboBox_provider.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n getContentPane().add(ComboBox_provider, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 200, 100, 30));\n\n CATEGORY.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n CATEGORY.setForeground(new java.awt.Color(255, 255, 255));\n CATEGORY.setText(\"Category\");\n getContentPane().add(CATEGORY, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 250, 70, 30));\n\n ComboBox_category.setBackground(new java.awt.Color(51, 51, 51));\n ComboBox_category.setForeground(new java.awt.Color(255, 255, 255));\n ComboBox_category.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n getContentPane().add(ComboBox_category, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 250, 100, 30));\n\n Trademark.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n Trademark.setForeground(new java.awt.Color(255, 255, 255));\n Trademark.setText(\"Trademark\");\n getContentPane().add(Trademark, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 300, 70, 30));\n\n ComboBox_trademark.setBackground(new java.awt.Color(51, 51, 51));\n ComboBox_trademark.setForeground(new java.awt.Color(255, 255, 255));\n ComboBox_trademark.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n ComboBox_trademark.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n ComboBox_trademarkActionPerformed(evt);\n }\n });\n getContentPane().add(ComboBox_trademark, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 300, 100, 30));\n\n COLOR.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n COLOR.setForeground(new java.awt.Color(255, 255, 255));\n COLOR.setText(\"Color\");\n getContentPane().add(COLOR, new org.netbeans.lib.awtextra.AbsoluteConstraints(300, 150, 70, 30));\n\n ComboBox_color.setBackground(new java.awt.Color(51, 51, 51));\n ComboBox_color.setForeground(new java.awt.Color(255, 255, 255));\n ComboBox_color.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n getContentPane().add(ComboBox_color, new org.netbeans.lib.awtextra.AbsoluteConstraints(400, 150, 100, 30));\n\n SIZE.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n SIZE.setForeground(new java.awt.Color(255, 255, 255));\n SIZE.setText(\"Size\");\n getContentPane().add(SIZE, new org.netbeans.lib.awtextra.AbsoluteConstraints(300, 200, 70, 30));\n\n ComboBox_size.setBackground(new java.awt.Color(51, 51, 51));\n ComboBox_size.setForeground(new java.awt.Color(255, 255, 255));\n ComboBox_size.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n getContentPane().add(ComboBox_size, new org.netbeans.lib.awtextra.AbsoluteConstraints(400, 200, 100, 30));\n\n MATERIAL.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n MATERIAL.setForeground(new java.awt.Color(255, 255, 255));\n MATERIAL.setText(\"Material\");\n getContentPane().add(MATERIAL, new org.netbeans.lib.awtextra.AbsoluteConstraints(300, 250, 70, 30));\n\n ComboBox_material.setBackground(new java.awt.Color(51, 51, 51));\n ComboBox_material.setForeground(new java.awt.Color(255, 255, 255));\n ComboBox_material.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n getContentPane().add(ComboBox_material, new org.netbeans.lib.awtextra.AbsoluteConstraints(400, 250, 100, 30));\n\n PRICE.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n PRICE.setForeground(new java.awt.Color(255, 255, 255));\n PRICE.setText(\"Price\");\n getContentPane().add(PRICE, new org.netbeans.lib.awtextra.AbsoluteConstraints(300, 300, 70, 30));\n\n txt_price.setBackground(new java.awt.Color(51, 51, 51));\n txt_price.setForeground(new java.awt.Color(255, 255, 255));\n txt_price.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txt_priceActionPerformed(evt);\n }\n });\n getContentPane().add(txt_price, new org.netbeans.lib.awtextra.AbsoluteConstraints(400, 300, 100, 30));\n\n SAVE.setBackground(new java.awt.Color(25, 25, 25));\n SAVE.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/icono_guardar-A.png\"))); // NOI18N\n SAVE.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n SAVE.setPressedIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/icono_guardar-B.png\"))); // NOI18N\n SAVE.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/icono_guardar.png\"))); // NOI18N\n SAVE.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n SAVEActionPerformed(evt);\n }\n });\n getContentPane().add(SAVE, new org.netbeans.lib.awtextra.AbsoluteConstraints(210, 480, 50, 50));\n\n CANCEL.setBackground(new java.awt.Color(25, 25, 25));\n CANCEL.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/icono_no-A.png\"))); // NOI18N\n CANCEL.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n CANCEL.setPressedIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/icono_no-B.png\"))); // NOI18N\n CANCEL.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/icono_no.png\"))); // NOI18N\n CANCEL.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n CANCELActionPerformed(evt);\n }\n });\n getContentPane().add(CANCEL, new org.netbeans.lib.awtextra.AbsoluteConstraints(280, 480, 50, 50));\n\n Background.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/fondo_windows2.jpg\"))); // NOI18N\n getContentPane().add(Background, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, -1, -1));\n\n pack();\n }",
"void createGebruikersBeheerPanel() {\n frame.add(gebruikersBeheerView.createGebruikersBeheerPanel());\n frame.setTitle(gebruikersBeheerModel.getTitle());\n }",
"public void onNew() {\t\t\n\t\tdesignWidget.addNewForm();\n\t}",
"public void createPartyPanel()\n {\n setPartyLabel(game.getPartyPane(), 0);\n //setPartyLabel(\"EMPTY\", 1);\n //setPartyLabel(\"EMPTY\", 2);\n //setPartyLabel(\"EMPTY\", 3);\n reloadPartyPanel();\n }",
"@DISPID(1611005968) //= 0x60060010. The runtime will prefer the VTID if present\n @VTID(44)\n void newWithPanel(\n boolean oNewPartPanelDisplayed);",
"public void createControl(Composite parent) {\n Group group = SWTFactory.createGroup(parent, PDEUIMessages.ProfileBlock_0, 1, 1, GridData.FILL_HORIZONTAL);\n fGenerateProfileButton = SWTFactory.createCheckButton(group, PDEUIMessages.ProfileBlock_1, null, false, 1);\n fGenerateProfileButton.addSelectionListener(new SelectionAdapter() {\n\n @Override\n public void widgetSelected(SelectionEvent e) {\n fTab.updateLaunchConfigurationDialog();\n }\n });\n }",
"private void showProposalDevelopment(){\r\n try{\r\n \r\n ProposalBaseWindow propFrame = null;\r\n if ( (propFrame = (ProposalBaseWindow)mdiForm.getFrame(\r\n CoeusGuiConstants.PROPOSAL_BASE_FRAME_TITLE))!= null ) {\r\n if( propFrame.isIcon() ){\r\n propFrame.setIcon(false);\r\n }\r\n propFrame.setSelected(true);\r\n return;\r\n }\r\n propFrame = new ProposalBaseWindow(mdiForm );\r\n propFrame.setVisible( true );\r\n }catch(Exception exception){\r\n CoeusOptionPane.showInfoDialog(exception.getMessage());\r\n }\r\n }",
"protected Control createContents(Composite parent) {\n\t\tgetOverlayStore().load();\r\n\t\tgetOverlayStore().start();\r\n Composite composite = createContainer(parent);\r\n \r\n // The layout info for the preference page\r\n GridLayout gridLayout = new GridLayout();\r\n gridLayout.marginHeight = 0;\r\n gridLayout.marginWidth = 0;\r\n composite.setLayout(gridLayout);\r\n \r\n // A panel for the preference page\r\n Composite defPanel = new Composite(composite, SWT.NONE);\r\n GridLayout layout = new GridLayout();\r\n int numColumns = 2;\r\n layout.numColumns = numColumns;\r\n defPanel.setLayout(layout);\r\n GridData gridData =\r\n new GridData(GridData.FILL_BOTH | GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL);\r\n defPanel.setLayoutData(gridData);\r\n \r\n\r\n // Browser options\r\n\t\tGroup wrappingGroup= createGroup(numColumns, defPanel, \"Web Browser\");\r\n\t\tString labelText= \"Use tabbed browsing\";\r\n\t\tlabelText= \"Used tabbed browsing\";\r\n\t\taddCheckBox(wrappingGroup, labelText, CFMLPreferenceConstants.P_TABBED_BROWSER, 1);\r\n \r\n // File paths\r\n createFilePathGroup(defPanel);\r\n \r\n // Images tooltips\r\n\t\tGroup imageGroup= createGroup(numColumns, defPanel, \"Images\");\r\n\t\tlabelText= \"Show Image Tooltips (restart required)\";\r\n\t\taddCheckBox(imageGroup, labelText, CFMLPreferenceConstants.P_IMAGE_TOOLTIPS, 1);\r\n \t\t\r\n\t\t// default help url\r\n\t\tGroup helpGroup= createGroup(numColumns, defPanel, \"External Help Documentation\");\r\n\t\tlabelText= \"Default URL:\";\r\n\t\taddTextField(helpGroup, labelText, CFMLPreferenceConstants.P_DEFAULT_HELP_URL, 50, 0, null);\r\n\t\tlabelText= \"Use external broswer\";\r\n\t\taddCheckBox(helpGroup, labelText, CFMLPreferenceConstants.P_HELP_URL_USE_EXTERNAL_BROWSER, 1);\r\n \r\n // Template Sites\r\n \r\n // createTemplateSitesPathGroup(defPanel);\r\n\r\n\t\tinitializeFields();\r\n\t\tapplyDialogFont(defPanel);\r\n\r\n\t\treturn composite;\r\n }",
"private void createpanel3() {\r\n\t\tpanels[2].setLayout(new GridLayout(1, 2));\r\n\r\n\t\tdescription[1] = new JLabel(\"Password: \");\r\n\t\tdescription[1].setFont(smallfont);\r\n\t\tdescription[1].setHorizontalAlignment(JLabel.CENTER);\r\n\t\tpasswordbox = new JPasswordField() {\r\n\t\t\tprivate static final long serialVersionUID = 1L;\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void paint(Graphics g) {\r\n\t\t\t\tg.drawImage(ImageLoader.getImage(\"black_0.4\"), 0, 0, null);\r\n\t\t\t\tsuper.paint(g);\r\n\t\t\t}\r\n\t\t};\r\n\t\tif (System.getProperty(\"os.name\").startsWith(\"Windows\"))\r\n\t\t\tpasswordbox.setForeground(Color.WHITE);\r\n\t\telse\r\n\t\t\tpasswordbox.setForeground(Color.BLACK);\r\n\t\tpasswordbox.setOpaque(false);\r\n\t\tpanels[2].add(description[1]);\r\n\t\tpanels[2].add(passwordbox);\r\n\t\tpanels[2].setOpaque(false);\r\n\t\tallComponents.add(panels[2]);\r\n\t\tpanels[2].revalidate();\r\n\t}",
"private void showUserPreferences() {\r\n MyAccount ma = state.getAccount();\r\n \r\n mOriginName.setValue(ma.getOriginName());\r\n SharedPreferencesUtil.showListPreference(this, MyAccount.Builder.KEY_ORIGIN_NAME, R.array.origin_system_entries, R.array.origin_system_entries, R.string.summary_preference_origin_system);\r\n \r\n mOriginName.setEnabled(!state.builder.isPersistent() && TextUtils.isEmpty(ma.getUsername()));\r\n \r\n if (mEditTextUsername.getText() == null\r\n || ma.getUsername().compareTo(mEditTextUsername.getText()) != 0) {\r\n mEditTextUsername.setText(ma.getUsername());\r\n }\r\n StringBuilder summary;\r\n if (ma.getUsername().length() > 0) {\r\n summary = new StringBuilder(ma.getUsername());\r\n } else {\r\n summary = new StringBuilder(this.getText(ma.alternativeTermForResourceId(R.string.summary_preference_username)));\r\n }\r\n mEditTextUsername.setDialogTitle(this.getText(ma.alternativeTermForResourceId(R.string.dialog_title_preference_username)));\r\n mEditTextUsername.setTitle(this.getText(ma.alternativeTermForResourceId(R.string.title_preference_username)));\r\n mEditTextUsername.setSummary(summary);\r\n mEditTextUsername.setEnabled(!state.builder.isPersistent() && !ma.isUsernameValidToStartAddingNewAccount());\r\n \r\n boolean isNeeded = ma.canChangeOAuth();\r\n if (ma.isOAuth() != mOAuth.isChecked()) {\r\n mOAuth.setChecked(ma.isOAuth());\r\n }\r\n // In fact, we should hide it if not enabled, but I couldn't find an easy way for this...\r\n mOAuth.setEnabled(isNeeded);\r\n if (isNeeded) {\r\n mOAuth.setTitle(R.string.title_preference_oauth);\r\n mOAuth.setSummary(ma.isOAuth() ? R.string.summary_preference_oauth_on : R.string.summary_preference_oauth_off);\r\n } else {\r\n mOAuth.setTitle(\"\");\r\n mOAuth.setSummary(\"\");\r\n }\r\n \r\n isNeeded = ma.getConnection().isPasswordNeeded();\r\n if (mEditTextPassword.getText() == null\r\n || ma.getPassword().compareTo(mEditTextPassword.getText()) != 0) {\r\n mEditTextPassword.setText(ma.getPassword());\r\n }\r\n if (isNeeded) {\r\n mEditTextPassword.setTitle(R.string.title_preference_password);\r\n summary = new StringBuilder(this.getText(R.string.summary_preference_password));\r\n if (TextUtils.isEmpty(ma.getPassword())) {\r\n summary.append(\": (\" + this.getText(R.string.not_set) + \")\");\r\n }\r\n } else {\r\n summary = null;\r\n mEditTextPassword.setTitle(\"\");\r\n }\r\n mEditTextPassword.setSummary(summary);\r\n mEditTextPassword.setEnabled(isNeeded);\r\n \r\n int titleResId;\r\n boolean addAccountOrVerifyCredentialsEnabled = ma.isOAuth() || ma.getCredentialsPresent();\r\n switch (ma.getCredentialsVerified()) {\r\n case SUCCEEDED:\r\n titleResId = R.string.title_preference_verify_credentials;\r\n summary = new StringBuilder(\r\n this.getText(R.string.summary_preference_verify_credentials));\r\n break;\r\n default:\r\n if (state.builder.isPersistent()) {\r\n titleResId = R.string.title_preference_verify_credentials_failed;\r\n summary = new StringBuilder(\r\n this.getText(R.string.summary_preference_verify_credentials_failed));\r\n } else {\r\n if (!ma.isUsernameValidToStartAddingNewAccount()) {\r\n addAccountOrVerifyCredentialsEnabled = false;\r\n }\r\n titleResId = R.string.title_preference_add_account;\r\n if (ma.isOAuth()) {\r\n summary = new StringBuilder(\r\n this.getText(R.string.summary_preference_add_account_oauth));\r\n } else {\r\n summary = new StringBuilder(\r\n this.getText(R.string.summary_preference_add_account_basic));\r\n }\r\n }\r\n break;\r\n }\r\n addAccountOrVerifyCredentials.setTitle(titleResId);\r\n addAccountOrVerifyCredentials.setSummary(summary);\r\n addAccountOrVerifyCredentials.setEnabled(addAccountOrVerifyCredentialsEnabled);\r\n }",
"@Override\n\tprotected Control createContents(final Composite parent) {\n\t\tfinal Composite composite = new Composite(parent, SWT.NONE);\n\t\tcomposite.setLayout(new GridLayout());\n\n\t\t// Get the preference store\n\t\tfinal IPreferenceStore preferenceStore = getPreferenceStore();\n\n\t\tfinal Label lblRandomRules = new Label(composite, SWT.NONE);\n\t\tlblRandomRules.setText(Messages.getString(\"PasswordPolicyPreferences.RulesLabel\")); //$NON-NLS-1$\n\n\t\tfinal Composite composite_1 = new Composite(composite, SWT.NONE);\n\t\tfinal GridLayout gridLayout = new GridLayout();\n\t\tgridLayout.marginHeight = 0;\n\t\tgridLayout.marginWidth = 0;\n\t\tgridLayout.numColumns = 2;\n\t\tcomposite_1.setLayout(gridLayout);\n\n\t\tfinal Label lblDefaultLength = new Label(composite_1, SWT.NONE);\n\t\tlblDefaultLength.setText(Messages.getString(\"PasswordPolicyPreferences.PasswordLength\")); //$NON-NLS-1$\n\n\t\tspiLength = new Spinner(composite_1, SWT.BORDER);\n\t\tspiLength.setSelection(preferenceStore.getInt(DEFAULT_PASSWORD_LENGTH));\n\n\t\tbtnUseLowercase = new Button(composite, SWT.CHECK);\n\t\tbtnUseLowercase.setText(Messages.getString(\"PasswordPolicyPreferences.Lowercase\")); //$NON-NLS-1$\n\t\tbtnUseLowercase.setSelection(preferenceStore.getBoolean(USE_LOWERCASE_LETTERS));\n\n\t\tbtnUserUppercase = new Button(composite, SWT.CHECK);\n\t\tbtnUserUppercase.setText(Messages.getString(\"PasswordPolicyPreferences.Uppercase\")); //$NON-NLS-1$\n\t\tbtnUserUppercase.setSelection(preferenceStore.getBoolean(USE_UPPERCASE_LETTERS));\n\n\t\tbtnUseDigits = new Button(composite, SWT.CHECK);\n\t\tbtnUseDigits.setText(Messages.getString(\"PasswordPolicyPreferences.Digits\")); //$NON-NLS-1$\n\t\tbtnUseDigits.setSelection(preferenceStore.getBoolean(USE_DIGITS));\n\n\t\tbtnUseSymbols = new Button(composite, SWT.CHECK);\n\t\tbtnUseSymbols.setText(Messages.getString(\"PasswordPolicyPreferences.Symbols\")); //$NON-NLS-1$\n\t\tbtnUseSymbols.setSelection(preferenceStore.getBoolean(USE_SYMBOLS));\n\n\t\tbtnUseEaseToRead = new Button(composite, SWT.CHECK);\n\t\tbtnUseEaseToRead.setText(Messages.getString(\"PasswordPolicyPreferences.EasyToRead\")); //$NON-NLS-1$\n\t\tbtnUseEaseToRead.setSelection(preferenceStore.getBoolean(USE_EASY_TO_READ));\n\n\t\tbtnUseHexOnly = new Button(composite, SWT.CHECK);\n\t\tbtnUseHexOnly.setEnabled(false);\n\t\tbtnUseHexOnly.setText(Messages.getString(\"PasswordPolicyPreferences.HexOnly\")); //$NON-NLS-1$\n\t\tbtnUseHexOnly.setSelection(preferenceStore.getBoolean(USE_HEX_ONLY));\n\n\t\treturn composite;\n\t}",
"public AdminProfile_panel() {\n initComponents();\n \n }",
"FORM createFORM();",
"private TabPane createSettingsWindow() {\r\n\t\tint tabHeight = 380, tabWidth = 318, textfieldWidth = 120;\r\n\t\tColor settingsTitleColor = Color.DODGERBLUE;\r\n\t\tColor settingsTextColor = Color.ORANGE;\r\n\t\tFont settingsTitleFont = new Font(\"Aria\", 20);\r\n\t\tFont settingsFont = new Font(\"Aria\", 18);\r\n\t\tFont infoFont = new Font(\"Aria\", 16);\r\n\t\tInsets settingsInsets = new Insets(0, 0, 5, 0);\r\n\t\tInsets topSettingsInsets = new Insets(5, 0, 5, 0);\r\n\t\tInsets paddingAllAround = new Insets(5, 5, 5, 5);\r\n\t\tInsets separatorInsets = new Insets(5, 0, 5, 0);\r\n\t\tfeedbackSettingsLabel.setFont(settingsFont);\r\n\t\tfeedbackSimulationLabel.setFont(settingsFont);\r\n\t\tString updateHelp = \"Enter new values into the textfields\" + System.lineSeparator() + \"and click [enter] to update current values.\";\r\n\r\n//\t\t*** Settings>informationTab ***\r\n\t\tTab infoTab = new Tab(\"Information\");\r\n\t\tinfoTab.setClosable(false);\r\n\t\t\r\n\t\tVBox infoContent = new VBox();\r\n\t\tinfoContent.setPrefSize(tabWidth, tabHeight);\r\n\t\t\r\n\t\tfinal Label proxim8Version = new Label(\"Proxim8 v3.3\");\r\n\t\tproxim8Version.setTextFill(settingsTitleColor);\r\n\t\tproxim8Version.setFont(new Font(\"Aria\", 24));\r\n\t\tfinal Label driveModeLabel = new Label(\"Drive mode:\");\r\n\t\tdriveModeLabel.setTextFill(settingsTitleColor);\r\n\t\tdriveModeLabel.setFont(settingsTitleFont);\r\n\t\tfinal Text driveModeInfo = new Text(\"- measures the distance to the car infront of you\" + System.lineSeparator()\r\n\t\t\t\t\t\t\t\t\t \t + \"- checks if your brakedistance < current distance\");\r\n\t\tdriveModeInfo.setFill(settingsTextColor);\r\n\t\tdriveModeInfo.setFont(infoFont);\r\n\t\tfinal Label blindspotLabel = new Label(\"Blindspot mode:\");\r\n\t\tblindspotLabel.setTextFill(settingsTitleColor);\r\n\t\tblindspotLabel.setFont(settingsTitleFont);\r\n\t\tfinal Text blindspotModeInfo = new Text(\"- checks if there's a car in your blindzone\");\r\n\t\tblindspotModeInfo.setFill(settingsTextColor);\r\n\t\tblindspotModeInfo.setFont(infoFont);\r\n\t\tfinal Label parkingModeLabel = new Label(\"Parking mode:\");\r\n\t\tparkingModeLabel.setTextFill(settingsTitleColor);\r\n\t\tparkingModeLabel.setFont(settingsTitleFont);\r\n\t\tfinal Text parkingModeInfo = new Text(\"- measures the distances around the car\" + System.lineSeparator()\r\n\t\t\t\t\t\t\t\t\t\t\t+ \"- gives a warning incase the distance < door length\");\r\n\t\tparkingModeInfo.setFill(settingsTextColor);\r\n\t\tparkingModeInfo.setFont(infoFont);\r\n\t\t\r\n\t\tinfoContent.getChildren().addAll(proxim8Version, driveModeLabel, driveModeInfo, blindspotLabel, blindspotModeInfo, parkingModeLabel, parkingModeInfo);\r\n\t\tinfoTab.setContent(infoContent);\r\n\t\t\r\n//\t\t*** Settings>settingsTab ***\r\n\t\tTab settingsTab = new Tab(\"Settings\");\r\n\t\tsettingsTab.setClosable(false);\r\n\t\t\r\n\t\tVBox settingsContent = new VBox();\r\n\t\tsettingsContent.setPrefSize(tabWidth, tabHeight);\r\n\t\t\r\n\t\tHBox getAndSetValues = new HBox();\r\n\t\tgetAndSetValues.setPadding(paddingAllAround);\r\n//\t\tSettings>settingsTab>currentValues\r\n\t\tGridPane currentValues = new GridPane();\r\n\t\tfinal Label currentValuesLabel = new Label(\"Current values:\");\r\n\t\tcurrentValuesLabel.setTextFill(settingsTitleColor);\r\n\t\tcurrentValuesLabel.setFont(settingsTitleFont);\r\n\t\t\r\n\t\tfinal Label door = new Label(DOOR_LENGTH + \": \");\r\n\t\tdoor.setTextFill(settingsTextColor);\r\n\t\tdoor.setFont(settingsFont);\r\n\t\tdoor.setPadding(topSettingsInsets);\r\n\t\tfinal Label doorValue = new Label(String.valueOf(carData.getDoorLength()) + \"m\");\r\n\t\tdoorValue.setTextFill(settingsTextColor);\r\n\t\tdoorValue.setFont(settingsFont);\r\n\t\tfinal Label rearDoor = new Label(REAR_DOOR_LENGTH + \": \");\r\n\t\trearDoor.setTextFill(settingsTextColor);\r\n\t\trearDoor.setFont(settingsFont);\r\n\t\trearDoor.setPadding(settingsInsets);\r\n\t\tfinal Label rearDoorValue = new Label(String.valueOf(carData.getRearDoorLength()) + \"m\");\r\n\t\trearDoorValue.setTextFill(settingsTextColor);\r\n\t\trearDoorValue.setFont(settingsFont);\r\n\t\tfinal Label blindZone = new Label(BLIND_ZONE_VALUE + \": \");\r\n\t\tblindZone.setTextFill(settingsTextColor);\r\n\t\tblindZone.setFont(settingsFont);\r\n\t\tblindZone.setPadding(settingsInsets);\r\n\t\tfinal Label blindZoneValue = new Label(String.valueOf(carData.getBlindZoneValue()) + \"m\");\r\n\t\tblindZoneValue.setTextFill(settingsTextColor);\r\n\t\tblindZoneValue.setFont(settingsFont);\r\n\t\tfinal Label frontParkDist = new Label(FRONT_PARK_DISTANCE + \": \");\r\n\t\tfrontParkDist.setTextFill(settingsTextColor);\r\n\t\tfrontParkDist.setFont(settingsFont);\r\n\t\tfrontParkDist.setPadding(settingsInsets);\r\n\t\tfinal Label frontParkDistValue = new Label(String.valueOf(carData.getFrontDistParking()) + \"m\");\r\n\t\tfrontParkDistValue.setTextFill(settingsTextColor);\r\n\t\tfrontParkDistValue.setFont(settingsFont);\r\n\t\tfrontParkDistValue.setPadding(settingsInsets);\r\n\t\t\r\n\t\tcurrentValues.add(currentValuesLabel, 0, 0);\r\n\t\tcurrentValues.add(door, 0, 1);\r\n\t\tcurrentValues.add(doorValue, 1, 1);\r\n\t\t\r\n\t\tcurrentValues.add(rearDoor, 0, 2);\r\n\t\tcurrentValues.add(rearDoorValue, 1, 2);\r\n\t\t\r\n\t\tcurrentValues.add(blindZone, 0, 3);\r\n\t\tcurrentValues.add(blindZoneValue, 1, 3);\r\n\t\t\r\n\t\tcurrentValues.add(frontParkDist, 0, 4);\r\n\t\tcurrentValues.add(frontParkDistValue, 1, 4);\r\n\t\t\r\n//\t\tSettings>settingTab>updateFields\r\n\t\tVBox updateFields = new VBox();\r\n\t\tupdateFields.setPadding(paddingAllAround);\r\n\t\tfinal Label updateLabel = new Label(\"Set new value:\");\r\n\t\tupdateLabel.setTextFill(settingsTitleColor);\r\n\t\tupdateLabel.setFont(settingsTitleFont);\r\n\t\t\r\n\t\tfinal TextField doorLengthField = new TextField();\r\n\t\tdoorLengthField.setPromptText(\"meter\");\r\n\t\tdoorLengthField.setMaxWidth(textfieldWidth);\r\n\t\tdoorLengthField.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent event) {\r\n\t\t\t\tvalidateInput(doorValue, feedbackSettingsLabel, doorLengthField, DOOR_LENGTH, 0, 10);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tfinal TextField rearDoorLengthField = new TextField();\r\n\t\trearDoorLengthField.setPromptText(\"meter\");\r\n\t\trearDoorLengthField.setMaxWidth(textfieldWidth);\r\n\t\trearDoorLengthField.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent event) {\r\n\t\t\t\tvalidateInput(rearDoorValue, feedbackSettingsLabel, rearDoorLengthField, REAR_DOOR_LENGTH, 0, 10);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tfinal TextField blindZoneValueField = new TextField();\r\n\t\tblindZoneValueField.setMaxWidth(textfieldWidth);\r\n\t\tblindZoneValueField.setPromptText(\"meter\");\r\n\t\tblindZoneValueField.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent event) {\r\n\t\t\t\tvalidateInput(blindZoneValue, feedbackSettingsLabel, blindZoneValueField, BLIND_ZONE_VALUE, 0, 10);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tfinal TextField frontParkDistField = new TextField();\r\n\t\tfrontParkDistField.setMaxWidth(textfieldWidth);\r\n\t\tfrontParkDistField.setPromptText(\"meter\");\r\n\t\tfrontParkDistField.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent event) {\r\n\t\t\t\tvalidateInput(frontParkDistValue, feedbackSettingsLabel, frontParkDistField, FRONT_PARK_DISTANCE, 0, 10);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tupdateFields.getChildren().addAll(updateLabel, doorLengthField, rearDoorLengthField, blindZoneValueField, frontParkDistField);\r\n\t\t\r\n\t\tRegion regionSettings = new Region();\r\n\t\tregionSettings.setPrefWidth(25);\r\n\t\tgetAndSetValues.getChildren().addAll(currentValues, regionSettings, updateFields);\r\n\t\t\r\n\t\tSeparator settingsSeparator = new Separator();\r\n\t\tsettingsSeparator.setPadding(separatorInsets);\r\n\t\t\r\n\t\tfinal Text howToUpdate = new Text(updateHelp);\r\n\t\thowToUpdate.setFill(settingsTextColor);\r\n\t\thowToUpdate.setFont(settingsFont);\r\n\t\t\r\n\t\tSeparator settingsSeparator2 = new Separator();\r\n\t\tsettingsSeparator2.setPadding(separatorInsets);\r\n\t\t\r\n\t\t\r\n\t\tsettingsContent.getChildren().addAll(getAndSetValues, settingsSeparator, howToUpdate, settingsSeparator2, feedbackSettingsLabel);\r\n\t\tsettingsTab.setContent(settingsContent);\r\n\t\t\r\n//\t\t*** Settings>simulate ***\r\n\t\tTab simulateTab = new Tab(\"Simulation\");\r\n\t\tsimulateTab.setClosable(false);\r\n\t\t\r\n\t\tVBox simulateContent = new VBox();\r\n\t\tsimulateContent.setPrefSize(tabWidth, tabHeight);\r\n\t\t\r\n\t\t\r\n\t\tHBox getAndSetSim = new HBox();\r\n\t\tgetAndSetSim.setPadding(paddingAllAround);\r\n//\t\tSettings>simulate>currentValues\r\n\t\tGridPane currentValuesSim = new GridPane();\r\n\t\tfinal Label currentValuesSimLabel = new Label(\"Current values:\");\r\n\t\tcurrentValuesSimLabel.setTextFill(settingsTitleColor);\r\n\t\tcurrentValuesSimLabel.setFont(settingsTitleFont);\r\n\t\t\r\n\t\tfinal Label topSpeed = new Label(TOP_SPEED + \": \");\r\n\t\ttopSpeed.setTextFill(settingsTextColor);\r\n\t\ttopSpeed.setFont(settingsFont);\r\n\t\ttopSpeed.setPadding(topSettingsInsets);\r\n\t\tfinal Label topSpeedValue = new Label(String.valueOf(carData.getTopSpeed()) + \"km/h\");\r\n\t\ttopSpeedValue.setTextFill(settingsTextColor);\r\n\t\ttopSpeedValue.setFont(settingsFont);\r\n\t\t\r\n\t\tcurrentValuesSim.add(currentValuesSimLabel, 0, 0);\r\n\t\tcurrentValuesSim.add(topSpeed, 0, 1);\r\n\t\tcurrentValuesSim.add(topSpeedValue, 1, 1);\r\n\t\t\r\n//\t\tSettings>simulate>updateFields\r\n\t\tVBox updateFieldsSim = new VBox();\r\n\t\tfinal Label updateSimLabel = new Label(\"Set new value:\");\r\n\t\tupdateSimLabel.setTextFill(settingsTitleColor);\r\n\t\tupdateSimLabel.setFont(settingsTitleFont);\r\n\t\t\r\n\t\tfinal TextField topSpeedField = new TextField();\r\n\t\ttopSpeedField.setMaxWidth(textfieldWidth);\r\n\t\ttopSpeedField.setPromptText(\"km/h\");\r\n\t\ttopSpeedField.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent event) {\r\n\t\t\t\tvalidateInput(topSpeedValue, feedbackSimulationLabel, topSpeedField, TOP_SPEED, Double.valueOf(carSpeed), 999.0);\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tupdateFieldsSim.getChildren().addAll(updateSimLabel, topSpeedField);\r\n\t\t\r\n\t\tRegion simulateRegion = new Region();\r\n\t\tsimulateRegion.setPrefWidth(25);\r\n\t\tgetAndSetSim.getChildren().addAll(currentValuesSim, simulateRegion, updateFieldsSim);\r\n\t\t\r\n\t\tSeparator simulationSeparator = new Separator();\r\n\t\tsimulationSeparator.setPadding(separatorInsets);\r\n\t\t\r\n\t\tfinal Text simulateInfo = new Text(updateHelp);\r\n\t\tsimulateInfo.setFill(settingsTextColor);\r\n\t\tsimulateInfo.setFont(settingsFont);\r\n\t\t\r\n\t\tSeparator simulationSeparator2 = new Separator();\r\n\t\tsimulationSeparator2.setPadding(separatorInsets);\r\n\t\t\r\n\t\t\r\n\t\tsimulateContent.getChildren().addAll(getAndSetSim, simulationSeparator, simulateInfo, simulationSeparator2, feedbackSimulationLabel);\r\n\t\tsimulateTab.setContent(simulateContent);\r\n\t\t\r\n//\t\t*** Settings>checkBoxTab ***\r\n\t\tTab extraFeaturesTab = new Tab(\"Extra features\");\r\n\t\textraFeaturesTab.setClosable(false);\r\n\t\t\r\n\t\tVBox extraFeaturesContent = new VBox();\r\n\t\textraFeaturesContent.setPrefSize(tabWidth, tabHeight);\r\n\t\textraFeaturesContent.setPadding(paddingAllAround);\r\n\t\t\r\n\t\tfinal Label extraFeaturesLabel = new Label(\"Extra features\");\r\n\t\textraFeaturesLabel.setTextFill(settingsTitleColor);\r\n\t\textraFeaturesLabel.setFont(settingsTitleFont);\r\n\t\textraFeaturesLabel.setPadding(topSettingsInsets);\r\n\t\t\r\n\t\tSeparator separatorExtraFeatures = new Separator();\r\n\t\tseparatorExtraFeatures.setPadding(separatorInsets);\r\n\t\t\r\n\t\tInsets checkInsets = new Insets(5, 0, 5, 5);\r\n\t\tfinal CheckBox smartBrake = new CheckBox(\"Smart brake\");\r\n\t\tsmartBrake.setSelected(smartBrakeActivated);\r\n\t\tsmartBrake.setFont(settingsFont);\r\n\t\tsmartBrake.setTextFill(settingsTextColor);\r\n\t\tsmartBrake.setPadding(checkInsets);\r\n\t\tsmartBrake.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent event) {\r\n\t\t\t\tsmartBrakeActivated = ! smartBrakeActivated;\r\n\t\t\t\tvalidateAndUpdate(null, true, feedbackSettingsLabel, \"Successfully updated\");\r\n\t\t\t}\r\n\t\t});\r\n\t\tfinal CheckBox blindspotAlways = new CheckBox(\"Blindspot always\");\r\n\t\tblindspotAlways.setSelected(blindspotAlwaysActivated);\r\n\t\tblindspotAlways.setFont(settingsFont);\r\n\t\tblindspotAlways.setTextFill(settingsTextColor);\r\n\t\tblindspotAlways.setPadding(checkInsets);\r\n\t\tblindspotAlways.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent event) {\r\n\t\t\t\tblindspotAlwaysActivated = ! blindspotAlwaysActivated;\r\n\t\t\t\tvalidateAndUpdate(null, true, feedbackSettingsLabel, \"Successfully updated\");\r\n\t\t\t}\r\n\t\t});\r\n\t\tfinal CheckBox audioWarning = new CheckBox(\"Audio warning\");\r\n\t\taudioWarning.setSelected(audioWarningActivated);\r\n\t\taudioWarning.setFont(settingsFont);\r\n\t\taudioWarning.setTextFill(settingsTextColor);\r\n\t\taudioWarning.setPadding(checkInsets);\r\n\t\taudioWarning.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent event) {\r\n\t\t\t\taudioWarningActivated = ! audioWarningActivated;\r\n\t\t\t\tvalidateAndUpdate(null, true, feedbackSettingsLabel, \"Successfully updated\");\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\textraFeaturesContent.getChildren().addAll(extraFeaturesLabel, separatorExtraFeatures, smartBrake, blindspotAlways); //, audioWarning);\r\n\t\textraFeaturesTab.setContent(extraFeaturesContent);\r\n\t\t\r\n\t\t\r\n\t\tTabPane settingsWindow = new TabPane();\r\n\t\tsettingsWindow.setVisible(false);\r\n\t\tsettingsWindow.getTabs().addAll(infoTab, settingsTab, simulateTab, extraFeaturesTab);\r\n\t\treturn settingsWindow;\r\n\t}",
"protected void createContents() {\n\t\tsetText(\"Account Settings\");\n\t\tsetSize(450, 225);\n\n\t}",
"private PasswordScreen() {\n initComponents();\n\n //cbUserType.setModel(new DefaultComboBoxModel(new String[] {User.USER_TYPE_MANAGER, User.USER_TYPE_CASHIER, User.USER_TYPE_SERVER}));\n\n btnConfigureDatabase.setAction(goAction);\n btnConfigureDatabase.setActionCommand(\"DBCONFIG\");\n }",
"private void createpanel1() {\r\n\t\theader = new JLabel();\r\n\t\theader.setText(\"Type in Userinformation\");\r\n\t\theader.setFont(customFont.deriveFont(25f));\r\n\t\theader.setForeground(Color.WHITE);\r\n\r\n\t\tpanels[0].add(header);\r\n\t\tpanels[0].setOpaque(false);\r\n\t\tallComponents.add(panels[0]);\r\n\r\n\t}",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jToolBar1 = new javax.swing.JToolBar();\n jPanel1 = new javax.swing.JPanel();\n jTextField1 = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n jTextField4 = new javax.swing.JTextField();\n jButton2 = new javax.swing.JButton();\n jLabel4 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jComboBox1 = new javax.swing.JComboBox<>();\n jTextField2 = new javax.swing.JTextField();\n jLabel1 = new javax.swing.JLabel();\n jButton1 = new javax.swing.JButton();\n jLabel5 = new javax.swing.JLabel();\n jTextField5 = new javax.swing.JTextField();\n jLabel6 = new javax.swing.JLabel();\n jPasswordField1 = new javax.swing.JPasswordField();\n jButton3 = new javax.swing.JButton();\n jLabel7 = new javax.swing.JLabel();\n jTextField3 = new javax.swing.JTextField();\n\n jToolBar1.setRollover(true);\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jPanel1.setBackground(new java.awt.Color(255, 255, 255));\n jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, \"New Account\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Apple SD Gothic Neo\", 1, 18), java.awt.Color.orange)); // NOI18N\n\n jLabel3.setFont(new java.awt.Font(\"Apple SD Gothic Neo\", 1, 14)); // NOI18N\n jLabel3.setText(\"Password\");\n\n jButton2.setIcon(new javax.swing.ImageIcon(\"/Users/sena/Downloads/02.png\")); // NOI18N\n jButton2.setText(\"Back\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n jLabel4.setFont(new java.awt.Font(\"Apple SD Gothic Neo\", 1, 14)); // NOI18N\n jLabel4.setText(\"Security Question\");\n\n jLabel2.setFont(new java.awt.Font(\"Apple SD Gothic Neo\", 1, 14)); // NOI18N\n jLabel2.setText(\"Username\");\n\n jComboBox1.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"What is your first animal's name?\", \"What is your favorite color?\", \"What is your first Childhood friend?\", \"What is your school name?\" }));\n\n jLabel1.setFont(new java.awt.Font(\"Apple SD Gothic Neo\", 1, 14)); // NOI18N\n jLabel1.setText(\"Name\");\n\n jButton1.setIcon(new javax.swing.ImageIcon(\"/Users/sena/Downloads/00.png\")); // NOI18N\n jButton1.setText(\"Create\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jLabel5.setFont(new java.awt.Font(\"Apple SD Gothic Neo\", 1, 14)); // NOI18N\n jLabel5.setText(\"Answer\");\n\n jLabel6.setFont(new java.awt.Font(\"Apple SD Gothic Neo\", 1, 14)); // NOI18N\n jLabel6.setText(\"E-mail\");\n\n jButton3.setText(\"Attach\");\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n\n jLabel7.setBackground(new java.awt.Color(204, 204, 255));\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addGap(38, 38, 38)\n .addComponent(jButton2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(85, 85, 85))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 131, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addGap(80, 80, 80)\n .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, 188, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel5)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel4)\n .addComponent(jLabel6)\n .addComponent(jLabel3)\n .addComponent(jLabel2))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, 256, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 174, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jPasswordField1, javax.swing.GroupLayout.PREFERRED_SIZE, 189, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jButton3)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 174, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, 176, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(39, 39, 39))))\n .addContainerGap(136, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 122, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(29, 29, 29)\n .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(33, 33, 33)\n .addComponent(jButton3)))\n .addGap(53, 53, 53)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 25, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(34, 34, 34)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(jPasswordField1, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(20, 20, 20)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel6))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(jComboBox1, javax.swing.GroupLayout.DEFAULT_SIZE, 45, Short.MAX_VALUE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(63, 63, 63)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton2)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(49, 49, 49))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n }",
"public FormPermisos() {\n initComponents();\n setLocationRelativeTo(null);\n setTitle(\"INTERFACE-PERMISOS\");\n }",
"private void initSettingsPanel() {\n JLabel lblName = new JLabel(\"Name:\");\n lblName.setForeground(StyleCompat.textColor());\n\n JTextField fieldName = new JTextField(20);\n panelSettings.add(UserInterfaceUtil.createSettingBgr(lblName, fieldName));\n\n JLabel lblVirtOutput = new JLabel(\"VirtualOutput:\");\n lblVirtOutput.setForeground(StyleCompat.textColor());\n\n JComboBox<String> comboVirtOutputs = new JComboBox<>();\n for(Device device : instance.getInterface().getDeviceManager().getDevices()) {\n if(device instanceof VirtualOutput) {\n if(handler != null && instance.getHandlerByVirtualOutput(device.getId()) == handler) {\n comboVirtOutputs.addItem(device.getId());\n comboVirtOutputs.setSelectedIndex(comboVirtOutputs.getItemCount() - 1);\n } else if(!instance.isVirtualOutputUsed(device.getId())) {\n comboVirtOutputs.addItem(device.getId());\n }\n }\n }\n panelSettings.add(UserInterfaceUtil.createSettingBgr(lblVirtOutput, comboVirtOutputs));\n\n JLabel lblDeviceId = new JLabel(\"OpenRGB Device ID (index):\");\n lblDeviceId.setForeground(StyleCompat.textColor());\n\n JFormattedTextField fieldDeviceId = new JFormattedTextField(UserInterfaceUtil.getIntFieldFormatter());\n fieldDeviceId.setColumns(5);\n JButton btnAddDeviceId = new JButton(\"Add device\");\n UiUtilsCompat.configureButton(btnAddDeviceId);\n btnAddDeviceId.addActionListener(e -> {\n if(fieldDeviceId.getValue() == null) return;\n int value = (int) fieldDeviceId.getValue();\n if(value < 0 || listDevices.contains(value)) {\n instance.getInterface().getNotificationManager().addNotification(\n new Notification(NotificationType.ERROR, \"OpenRGB Plugin\", \"Invalid ID or list contains already ID.\"));\n return;\n }\n listDevices.add(value);\n fieldDeviceId.setText(\"\");\n updateDeviceListPanel();\n });\n panelSettings.add(UserInterfaceUtil.createSettingBgr(lblDeviceId, fieldDeviceId, btnAddDeviceId));\n\n if(instance.getOpenRGB().isConnected()) {\n // show info label, remove all and add all button\n int deviceCount = instance.getOpenRGB().getControllerCount();\n\n JLabel lblCountInfo = new JLabel(\"There are \" + deviceCount + \" devices available.\");\n lblCountInfo.setForeground(StyleCompat.textColor());\n\n JButton btnAddAll = new JButton(\"Add all\");\n UiUtilsCompat.configureButton(btnAddAll);\n btnAddAll.addActionListener(e -> {\n for(int i = 0; i < deviceCount; i++) {\n if(!listDevices.contains(i))\n listDevices.add(i);\n }\n updateDeviceListPanel();\n });\n\n JButton btnRemoveAll = new JButton(\"Remove all\");\n UiUtilsCompat.configureButton(btnRemoveAll);\n btnRemoveAll.addActionListener(e -> {\n listDevices.clear();\n updateDeviceListPanel();\n });\n\n // add components to panel\n panelSettings.add(UserInterfaceUtil.createSettingBgr(lblCountInfo, btnAddAll, btnRemoveAll));\n } else {\n // show hint message\n JLabel lblHint = new JLabel(\"(i) Go back and connect the client to receive live data from the SDK server.\");\n lblHint.setForeground(StyleCompat.textColorDarker());\n panelSettings.add(UserInterfaceUtil.createSettingBgr(lblHint));\n }\n\n panelDeviceList = new JPanel();\n panelDeviceList.setBackground(StyleCompat.panelDarkBackground());\n panelDeviceList.setLayout(new BoxLayout(panelDeviceList, BoxLayout.Y_AXIS));\n panelDeviceList.setAlignmentX(Component.LEFT_ALIGNMENT);\n panelSettings.add(Box.createVerticalStrut(10));\n panelSettings.add(panelDeviceList);\n updateDeviceListPanel();\n\n if(handler != null) {\n // set stored values\n fieldName.setText(handler.getName());\n }\n\n JButton btnAdd = new JButton(handler == null ? \"Add OpenRGB Device\" : \"Save OpenRGB Device\");\n UiUtilsCompat.configureButton(btnAdd);\n btnAdd.setAlignmentX(Component.LEFT_ALIGNMENT);\n btnAdd.setMaximumSize(new Dimension(Integer.MAX_VALUE, 50));\n btnAdd.setMinimumSize(new Dimension(100, 50));\n\n btnAdd.addActionListener(e -> {\n // create value holder\n ValueHolder holder = new ValueHolder(\n fieldName.getText(),\n (String) comboVirtOutputs.getSelectedItem(),\n listDevices);\n\n if(validateInput(holder.getName(), holder.getOutputId())) {\n // get output\n VirtualOutput output = OpenRgbPlugin.getVirtualOutput(instance.getInterface().getDeviceManager(), holder.getOutputId());\n if (output == null) {\n instance.getInterface().getNotificationManager().addNotification(\n new Notification(NotificationType.ERROR, \"OpenRGB Plugin\", \"Could not find virtual output for id \" + holder.getOutputId()));\n return;\n }\n\n if(handler != null) { // set values to output handler\n handler.setName(holder.getName());\n handler.setDevices(listDevices);\n handler.setVirtualOutput(output);\n } else { // create new output handler\n // create new handler\n OutputHandler handler = instance.createHandler(holder, output);\n // add handler to set\n instance.addHandler(handler);\n }\n\n // go back\n context.navigateDown();\n }\n });\n\n panelSettings.add(Box.createVerticalGlue());\n panelSettings.add(btnAdd);\n }",
"private void saveFieldnameSettingsButtonActionPerformed(ActionEvent e) {\n FieldnameDuplicatePresets fdp = PreferencesManager.getFieldnameDupliatePresets();\n fdp.setFieldname(defaultFieldnamePrefixTextField.getText().trim());\n fdp.setCounterStart((Integer) fieldnameCounterSpinner.getValue());\n fdp.setHorizontalDuplicates((Integer) horizontalDuplicatesSpinner.getValue());\n fdp.setVerticalDuplicates((Integer) verticalDuplicatesSpinner.getValue());\n fdp.setHorizontalSpacing((Integer) horizontalSpacingSpinner.getValue());\n fdp.setVerticalSpacing((Integer) verticalSpacingSpinner.getValue());\n if (tblrButton.isSelected()) {\n fdp.setNamingDirection(FieldnameDuplicatePresets.DIRECTION_TOP_TO_BOTTOM_LEFT_TO_RIGHT);\n } else {\n fdp.setNamingDirection(FieldnameDuplicatePresets.DIRECTION_LEFT_TO_RIGHT_TOP_TO_BOTTOM);\n }\n try {\n PreferencesManager.savePreferences(Main.getXstream());\n Misc.showSuccessMsg(this,\n Localizer.localize(\"Util\", \"CapturePreferencesSavedSuccessfullyMessage\"));\n } catch (IOException e1) {\n Misc.showErrorMsg(this, Localizer.localize(\"Util\", \"ErrorSavingPreferencesMessage\"),\n Localizer.localize(\"Util\", \"ErrorSavingPreferencesTitle\"));\n com.ebstrada.formreturn.manager.util.Misc.printStackTrace(e1);\n return;\n }\n }",
"public Frame_Ajouter_Administrateur() {\n initComponents();\n }",
"@SuppressWarnings(\"deprecation\")\n\tprivate void setupSimplePreferencesScreen() {\n\t\tif (!isSimplePreferences(this)) {\n\t\t\treturn;\n\t\t}\n\n\t\taddPreferencesFromResource(R.xml.pref_blank);\n\n\t\t// Add 'filters' preferences.\n\t\tPreferenceCategory fakeHeader = new PreferenceCategory(this);\n\n\t\t// Add 'appearance' preferences.\n\t\tfakeHeader = new PreferenceCategory(this);\n\t\tfakeHeader.setTitle(R.string.appearance);\n\t\tgetPreferenceScreen().addPreference(fakeHeader);\n\t\taddPreferencesFromResource(R.xml.pref_appearance);\n\n\t\t// Add 'text color' preferences.\n\t\tfakeHeader = new PreferenceCategory(this);\n\t\tfakeHeader.setTitle(R.string.text_color);\n\t\tgetPreferenceScreen().addPreference(fakeHeader);\n\t\taddPreferencesFromResource(R.xml.pref_textcolor);\n\n\t\t// Add 'info' preferences.\n\t\tfakeHeader = new PreferenceCategory(this);\n\t\tfakeHeader.setTitle(R.string.information);\n\t\tgetPreferenceScreen().addPreference(fakeHeader);\n\t\taddPreferencesFromResource(R.xml.pref_info);\n\n\t\t// Add others\n\t\tsetupOpenSourceInfoPreference(this, findPreference(getString(R.string.pref_info_open_source)));\n\t\tsetupVersionPref(this, findPreference(getString(R.string.pref_version)));\n\n\t}",
"private void createAndShowGUI (){\n\n JustawieniaPowitalne = new JUstawieniaPowitalne();\n }",
"public ReconstructionSettingsFrame(ReconstructionFrame parent) {\n pref = Preferences.userNodeForPackage(getClass());\n this.parent = parent;\n\n loadPrefs();\n\n setLocationRelativeTo(parent);\n initComponents();\n }",
"public void makeNew() {\n\t\towner.switchMode(WindowMode.ITEMCREATE);\n\t}",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n serviceJarLabel = new javax.swing.JLabel();\n serviceJarTf = new javax.swing.JTextField();\n copyJarCB = new javax.swing.JCheckBox();\n saveButton = new javax.swing.JButton();\n cancelButton = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(org.openide.util.NbBundle.getMessage(PreferencesUI.class, \"LBL_Preferences\")); // NOI18N\n\n jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(PreferencesUI.class, \"LBL_TTL_PREFERENCES\"))); // NOI18N\n\n serviceJarLabel.setText(org.openide.util.NbBundle.getMessage(PreferencesUI.class, \"PreferencesUI.serviceJarLabel.text\")); // NOI18N\n\n copyJarCB.setText(org.openide.util.NbBundle.getMessage(PreferencesUI.class, \"PreferencesUI.copyJarCB.text\")); // NOI18N\n\n org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(jPanel1Layout.createSequentialGroup()\n .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(jPanel1Layout.createSequentialGroup()\n .add(6, 6, 6)\n .add(serviceJarLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(serviceJarTf, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 243, Short.MAX_VALUE))\n .add(jPanel1Layout.createSequentialGroup()\n .add(copyJarCB, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .add(136, 136, 136)))\n .addContainerGap())\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(serviceJarTf, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(serviceJarLabel))\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)\n .add(copyJarCB)\n .addContainerGap(32, Short.MAX_VALUE))\n );\n\n saveButton.setText(org.openide.util.NbBundle.getMessage(PreferencesUI.class, \"PreferencesUI.saveButton.text\")); // NOI18N\n saveButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n saveButtonActionPerformed(evt);\n }\n });\n\n cancelButton.setText(org.openide.util.NbBundle.getMessage(PreferencesUI.class, \"PreferencesUI.cancelButton.text\")); // NOI18N\n cancelButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cancelButtonActionPerformed(evt);\n }\n });\n\n org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()\n .addContainerGap()\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)\n .add(jPanel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .add(layout.createSequentialGroup()\n .add(233, 233, 233)\n .add(saveButton, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 65, Short.MAX_VALUE)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(cancelButton, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()\n .addContainerGap()\n .add(jPanel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(cancelButton)\n .add(saveButton))\n .addContainerGap())\n );\n\n pack();\n }",
"public FDRSettingsPanel() {\n initComponents();\n }",
"public PreferencesDialog (JFrame owner, String title)\n {\n this (owner, title, OpenMarkovPreferences.OPENMARKOV_NODE_PREFERENCES, true/*\n * ,\n * OpenMarkovPreferences\n * .\n * OPENMARKOV_KERNEL_PREFERENCES\n * ,\n * false\n */);\n }",
"@Override\n\tpublic UserPreferences newInstance() {\n\t\treturn new UserPreferences();\n\t}",
"private void fillPanel(){\n\t\t\tcontent.setLayout(new GridLayout(9,1));\n\t\t\tcontent.setBackground(Color.BLACK);\n\t\t\tcontent.add(playerNameLabel);\n\t\t\tcontent.add(playerNameField);\n\t\t\tcontent.add(placeHolder);\n\t\t\tcontent.add(passwordLabel);\n\t\t\tcontent.add(passwordField);\n\t\t\tcontent.add(passwordLabelRepeat);\n\t\t\tcontent.add(passwordFieldRepeat);\n\t\t\tcontent.add(placeHolder2);\n\t\t\tcontent.add(createButton);\t\n\t\t}",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n db = new javax.swing.JComboBox<>();\n driver = new javax.swing.JTextField();\n url = new javax.swing.JTextField();\n username = new javax.swing.JTextField();\n password = new javax.swing.JTextField();\n showPassword = new javax.swing.JCheckBox();\n check = new javax.swing.JButton();\n save = new javax.swing.JButton();\n close = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"Add databse\");\n setResizable(false);\n\n jPanel1.setBackground(new java.awt.Color(255, 255, 255));\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel1.setText(\"DB\");\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel2.setText(\"Driver\");\n\n jLabel3.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel3.setText(\"Url\");\n\n jLabel4.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel4.setText(\"Username\");\n\n jLabel5.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel5.setText(\"Password\");\n jLabel5.setToolTipText(\"\");\n\n db.setFont(new java.awt.Font(\"Tahoma\", 0, 16)); // NOI18N\n db.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"select\", \"MySQL\", \"Oracle\", \"IBM DB2 App\", \"IBM DB2 Net\\t\", \"Sybase\", \"Teradata\", \"Microsoft SQL Server\\t\", \"Postgre\" }));\n db.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n dbItemStateChanged(evt);\n }\n });\n\n driver.setFont(new java.awt.Font(\"Tahoma\", 0, 16)); // NOI18N\n driver.setEnabled(false);\n\n url.setFont(new java.awt.Font(\"Tahoma\", 0, 16)); // NOI18N\n\n username.setFont(new java.awt.Font(\"Tahoma\", 0, 16)); // NOI18N\n\n password.setFont(new java.awt.Font(\"Tahoma\", 0, 16)); // NOI18N\n\n showPassword.setBackground(new java.awt.Color(255, 255, 255));\n showPassword.setText(\"show password\");\n\n check.setText(\"Check\");\n check.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n checkActionPerformed(evt);\n }\n });\n\n save.setText(\"Save\");\n save.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n saveActionPerformed(evt);\n }\n });\n\n close.setText(\"Close\");\n close.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n closeActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(10, 10, 10)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(password, javax.swing.GroupLayout.PREFERRED_SIZE, 242, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(showPassword))\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(db, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(username))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(url))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(driver, javax.swing.GroupLayout.PREFERRED_SIZE, 297, javax.swing.GroupLayout.PREFERRED_SIZE)))))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(85, 85, 85)\n .addComponent(check, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(46, 46, 46)\n .addComponent(save, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(46, 46, 46)\n .addComponent(close, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(34, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(37, 37, 37)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(db, javax.swing.GroupLayout.DEFAULT_SIZE, 37, Short.MAX_VALUE)\n .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(24, 24, 24)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(driver, javax.swing.GroupLayout.DEFAULT_SIZE, 37, Short.MAX_VALUE)\n .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(24, 24, 24)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(url, javax.swing.GroupLayout.DEFAULT_SIZE, 37, Short.MAX_VALUE)\n .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(24, 24, 24)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(username, javax.swing.GroupLayout.DEFAULT_SIZE, 37, Short.MAX_VALUE)\n .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(24, 24, 24)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(password, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(showPassword))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 30, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(check, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(save, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(close, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(22, 22, 22))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n setLocationRelativeTo(null);\n }",
"private void jmiAdministrarHuespedActionPerformed(java.awt.event.ActionEvent evt) {\n if(adminHuesped == null){\n adminHuesped = new HuespedAdministrar();\n jdpPrincipal.add(adminHuesped);\n adminHuesped.show();\n }else{\n adminHuesped.dispose();\n adminHuesped = new HuespedAdministrar();\n jdpPrincipal.add(adminHuesped);\n adminHuesped.show();\n } \n }",
"public SwitchYardSettingsPropertyPage() {\n super();\n noDefaultAndApplyButton();\n }",
"private void createManualJPanel() {\r\n createJPanelWithManual();\r\n JFrame frame = new JFrame();\r\n customizeFrame(frame);\r\n }",
"public UserInfoPanel() {\n initComponents();\n }",
"private void btnNewActionPerformed(java.awt.event.ActionEvent evt) {\n\n initPanel();\n }",
"public frmCadastrarProduto() {\n initComponents();\n\n this.cmbCategoria.setEnabled(false);\n this.cmbFornecedor.setEnabled(false);\n this.txtNome.setEnabled(false);\n this.txtDescricao.setEnabled(false);\n this.txtEstoque.setEnabled(false);\n this.txtId.setEnabled(false);\n this.txtPreco.setEnabled(false);\n this.txtPrecoCusto.setEnabled(false);\n this.txtCodBarras.setEnabled(false);\n\n }",
"public SettingsMenuPanel() {\n initComponents();\n changed.setVisible(false);\n }",
"private JPanel createAvailableConditionsSetPanel() {\n\t\tJPanel toReturn = new JPanel(new GridBagLayout());\n\n\t\t\n\t\t// Action for show profiling preferences.\n\t\t AbstractAction showProfilingPageAction = new AbstractAction(\"Profiling Preferences\") {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tPluginWorkspaceProvider.getPluginWorkspace().showPreferencesPages(new String[] { \"profiling.conditions\" },\n\t\t\t\t\t\t\"profiling.conditions\", true);\n\t\t\t\n\t\t\t\t//update the panel \n\t\t\t\tcomboBoxUpdate();\n\t\t\t}\n\t\t};\n\n\t\t\n\t\t // Button for display profiling preferences\n\t\t ToolbarButton buttonToProfiling = new ToolbarButton(showProfilingPageAction, true);\n\t\t\n\t\t\n\t\tGridBagConstraints gbc = new GridBagConstraints();\n\t\t\n\t\t//add the checkBox\n\t\tgbc.gridx = 0;\n\t\tgbc.gridy = 0;\n\t\tgbc.weightx = 1;\n\t\ttoReturn.add(useAllCondSetsRBtn, gbc);\n\t\t\n\t\t//add the button\n\t\tgbc.gridx = 1;\n\t\tgbc.weightx = 0;\n\n\t\tURL imageToLoad = getClass().getClassLoader().getResource(Images.PREFERENCES_ICON);\n\t\tif (imageToLoad != null) {\n\t\t\tbuttonToProfiling.setIcon(ro.sync.ui.Icons.getIcon(imageToLoad.toString()));\n\t\t\tbuttonToProfiling.setText(\"\");\n\t\t} else {\n\t\t\tbuttonToProfiling.setText(\"PC\");\n\t\t}\n\t\ttoReturn.add(buttonToProfiling, gbc);\n\n\t\treturn toReturn;\n\t}",
"public void createControl(Composite parent) {\n\t\tComposite comp = new Composite(parent, SWT.NONE);\r\n\t\tsetControl(comp);\r\n\r\n\t\tLaunchUIPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(getControl(), ICDTLaunchHelpContextIds.LAUNCH_CONFIGURATION_DIALOG_MAIN_TAB);\r\n\r\n\t\tGridLayout topLayout = new GridLayout();\r\n\t\ttopLayout.marginHeight = 10;\r\n\t\tcomp.setLayout(topLayout);\r\n\t\t\r\n\t\tcreateTargetCommGroup(comp, 1);\r\n\t\tcreateVerticalSpacer(comp, 1);\r\n\t\tcreateTargetInfoGroup(comp, 1);\r\n\t\t\r\n\t\tLaunchUIPlugin.setDialogShell(parent.getShell());\r\n\t}",
"private JPanel buildMainPanel() {\n FormLayout layout = new FormLayout(\"pref:grow\",\n \"pref, 3dlu, pref, 3dlu, pref, 12dlu, pref, 3dlu, pref, pref, \"\n + \"pref, pref, 9dlu, pref, 3dlu, pref, \"\n + \"pref, pref, pref, 0:grow, pref\");\n\n PanelBuilder builder = new PanelBuilder(layout);\n // Bottom border\n builder.setBorder(Borders.createEmptyBorder(\"1dlu, 3dlu, 2dlu, 3dlu\"));\n CellConstraints cc = new CellConstraints();\n\n int row = 1;\n\n builder.addSeparator(Translation.getTranslation(\"status_tab.status\"),\n cc.xy(1, row));\n row += 2;\n builder.add(synchronizationStatusLabel, cc.xy(1, row));\n row += 2;\n builder.add(synchronizationDateLabel, cc.xy(1, row));\n row += 2;\n\n builder.addSeparator(Translation.getTranslation(\"status_tab.you_have\"),\n cc.xy(1, row));\n row += 2;\n builder.add(newNoticesLine.getUIComponent(), cc.xy(1, row));\n row++;\n builder.add(filesAvailableLine.getUIComponent(), cc.xy(1, row));\n row++;\n builder.add(downloadsLine.getUIComponent(), cc.xy(1, row));\n row++;\n builder.add(uploadsLine.getUIComponent(), cc.xy(1, row));\n row += 2;\n\n builder.addSeparator(\n Translation.getTranslation(\"status_tab.online_storage.title\"),\n cc.xy(1, row));\n row += 2;\n builder.add(onlineStorageAccountLabel.getUIComponent(), cc.xy(1, row));\n row++;\n builder.add(onlineStorageSection.getUIComponent(), cc.xy(1, row));\n row++;\n builder.add(licenseInfoSection.getUIComponent(), cc.xy(1, row));\n row++;\n builder.add(buyNowLabel.getUIComponent(), cc.xy(1, row));\n if (PreferencesEntry.SHOW_TELL_A_FRIEND\n .getValueBoolean(getController()))\n {\n row += 2;\n builder.add(tellFriendLabel.getUIComponent(), cc.xy(1, row));\n }\n\n return builder.getPanel();\n }",
"public CreateProfile() {\n initComponents();\n }",
"private JButton createButtonAddProduct() {\n\n JButton btn = new JButton(\"Add Product\");\n btn.setEnabled(false);\n btn.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n\n // new NewProductDialog(DemonstrationApplication.this);\n }\n });\n\n return btn;\n }",
"public ControlDeveloperView(){\n\t\tsuper (\"Control-Developer\");\n\t\tcdvMB = new ControlDeveloperMenuBar(this);\n\t\tsetJMenuBar(cdvMB);\n\t}",
"public static void addScratchPanel() {\n scratchDetailPanel = new ScratchDetailPanel();\n JTabbedPane scratchTP = ScratchPanel.getScratchTP();\n numScratchLabels++;\n \n boolean debug = false;\n if (debug) { \n System.out.println(\"prior numScratchPanels \" + numScratchPanelsAdded);\n System.out.println(\"prior num Components \" + scratchTP.getComponentCount());\n System.out.println(\"numScratchPanelsRemoved \" + numScratchPanelsRemoved);\n }\n\n\n try {\n scratchTP.add(scratchDetailPanel, \"Scratch \" + numScratchLabels,numScratchPanelsAdded - numScratchPanelsRemoved);\n } catch (Exception e) {\n // ignore any errors here\n }\n \n if (debug) System.out.println(\"panel added\");\n \n if (numScratchPanelsAdded >= 1) scratchTP.setSelectedComponent(scratchDetailPanel);\n try {\n scratchTP.setTabComponentAt(numScratchPanelsAdded - numScratchPanelsRemoved, new ButtonTabComponent(scratchTP));\n } catch (Exception e) {\n //ignore any errors here\n }\n numScratchPanelsAdded++;\n \n \n if (debug) { \n System.out.println(\"post numScratchPanels \" + numScratchPanelsAdded);\n System.out.println(\"post num Components \" + scratchTP.getComponentCount());\n }\n\n }",
"private void createAdminPanel() {\n username = new JTextField(8);\n password = new JPasswordField(8);\n JPanel loginArea = adminLoginPanels();\n JPanel buttons = adminLoginButtons();\n loginFrame = new JFrame();\n loginFrame.setLayout(new BorderLayout());\n loginFrame.getRootPane().setBorder(BorderFactory.createEmptyBorder(10,10,10,10));\n loginLabel = new JLabel(\"Please log in as administrator\", SwingConstants.CENTER);\n loginFrame.getContentPane().add(loginLabel, BorderLayout.NORTH);\n loginFrame.getContentPane().add(loginArea, BorderLayout.CENTER);\n loginFrame.getContentPane().add(buttons, BorderLayout.SOUTH);\n loginFrame.setVisible(true);\n loginFrame.pack();\n }",
"public void createPersonalInfos(JFrame jFrame, ControllerAdmin controllerAdminPersonalInfos){\n JLabel jLabelAcount = new JLabel(\"Compte\");\n jLabelAcount.setBounds(20, 20, 100, 28);\n\n JLabel jLabelId = new JLabel(\"Identifiant :\");\n jLabelId.setBounds(40, 50, 300, 28);\n JTextField jTextFieldId = new JTextField(controllerAdminPersonalInfos.getUser().getId());\n jTextFieldId.setBounds(40, 80, 300, 28);\n\n JLabel jLabelLastName = new JLabel(\"Nom :\");\n jLabelLastName.setBounds(40, 110, 300, 28);\n JTextField jTextFieldLastName = new JTextField(controllerAdminPersonalInfos.getUser().getLastName());\n jTextFieldLastName.setBounds(40, 140, 300, 28);\n\n JLabel jLabelFirstName = new JLabel(\"Prenom :\");\n jLabelFirstName.setBounds(40, 170, 300, 28);\n JTextField jTextFieldFirstName = new JTextField(controllerAdminPersonalInfos.getUser().getFirstName());\n jTextFieldFirstName.setBounds(40, 200, 300, 28);\n\n JLabel jLabelEmail = new JLabel(\"Email :\");\n jLabelEmail.setBounds(40, 230, 300, 28);\n JTextField jTextFieldEmail = new JTextField(controllerAdminPersonalInfos.getUser().getEmail());\n jTextFieldEmail.setBounds(40, 260, 300, 28);\n\n JLabel jLabelPassword = new JLabel(\"Mot de passe :\");\n jLabelPassword.setBounds(40, 290, 300, 28);\n JPasswordField jPasswordFieldPassword = new JPasswordField(controllerAdminPersonalInfos.getUser().getPassword());\n jPasswordFieldPassword.setBounds(40, 320, 300, 28);\n\n JButton jButtonModifPassword = new JButton(\"Modifier le mot de passe\");\n jButtonModifPassword.setBounds(350, 320, 200, 28);\n\n //set editabilite\n jTextFieldId.setEditable(false);\n jTextFieldLastName.setEditable(false);\n jTextFieldFirstName.setEditable(false);\n jTextFieldEmail.setEditable(false);\n jPasswordFieldPassword.setEditable(false);\n\n // Ajout des element à la JFrame\n jFrame.add(jLabelAcount);\n jFrame.add(jLabelId);\n jFrame.add(jTextFieldId);\n jFrame.add(jLabelLastName);\n jFrame.add(jTextFieldLastName);\n jFrame.add(jLabelFirstName);\n jFrame.add(jTextFieldFirstName);\n jFrame.add(jLabelEmail);\n jFrame.add(jTextFieldEmail);\n jFrame.add(jLabelPassword);\n jFrame.add(jButtonModifPassword);\n jFrame.add(jPasswordFieldPassword);\n\n jButtonModifPassword.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n createModifPassword(jFrame, controllerAdminPersonalInfos);\n jFrame.repaint();\n }\n });\n\n jFrame.setLayout(null);\n jFrame.setVisible(true);\n }",
"public DesigningSec() {\n initComponents();\n }",
"private void settings() {\n mainTitle = makeLabel(\"Settings\", true);\n add(mainTitle);\n add(content);\n add(diffSlider);\n add(colourChooser);\n add(mainB);//button to main menu\n diffSlider.requestFocus();\n }",
"public JPanel getNewClientAccountPanel() {\n clientAccountView = new ClientAccountView();\n clientAccountView.setAccNum(smCntr.getID());\n clientAccountView.setFormToAdd();\n return clientAccountView;\n }",
"public PausePanel()\n {\n StateSelector stateSelector = StateSelector.getInstance();\n GameState state = (GameState) stateSelector.getState();\n Session session = state.getSession();\n\n JTextField idTextField = new JTextField(40);\n idTextField.setEditable(false);\n idTextField.setText(session.getId());\n add(idTextField);\n \n StringSelection stringSelection = new StringSelection(session.getId());\n Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();\n clipboard.setContents(stringSelection, null);\n \n Button backButton = new Button(\"assets/images/buttons/backDefault.png\", \"assets/images/buttons/backHover.png\", \"assets/images/buttons/backClick.png\");\n backButton.setWidth(71);\n backButton.setHeight(33);\n backButton.setX(539);\n backButton.setY(367);\n onHover(backButton, backButton.HOVER_COMMAND, backButton.UNHOVER_COMMAND);\n onPress(backButton, backButton.PRESS_COMMAND);\n onRelease(backButton, new Callable()\n {\n public void call()\n {\n Window window = Window.getInstance();\n window.setPanel(new GamePanel());\n \n }\n });\n buttons.add(backButton);\n\n JButton quitBtn = new JButton(\"quit\");\n quitBtn.addActionListener(new QuitListener());\n add(quitBtn);\n }",
"private JFrame createFrame() {\n\t\tJFrame frmProfessorgui = new JFrame();\n\t\tfrmProfessorgui.getContentPane().setBackground(new Color(153, 204, 204));\n\t\tfrmProfessorgui.getContentPane().setForeground(SystemColor.desktop);\n\t\tfrmProfessorgui.setTitle(\"ProfessorGUI\");\n\t\tfrmProfessorgui.setBounds(100, 100, 600, 475);\n\t\tfrmProfessorgui.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n\t\tfrmProfessorgui.getContentPane().setLayout(null);\n\n\n\t\t//List, ScrollPane and Button Components\n\t\tmodel = new DefaultListModel();\n\t\tsetList();\n\t\tlist = new JList(model);\n\t\tlist.setBackground(new Color(255, 245, 238));\n\t\tJScrollPane scrollPane = new JScrollPane(list, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);\n\t\tscrollPane.setBounds(10, 46, 293, 365);\n\t\tfrmProfessorgui.getContentPane().add(scrollPane);\n\n\t\tlist.setFont(new Font(\"Dialog\", Font.PLAIN, 13));\n\t\tlist.setBorder(new LineBorder(new Color(128, 128, 128), 2, true));\n\n\t\tcourse = new JButton(\"View Course\");\n\t\tcourse.setFont(new Font(\"Dialog\", Font.PLAIN, 13));\n\t\tcourse.addActionListener(new profMainListener());\n\n\t\tcourse.setBounds(390, 207, 126, 22);\n\t\tfrmProfessorgui.getContentPane().add(course);\n\n\t\tcreate = new JButton(\"Create Course\");\n\t\tcreate.setFont(new Font(\"Dialog\", Font.PLAIN, 13));\n\t\tcreate.setBounds(390, 250, 126, 22);\n\t\tfrmProfessorgui.getContentPane().add(create);\n\t\tcreate.addActionListener(new profMainListener());\n\n\t\tactivate = new JButton(\"Activate\");\n\t\tactivate.addActionListener(new profMainListener()); \n\t\tactivate.setFont(new Font(\"Dialog\", Font.PLAIN, 13));\n\t\tactivate.setBounds(390, 296, 126, 22);\n\t\tfrmProfessorgui.getContentPane().add(activate);\n\n\t\tdeactivate = new JButton(\"Deactivate\");\n\t\tdeactivate.addActionListener(new profMainListener());\n\n\t\tdeactivate.setFont(new Font(\"Dialog\", Font.PLAIN, 13));\n\t\tdeactivate.setBounds(390, 340, 126, 22);\n\t\tfrmProfessorgui.getContentPane().add(deactivate);\n\n\n\t\t//Aesthetic Pieces\n\t\tJLabel lblCourseList = new JLabel(\"Course List\");\n\t\tlblCourseList.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlblCourseList.setFont(new Font(\"Dialog\", Font.BOLD, 16));\n\t\tlblCourseList.setBounds(21, 11, 261, 24);\n\t\tfrmProfessorgui.getContentPane().add(lblCourseList);\n\n\t\tJLabel lblWelcome = new JLabel(\"Welcome\");\n\t\tlblWelcome.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlblWelcome.setFont(new Font(\"Dialog\", Font.BOLD, 16));\n\t\tlblWelcome.setBounds(357, 49, 191, 46);\n\t\tfrmProfessorgui.getContentPane().add(lblWelcome);\n\n\t\tJLabel lblNewLabel = new JLabel(prof.getFirstName() + \" \" + prof.getLastName());\n\t\tlblNewLabel.setFont(new Font(\"Dialog\", Font.ITALIC, 16));\n\t\tlblNewLabel.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlblNewLabel.setBounds(335, 82, 239, 40);\n\t\tfrmProfessorgui.getContentPane().add(lblNewLabel);\n\n\t\tJPanel panel = new JPanel();\n\t\tpanel.setBorder(new LineBorder(new Color(128, 128, 128), 2, true));\n\t\tpanel.setBackground(new Color(204, 255, 255));\n\t\tpanel.setBounds(367, 178, 174, 213);\n\t\tfrmProfessorgui.getContentPane().add(panel);\n\n\t\treturn frmProfessorgui;\n\t}",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n tabPenyedia = new javax.swing.JTabbedPane();\n viewProfile = new javax.swing.JPanel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n idLabel = new javax.swing.JLabel();\n namaLabel = new javax.swing.JLabel();\n umurlabel = new javax.swing.JLabel();\n jeniskelLabel = new javax.swing.JLabel();\n jLabel9 = new javax.swing.JLabel();\n editProfile = new javax.swing.JPanel();\n jLabel6 = new javax.swing.JLabel();\n idLabel1 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n namaLabel1 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n passTextField = new javax.swing.JTextField();\n saveButton = new javax.swing.JButton();\n jLabel10 = new javax.swing.JLabel();\n createBarang = new javax.swing.JPanel();\n jLabel11 = new javax.swing.JLabel();\n jLabel12 = new javax.swing.JLabel();\n jLabel13 = new javax.swing.JLabel();\n jLabel14 = new javax.swing.JLabel();\n jLabel15 = new javax.swing.JLabel();\n nbTextField = new javax.swing.JTextField();\n jbTextField = new javax.swing.JTextField();\n tglSpinner = new javax.swing.JSpinner();\n blnSpinner = new javax.swing.JSpinner();\n thnSpinner = new javax.swing.JSpinner();\n btnCreate = new javax.swing.JButton();\n kbComboBox = new javax.swing.JComboBox();\n logoutButton = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel1.setText(\"MENU PENYEDIA\");\n\n jLabel2.setText(\"ID\");\n\n jLabel3.setText(\"Nama\");\n\n jLabel4.setText(\"Umur\");\n\n jLabel5.setText(\"Gender\");\n\n idLabel.setText(\"-\");\n\n namaLabel.setText(\"-\");\n\n umurlabel.setText(\"-\");\n\n jeniskelLabel.setText(\"-\");\n\n jLabel9.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n jLabel9.setText(\"VIEW PROFILE\");\n\n javax.swing.GroupLayout viewProfileLayout = new javax.swing.GroupLayout(viewProfile);\n viewProfile.setLayout(viewProfileLayout);\n viewProfileLayout.setHorizontalGroup(\n viewProfileLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(viewProfileLayout.createSequentialGroup()\n .addGroup(viewProfileLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(viewProfileLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(viewProfileLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(viewProfileLayout.createSequentialGroup()\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(idLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 212, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(viewProfileLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, viewProfileLayout.createSequentialGroup()\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jeniskelLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, viewProfileLayout.createSequentialGroup()\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(umurlabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, viewProfileLayout.createSequentialGroup()\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(namaLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 202, javax.swing.GroupLayout.PREFERRED_SIZE)))))\n .addGroup(viewProfileLayout.createSequentialGroup()\n .addGap(134, 134, 134)\n .addComponent(jLabel9)))\n .addContainerGap(128, Short.MAX_VALUE))\n );\n viewProfileLayout.setVerticalGroup(\n viewProfileLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(viewProfileLayout.createSequentialGroup()\n .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(31, 31, 31)\n .addGroup(viewProfileLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(idLabel))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(viewProfileLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(namaLabel))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(viewProfileLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(umurlabel))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(viewProfileLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(jeniskelLabel))\n .addContainerGap(76, Short.MAX_VALUE))\n );\n\n tabPenyedia.addTab(\"tab1\", viewProfile);\n\n jLabel6.setText(\"ID\");\n\n idLabel1.setText(\"-\");\n\n jLabel7.setText(\"Nama\");\n\n namaLabel1.setText(\"-\");\n\n jLabel8.setText(\"Password\");\n\n passTextField.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n passTextFieldActionPerformed(evt);\n }\n });\n\n saveButton.setText(\"Save\");\n saveButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n saveButtonActionPerformed(evt);\n }\n });\n\n jLabel10.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n jLabel10.setText(\"EDIT PROFILE\");\n\n javax.swing.GroupLayout editProfileLayout = new javax.swing.GroupLayout(editProfile);\n editProfile.setLayout(editProfileLayout);\n editProfileLayout.setHorizontalGroup(\n editProfileLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(editProfileLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(editProfileLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(editProfileLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(editProfileLayout.createSequentialGroup()\n .addGroup(editProfileLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(passTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 215, Short.MAX_VALUE)\n .addComponent(namaLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 202, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(101, Short.MAX_VALUE))\n .addGroup(editProfileLayout.createSequentialGroup()\n .addComponent(idLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 212, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, editProfileLayout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(saveButton)\n .addContainerGap())\n .addGroup(editProfileLayout.createSequentialGroup()\n .addGap(140, 140, 140)\n .addComponent(jLabel10)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n editProfileLayout.setVerticalGroup(\n editProfileLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(editProfileLayout.createSequentialGroup()\n .addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 41, Short.MAX_VALUE)\n .addGroup(editProfileLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel6)\n .addComponent(idLabel1))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(editProfileLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel7)\n .addComponent(namaLabel1))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(editProfileLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel8)\n .addComponent(passTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(51, 51, 51)\n .addComponent(saveButton)\n .addContainerGap())\n );\n\n tabPenyedia.addTab(\"tab2\", editProfile);\n\n jLabel11.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n jLabel11.setText(\"CREATE BARANG\");\n\n jLabel12.setFont(new java.awt.Font(\"Tahoma\", 0, 12)); // NOI18N\n jLabel12.setText(\"Nama Barang\");\n\n jLabel13.setFont(new java.awt.Font(\"Tahoma\", 0, 12)); // NOI18N\n jLabel13.setText(\"Jumlah Barang\");\n\n jLabel14.setFont(new java.awt.Font(\"Tahoma\", 0, 12)); // NOI18N\n jLabel14.setText(\"Kondisi Barang\");\n\n jLabel15.setFont(new java.awt.Font(\"Tahoma\", 0, 12)); // NOI18N\n jLabel15.setText(\"Tanggal Masuk\");\n\n nbTextField.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n nbTextFieldActionPerformed(evt);\n }\n });\n\n btnCreate.setText(\"Create\");\n btnCreate.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnCreateActionPerformed(evt);\n }\n });\n\n kbComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n kbComboBox.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n kbComboBoxItemStateChanged(evt);\n }\n });\n\n javax.swing.GroupLayout createBarangLayout = new javax.swing.GroupLayout(createBarang);\n createBarang.setLayout(createBarangLayout);\n createBarangLayout.setHorizontalGroup(\n createBarangLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(createBarangLayout.createSequentialGroup()\n .addGroup(createBarangLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(createBarangLayout.createSequentialGroup()\n .addGap(143, 143, 143)\n .addComponent(jLabel11))\n .addGroup(createBarangLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(createBarangLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel12)\n .addComponent(jLabel13)\n .addComponent(jLabel14)\n .addComponent(jLabel15))\n .addGap(30, 30, 30)\n .addGroup(createBarangLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(createBarangLayout.createSequentialGroup()\n .addComponent(tglSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(blnSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(thnSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnCreate))\n .addGroup(createBarangLayout.createSequentialGroup()\n .addGroup(createBarangLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(nbTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 208, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jbTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 208, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(kbComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(0, 64, Short.MAX_VALUE)))))\n .addContainerGap())\n );\n createBarangLayout.setVerticalGroup(\n createBarangLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(createBarangLayout.createSequentialGroup()\n .addGroup(createBarangLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(createBarangLayout.createSequentialGroup()\n .addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addGroup(createBarangLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel12)\n .addComponent(nbTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(createBarangLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel13)\n .addComponent(jbTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(16, 16, 16)\n .addGroup(createBarangLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel14)\n .addComponent(kbComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(createBarangLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel15)\n .addComponent(tglSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(blnSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(thnSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(0, 35, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, createBarangLayout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(btnCreate)))\n .addContainerGap())\n );\n\n tabPenyedia.addTab(\"tab3\", createBarang);\n\n logoutButton.setText(\"Logout\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(132, 132, 132)\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(logoutButton))\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(tabPenyedia)))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(logoutButton))\n .addGap(18, 18, 18)\n .addComponent(tabPenyedia)\n .addContainerGap())\n );\n\n pack();\n }",
"private void adminOperations() {\n adminOps = new JFrame(\"Administrator Frame\");\n adminOps.getRootPane().setBorder(BorderFactory.createEmptyBorder(10,10,10,10));\n JTabbedPane adminPane = new JTabbedPane();\n adminPane.addTab(\"Withdraw $\", withdrawMoney());\n adminPane.addTab(\"Update Inventory\", updateInventoryPanel());\n adminOps.getContentPane().add(adminPane);\n adminOps.setVisible(true);\n adminOps.pack();\n }",
"public void createAndShowGUI() {\n frame= new JFrame(\"TabAdmin\");\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.setLocation(200,50);\n //Create and set up the content pane.\n \n addComponentToPane(frame.getContentPane());\n \n //Display the window.\n frame.pack();\n frame.setVisible(true);\n //create admin to operate \n \n }",
"public OpenShift2PreferencePage() {\n\t\tsuper(\"JBoss Tools\", \"OpenShift 2\");\n\t}",
"public frm_tutor_subida_prueba() {\n }",
"@Override\n public List<UpdatableItem> createPopup() {\n final List<UpdatableItem> items = new ArrayList<UpdatableItem>();\n \n /* host wizard */\n final MyMenuItem newHostWizardItem =\n new MyMenuItem(Tools.getString(\"EmptyBrowser.NewHostWizard\"),\n HOST_ICON,\n null,\n new AccessMode(ConfigData.AccessType.RO, false),\n new AccessMode(ConfigData.AccessType.RO, false)) {\n private static final long serialVersionUID = 1L;\n \n @Override\n public String enablePredicate() {\n return null;\n }\n \n @Override\n public void action() {\n final AddHostDialog dialog = new AddHostDialog(new Host());\n dialog.showDialogs();\n }\n };\n items.add(newHostWizardItem);\n Tools.getGUIData().registerAddHostButton(newHostWizardItem);\n return items;\n }",
"private void buildMainPanel() {\n\t\t\n\t\tif(theMode == MODE_FPC) {\n\t\t\ttheFields = new PropertyComponent[9];\n\t\t\t\n\t\t\ttheFields[0] = new PropertyComponent(\"category\", \"Uncategorized\", 1, false, false);\n\t\t\ttheFields[1] = new PropertyComponent(\"display_name\", theDisplayName, 1, false, false);\n\t\t\ttheFields[2] = new PropertyComponent(\"grp_type\", \"Chromosome\", 1, false, false);\n\t\t\ttheFields[3] = new PropertyComponent(\"grp_prefix\", \"\", 1, false, false);\n\t\t\t//theFields[4] = new PropertyComponent(\"grp_sort\", FPC_GRP_SORT, 0, true, false);\t\t\t\n\t\t\t//theFields[5] = new PropertyComponent(\"grp_order\", \"\", 1, true, false);\t\t\t\n\t\t\ttheFields[4] = new PropertyComponent(\"cbsize\", \"1200\", 1, false, false);\t\t\t\n\t\t\ttheFields[5] = new PropertyComponent(\"description\", \"\", 2, false, false);\t\t\t\n\t\t\ttheFields[6] = new PropertyComponent(\"fpc_file\", \"\", true, true, true);\n\t\t\ttheFields[7] = new PropertyComponent(\"bes_files\", \"\", true, true, false);\n\t\t\ttheFields[8] = new PropertyComponent(\"marker_files\", \"\", true, true, false);\n\t\t} else { //MODE_PSEUDO\n\t\t\ttheFields = new PropertyComponent[13];\n\t\t\t\n\t\t\ttheFields[0] = new PropertyComponent(\"category\", \"Uncategorized\", 1, false, false);\n\t\t\ttheFields[1] = new PropertyComponent(\"display_name\", theDisplayName, 1, false, false);\n\t\t\ttheFields[2] = new PropertyComponent(\"grp_type\", \"Chromosome\", 1, false, false);\n\t\t\ttheFields[3] = new PropertyComponent(\"grp_prefix\", \"Chr\", 1, false, false);\t\t\t\n\t\t\t//theFields[4] = new PropertyComponent(\"grp_sort\", PSEUDO_GRP_SORT, 0, true, false);\n\t\t\ttheFields[4] = new PropertyComponent(\"order_against\", getProjectSelections(), 0, false, true);\n\t\t\ttheFields[5] = new PropertyComponent(\"mask_all_but_genes\", PSEUDO_MASK_GENES, 1, false, true);\n\t\t\ttheFields[6] = new PropertyComponent(\"min_size\", \"100000\", 1, true, false);\t\t\t\n\t\t\ttheFields[7] = new PropertyComponent(\"min_display_size_bp\", \"0\", 1, false, false);\t\t\t\n\t\t\ttheFields[8] = new PropertyComponent(\"description\", \"\", 2, false, false);\t\t\t\n\t\t\ttheFields[9] = new PropertyComponent(\"annot_keywords\", \"\", 2, false, false);\t\t\t\n\t\t\ttheFields[10] = new PropertyComponent(\"annot_kw_mincount\", \"50\", 2, false, false);\t\n\t\t\ttheFields[11] = new PropertyComponent(\"anno_files\", \"\", true, true, false);\n\t\t\ttheFields[12] = new PropertyComponent(\"sequence_files\", \"\", true, true, false);\n\t\t}\n\t\t\t\n\t\tJPanel tempPanel = new JPanel();\n\t\ttempPanel.setLayout(new BoxLayout(tempPanel, BoxLayout.PAGE_AXIS));\n\t\ttempPanel.setBackground(Color.WHITE);\n\t\t\n\t\tfor(int x=0; x<theFields.length; x++) {\n\t\t\ttempPanel.add(Box.createVerticalStrut(5));\n\t\t\ttheFields[x].setTextListener(theListener);\n\t\t\ttempPanel.add(theFields[x]);\n\t\t}\n\t\ttempPanel.add(Box.createVerticalStrut(20));\n\t\ttempPanel.add(createButtonPanel());\n\t\ttempPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));\n\t\ttempPanel.setMaximumSize(tempPanel.getPreferredSize());\n\t\ttempPanel.setAlignmentX(Component.CENTER_ALIGNMENT);\n\t\t\t\n\t\tgetContentPane().add(tempPanel);\n\t}",
"@Override\r\n\tprotected final void createAppWindows() {\r\n \t//Instantiate only DD-specific windows. SFDC-scope windows (such as mainWindow) are static\r\n \t// objects in the EISTestBase class\r\n \tmyDocumentsPopUp = createWindow(\"WINDOW_MY_DOCUMENTS_POPUP_PROPERTIES_FILE\");\r\n }",
"public void onCreate() {\r\n Session session = sessionService.getCurrentSession();\r\n Map<String, Region> items = ControlUtility.createForm(Pc.class);\r\n\r\n ControlUtility.fillComboBox((ComboBox<Kind>) items.get(\"Kind\"), session.getCampaign().getCampaignVariant().getKinds());\r\n ControlUtility.fillComboBox((ComboBox<Race>) items.get(\"Race\"), session.getCampaign().getCampaignVariant().getRaces());\r\n ControlUtility.fillCheckComboBox((CheckComboBox<Ability>) items.get(\"SavingThrows\"), Arrays.asList(Ability.values()));\r\n ControlUtility.fillCheckComboBox((CheckComboBox<Proficiency>) items.get(\"Proficiencies\"), session.getCampaign().getCampaignVariant().getProficiencies());\r\n ControlUtility.fillCheckComboBox((CheckComboBox<Feature>) items.get(\"Features\"), session.getCampaign().getCampaignVariant().getFeatures());\r\n ControlUtility.fillCheckComboBox((CheckComboBox<Trait>) items.get(\"Traits\"), session.getCampaign().getCampaignVariant().getTraits());\r\n ControlUtility.fillCheckComboBox((CheckComboBox<Equipment>) items.get(\"Equipment\"), session.getCampaign().getCampaignVariant().getEquipments());\r\n\r\n Campaign campaign = session.getCampaign();\r\n\r\n Dialog<String> dialog = ControlUtility.createDialog(\"Create Playable Character\", items);\r\n dialog.show();\r\n\r\n dialog.setResultConverter(buttonType -> {\r\n if (buttonType != null) {\r\n Pc pc = null;\r\n try {\r\n pc = ControlUtility.controlsToValues(Pc.class, items);\r\n } catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException | InstantiationException | ClassNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n if (pc != null) {\r\n try {\r\n characterService.createPlayerCharacter(pc);\r\n } catch (SessionAlreadyExists | IndexAlreadyExistsException sessionAlreadyExists) {\r\n sessionAlreadyExists.printStackTrace();\r\n }\r\n try {\r\n playerManagementService.addOrUpdatePcForRegisteredPlayer(pc);\r\n Player player = playerManagementService.getRegisteredPlayer();\r\n campaign.addPlayer(player);\r\n campaign.addCharacter(pc);\r\n if (campaignListingService.campaignExists(campaign.getId())) {\r\n manipulationService.updateCampaign(campaign);\r\n } else {\r\n manipulationService.createCampaign(campaign);\r\n }\r\n } catch (MultiplePlayersException | EntityNotFoundException | SessionAlreadyExists | IndexAlreadyExistsException e) {\r\n e.printStackTrace();\r\n }\r\n try {\r\n playerManagementService.addOrUpdatePcForRegisteredPlayer(pc);\r\n } catch (MultiplePlayersException | EntityNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n try {\r\n sessionService.updateParticipant(playerManagementService.getRegisteredPlayer().getId(), pc.getId());\r\n sessionService.updateCampaign(campaign);\r\n } catch (EntityNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n render();\r\n return pc.toString();\r\n }\r\n }\r\n return null;\r\n });\r\n }",
"public PanelControl() {\r\n initComponents();\r\n VersionEImageIcon versionEImageIcon = new VersionEImageIcon();\r\n versionEImageIcon.newColorFromPanel(panelColor);\r\n jLabel1.setText(INFO_LABEL);\r\n Usuario usuarioTipo = Login.getUsuario();\r\n this.administrador = usuarioTipo.isAdmin();\r\n if (!administrador)\r\n {\r\n rangos.setEnabled(false);\r\n controles.setEnabled(false);\r\n alta_usuarios.setEnabled(false);\r\n verificacion.setEnabled(false);\r\n }\r\n }",
"private void buildSettingsMenu() {\r\n settingsMenu = new JMenu( Msgs.str( \"Settings\" ) );\r\n\r\n qMarkItem = new JCheckBoxMenuItem( Msgs.str( \"Qmarks\" ), qMarksOn );\r\n ks = KeyStroke.getKeyStroke( KeyEvent.VK_Q, Event.ALT_MASK );\r\n qMarkItem.setAccelerator( ks );\r\n qMarkItem.setMnemonic( 'Q' );\r\n qMarkItem.addActionListener( listener );\r\n\r\n newGameItem = new JMenuItem( Msgs.str( \"game.new\" ) );\r\n ks = KeyStroke.getKeyStroke( KeyEvent.VK_F2, 0 );\r\n newGameItem.setAccelerator( ks );\r\n newGameItem.addActionListener( listener );\r\n\r\n showSettingsItem = new JMenuItem( Msgs.str( \"settings.change\" ) );\r\n ks = KeyStroke.getKeyStroke( KeyEvent.VK_C, Event.ALT_MASK );\r\n showSettingsItem.setAccelerator( ks );\r\n showSettingsItem.setMnemonic( 'C' );\r\n showSettingsItem.addActionListener( listener );\r\n\r\n settingsMenu.add( qMarkItem );\r\n settingsMenu.add( newGameItem );\r\n settingsMenu.add( showSettingsItem );\r\n }",
"public FormPpal() {\n initComponents();\n setIconImage(Toolkit.getDefaultToolkit().getImage(this.getClass().getResource(\"Imagenes/icon.png\")));\n setLocationRelativeTo(null);\n setTitle(\"Men\\372 principal\");\n setResizable(false);\n formBackUp = null;\n formBuscador = null;\n fb1 = null;\n fb2 = null;\n formListado = null;\n conn = new Conn();\n pacientesCumpleanos = new LinkedList();\n pacientesControl = new LinkedList();\n cargarCumpleanos();\n cargarControlesHoy();\n }",
"private void initPanel() {\r\n panel = new JDialog(mdiForm);\r\n panel.setTitle(\"Groups\");\r\n panel.setSize(325, 290);\r\n panel.getContentPane().add(groupsController.getControlledUI());\r\n Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\r\n java.awt.Dimension dlgSize = panel.getSize();\r\n int x = screenSize.width/1 - ((dlgSize.width/1)+20);\r\n int y = screenSize.height/1 - ((dlgSize.height/1)+60);\r\n panel.setLocation(x, y);\r\n panel.setFocusable(false);\r\n panel.show();\r\n panel.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);\r\n panel.addWindowListener(new java.awt.event.WindowAdapter() {\r\n public void windowClosing(java.awt.event.WindowEvent event) {\r\n panel.dispose();\r\n maintainSponsorHierarchyBaseWindow.mnuItmPanel.setSelected(false);\r\n maintainSponsorHierarchyBaseWindow.btnPanel.setSelected(false);\r\n }\r\n });\r\n }",
"public PacManUiBuilder() {\n this.defaultButtons = false;\n this.buttons = new LinkedHashMap<>();\n this.keyMappings = new HashMap<>();\n }",
"public LandRYSettingPage() {\n initComponents();\n }",
"private static ISInspectorGui createNewInstance(ISInspectorController controller) {\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(ISInspectorGui.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n Holder<ISInspectorGui> result = new Holder();\n try {\n /* Create and display the form */\n java.awt.EventQueue.invokeAndWait(new Runnable() {\n @Override\n public void run() {\n result.setValue(new ISInspectorGui(controller));\n result.getValue().setVisible(true);\n }\n });\n } catch (InterruptedException | InvocationTargetException ex) {\n Logger.getLogger(ISInspectorGui.class.getName()).log(Level.SEVERE, null, ex);\n }\n return result.getValue();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n databaseHost = new javax.swing.JTextField();\n databaseDatabase = new javax.swing.JTextField();\n databaseUsername = new javax.swing.JTextField();\n okButton = new javax.swing.JButton();\n cancleButton = new javax.swing.JButton();\n databasePassword = new javax.swing.JPasswordField();\n jMenuBar1 = new javax.swing.JMenuBar();\n windowsMenu = new javax.swing.JMenu();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);\n setTitle(\"Reference Database Settings\");\n addWindowListener(new java.awt.event.WindowAdapter() {\n public void windowClosing(java.awt.event.WindowEvent evt) {\n formWindowClosing(evt);\n }\n public void windowActivated(java.awt.event.WindowEvent evt) {\n formWindowActivated(evt);\n }\n });\n\n jPanel1.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n\n jLabel2.setText(\"Host:\");\n\n jLabel3.setText(\"Database:\");\n\n jLabel5.setText(\"Username:\");\n\n jLabel6.setText(\"Password:\");\n\n okButton.setText(\"OK\");\n okButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n okButtonActionPerformed(evt);\n }\n });\n\n cancleButton.setText(\"Cancel\");\n cancleButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cancleButtonActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel6)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel5)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.TRAILING))))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(databaseHost, javax.swing.GroupLayout.DEFAULT_SIZE, 349, Short.MAX_VALUE)\n .addComponent(databaseDatabase)\n .addComponent(databaseUsername)\n .addComponent(databasePassword)))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(cancleButton)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(okButton)\n .addContainerGap())\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(databaseHost, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(6, 6, 6)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(databaseDatabase, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(11, 11, 11)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(databaseUsername, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel6)\n .addComponent(databasePassword, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(cancleButton)\n .addComponent(okButton))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n windowsMenu.setText(\"Windows\");\n jMenuBar1.add(windowsMenu);\n\n setJMenuBar(jMenuBar1);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jPanel1 = new javax.swing.JPanel();\n nameLabel = new javax.swing.JLabel();\n menuOpsPanel = new javax.swing.JPanel();\n settingsButton = new javax.swing.JButton();\n jButton1 = new javax.swing.JButton();\n jButton4 = new javax.swing.JButton();\n jLabel2 = new javax.swing.JLabel();\n jPanel2 = new javax.swing.JPanel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n nameField = new javax.swing.JTextField();\n subjectField = new javax.swing.JTextField();\n descrField = new javax.swing.JTextField();\n createClassButton = new javax.swing.JButton();\n\n setBackground(java.awt.Color.white);\n setMaximumSize(new java.awt.Dimension(860, 560));\n setMinimumSize(new java.awt.Dimension(860, 560));\n setPreferredSize(new java.awt.Dimension(860, 560));\n\n jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/images/download.jpg\"))); // NOI18N\n\n nameLabel.setFont(new java.awt.Font(\"DejaVu Sans\", 1, 24)); // NOI18N\n nameLabel.setForeground(new java.awt.Color(1, 1, 1));\n nameLabel.setText(\"Welcome back, [name]!\");\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(120, 120, 120)\n .addComponent(nameLabel)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(37, 37, 37)\n .addComponent(nameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(56, Short.MAX_VALUE))\n );\n\n menuOpsPanel.setBackground(new java.awt.Color(72, 186, 244));\n menuOpsPanel.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));\n\n settingsButton.setText(\"Account Settings\");\n settingsButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n settingsButtonActionPerformed(evt);\n }\n });\n\n jButton1.setText(\"Add/Remove User\");\n\n jButton4.setText(\"Add/Remove Class\");\n\n javax.swing.GroupLayout menuOpsPanelLayout = new javax.swing.GroupLayout(menuOpsPanel);\n menuOpsPanel.setLayout(menuOpsPanelLayout);\n menuOpsPanelLayout.setHorizontalGroup(\n menuOpsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(menuOpsPanelLayout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(menuOpsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(settingsButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 166, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 166, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton4, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 166, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap())\n );\n menuOpsPanelLayout.setVerticalGroup(\n menuOpsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(menuOpsPanelLayout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(settingsButton, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n jLabel2.setFont(new java.awt.Font(\"Verdana\", 0, 24)); // NOI18N\n jLabel2.setText(\"Create a new Course\");\n\n jLabel3.setFont(new java.awt.Font(\"Verdana\", 0, 14)); // NOI18N\n jLabel3.setText(\"Name\");\n\n jLabel4.setFont(new java.awt.Font(\"Verdana\", 0, 14)); // NOI18N\n jLabel4.setText(\"Subject:\");\n\n jLabel5.setFont(new java.awt.Font(\"Verdana\", 0, 14)); // NOI18N\n jLabel5.setText(\"Description:\");\n\n nameField.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusLost(java.awt.event.FocusEvent evt) {\n nameFieldFocusLost(evt);\n }\n });\n\n subjectField.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusLost(java.awt.event.FocusEvent evt) {\n subjectFieldFocusLost(evt);\n }\n });\n\n descrField.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusLost(java.awt.event.FocusEvent evt) {\n descrFieldFocusLost(evt);\n }\n });\n\n createClassButton.setText(\"Create Class\");\n createClassButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n createClassButtonActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(37, 37, 37)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel4, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel5, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.TRAILING))\n .addGap(18, 18, 18)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(nameField, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 372, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(subjectField, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 372, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(descrField, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 372, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(225, 225, 225)\n .addComponent(createClassButton)))\n .addContainerGap(44, Short.MAX_VALUE))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()\n .addContainerGap(56, Short.MAX_VALUE)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(nameField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(subjectField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(26, 26, 26)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(descrField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(38, 38, 38)\n .addComponent(createClassButton)\n .addContainerGap())\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGap(64, 64, 64))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\n .addComponent(jLabel1)\n .addContainerGap())\n .addGroup(layout.createSequentialGroup()\n .addGap(12, 12, 12)\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGap(56, 56, 56)\n .addComponent(menuOpsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(30, 30, 30))))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(menuOpsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(39, 39, 39))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(27, 27, 27)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(35, 35, 35)\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(44, Short.MAX_VALUE))))\n );\n }",
"public void buildAndShowMenuForm() {\n SimpleForm.Builder builder =\n SimpleForm.builder()\n .translator(MinecraftLocale::getLocaleString, session.locale())\n .title(\"gui.advancements\");\n\n List<String> rootAdvancementIds = new ArrayList<>();\n for (Map.Entry<String, GeyserAdvancement> advancement : storedAdvancements.entrySet()) {\n if (advancement.getValue().getParentId() == null) { // No parent means this is a root advancement\n builder.button(MessageTranslator.convertMessage(advancement.getValue().getDisplayData().getTitle(), session.locale()));\n rootAdvancementIds.add(advancement.getKey());\n }\n }\n\n if (rootAdvancementIds.isEmpty()) {\n builder.content(\"advancements.empty\");\n }\n\n builder.validResultHandler((response) -> {\n String id = rootAdvancementIds.get(response.clickedButtonId());\n if (!id.equals(\"\")) {\n if (id.equals(currentAdvancementCategoryId)) {\n // The server thinks we are already on this tab\n buildAndShowListForm();\n } else {\n // Send a packet indicating that we intend to open this particular advancement window\n ServerboundSeenAdvancementsPacket packet = new ServerboundSeenAdvancementsPacket(id);\n session.sendDownstreamPacket(packet);\n // Wait for a response there\n }\n }\n });\n\n session.sendForm(builder);\n }",
"public void showSettingsDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"Need Permissions\");\n builder.setMessage(\"This app needs permission to use this feature. You can grant them in app settings.\");\n builder.setPositiveButton(\"GOTO SETTINGS\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n Add_Event.this.openSettings();\n }\n });\n builder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }\n });\n builder.show();\n }",
"public static EditProfileDialogue newInstance(){\n EditProfileDialogue dialogue = new EditProfileDialogue();\n\n Log.d(TAG, \"newInstance: NO ARGUMENTS because we are creating new profile.\" );\n return dialogue;\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n partyWebsite = new javax.swing.JTextField();\n saveButton = new javax.swing.JButton();\n CancelButton = new javax.swing.JButton();\n jLabel7 = new javax.swing.JLabel();\n partyName = new javax.swing.JTextField();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n\n jLabel1.setText(\"Party Name\");\n\n jLabel2.setText(\"Website\");\n\n saveButton.setText(\"Save\");\n saveButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n saveButtonActionPerformed(evt);\n }\n });\n\n CancelButton.setText(\"Cancel\");\n CancelButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n CancelButtonActionPerformed(evt);\n }\n });\n\n jLabel7.setText(\"Product Editor\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(33, 33, 33)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel2)\n .addComponent(jLabel1))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(62, 62, 62)\n .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 278, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 297, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(partyName)\n .addComponent(partyWebsite))))\n .addContainerGap())\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(saveButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGap(55, 55, 55)\n .addComponent(CancelButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGap(70, 70, 70))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addGap(36, 36, 36)\n .addComponent(jLabel1))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(partyName, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(partyWebsite, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(saveButton)\n .addComponent(CancelButton)))\n );\n\n pack();\n }"
] | [
"0.6563004",
"0.62170094",
"0.60781264",
"0.60398847",
"0.5805823",
"0.5769819",
"0.5699072",
"0.5682468",
"0.5647402",
"0.5640129",
"0.56260926",
"0.56229013",
"0.5619753",
"0.5583432",
"0.5577857",
"0.5564509",
"0.5523468",
"0.5523246",
"0.5522204",
"0.550752",
"0.5502655",
"0.5473691",
"0.5472153",
"0.54461765",
"0.54354334",
"0.54255134",
"0.5425001",
"0.5401919",
"0.53985196",
"0.53827876",
"0.53769684",
"0.53724355",
"0.5366588",
"0.53523016",
"0.5337307",
"0.53353554",
"0.53293085",
"0.5328857",
"0.53176856",
"0.53132653",
"0.5306136",
"0.5299017",
"0.5298635",
"0.5297854",
"0.5296488",
"0.5294566",
"0.5291675",
"0.52904254",
"0.52798986",
"0.5273799",
"0.5269406",
"0.5267788",
"0.52650446",
"0.52581656",
"0.52522707",
"0.52517635",
"0.52478445",
"0.52298677",
"0.5224943",
"0.5224466",
"0.5222993",
"0.52221483",
"0.52182335",
"0.521802",
"0.5217809",
"0.5214898",
"0.52123463",
"0.5209633",
"0.520441",
"0.52041376",
"0.52026343",
"0.5201928",
"0.51979446",
"0.5197901",
"0.5193225",
"0.51895225",
"0.5184325",
"0.51800895",
"0.5179614",
"0.517905",
"0.5178154",
"0.5177835",
"0.51756144",
"0.517538",
"0.51727927",
"0.5169098",
"0.5168542",
"0.51668894",
"0.51588833",
"0.515856",
"0.5158026",
"0.5156711",
"0.5156417",
"0.5155654",
"0.51519024",
"0.5149925",
"0.5149828",
"0.51478285",
"0.5147038",
"0.51438403"
] | 0.7215074 | 0 |
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor. //GENBEGIN:initComponents | private void initComponents() {
sceneMonitor = new javax.swing.JCheckBox();
sceneMonitor.setText("Enable scene monitor:");
sceneMonitor.setHorizontalTextPosition(javax.swing.SwingConstants.LEADING);
sceneMonitor.setName("sceneMonitor"); // NOI18N
sceneMonitor.setSelected(prefs.getShowSceneMonitor());
sceneMonitor.addItemListener(new java.awt.event.ItemListener() {
public void itemStateChanged(java.awt.event.ItemEvent evt) {
sceneMonitorItemStateChanged(evt);
}
});
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(sceneMonitor)
.addContainerGap(223, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(sceneMonitor)
.addContainerGap(271, Short.MAX_VALUE))
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public Form() {\n initComponents();\n }",
"public TorneoForm() {\n initComponents();\n }",
"public GUIForm() { \n initComponents();\n }",
"public form() {\n initComponents();\n }",
"public frmRectangulo() {\n initComponents();\n }",
"public FormPemilihan() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n \n }",
"public AdjointForm() {\n initComponents();\n setDefaultCloseOperation(HIDE_ON_CLOSE);\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setBackground(new java.awt.Color(255, 255, 255));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 983, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 769, Short.MAX_VALUE)\n );\n\n pack();\n }",
"public FormCompra() {\n initComponents();\n }",
"public FrameForm() {\n initComponents();\n }",
"public MechanicForm() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n setRequestFocusEnabled(false);\n setVerifyInputWhenFocusTarget(false);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 465, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 357, Short.MAX_VALUE)\n );\n }",
"@SuppressWarnings(\"unchecked\")\n\t// <editor-fold defaultstate=\"collapsed\" desc=\"Generated\n\t// Code\">//GEN-BEGIN:initComponents\n\tprivate void initComponents() {\n\n\t\tlabel1 = new java.awt.Label();\n\t\tlabel2 = new java.awt.Label();\n\t\tlabel3 = new java.awt.Label();\n\t\tlabel4 = new java.awt.Label();\n\t\tlabel5 = new java.awt.Label();\n\t\tlabel6 = new java.awt.Label();\n\t\tlabel7 = new java.awt.Label();\n\t\tlabel8 = new java.awt.Label();\n\t\tlabel9 = new java.awt.Label();\n\t\tlabel10 = new java.awt.Label();\n\t\ttextField1 = new java.awt.TextField();\n\t\ttextField2 = new java.awt.TextField();\n\t\tlabel14 = new java.awt.Label();\n\t\tlabel15 = new java.awt.Label();\n\t\tlabel16 = new java.awt.Label();\n\t\ttextField3 = new java.awt.TextField();\n\t\ttextField4 = new java.awt.TextField();\n\t\ttextField5 = new java.awt.TextField();\n\t\tlabel17 = new java.awt.Label();\n\t\tlabel18 = new java.awt.Label();\n\t\tlabel19 = new java.awt.Label();\n\t\tlabel20 = new java.awt.Label();\n\t\tlabel21 = new java.awt.Label();\n\t\tlabel22 = new java.awt.Label();\n\t\ttextField6 = new java.awt.TextField();\n\t\ttextField7 = new java.awt.TextField();\n\t\ttextField8 = new java.awt.TextField();\n\t\tlabel23 = new java.awt.Label();\n\t\ttextField9 = new java.awt.TextField();\n\t\ttextField10 = new java.awt.TextField();\n\t\ttextField11 = new java.awt.TextField();\n\t\ttextField12 = new java.awt.TextField();\n\t\tlabel24 = new java.awt.Label();\n\t\tlabel25 = new java.awt.Label();\n\t\tlabel26 = new java.awt.Label();\n\t\tlabel27 = new java.awt.Label();\n\t\tlabel28 = new java.awt.Label();\n\t\tlabel30 = new java.awt.Label();\n\t\tlabel31 = new java.awt.Label();\n\t\tlabel32 = new java.awt.Label();\n\t\tjButton1 = new javax.swing.JButton();\n\n\t\tlabel1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel1.setText(\"It seems that some of the buttons on the ATM machine are not working!\");\n\n\t\tlabel2.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel2.setText(\"Unfortunately these numbers are exactly what Professor has to use to type in his password.\");\n\n\t\tlabel3.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel3.setText(\n\t\t\t\t\"If you want to eat tonight, you have to help him out and construct the numbers of the password with the working buttons and math operators.\");\n\n\t\tlabel4.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tlabel4.setText(\"Denver's Password: 2792\");\n\n\t\tlabel5.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel5.setText(\"import java.util.Scanner;\\n\");\n\n\t\tlabel6.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel6.setText(\"public class ATM{\");\n\n\t\tlabel7.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel7.setText(\"public static void main(String[] args){\");\n\n\t\tlabel8.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel8.setText(\"System.out.print(\");\n\n\t\tlabel9.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel9.setText(\" -\");\n\n\t\tlabel10.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel10.setText(\");\");\n\n\t\ttextField1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\ttextField1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tlabel14.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel14.setText(\"System.out.print( (\");\n\n\t\tlabel15.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel15.setText(\"System.out.print(\");\n\n\t\tlabel16.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel16.setText(\"System.out.print( ( (\");\n\n\t\tlabel17.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel17.setText(\")\");\n\n\t\tlabel18.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel18.setText(\" +\");\n\n\t\tlabel19.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel19.setText(\");\");\n\n\t\tlabel20.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel20.setText(\" /\");\n\n\t\tlabel21.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel21.setText(\" %\");\n\n\t\tlabel22.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel22.setText(\" +\");\n\n\t\tlabel23.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel23.setText(\");\");\n\n\t\tlabel24.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel24.setText(\" +\");\n\n\t\tlabel25.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel25.setText(\" /\");\n\n\t\tlabel26.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel26.setText(\" *\");\n\n\t\tlabel27.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\t\tlabel27.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel27.setText(\")\");\n\n\t\tlabel28.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel28.setText(\")\");\n\n\t\tlabel30.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel30.setText(\"}\");\n\n\t\tlabel31.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel31.setText(\"}\");\n\n\t\tlabel32.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel32.setText(\");\");\n\n\t\tjButton1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tjButton1.setText(\"Check\");\n\t\tjButton1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tjButton1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tjavax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n\t\tlayout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(28).addGroup(layout\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING).addComponent(getDoneButton()).addComponent(jButton1)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, 774, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addGap(92).addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15, GroupLayout.PREFERRED_SIZE, 145,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(2)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(37))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(174)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(7)))\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label23, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20).addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(23).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel10, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16, GroupLayout.PREFERRED_SIZE, 177,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));\n\t\tlayout.setVerticalGroup(\n\t\t\t\tlayout.createParallelGroup(Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup().addGroup(layout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(19)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(78)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(76)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(75)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(27))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel23,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(29)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))))\n\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t.addGap(30)\n\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(25)\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(26).addComponent(jButton1).addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(getDoneButton()).addContainerGap(23, Short.MAX_VALUE)));\n\t\tthis.setLayout(layout);\n\n\t\tlabel16.getAccessibleContext().setAccessibleName(\"System.out.print( ( (\");\n\t\tlabel17.getAccessibleContext().setAccessibleName(\"\");\n\t\tlabel18.getAccessibleContext().setAccessibleName(\" +\");\n\t}",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(null);\n\n pack();\n }",
"public FormListRemarking() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }",
"public SettingsForm() {\n initComponents();\n }",
"public Interfax_D() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 630, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 431, Short.MAX_VALUE)\n );\n\n pack();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n jLabel9 = new javax.swing.JLabel();\n jLabel10 = new javax.swing.JLabel();\n jLabel11 = new javax.swing.JLabel();\n jLabel12 = new javax.swing.JLabel();\n jLabel13 = new javax.swing.JLabel();\n jLabel14 = new javax.swing.JLabel();\n jLabel15 = new javax.swing.JLabel();\n jLabel16 = new javax.swing.JLabel();\n jLabel17 = new javax.swing.JLabel();\n jLabel18 = new javax.swing.JLabel();\n jLabel19 = new javax.swing.JLabel();\n jLabel20 = new javax.swing.JLabel();\n jLabel21 = new javax.swing.JLabel();\n jLabel22 = new javax.swing.JLabel();\n jLabel23 = new javax.swing.JLabel();\n jLabel24 = new javax.swing.JLabel();\n jLabel25 = new javax.swing.JLabel();\n jLabel26 = new javax.swing.JLabel();\n jLabel27 = new javax.swing.JLabel();\n jLabel28 = new javax.swing.JLabel();\n jLabel29 = new javax.swing.JLabel();\n axTextField = new javax.swing.JTextField();\n bxTextField = new javax.swing.JTextField();\n cxTextField = new javax.swing.JTextField();\n dxTextField = new javax.swing.JTextField();\n siTextField = new javax.swing.JTextField();\n diTextField = new javax.swing.JTextField();\n spTextField = new javax.swing.JTextField();\n bpTextField = new javax.swing.JTextField();\n pcTextField = new javax.swing.JTextField();\n ir1TextField = new javax.swing.JTextField();\n ir2TextField = new javax.swing.JTextField();\n marTextField = new javax.swing.JTextField();\n ivtpTextField = new javax.swing.JTextField();\n mbrTextField = new javax.swing.JTextField();\n ir3TextField = new javax.swing.JTextField();\n ir4TextField = new javax.swing.JTextField();\n xTextField = new javax.swing.JTextField();\n yTextField = new javax.swing.JTextField();\n aTextField = new javax.swing.JTextField();\n bTextField = new javax.swing.JTextField();\n pswTextField = new javax.swing.JTextField();\n imrTextField = new javax.swing.JTextField();\n sbusTextField = new javax.swing.JTextField();\n dbusTextField = new javax.swing.JTextField();\n systemABUSTextField = new javax.swing.JTextField();\n systemDBUSTextField = new javax.swing.JTextField();\n jSeparator1 = new javax.swing.JSeparator();\n jSeparator2 = new javax.swing.JSeparator();\n jSeparator3 = new javax.swing.JSeparator();\n jSeparator4 = new javax.swing.JSeparator();\n okButton = new javax.swing.JButton();\n jLabel30 = new javax.swing.JLabel();\n jLabel31 = new javax.swing.JLabel();\n\n setTitle(\"RegisterDialog\");\n setFocusable(false);\n setMinimumSize(new java.awt.Dimension(688, 285));\n setName(\"\"); // NOI18N\n\n jLabel1.setText(\"AX\");\n\n jLabel2.setText(\"BX\");\n\n jLabel3.setText(\"CX\");\n\n jLabel4.setText(\"DX\");\n\n jLabel5.setText(\"SI\");\n\n jLabel6.setText(\"DI\");\n\n jLabel7.setText(\"SP\");\n\n jLabel8.setText(\"BP\");\n\n jLabel9.setText(\"PC\");\n\n jLabel10.setText(\"IR1\");\n\n jLabel11.setText(\"IR2\");\n\n jLabel12.setText(\"MAR\");\n\n jLabel13.setText(\"MBR\");\n\n jLabel14.setText(\"IVTP\");\n\n jLabel15.setText(\"IR3\");\n\n jLabel16.setText(\"IR4\");\n\n jLabel17.setText(\"X\");\n\n jLabel18.setText(\"Y\");\n\n jLabel19.setText(\"A\");\n\n jLabel20.setText(\"B\");\n\n jLabel21.setText(\"PSW\");\n\n jLabel22.setText(\"IMR\");\n\n jLabel23.setFont(new java.awt.Font(\"Tahoma\", 1, 14));\n jLabel23.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);\n jLabel23.setText(\"CPU\");\n\n jLabel24.setText(\"sBUS\");\n\n jLabel25.setText(\"dBUS\");\n\n jLabel26.setText(\"ABUS\");\n\n jLabel27.setText(\"DBUS\");\n\n jLabel28.setText(\"bin.\");\n\n jLabel29.setText(\"bin.\");\n\n axTextField.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n axTextField.setText(\"0000\");\n axTextField.setFocusable(false);\n axTextField.setMaximumSize(new java.awt.Dimension(30, 20));\n axTextField.setMinimumSize(new java.awt.Dimension(30, 20));\n\n bxTextField.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n bxTextField.setText(\"0000\");\n bxTextField.setFocusable(false);\n bxTextField.setMaximumSize(new java.awt.Dimension(30, 20));\n bxTextField.setMinimumSize(new java.awt.Dimension(30, 20));\n\n cxTextField.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n cxTextField.setText(\"0000\");\n cxTextField.setFocusable(false);\n cxTextField.setMaximumSize(new java.awt.Dimension(30, 20));\n cxTextField.setMinimumSize(new java.awt.Dimension(30, 20));\n\n dxTextField.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n dxTextField.setText(\"0000\");\n dxTextField.setFocusable(false);\n dxTextField.setMaximumSize(new java.awt.Dimension(30, 20));\n dxTextField.setMinimumSize(new java.awt.Dimension(30, 20));\n\n siTextField.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n siTextField.setText(\"0000\");\n siTextField.setFocusable(false);\n siTextField.setMaximumSize(new java.awt.Dimension(30, 20));\n siTextField.setMinimumSize(new java.awt.Dimension(30, 20));\n\n diTextField.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n diTextField.setText(\"0000\");\n diTextField.setFocusable(false);\n diTextField.setMaximumSize(new java.awt.Dimension(30, 20));\n diTextField.setMinimumSize(new java.awt.Dimension(30, 20));\n\n spTextField.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n spTextField.setText(\"0000\");\n spTextField.setFocusable(false);\n spTextField.setMaximumSize(new java.awt.Dimension(30, 20));\n spTextField.setMinimumSize(new java.awt.Dimension(30, 20));\n\n bpTextField.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n bpTextField.setText(\"0000\");\n bpTextField.setFocusable(false);\n bpTextField.setMaximumSize(new java.awt.Dimension(30, 20));\n bpTextField.setMinimumSize(new java.awt.Dimension(30, 20));\n\n pcTextField.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n pcTextField.setText(\"0000\");\n pcTextField.setFocusable(false);\n pcTextField.setMaximumSize(new java.awt.Dimension(30, 20));\n pcTextField.setMinimumSize(new java.awt.Dimension(30, 20));\n\n ir1TextField.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n ir1TextField.setText(\"0000\");\n ir1TextField.setFocusable(false);\n ir1TextField.setMaximumSize(new java.awt.Dimension(30, 20));\n ir1TextField.setMinimumSize(new java.awt.Dimension(30, 20));\n\n ir2TextField.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n ir2TextField.setText(\"0000\");\n ir2TextField.setFocusable(false);\n ir2TextField.setMaximumSize(new java.awt.Dimension(30, 20));\n ir2TextField.setMinimumSize(new java.awt.Dimension(30, 20));\n\n marTextField.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n marTextField.setText(\"0000\");\n marTextField.setFocusable(false);\n marTextField.setMaximumSize(new java.awt.Dimension(30, 20));\n marTextField.setMinimumSize(new java.awt.Dimension(30, 20));\n\n ivtpTextField.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n ivtpTextField.setText(\"0000\");\n ivtpTextField.setFocusable(false);\n ivtpTextField.setMaximumSize(new java.awt.Dimension(30, 20));\n ivtpTextField.setMinimumSize(new java.awt.Dimension(30, 20));\n\n mbrTextField.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n mbrTextField.setText(\"0000\");\n mbrTextField.setFocusable(false);\n mbrTextField.setMaximumSize(new java.awt.Dimension(30, 20));\n mbrTextField.setMinimumSize(new java.awt.Dimension(30, 20));\n\n ir3TextField.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n ir3TextField.setText(\"0000\");\n ir3TextField.setFocusable(false);\n ir3TextField.setMaximumSize(new java.awt.Dimension(30, 20));\n ir3TextField.setMinimumSize(new java.awt.Dimension(30, 20));\n\n ir4TextField.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n ir4TextField.setText(\"0000\");\n ir4TextField.setFocusable(false);\n ir4TextField.setMaximumSize(new java.awt.Dimension(30, 20));\n ir4TextField.setMinimumSize(new java.awt.Dimension(30, 20));\n\n xTextField.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n xTextField.setText(\"0000\");\n xTextField.setFocusable(false);\n xTextField.setMaximumSize(new java.awt.Dimension(30, 20));\n xTextField.setMinimumSize(new java.awt.Dimension(30, 20));\n\n yTextField.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n yTextField.setText(\"0000\");\n yTextField.setFocusable(false);\n yTextField.setMaximumSize(new java.awt.Dimension(30, 20));\n yTextField.setMinimumSize(new java.awt.Dimension(30, 20));\n\n aTextField.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n aTextField.setText(\"0000\");\n aTextField.setFocusable(false);\n aTextField.setMaximumSize(new java.awt.Dimension(30, 20));\n aTextField.setMinimumSize(new java.awt.Dimension(30, 20));\n\n bTextField.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n bTextField.setText(\"0000\");\n bTextField.setFocusable(false);\n bTextField.setMaximumSize(new java.awt.Dimension(30, 20));\n bTextField.setMinimumSize(new java.awt.Dimension(30, 20));\n\n pswTextField.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n pswTextField.setText(\"0000000000000000\");\n pswTextField.setFocusable(false);\n pswTextField.setMaximumSize(new java.awt.Dimension(30, 20));\n pswTextField.setMinimumSize(new java.awt.Dimension(30, 20));\n\n imrTextField.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n imrTextField.setText(\"0000\");\n imrTextField.setFocusable(false);\n imrTextField.setMaximumSize(new java.awt.Dimension(30, 20));\n imrTextField.setMinimumSize(new java.awt.Dimension(30, 20));\n\n sbusTextField.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n sbusTextField.setText(\"0000\");\n sbusTextField.setFocusable(false);\n sbusTextField.setMaximumSize(new java.awt.Dimension(30, 20));\n sbusTextField.setMinimumSize(new java.awt.Dimension(30, 20));\n\n dbusTextField.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n dbusTextField.setText(\"0000\");\n dbusTextField.setFocusable(false);\n dbusTextField.setMaximumSize(new java.awt.Dimension(30, 20));\n dbusTextField.setMinimumSize(new java.awt.Dimension(30, 20));\n\n systemABUSTextField.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n systemABUSTextField.setText(\"0000\");\n systemABUSTextField.setFocusable(false);\n systemABUSTextField.setMaximumSize(new java.awt.Dimension(30, 20));\n systemABUSTextField.setMinimumSize(new java.awt.Dimension(30, 20));\n\n systemDBUSTextField.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n systemDBUSTextField.setText(\"0000\");\n systemDBUSTextField.setFocusable(false);\n systemDBUSTextField.setMaximumSize(new java.awt.Dimension(30, 20));\n systemDBUSTextField.setMinimumSize(new java.awt.Dimension(30, 20));\n\n jSeparator1.setOrientation(javax.swing.SwingConstants.VERTICAL);\n\n okButton.setText(\"OK\");\n okButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n okButtonActionPerformed(evt);\n }\n });\n\n jLabel30.setFont(new java.awt.Font(\"Tahoma\", 0, 14));\n jLabel30.setText(\"interne \\nmagistrale\");\n\n jLabel31.setFont(new java.awt.Font(\"Tahoma\", 0, 14));\n jLabel31.setText(\"sistemske magistrale\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jSeparator2, javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel4)\n .addGap(18, 18, 18)\n .addComponent(dxTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel3)\n .addGap(18, 18, 18)\n .addComponent(cxTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jLabel1)\n .addComponent(jLabel2))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(bxTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE)\n .addComponent(axTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE))))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel7)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 12, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 12, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel8))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(siTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE)\n .addComponent(diTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE)\n .addComponent(spTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE)\n .addComponent(bpTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel14)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(ivtpTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel12)\n .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jLabel13))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(pcTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE)\n .addComponent(mbrTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE)\n .addComponent(marTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE)))))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addComponent(jLabel22)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(imrTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addComponent(jLabel21)\n .addGap(18, 18, 18)\n .addComponent(pswTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel28, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel29))))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel16)\n .addComponent(jLabel15)\n .addComponent(jLabel11, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel10, javax.swing.GroupLayout.Alignment.TRAILING))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(ir1TextField, javax.swing.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE)\n .addComponent(ir2TextField, javax.swing.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE)\n .addComponent(ir3TextField, javax.swing.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE)\n .addComponent(ir4TextField, javax.swing.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel20, javax.swing.GroupLayout.PREFERRED_SIZE, 8, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel19)\n .addComponent(jLabel18, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 7, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel17, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 8, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(xTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE)\n .addComponent(yTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE)\n .addComponent(aTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE)\n .addComponent(bTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE)))\n .addComponent(jLabel23, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel25, javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jLabel30)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 34, Short.MAX_VALUE)\n .addComponent(jLabel24)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(dbusTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE)\n .addComponent(sbusTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addComponent(jSeparator3, javax.swing.GroupLayout.DEFAULT_SIZE, 215, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel27, javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jLabel31)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel26)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(systemDBUSTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE)\n .addComponent(systemABUSTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addComponent(jSeparator4)))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(okButton, javax.swing.GroupLayout.PREFERRED_SIZE, 108, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(46, 46, 46)))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(pcTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel9))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel12)\n .addComponent(marTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addComponent(mbrTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(siTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(diTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(spTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel13))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(bpTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel14)\n .addComponent(ivtpTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(axTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel5))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(bxTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel6))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(cxTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel7))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(dxTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel8))))\n .addGap(33, 33, 33)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel21)\n .addComponent(pswTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel28))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel22)\n .addComponent(imrTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addComponent(jLabel29)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel24)\n .addComponent(sbusTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel25)\n .addComponent(dbusTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(layout.createSequentialGroup()\n .addGap(13, 13, 13)\n .addComponent(jLabel30, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jSeparator3, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel26)\n .addComponent(systemABUSTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel27)\n .addComponent(systemDBUSTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(layout.createSequentialGroup()\n .addGap(18, 18, 18)\n .addComponent(jLabel31, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jSeparator4, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(26, 26, 26)\n .addComponent(okButton))\n .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 218, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel17)\n .addComponent(xTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel18)\n .addComponent(yTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel19)\n .addComponent(aTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel20)\n .addComponent(bTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel10)\n .addComponent(ir1TextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel11)\n .addComponent(ir2TextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel15)\n .addComponent(ir3TextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel16)\n .addComponent(ir4TextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addGap(71, 71, 71)\n .addComponent(jLabel23))))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n pack();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 760, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 446, Short.MAX_VALUE)\n );\n\n pack();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 731, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 638, Short.MAX_VALUE)\n );\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 731, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 475, Short.MAX_VALUE)\n );\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jSeparator1 = new javax.swing.JSeparator();\n jLabel4 = new javax.swing.JLabel();\n jTextField1 = new javax.swing.JTextField();\n jButton2 = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jButton1 = new javax.swing.JButton();\n jLabel5 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n jLabel9 = new javax.swing.JLabel();\n jLabel10 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jLabel14 = new javax.swing.JLabel();\n jLabel15 = new javax.swing.JLabel();\n jLabel12 = new javax.swing.JLabel();\n jLabel13 = new javax.swing.JLabel();\n jTextField3 = new javax.swing.JTextField();\n jTextField2 = new javax.swing.JTextField();\n jTextField4 = new javax.swing.JTextField();\n jTextField5 = new javax.swing.JTextField();\n jLabel27 = new javax.swing.JLabel();\n jLabel26 = new javax.swing.JLabel();\n jLabel25 = new javax.swing.JLabel();\n jLabel24 = new javax.swing.JLabel();\n jButton3 = new javax.swing.JButton();\n jSeparator2 = new javax.swing.JSeparator();\n jLabel16 = new javax.swing.JLabel();\n jLabel17 = new javax.swing.JLabel();\n jTextField7 = new javax.swing.JTextField();\n jLabel18 = new javax.swing.JLabel();\n jPasswordField1 = new javax.swing.JPasswordField();\n jPasswordField2 = new javax.swing.JPasswordField();\n jButton4 = new javax.swing.JButton();\n jLabel11 = new javax.swing.JLabel();\n jButton5 = new javax.swing.JButton();\n jLabel19 = new javax.swing.JLabel();\n jLabel20 = new javax.swing.JLabel();\n jLabel21 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"Settings\");\n setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n addWindowListener(new java.awt.event.WindowAdapter() {\n public void windowOpened(java.awt.event.WindowEvent evt) {\n formWindowOpened(evt);\n }\n });\n\n jSeparator1.setForeground(new java.awt.Color(102, 0, 153));\n\n jLabel4.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Tux TV 1280-1024.jpg\"))); // NOI18N\n\n jTextField1.setFont(new java.awt.Font(\"Tahoma\", 1, 14));\n\n jButton2.setFont(new java.awt.Font(\"Tahoma\", 1, 14));\n jButton2.setForeground(new java.awt.Color(51, 51, 255));\n jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Blue-young-icon.png\"))); // NOI18N\n jButton2.setText(\"Search\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n jLabel1.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));\n\n jLabel3.setFont(new java.awt.Font(\"Tahoma\", 1, 18));\n jLabel3.setForeground(new java.awt.Color(51, 51, 255));\n jLabel3.setText(\"<html>Logged In <font color=green>●\");\n\n jLabel2.setBackground(new java.awt.Color(204, 204, 255));\n jLabel2.setFont(new java.awt.Font(\"Arial\", 1, 18));\n jLabel2.setOpaque(true);\n\n jButton1.setBackground(new java.awt.Color(255, 153, 153));\n jButton1.setFont(new java.awt.Font(\"Arial\", 1, 14));\n jButton1.setForeground(new java.awt.Color(255, 0, 0));\n jButton1.setText(\"Log Out\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jLabel5.setFont(new java.awt.Font(\"Arial\", 0, 18));\n jLabel5.setForeground(new java.awt.Color(153, 0, 153));\n jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel5.setText(\"<html><u>Home\");\n jLabel5.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabel5MouseClicked(evt);\n }\n });\n\n jLabel7.setFont(new java.awt.Font(\"Arial\", 0, 18));\n jLabel7.setForeground(new java.awt.Color(153, 0, 153));\n jLabel7.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel7.setText(\"<html><u>Friends\");\n jLabel7.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabel7MouseClicked(evt);\n }\n });\n\n jLabel8.setFont(new java.awt.Font(\"Arial\", 0, 18));\n jLabel8.setForeground(new java.awt.Color(153, 0, 153));\n jLabel8.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel8.setText(\"<html><u>Messages\");\n jLabel8.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabel8MouseClicked(evt);\n }\n });\n\n jLabel9.setFont(new java.awt.Font(\"Arial\", 0, 18));\n jLabel9.setForeground(new java.awt.Color(153, 0, 153));\n jLabel9.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel9.setText(\"<html><u>Notifications\");\n jLabel9.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabel9MouseClicked(evt);\n }\n });\n\n jLabel10.setFont(new java.awt.Font(\"Arial\", 0, 18));\n jLabel10.setForeground(new java.awt.Color(153, 0, 153));\n jLabel10.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel10.setText(\"<html><u>Profile\");\n jLabel10.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabel10MouseClicked(evt);\n }\n });\n\n jLabel6.setFont(new java.awt.Font(\"Arial\", 0, 18));\n jLabel6.setForeground(new java.awt.Color(0, 0, 255));\n jLabel6.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel6.setText(\"<html><u>Settings\");\n\n jLabel14.setFont(new java.awt.Font(\"Tahoma\", 1, 14));\n jLabel14.setText(\"E-Mail:\");\n\n jLabel15.setFont(new java.awt.Font(\"Tahoma\", 1, 14));\n jLabel15.setText(\"Phone Number:\");\n\n jLabel12.setFont(new java.awt.Font(\"Tahoma\", 1, 14));\n jLabel12.setText(\"Name:\");\n\n jLabel13.setFont(new java.awt.Font(\"Tahoma\", 1, 14));\n jLabel13.setText(\"UserName:\");\n\n jTextField3.setFont(new java.awt.Font(\"Tahoma\", 1, 14));\n jTextField3.setForeground(new java.awt.Color(102, 0, 102));\n jTextField3.setEnabled(false);\n\n jTextField2.setFont(new java.awt.Font(\"Tahoma\", 1, 14));\n jTextField2.setForeground(new java.awt.Color(102, 0, 102));\n jTextField2.setEnabled(false);\n\n jTextField4.setFont(new java.awt.Font(\"Tahoma\", 1, 14));\n jTextField4.setForeground(new java.awt.Color(102, 0, 102));\n jTextField4.setEnabled(false);\n\n jTextField5.setFont(new java.awt.Font(\"Tahoma\", 1, 14));\n jTextField5.setForeground(new java.awt.Color(102, 0, 102));\n jTextField5.setEnabled(false);\n\n jLabel27.setFont(new java.awt.Font(\"Tahoma\", 1, 14));\n jLabel27.setForeground(new java.awt.Color(0, 0, 255));\n jLabel27.setText(\"<html><u>Edit\");\n jLabel27.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabel27MouseClicked(evt);\n }\n });\n\n jLabel26.setFont(new java.awt.Font(\"Tahoma\", 1, 14));\n jLabel26.setForeground(new java.awt.Color(0, 0, 255));\n jLabel26.setText(\"<html><u>Edit\");\n jLabel26.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabel26MouseClicked(evt);\n }\n });\n\n jLabel25.setFont(new java.awt.Font(\"Tahoma\", 1, 14));\n jLabel25.setForeground(new java.awt.Color(0, 0, 255));\n jLabel25.setText(\"<html><u>Edit\");\n jLabel25.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabel25MouseClicked(evt);\n }\n });\n\n jLabel24.setFont(new java.awt.Font(\"Tahoma\", 1, 14));\n jLabel24.setForeground(new java.awt.Color(0, 0, 255));\n jLabel24.setText(\"<html><u>Edit\");\n jLabel24.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabel24MouseClicked(evt);\n }\n });\n\n jButton3.setFont(new java.awt.Font(\"Tahoma\", 2, 18)); // NOI18N\n jButton3.setForeground(new java.awt.Color(0, 153, 51));\n jButton3.setText(\"Update Info\");\n jButton3.setEnabled(false);\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n\n jSeparator2.setForeground(jSeparator1.getForeground());\n\n jLabel16.setFont(new java.awt.Font(\"Tahoma\", 1, 14));\n jLabel16.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n jLabel16.setText(\"Old Password:\");\n\n jLabel17.setFont(new java.awt.Font(\"Tahoma\", 1, 14));\n jLabel17.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n jLabel17.setText(\"New Password:\");\n\n jTextField7.setFont(new java.awt.Font(\"Tahoma\", 1, 14));\n jTextField7.setForeground(new java.awt.Color(102, 0, 102));\n\n jLabel18.setFont(new java.awt.Font(\"Tahoma\", 1, 14));\n jLabel18.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n jLabel18.setText(\"ReType New Password:\");\n\n jButton4.setFont(new java.awt.Font(\"Tahoma\", 3, 18));\n jButton4.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/3.png\"))); // NOI18N\n jButton4.setText(\"Change\");\n jButton4.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jButton4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton4ActionPerformed(evt);\n }\n });\n\n jLabel11.setFont(new java.awt.Font(\"Tahoma\", 1, 14));\n jLabel11.setForeground(new java.awt.Color(0, 0, 255));\n jLabel11.setText(\"<html><u>Wanna See Your Security Code?\");\n jLabel11.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabel11MouseClicked(evt);\n }\n });\n\n jButton5.setFont(new java.awt.Font(\"Tahoma\", 1, 14));\n jButton5.setForeground(new java.awt.Color(255, 51, 51));\n jButton5.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/imagesFCG7ZZJL.jpg\"))); // NOI18N\n jButton5.setText(\"Delete My Account\");\n jButton5.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jButton5.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton5ActionPerformed(evt);\n }\n });\n\n jLabel19.setFont(new java.awt.Font(\"Tahoma\", 0, 1));\n\n jLabel20.setFont(new java.awt.Font(\"Tahoma\", 0, 1));\n\n jLabel21.setFont(new java.awt.Font(\"Tahoma\", 0, 1));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jSeparator1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 636, Short.MAX_VALUE)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 437, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, 139, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, 352, Short.MAX_VALUE)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 312, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(78, 78, 78)\n .addComponent(jLabel19)\n .addGap(40, 40, 40)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 97, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jLabel9)\n .addGap(18, 18, 18)\n .addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jLabel6, javax.swing.GroupLayout.DEFAULT_SIZE, 96, Short.MAX_VALUE))))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(136, 136, 136)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel12)\n .addComponent(jLabel13))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jTextField3)\n .addComponent(jTextField2, javax.swing.GroupLayout.DEFAULT_SIZE, 226, Short.MAX_VALUE)))\n .addGroup(layout.createSequentialGroup()\n .addGap(103, 103, 103)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel14)\n .addComponent(jLabel15))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jTextField5)\n .addComponent(jTextField4, javax.swing.GroupLayout.DEFAULT_SIZE, 226, Short.MAX_VALUE))))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel27)\n .addComponent(jLabel26)\n .addComponent(jLabel25))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton5))\n .addComponent(jLabel24))\n .addGap(2, 2, 2))\n .addGroup(layout.createSequentialGroup()\n .addGap(264, 264, 264)\n .addComponent(jButton3))\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jSeparator2, javax.swing.GroupLayout.DEFAULT_SIZE, 636, Short.MAX_VALUE)))\n .addContainerGap())\n .addGroup(layout.createSequentialGroup()\n .addGap(25, 25, 25)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel18, javax.swing.GroupLayout.PREFERRED_SIZE, 188, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addGap(10, 10, 10)\n .addComponent(jLabel17, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addComponent(jLabel16, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 155, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jPasswordField2)\n .addComponent(jPasswordField1)\n .addComponent(jTextField7, javax.swing.GroupLayout.DEFAULT_SIZE, 226, Short.MAX_VALUE))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addGap(100, 100, 100)\n .addComponent(jLabel20)\n .addGap(73, 73, 73))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel21)\n .addGap(21, 21, 21))))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(199, Short.MAX_VALUE)\n .addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, 295, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(162, 162, 162))\n .addGroup(layout.createSequentialGroup()\n .addGap(271, 271, 271)\n .addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 124, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(261, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createSequentialGroup()\n .addGap(13, 13, 13)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel19)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jTextField1, javax.swing.GroupLayout.DEFAULT_SIZE, 29, Short.MAX_VALUE)\n .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 29, Short.MAX_VALUE))\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 5, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(27, 27, 27)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel12)\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel24))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel13)\n .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel25))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel26)\n .addComponent(jLabel14))\n .addGap(12, 12, 12)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel27)\n .addComponent(jLabel15))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(51, 51, 51)\n .addComponent(jButton5, javax.swing.GroupLayout.PREFERRED_SIZE, 92, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(33, 33, 33)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel16)\n .addComponent(jTextField7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel20))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel17)\n .addComponent(jPasswordField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel18)\n .addComponent(jPasswordField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel11))\n .addGroup(layout.createSequentialGroup()\n .addGap(59, 59, 59)\n .addComponent(jLabel21)))\n .addContainerGap(47, Short.MAX_VALUE))\n );\n\n pack();\n }",
"public RegistrationForm() {\n initComponents();\n this.setLocationRelativeTo(null);\n }",
"public quanlixe_form() {\n initComponents();\n }",
"public BloodDonationGUI() {\n initComponents();\n }",
"public AmountReleasedCommentsForm() {\r\n initComponents();\r\n }",
"public Magasin() {\n initComponents();\n }",
"public UploadForm() {\n initComponents();\n }",
"public IssueBookForm() {\n initComponents();\n }",
"public frmMain() {\n initComponents();\n }",
"public frmMain() {\n initComponents();\n }",
"public soal2GUI() {\n initComponents();\n }",
"public quotaGUI() {\n initComponents();\n }",
"public P0405() {\n initComponents();\n }",
"public PatientUI() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setBackground(new java.awt.Color(204, 204, 204));\n setMinimumSize(new java.awt.Dimension(1, 1));\n setPreferredSize(new java.awt.Dimension(760, 402));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 750, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n }",
"public muveletek() {\n initComponents();\n }",
"public Managing_Staff_Main_Form() {\n initComponents();\n }",
"public EindopdrachtGUI() {\n initComponents();\n }",
"public Soru1() {\n initComponents();\n }",
"public AddDocumentLineForm(java.awt.Frame parent) {\n super(parent);\n initComponents();\n myInit();\n }",
"public ValidFrequencyForm() {\r\n initComponents();\r\n }",
"public form2() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setLayout(new java.awt.BorderLayout());\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setLayout(new java.awt.BorderLayout());\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setLayout(new java.awt.BorderLayout());\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n jLabel9 = new javax.swing.JLabel();\n jLabel10 = new javax.swing.JLabel();\n jLabel11 = new javax.swing.JLabel();\n jLabel12 = new javax.swing.JLabel();\n jLabel13 = new javax.swing.JLabel();\n jLabel14 = new javax.swing.JLabel();\n jLabel15 = new javax.swing.JLabel();\n jLabel16 = new javax.swing.JLabel();\n jLabel17 = new javax.swing.JLabel();\n jTextField1 = new javax.swing.JTextField();\n jTextField2 = new javax.swing.JTextField();\n jTextField5 = new javax.swing.JTextField();\n jTextField6 = new javax.swing.JTextField();\n jTextField8 = new javax.swing.JTextField();\n jTextField9 = new javax.swing.JTextField();\n jTextField10 = new javax.swing.JTextField();\n jTextField11 = new javax.swing.JTextField();\n jTextField12 = new javax.swing.JTextField();\n jTextField13 = new javax.swing.JTextField();\n jTextField14 = new javax.swing.JTextField();\n jTextField16 = new javax.swing.JTextField();\n jButton2 = new javax.swing.JButton();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTextArea1 = new javax.swing.JTextArea();\n jButton1 = new javax.swing.JButton();\n jLabel18 = new javax.swing.JLabel();\n jButton3 = new javax.swing.JButton();\n jLabel19 = new javax.swing.JLabel();\n jLabel20 = new javax.swing.JLabel();\n jFormattedTextField1 = new javax.swing.JFormattedTextField();\n jFormattedTextField2 = new javax.swing.JFormattedTextField();\n jFormattedTextField3 = new javax.swing.JFormattedTextField();\n jLabel21 = new javax.swing.JLabel();\n jLabel22 = new javax.swing.JLabel();\n jButton4 = new javax.swing.JButton();\n jFormattedTextField4 = new javax.swing.JFormattedTextField();\n jLabel23 = new javax.swing.JLabel();\n jLabel24 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"Personal Profile\");\n\n jLabel1.setFont(new java.awt.Font(\"Lucida Grande\", 1, 24)); // NOI18N\n jLabel1.setText(\"Personal Information\");\n\n jLabel2.setText(\"Name\");\n\n jLabel3.setText(\"Address\");\n\n jLabel4.setText(\"Date of Birth\");\n jLabel4.setToolTipText(\"\");\n\n jLabel5.setText(\"Contact\");\n\n jLabel6.setText(\"Fax Number\");\n\n jLabel7.setText(\"Email\");\n\n jLabel8.setText(\"SSN\");\n\n jLabel9.setText(\"Medical Record No\");\n\n jLabel10.setText(\"Health Plan No\");\n\n jLabel11.setText(\"Bank Acc No\");\n\n jLabel12.setText(\"License No\");\n\n jLabel13.setText(\"Vehicle Identifiers\");\n\n jLabel14.setText(\"Device Identifiers\");\n jLabel14.setToolTipText(\"\");\n\n jLabel15.setText(\"LinkedIn\");\n\n jLabel16.setText(\"IP Address\");\n\n jLabel17.setText(\"Identifier\");\n\n jButton2.setText(\"Submit\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n jTextArea1.setColumns(20);\n jTextArea1.setRows(5);\n jTextArea1.setBounds(new java.awt.Rectangle(0, 0, 240, 120));\n jScrollPane1.setViewportView(jTextArea1);\n\n jButton1.setText(\"Clear\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jLabel18.setText(\"Image\");\n\n jButton3.setText(\"Upload\");\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n\n jFormattedTextField1.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.DateFormatter(java.text.DateFormat.getDateInstance(java.text.DateFormat.SHORT))));\n\n try {\n jFormattedTextField2.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter(\"###-###-####\")));\n } catch (java.text.ParseException ex) {\n ex.printStackTrace();\n }\n\n try {\n jFormattedTextField3.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter(\"###-##-####\")));\n } catch (java.text.ParseException ex) {\n ex.printStackTrace();\n }\n\n jLabel22.setText(\"Biometrics\");\n\n jButton4.setText(\"Upload\");\n jButton4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton4ActionPerformed(evt);\n }\n });\n\n try {\n jFormattedTextField4.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter(\"###.###.###.###\")));\n } catch (java.text.ParseException ex) {\n ex.printStackTrace();\n }\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(29, 29, 29)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel21)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel22))\n .addComponent(jLabel18)\n .addComponent(jLabel3)\n .addComponent(jLabel2)\n .addComponent(jLabel4)\n .addComponent(jLabel5)\n .addComponent(jLabel6)\n .addComponent(jLabel7)\n .addComponent(jLabel8)\n .addComponent(jLabel9)\n .addComponent(jLabel10)\n .addComponent(jLabel11)\n .addComponent(jLabel12)\n .addComponent(jLabel13)\n .addComponent(jLabel14)\n .addComponent(jLabel15)\n .addComponent(jLabel16)\n .addComponent(jLabel17))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jTextField1)\n .addComponent(jTextField2)\n .addComponent(jFormattedTextField1)\n .addComponent(jFormattedTextField2)\n .addComponent(jTextField5)\n .addComponent(jTextField6)\n .addComponent(jFormattedTextField3)\n .addComponent(jTextField8)\n .addComponent(jTextField9)\n .addComponent(jTextField10)\n .addComponent(jTextField11)\n .addComponent(jTextField12)\n .addComponent(jTextField13)\n .addComponent(jTextField14)\n .addComponent(jFormattedTextField4, javax.swing.GroupLayout.DEFAULT_SIZE, 367, Short.MAX_VALUE)\n .addComponent(jTextField16))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 440, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel19, javax.swing.GroupLayout.DEFAULT_SIZE, 209, Short.MAX_VALUE)\n .addComponent(jLabel23, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(24, 24, 24))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jButton3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel20))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jButton4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel24)))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(146, 146, 146)\n .addComponent(jButton2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jButton1))\n .addGroup(layout.createSequentialGroup()\n .addGap(423, 423, 423)\n .addComponent(jLabel1)))\n .addContainerGap(566, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(19, 19, 19)\n .addComponent(jLabel1)\n .addGap(27, 27, 27)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel19, javax.swing.GroupLayout.PREFERRED_SIZE, 206, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jLabel23, javax.swing.GroupLayout.PREFERRED_SIZE, 221, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel2)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel3)\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel4)\n .addComponent(jFormattedTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel5)\n .addComponent(jFormattedTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel6)\n .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel7)\n .addComponent(jTextField6, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel8)\n .addComponent(jFormattedTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel9)\n .addComponent(jTextField8, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel10)\n .addComponent(jTextField9, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel11)\n .addComponent(jTextField10, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel12)\n .addComponent(jTextField11, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel13)\n .addComponent(jTextField12, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel14)\n .addComponent(jTextField13, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel15)\n .addComponent(jTextField14, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel16)\n .addComponent(jFormattedTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel17)\n .addComponent(jTextField16, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addComponent(jScrollPane1))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel18)\n .addComponent(jButton3)\n .addComponent(jLabel20))\n .addGap(7, 7, 7)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel22)\n .addComponent(jButton4)\n .addComponent(jLabel24))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel21)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton2)\n .addComponent(jButton1))\n .addContainerGap(18, Short.MAX_VALUE))\n );\n\n pack();\n }",
"public HW3() {\n initComponents();\n }",
"public FormHorarioSSE() {\n initComponents();\n }",
"public FormUtama() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }",
"public PatientRegForm() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyPressed(java.awt.event.KeyEvent evt) {\n formKeyPressed(evt);\n }\n public void keyReleased(java.awt.event.KeyEvent evt) {\n formKeyReleased(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n\n pack();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n\n pack();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n\n pack();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n\n pack();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n\n pack();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n\n pack();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n\n pack();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n\n pack();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n\n pack();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n\n pack();\n }",
"public p0() {\n initComponents();\n }",
"public LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 394, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 278, Short.MAX_VALUE)\n );\n\n pack();\n }",
"public NewCustomerGUI() {\n initComponents();\n }",
"public myForm() {\n\t\t\tinitComponents();\n\t\t}",
"public EnterDetailsGUI() {\n initComponents();\n }",
"public JFrmPrincipal() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n\n pack();\n }",
"@SuppressWarnings(\"unchecked\")\r\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\r\n private void initComponents() {\r\n\r\n jTextField1 = new javax.swing.JTextField();\r\n jButton1 = new javax.swing.JButton();\r\n jTextField2 = new javax.swing.JTextField();\r\n jLabel1 = new javax.swing.JLabel();\r\n jLabel2 = new javax.swing.JLabel();\r\n jLabel3 = new javax.swing.JLabel();\r\n jLabel4 = new javax.swing.JLabel();\r\n jLabel5 = new javax.swing.JLabel();\r\n jLabel6 = new javax.swing.JLabel();\r\n jLabel7 = new javax.swing.JLabel();\r\n jTextField3 = new javax.swing.JTextField();\r\n jTextField4 = new javax.swing.JTextField();\r\n jTextField5 = new javax.swing.JTextField();\r\n jTextField6 = new javax.swing.JTextField();\r\n jTextField7 = new javax.swing.JTextField();\r\n jTextField8 = new javax.swing.JTextField();\r\n jButton2 = new javax.swing.JButton();\r\n jButton3 = new javax.swing.JButton();\r\n jButton4 = new javax.swing.JButton();\r\n lbhora = new javax.swing.JLabel();\r\n jButton5 = new javax.swing.JButton();\r\n jLabel8 = new javax.swing.JLabel();\r\n jButton6 = new javax.swing.JButton();\r\n jLabel9 = new javax.swing.JLabel();\r\n jMenuBar1 = new javax.swing.JMenuBar();\r\n jMenu1 = new javax.swing.JMenu();\r\n jMenuItem4 = new javax.swing.JMenuItem();\r\n jMenuItem5 = new javax.swing.JMenuItem();\r\n jMenu2 = new javax.swing.JMenu();\r\n jMenuItem9 = new javax.swing.JMenuItem();\r\n jMenuItem10 = new javax.swing.JMenuItem();\r\n jMenuItem11 = new javax.swing.JMenuItem();\r\n jMenuItem13 = new javax.swing.JMenuItem();\r\n jMenuItem14 = new javax.swing.JMenuItem();\r\n jMenu3 = new javax.swing.JMenu();\r\n jMenuItem15 = new javax.swing.JMenuItem();\r\n jMenuItem16 = new javax.swing.JMenuItem();\r\n jMenuItem17 = new javax.swing.JMenuItem();\r\n jMenu4 = new javax.swing.JMenu();\r\n\r\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\r\n getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\r\n\r\n jTextField1.setHorizontalAlignment(javax.swing.JTextField.CENTER);\r\n jTextField1.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jTextField1ActionPerformed(evt);\r\n }\r\n });\r\n getContentPane().add(jTextField1, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 12, 490, 30));\r\n\r\n jButton1.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\r\n jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Imagenes/search-icon-60x60.png\"))); // NOI18N\r\n jButton1.setBorderPainted(false);\r\n jButton1.setContentAreaFilled(false);\r\n jButton1.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jButton1ActionPerformed(evt);\r\n }\r\n });\r\n getContentPane().add(jButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(500, 0, -1, -1));\r\n\r\n jTextField2.setHorizontalAlignment(javax.swing.JTextField.CENTER);\r\n jTextField2.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jTextField2ActionPerformed(evt);\r\n }\r\n });\r\n jTextField2.addKeyListener(new java.awt.event.KeyAdapter() {\r\n public void keyTyped(java.awt.event.KeyEvent evt) {\r\n jTextField2KeyTyped(evt);\r\n }\r\n });\r\n getContentPane().add(jTextField2, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 80, 340, 30));\r\n\r\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\r\n jLabel1.setText(\"NOMBRE\");\r\n getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(100, 90, 72, -1));\r\n\r\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\r\n jLabel2.setText(\"DOMICILIO\");\r\n getContentPane().add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(100, 150, 70, -1));\r\n\r\n jLabel3.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\r\n jLabel3.setText(\"CIUDAD\");\r\n getContentPane().add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 290, 60, -1));\r\n\r\n jLabel4.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\r\n jLabel4.setText(\"TELEFONO\");\r\n getContentPane().add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 240, 70, -1));\r\n\r\n jLabel5.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\r\n jLabel5.setText(\"C.P.\");\r\n getContentPane().add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 360, -1, -1));\r\n\r\n jLabel6.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\r\n jLabel6.setText(\"R.F.C.\");\r\n getContentPane().add(jLabel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 190, -1, -1));\r\n\r\n jLabel7.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\r\n jLabel7.setText(\"E-MAIL\");\r\n getContentPane().add(jLabel7, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 410, 50, -1));\r\n\r\n jTextField3.setHorizontalAlignment(javax.swing.JTextField.CENTER);\r\n jTextField3.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jTextField3ActionPerformed(evt);\r\n }\r\n });\r\n jTextField3.addKeyListener(new java.awt.event.KeyAdapter() {\r\n public void keyTyped(java.awt.event.KeyEvent evt) {\r\n jTextField3KeyTyped(evt);\r\n }\r\n });\r\n getContentPane().add(jTextField3, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 130, 510, 30));\r\n\r\n jTextField4.setHorizontalAlignment(javax.swing.JTextField.CENTER);\r\n jTextField4.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jTextField4ActionPerformed(evt);\r\n }\r\n });\r\n jTextField4.addKeyListener(new java.awt.event.KeyAdapter() {\r\n public void keyTyped(java.awt.event.KeyEvent evt) {\r\n jTextField4KeyTyped(evt);\r\n }\r\n });\r\n getContentPane().add(jTextField4, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 290, 250, 30));\r\n\r\n jTextField5.setHorizontalAlignment(javax.swing.JTextField.CENTER);\r\n jTextField5.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jTextField5ActionPerformed(evt);\r\n }\r\n });\r\n jTextField5.addKeyListener(new java.awt.event.KeyAdapter() {\r\n public void keyTyped(java.awt.event.KeyEvent evt) {\r\n jTextField5KeyTyped(evt);\r\n }\r\n });\r\n getContentPane().add(jTextField5, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 340, 250, 30));\r\n\r\n jTextField6.setHorizontalAlignment(javax.swing.JTextField.CENTER);\r\n jTextField6.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jTextField6ActionPerformed(evt);\r\n }\r\n });\r\n getContentPane().add(jTextField6, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 400, 250, 30));\r\n\r\n jTextField7.setHorizontalAlignment(javax.swing.JTextField.CENTER);\r\n jTextField7.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jTextField7ActionPerformed(evt);\r\n }\r\n });\r\n jTextField7.addKeyListener(new java.awt.event.KeyAdapter() {\r\n public void keyTyped(java.awt.event.KeyEvent evt) {\r\n jTextField7KeyTyped(evt);\r\n }\r\n });\r\n getContentPane().add(jTextField7, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 180, 250, 30));\r\n\r\n jTextField8.setHorizontalAlignment(javax.swing.JTextField.CENTER);\r\n jTextField8.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jTextField8ActionPerformed(evt);\r\n }\r\n });\r\n jTextField8.addKeyListener(new java.awt.event.KeyAdapter() {\r\n public void keyTyped(java.awt.event.KeyEvent evt) {\r\n jTextField8KeyTyped(evt);\r\n }\r\n });\r\n getContentPane().add(jTextField8, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 230, 250, 30));\r\n\r\n jButton2.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\r\n jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Imagenes/add-icon.png\"))); // NOI18N\r\n jButton2.setBorderPainted(false);\r\n jButton2.setContentAreaFilled(false);\r\n jButton2.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jButton2ActionPerformed(evt);\r\n }\r\n });\r\n getContentPane().add(jButton2, new org.netbeans.lib.awtextra.AbsoluteConstraints(140, 540, 70, 80));\r\n\r\n jButton3.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\r\n jButton3.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Imagenes/edit_60_328965.png\"))); // NOI18N\r\n jButton3.setBorderPainted(false);\r\n jButton3.setContentAreaFilled(false);\r\n jButton3.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jButton3ActionPerformed(evt);\r\n }\r\n });\r\n getContentPane().add(jButton3, new org.netbeans.lib.awtextra.AbsoluteConstraints(250, 550, 80, 70));\r\n\r\n jButton4.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\r\n jButton4.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Imagenes/delete_action_discard.png\"))); // NOI18N\r\n jButton4.setBorderPainted(false);\r\n jButton4.setContentAreaFilled(false);\r\n jButton4.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jButton4ActionPerformed(evt);\r\n }\r\n });\r\n getContentPane().add(jButton4, new org.netbeans.lib.awtextra.AbsoluteConstraints(350, 550, 70, 70));\r\n\r\n lbhora.setFont(new java.awt.Font(\"SansSerif\", 1, 24)); // NOI18N\r\n lbhora.setForeground(new java.awt.Color(240, 240, 240));\r\n lbhora.setText(\"00:00:00\");\r\n getContentPane().add(lbhora, new org.netbeans.lib.awtextra.AbsoluteConstraints(1180, 10, -1, 44));\r\n\r\n jButton5.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Imagenes/logout.png\"))); // NOI18N\r\n jButton5.setBorder(null);\r\n jButton5.setBorderPainted(false);\r\n jButton5.setContentAreaFilled(false);\r\n jButton5.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jButton5ActionPerformed(evt);\r\n }\r\n });\r\n getContentPane().add(jButton5, new org.netbeans.lib.awtextra.AbsoluteConstraints(1280, 10, -1, -1));\r\n\r\n jLabel8.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\r\n jLabel8.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Imagenes/giphy.gif\"))); // NOI18N\r\n getContentPane().add(jLabel8, new org.netbeans.lib.awtextra.AbsoluteConstraints(1110, 90, -1, -1));\r\n\r\n jButton6.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Imagenes/CLEAN-AIR-ICON2.png\"))); // NOI18N\r\n jButton6.setBorderPainted(false);\r\n jButton6.setContentAreaFilled(false);\r\n jButton6.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jButton6ActionPerformed(evt);\r\n }\r\n });\r\n getContentPane().add(jButton6, new org.netbeans.lib.awtextra.AbsoluteConstraints(430, 550, -1, -1));\r\n\r\n jLabel9.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Imagenes/fondo gris.jpg\"))); // NOI18N\r\n getContentPane().add(jLabel9, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 1350, 760));\r\n\r\n jMenuBar1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, \"PLANTAS\", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Tahoma\", 1, 12))); // NOI18N\r\n\r\n jMenu1.setText(\"CAPTURA DE DATOS\");\r\n jMenu1.setFont(new java.awt.Font(\"Segoe UI\", 1, 12)); // NOI18N\r\n\r\n jMenuItem4.setFont(new java.awt.Font(\"Segoe UI\", 1, 12)); // NOI18N\r\n jMenuItem4.setText(\"CLIENTES\");\r\n jMenuItem4.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jMenuItem4ActionPerformed(evt);\r\n }\r\n });\r\n jMenu1.add(jMenuItem4);\r\n\r\n jMenuItem5.setFont(new java.awt.Font(\"Segoe UI\", 1, 12)); // NOI18N\r\n jMenuItem5.setText(\"USUARIOS\");\r\n jMenuItem5.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jMenuItem5ActionPerformed(evt);\r\n }\r\n });\r\n jMenu1.add(jMenuItem5);\r\n\r\n jMenuBar1.add(jMenu1);\r\n\r\n jMenu2.setText(\"PRODUCTOS\");\r\n jMenu2.setFont(new java.awt.Font(\"Segoe UI\", 1, 12)); // NOI18N\r\n\r\n jMenuItem9.setFont(new java.awt.Font(\"Segoe UI\", 1, 12)); // NOI18N\r\n jMenuItem9.setText(\"COMPONENTES\");\r\n jMenuItem9.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jMenuItem9ActionPerformed(evt);\r\n }\r\n });\r\n jMenu2.add(jMenuItem9);\r\n\r\n jMenuItem10.setFont(new java.awt.Font(\"Segoe UI\", 1, 12)); // NOI18N\r\n jMenuItem10.setText(\"MATERIALES\");\r\n jMenuItem10.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jMenuItem10ActionPerformed(evt);\r\n }\r\n });\r\n jMenu2.add(jMenuItem10);\r\n\r\n jMenuItem11.setFont(new java.awt.Font(\"Segoe UI\", 1, 12)); // NOI18N\r\n jMenuItem11.setText(\"FORMULA\");\r\n jMenuItem11.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jMenuItem11ActionPerformed(evt);\r\n }\r\n });\r\n jMenu2.add(jMenuItem11);\r\n\r\n jMenuItem13.setFont(new java.awt.Font(\"Segoe UI\", 1, 12)); // NOI18N\r\n jMenuItem13.setText(\"PROCESO\");\r\n jMenuItem13.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jMenuItem13ActionPerformed(evt);\r\n }\r\n });\r\n jMenu2.add(jMenuItem13);\r\n\r\n jMenuItem14.setFont(new java.awt.Font(\"Segoe UI\", 1, 12)); // NOI18N\r\n jMenuItem14.setText(\"OPB\");\r\n jMenuItem14.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jMenuItem14ActionPerformed(evt);\r\n }\r\n });\r\n jMenu2.add(jMenuItem14);\r\n\r\n jMenuBar1.add(jMenu2);\r\n\r\n jMenu3.setText(\"PRODUCCION\");\r\n jMenu3.setFont(new java.awt.Font(\"Segoe UI\", 1, 12)); // NOI18N\r\n\r\n jMenuItem15.setFont(new java.awt.Font(\"Segoe UI\", 1, 12)); // NOI18N\r\n jMenuItem15.setText(\"ORDENES\");\r\n jMenuItem15.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jMenuItem15ActionPerformed(evt);\r\n }\r\n });\r\n jMenu3.add(jMenuItem15);\r\n\r\n jMenuItem16.setFont(new java.awt.Font(\"Segoe UI\", 1, 12)); // NOI18N\r\n jMenuItem16.setText(\"OPERACION\");\r\n jMenu3.add(jMenuItem16);\r\n\r\n jMenuItem17.setFont(new java.awt.Font(\"Segoe UI\", 1, 12)); // NOI18N\r\n jMenuItem17.setText(\"DATOS DESPUES DE LA OPERACION\");\r\n jMenu3.add(jMenuItem17);\r\n\r\n jMenuBar1.add(jMenu3);\r\n\r\n jMenu4.setText(\"REPORTES\");\r\n jMenu4.setFont(new java.awt.Font(\"Segoe UI\", 1, 12)); // NOI18N\r\n jMenuBar1.add(jMenu4);\r\n\r\n setJMenuBar(jMenuBar1);\r\n\r\n pack();\r\n }",
"private void initComponents() {//GEN-BEGIN:initComponents\n\n FormListener formListener = new FormListener();\n\n addMouseListener(formListener);\n\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n addSponsorLogoLabel = new javax.swing.JLabel();\n addSponsorLabel = new javax.swing.JLabel();\n addSponsorNameInput = new javax.swing.JTextField();\n addSponsorNameLabel = new javax.swing.JLabel();\n addSponsorFnameInput = new javax.swing.JTextField();\n addSponsorFnameLabel = new javax.swing.JLabel();\n addSponsorLnameInput = new javax.swing.JTextField();\n addSponsorLnameLabel = new javax.swing.JLabel();\n addSponsorPhoneInput = new javax.swing.JTextField();\n addSponsorPhoneLabel = new javax.swing.JLabel();\n addSponsorPledgeInput = new javax.swing.JTextField();\n addSponsorPledgeLabel = new javax.swing.JLabel();\n addSponsorBackButton = new javax.swing.JButton();\n addSponsorSubmitButton = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jPanel1.setBackground(new java.awt.Color(255, 255, 255));\n\n addSponsorLogoLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/eventplanner/horizonlogoTiny.png\"))); // NOI18N\n\n addSponsorLabel.setFont(new java.awt.Font(\"Dialog\", 1, 48)); // NOI18N\n addSponsorLabel.setText(\"Add Sponsor\");\n\n addSponsorNameLabel.setText(\"Name of Sponsor:\");\n\n addSponsorFnameLabel.setText(\"First Name:\");\n\n addSponsorLnameLabel.setText(\"Last Name:\");\n\n addSponsorPhoneLabel.setText(\"Phone:\");\n\n addSponsorPledgeLabel.setText(\"Pledge:\");\n\n addSponsorBackButton.setFont(new java.awt.Font(\"Dialog\", 1, 18)); // NOI18N\n addSponsorBackButton.setText(\"Back\");\n addSponsorBackButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n addSponsorBackButtonActionPerformed(evt);\n }\n });\n\n addSponsorSubmitButton.setFont(new java.awt.Font(\"Dialog\", 1, 18)); // NOI18N\n addSponsorSubmitButton.setText(\"Submit\");\n addSponsorSubmitButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n addSponsorSubmitButtonActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()\n .addGap(71, 71, 71)\n .addComponent(addSponsorLabel)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(addSponsorLogoLabel))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()\n .addGap(143, 143, 143)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(addSponsorNameLabel)\n .addComponent(addSponsorFnameLabel)\n .addComponent(addSponsorLnameLabel)\n .addComponent(addSponsorPhoneLabel)\n .addComponent(addSponsorPledgeLabel))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(addSponsorNameInput, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(addSponsorFnameInput, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(addSponsorLnameInput, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(addSponsorPhoneInput, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(addSponsorPledgeInput, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()\n .addGap(152, 152, 152)\n .addComponent(addSponsorSubmitButton)\n .addGap(33, 33, 33)\n .addComponent(addSponsorBackButton)))\n .addGap(0, 0, Short.MAX_VALUE)))\n .addGap(42, 42, 42))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(addSponsorLogoLabel))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(41, 41, 41)\n .addComponent(addSponsorLabel)\n .addGap(29, 29, 29)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(addSponsorNameLabel)\n .addComponent(addSponsorNameInput, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(10, 10, 10)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(addSponsorFnameInput, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(addSponsorFnameLabel))))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(addSponsorLnameInput, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(addSponsorLnameLabel))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(addSponsorPhoneInput, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(addSponsorPhoneLabel))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(addSponsorPledgeInput, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(addSponsorPledgeLabel))\n .addGap(28, 28, 28)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(addSponsorSubmitButton)\n .addComponent(addSponsorBackButton))\n .addContainerGap(47, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n );\n\n pack();\n }",
"public ProgramForm() {\n setLookAndFeel();\n initComponents();\n }",
"public RadioUI()\n {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n businessNameJLabel = new javax.swing.JLabel();\n enterpriseNameJLabel = new javax.swing.JLabel();\n networkNameJLabel = new javax.swing.JLabel();\n jSeparator1 = new javax.swing.JSeparator();\n organizationNameJLabel = new javax.swing.JLabel();\n jSeparator2 = new javax.swing.JSeparator();\n titleJLabel = new javax.swing.JLabel();\n drugNameJLabel = new javax.swing.JLabel();\n drugNameJTextField = new javax.swing.JTextField();\n backJButton = new javax.swing.JButton();\n addToCatalogJButton = new javax.swing.JButton();\n statusJLabel = new javax.swing.JLabel();\n statusJTextField = new javax.swing.JTextField();\n\n businessNameJLabel.setFont(new java.awt.Font(\"Times New Roman\", 1, 20)); // NOI18N\n businessNameJLabel.setText(\"Drug Tracking System\");\n\n enterpriseNameJLabel.setFont(new java.awt.Font(\"Times New Roman\", 1, 20)); // NOI18N\n enterpriseNameJLabel.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);\n enterpriseNameJLabel.setMinimumSize(new java.awt.Dimension(170, 24));\n enterpriseNameJLabel.setPreferredSize(new java.awt.Dimension(170, 24));\n\n networkNameJLabel.setFont(new java.awt.Font(\"Times New Roman\", 1, 20)); // NOI18N\n networkNameJLabel.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n networkNameJLabel.setMaximumSize(new java.awt.Dimension(195, 24));\n networkNameJLabel.setMinimumSize(new java.awt.Dimension(195, 24));\n networkNameJLabel.setPreferredSize(new java.awt.Dimension(195, 24));\n\n organizationNameJLabel.setFont(new java.awt.Font(\"Times New Roman\", 1, 20)); // NOI18N\n organizationNameJLabel.setMinimumSize(new java.awt.Dimension(170, 24));\n organizationNameJLabel.setPreferredSize(new java.awt.Dimension(190, 24));\n\n titleJLabel.setFont(new java.awt.Font(\"Times New Roman\", 1, 26)); // NOI18N\n titleJLabel.setText(\"Drug Details\");\n\n drugNameJLabel.setFont(new java.awt.Font(\"Times New Roman\", 0, 16)); // NOI18N\n drugNameJLabel.setText(\"Drug Name\");\n\n drugNameJTextField.setEditable(false);\n drugNameJTextField.setFont(new java.awt.Font(\"Times New Roman\", 0, 13)); // NOI18N\n drugNameJTextField.setMinimumSize(new java.awt.Dimension(120, 26));\n drugNameJTextField.setPreferredSize(new java.awt.Dimension(120, 26));\n\n backJButton.setFont(new java.awt.Font(\"Times New Roman\", 1, 15)); // NOI18N\n backJButton.setText(\"Back\");\n backJButton.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n backJButton.setPreferredSize(new java.awt.Dimension(80, 30));\n backJButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n backJButtonActionPerformed(evt);\n }\n });\n\n addToCatalogJButton.setFont(new java.awt.Font(\"Times New Roman\", 1, 15)); // NOI18N\n addToCatalogJButton.setText(\"Add To Catalog\");\n addToCatalogJButton.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n addToCatalogJButton.setEnabled(false);\n addToCatalogJButton.setPreferredSize(new java.awt.Dimension(80, 30));\n addToCatalogJButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n addToCatalogJButtonActionPerformed(evt);\n }\n });\n\n statusJLabel.setFont(new java.awt.Font(\"Times New Roman\", 0, 16)); // NOI18N\n statusJLabel.setText(\"Status\");\n\n statusJTextField.setEditable(false);\n statusJTextField.setFont(new java.awt.Font(\"Times New Roman\", 0, 13)); // NOI18N\n statusJTextField.setMinimumSize(new java.awt.Dimension(120, 26));\n statusJTextField.setPreferredSize(new java.awt.Dimension(120, 26));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jSeparator1, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jSeparator2)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(organizationNameJLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 322, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(businessNameJLabel)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(enterpriseNameJLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 190, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 211, Short.MAX_VALUE)\n .addComponent(networkNameJLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap())\n .addGroup(layout.createSequentialGroup()\n .addGap(273, 273, 273)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(47, 47, 47)\n .addComponent(titleJLabel))\n .addGroup(layout.createSequentialGroup()\n .addGap(12, 12, 12)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(statusJLabel)\n .addGap(18, 18, 18)\n .addComponent(statusJTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(drugNameJLabel)\n .addGap(18, 18, 18)\n .addComponent(drugNameJTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(backJButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(addToCatalogJButton, javax.swing.GroupLayout.PREFERRED_SIZE, 139, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(311, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(businessNameJLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(enterpriseNameJLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(networkNameJLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(organizationNameJLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(titleJLabel)\n .addGap(75, 75, 75)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(drugNameJLabel)\n .addComponent(drugNameJTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(statusJLabel)\n .addComponent(statusJTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(33, 33, 33)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(backJButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(addToCatalogJButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(201, Short.MAX_VALUE))\n );\n }",
"public INFORMACION() {\n initComponents();\n this.setLocationRelativeTo(null); \n }",
"public ScheduleForm() {\n initComponents();\n }",
"public GUIForm() {\n initComponents();\n inputField.setText(NO_FILE_SELECTED);\n outputField.setText(NO_FILE_SELECTED);\n progressLabel.setBackground(INFO);\n progressLabel.setText(SELECT_FILE);\n }",
"@SuppressWarnings(\"unchecked\")\r\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\"> \r\n private void initComponents() {\r\n \r\n setBorder(javax.swing.BorderFactory.createCompoundBorder(javax.swing.BorderFactory.createLineBorder(Color.black), javax.swing.BorderFactory.createBevelBorder(BevelBorder.LOWERED)));\r\n \r\n setEnabled(false);\r\n\r\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\r\n this.setLayout(layout);\r\n layout.setHorizontalGroup(\r\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGap(0, 396, Short.MAX_VALUE));\r\n layout.setVerticalGroup(\r\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGap(0, 324, Short.MAX_VALUE));\r\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\"> \n private void initComponents() {\n\n addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n mouseClickedHandler(evt);\n }\n public void mouseExited(java.awt.event.MouseEvent evt) {\n mouseExitedHandler(evt);\n }\n public void mouseEntered(java.awt.event.MouseEvent evt) {\n mouseEnteredHandler(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }",
"public intrebarea() {\n initComponents();\n }"
] | [
"0.73927325",
"0.73927325",
"0.73927325",
"0.73527867",
"0.73327756",
"0.7330915",
"0.7296258",
"0.72668505",
"0.7226472",
"0.7215484",
"0.7158576",
"0.7155756",
"0.7151662",
"0.71413606",
"0.7136848",
"0.71340644",
"0.7121264",
"0.7120699",
"0.7114474",
"0.7111952",
"0.70889324",
"0.70867527",
"0.70650804",
"0.70584124",
"0.70338666",
"0.7031719",
"0.7023489",
"0.70230204",
"0.7018633",
"0.7012269",
"0.7004752",
"0.6966102",
"0.69610566",
"0.695966",
"0.6958411",
"0.6958283",
"0.6958283",
"0.69522756",
"0.6951526",
"0.6939627",
"0.69343084",
"0.6930311",
"0.69300324",
"0.69284606",
"0.6925568",
"0.692342",
"0.69184095",
"0.6916792",
"0.69164723",
"0.6912189",
"0.6912189",
"0.6912189",
"0.69086766",
"0.69053715",
"0.69003075",
"0.68973625",
"0.68964475",
"0.68964475",
"0.68964475",
"0.68964475",
"0.68964475",
"0.68964475",
"0.68964475",
"0.68964475",
"0.68964475",
"0.68964475",
"0.68964475",
"0.68964475",
"0.68964475",
"0.68957925",
"0.6893076",
"0.6888011",
"0.6888011",
"0.6888011",
"0.6888011",
"0.6888011",
"0.6888011",
"0.6888011",
"0.6888011",
"0.6888011",
"0.68865407",
"0.68837833",
"0.68730825",
"0.68729067",
"0.68693084",
"0.6863504",
"0.68605775",
"0.68556887",
"0.685328",
"0.68497145",
"0.6849343",
"0.6847577",
"0.6840183",
"0.6839656",
"0.6839526",
"0.6830273",
"0.68295836",
"0.68259466",
"0.68188006",
"0.6817024",
"0.68132985"
] | 0.0 | -1 |
Default constructor to instantiate Product. | public Product()
{
this.name = "";
this.price = 0.0;
this.imported = false;
this.quantity = 0;
this.taxedCost = 0.0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Product() {}",
"public Product() { }",
"public Product() { }",
"public Product() {\n\t}",
"public Product() {\n }",
"public Product() {\n }",
"protected Product() {\n\t\t\n\t}",
"protected Product()\n\t{\n\t}",
"public SuperProduct() {\n\t\tsuper();\n\t}",
"public Producto (){\n\n }",
"public Producto() {\r\n }",
"public Product(){\n // Default constructor required for calls to DataSnapshot.getValue(Product.class)\n }",
"public Product() {\n\t\tthis.name = \"\";\n\t\tthis.price = 0;\n\t\tthis.quantity = 0;\n\t}",
"public CartProduct() {\n }",
"public Productos() {\n super();\n // TODO Auto-generated constructor stub\n }",
"public Product() { \n initComponents();\n table();\n \n }",
"public PantryProducts() {\n this(DSL.name(\"pantry_products\"), null);\n }",
"public ProductFruit() {\r\n }",
"public ProductDecorator() {}",
"Product()\r\n\t{\r\n\t\tSystem.out.println(\"\");\r\n\t}",
"public Product Product() {\n return null;\n }",
"public ProductImp() {\n insert(new Product(\"hammer\", 9.99));\n insert(new Product(\"screwdriver\", 9.99));\n insert(new Product(\"drill\", 19.99));\n }",
"public ProductManager() {\n\t\tsuper();\n\t\ttotalQuantity = 0;\n\t\tcategoryList = new HashMap<Integer, ArrayList>();\n\t\tavailableProducts = new HashMap<String, String>();\n\t}",
"public Product(String name) {\n setName(name);\n setProductionNumber(currentProductionNumber);\n\n // Increment current production number in loop\n currentProductionNumber++;\n manufacturer = MANUFACTURER;\n manufacturedOn = new Date();\n }",
"public ProductCode() {\n }",
"public ProductResource() {\n }",
"public Product(Name productName, int productQuantity) {\n this.productName = productName;\n this.productQuantity = productQuantity;\n }",
"public ProductosBean() {\r\n }",
"public Producto() {\r\n\t\tsuper();\r\n\t\tID = getIDnuevoProducto();\r\n\t\tnombre = \"\";\r\n\t\tvendedor = \"\";\r\n\t\tprecio = 0;\r\n\t\tcantidad = 0;\r\n\t\tenVenta = false;\r\n\t\tdescripcion = \"\";\r\n\t\tcategorias = new Categoria();\r\n\t\tcaracteristicas = null;//TODO CORREGIR\r\n\t}",
"public product() {\n initComponents();\n }",
"public Product(String name, double price) {\r\n this.name = name;\r\n this.price = price;\r\n quantity = 0;\r\n }",
"public addproduct() {\n\t\tsuper();\n\t}",
"public ProductContainerImpl()\r\n {\r\n assert(true);\r\n groups = new TreeSet<ChangableProductContainer>();\r\n products = new TreeSet<ProductBarcode>();\r\n ID = BarcodeGenerator.instance().generatePCID();\r\n }",
"public Product createProduct() {\n\t\tProduct prod = new Product();\n\t\tprod.setProdId(this.getProdId());\n\t\tprod.setProductName(this.getProductName());\n\t\tprod.setPrice(this.getPrice());\n\t\tprod.setStock(this.getStock());\n\t\tprod.setDescription(this.getDescription());\n\t\tprod.setImage(this.getImage());\n\t\tprod.setSellerId(this.getSellerId());\n\t\tprod.setCategory(this.getCategory());\n\t\tprod.setSubcategory(this.getSubcategory());\n\t\tprod.setProductrating(this.getProductrating());\n\t\treturn prod;\n\t}",
"protected DirectProductNodeModel() {\n\t\tsuper(2, 1);\n\t}",
"public Product(String name, double price, int quantity) {\r\n this.name = name;\r\n this.price = price;\r\n this.quantity = quantity;\r\n }",
"public ShoppingCart() {\n\t\t_items = new ArrayList<Product>();\n\t}",
"public Product(String productName, float price, int quantity, String supplierName, String supplierPhone) {\n this.productName = productName;\n mProductPrice = price;\n productQuantity = quantity;\n this.supplierName = supplierName;\n this.supplierPhone = supplierPhone;\n }",
"public ProductController()\n {\n listOfProduct = new ArrayList<Product>();\n listOfOrder = new ArrayList<Order>();\n aCart = new ShoppingCart();\n }",
"public ProductIndexQuery() {\n\t}",
"public ProductDAO() {\n }",
"@Bean(name = \"product\")\n\tpublic Product getProduct() {\n\t\treturn new Product(\"C0001\", \"테스트\", 1000); // Constructor Injection\n\t}",
"public Products(){\n services = new LinkedHashMap<>();\n\n //Setting up products\n services.put(\"Consultation\", 30.0);\n services.put(\"Special Acupuncture Treatment\", 80.0);\n services.put(\"Medical Machine Therapy\", 30.0);\n services.put(\"Tapping Treatment\", 25.0);\n\n //Initializing the counter\n numCounter = services.size()+1;\n }",
"Product(String name, int quantity, double price, double totalCost) {\n this.name = name;\n this.quantity = quantity;\n this.price = price;\n this.totalCost = totalCost;\n }",
"public ProductoNoElaborado() {\n\t\t// TODO Auto-generated constructor stub\n\t}",
"public ProductTestReport() {}",
"public ProductoA2() {\n\t\tSystem.out.println(\"Hola yo soy el producto A2\");\n\t\t\n\t}",
"@Override\r\n\tpublic Product factory() {\n\t\treturn new ConcreteProduct2();\r\n\t}",
"public ProductsVOClient() {\r\n }",
"public Cart() {\n\t}",
"@Override\n public void initialize() {\n this.product = new Product(this.productId,this.productName,this.productPrice,this.productInv,this.productMin,this.productMax);\n productTitleLabel.setText(\"Modify Product\");\n }",
"public GetProductoSrv() {\n\t\tsuper();\n\t\tinitializer();\n\t}",
"@Override\n public Productor getProductor() {\n return new ProductorImp1();\n }",
"public GoodsSpecProduct() {\n this(DSL.name(\"b2c_goods_spec_product\"), null);\n }",
"public Product(int productID, String productName, double costPrice, double sellingPrice, String productDescription, int amountInStock, int minimumStock) {\r\n this.productID = productID;\r\n this.productName = productName;\r\n this.costPrice = costPrice;\r\n this.sellingPrice = sellingPrice;\r\n this.productDescription = productDescription;\r\n this.amountInStock = amountInStock;\r\n this.minimumStock = minimumStock;\r\n \r\n }",
"public ProductBeans() {\n \n services = BeanHelper.getService();\n list = services.listOfProducts();\n\n }",
"public Product(String name) {\n setProductionNumber(currentProductionNumber);\n this.name = name;\n this.serialNumber = currentProductionNumber;\n this.manufacturedOn = new java.util.Date();\n }",
"public Product(String name, double price, int quantity) {\n\t\tthis.name=name;\n\t\tthis.price=price;\n\t\tthis.quantity=quantity;\n\t\t\n\t}",
"public ProductoRepository() {}",
"public Product build() {\n Product product = new Product();\n product.product_id = this.product_id;\n product.product_name = this.product_name;\n product.price = this.price;\n product.in_stock = this.in_stock;\n product.amount = this.amount;\n product.ordered_amount = this.ordered_amount;\n product.order_price = this.order_price;\n\n return product;\n }",
"public Product(String code, String name) {\n this.code = code;\n this.name = name;\n }",
"public ProductAdapter(Context context, List<Product> products){\n super(context, -1, products);\n this.products = products;\n\n }",
"public ProductOverviewController() {\n }",
"public ProductImpl(ActivationID id, MarshalledObject data) \n throws RemoteException, IOException, ClassNotFoundException\n { \n super(id, 0);\n name = (String) data.get();\n System.out.println(\"Constructed \" + name);\n }",
"public ProductCreate() {\n initComponents();\n }",
"public Cart() {\r\n\t\tSystem.out.println(\"in ctor of cart\");\r\n\t}",
"public CrearProductos() {\n initComponents();\n }",
"public Product(String productName, double productPrice) {\n this.productName = productName;\n this.productPrice = productPrice;\n this.createDate = LocalDate.now();\n this.stockVolume = getStockNumber();\n }",
"private Productos(int codigo, String descripcion, double precio) {\n this.codigo = codigo;\n this.descripcion = descripcion;\n this.precio = precio;\n }",
"public CartProduct(int cartId, int uId, int cartQuantity, int pId, String pName, String pImage, double pPrice, int pWeight, String pDescription, int pQuantity, String pCreateDate) {\n this.cartId = cartId;\n this.uId = uId;\n this.cartQuantity = cartQuantity;\n this.pId = pId;\n this.pName = pName;\n this.pImage = pImage;\n this.pPrice = pPrice;\n this.pWeight = pWeight;\n this.pDescription = pDescription;\n this.pQuantity = pQuantity;\n this.pCreateDate = pCreateDate;\n }",
"private void initialize() {\r\n //Below are for testing purposes\r\n this.addProductQuantity(new Product(\"1984\", 1, 1.99), 10);\r\n this.addProductQuantity(new Product(\"The Great Gatsby\", 2, 2.45), 25);\r\n this.addProductQuantity(new Product(\"Silent Spring\", 3, 1.86), 3);\r\n this.addProductQuantity(new Product(\"A Room of One's Own\", 4, 3.75), 15);\r\n this.addProductQuantity(new Product(\"Catcher in The Rye\", 5, 2.89), 11);\r\n this.addProductQuantity(new Product(\"The Code Breaker\", 6, 2.50), 26);\r\n this.addProductQuantity(new Product(\"Crime and Punishment\", 7, 2.75), 1);\r\n this.addProductQuantity(new Product(\"Moby Dick\", 8, 2.50), 13);\r\n this.addProductQuantity(new Product(\"The Sixth Extinction\", 9, 3.10), 10);\r\n }",
"public ProductListContract() {}",
"ProductInventory()\n\t{\n\n\t\t// Initialize the Product Inventory Array List\n\t\tmyProductInventory = new ArrayList<Product>();\n\n\t}",
"private Catalog() {\r\n }",
"public static ProductBuilder builder() {\n return ProductBuilder.of();\n }",
"public ShopArticle() {\r\n\t\tsuper();\r\n\t}",
"public PantryProducts(Name alias) {\n this(alias, PANTRY_PRODUCTS);\n }",
"public Product(Name productName, int productQuantity, Set<Tag> productTags) {\n this.productName = productName;\n this.productQuantity = productQuantity;\n this.productTags.addAll(productTags);\n }",
"public ProductoAbm() {\n initComponents();\n }",
"public Product(Name productName, Set<Tag> productTags) {\n this.productName = productName;\n this.productQuantity = 0;\n this.productTags.addAll(productTags);\n }",
"public AdmAddProduct() {\n initComponents();\n }",
"void create(Product product) throws IllegalArgumentException;",
"public abstract Product productFactory(String type);",
"public UpdateProduct() {\n\t\tsuper();\t\t\n\t}",
"ProductUnit() {\n _elements = new Element[0];\n }",
"public Producto(Producto p) {\r\n\t\tsuper();\r\n\t\tID = getIDnuevoProducto();\r\n\t\tsetNombre(p.getNombre());\r\n\t\tsetCantidad(p.getCantidad());\r\n\t\tsetEnVenta(p.isEnVenta());\r\n\t\tsetCaracteristicas(p.getCaracteristicas());\r\n\t\tsetCategoria(p.getCategoria());\r\n\t\tsetDescripcion(p.getDescripcion());\r\n\t\tsetPrecio(p.getPrecio());\r\n\t\tsetVendedor(p.getVendedor());\r\n\t}",
"public ProductLocation() {\n }",
"public static Product createProduct(String type) {\n\n if (type.equals(\"A\")) {\n return new ConctreteProductA();\n }\n\n if (type.equals(\"B\")) {\n return new ConctreteProductB();\n }\n\n throw new UnsupportedOperationException(\"The type: \" + type + \" is incorrect!\");\n }",
"public Product(String categeory, String name, String description,int productSize, int packQuantity,\n double cost, double price, Business manufacturer) {\n this(categeory,name,description,packQuantity,cost,price,manufacturer);\n setProductSizeUnit(categeory); \n }",
"protected Product(Parcel in) {\r\n quantity = in.readInt();\r\n name = in.readString();\r\n checked = in.readByte() != 0;\r\n }",
"private static void createProducts() {\n productRepository.addProduct(Product.builder()\n .name(\"Milk\")\n .barcode(new Barcode(\"5900017304007\"))\n .price(new BigDecimal(2.90))\n .build()\n );\n productRepository.addProduct(Product.builder()\n .name(\"Butter\")\n .barcode(new Barcode(\"5906217041483\"))\n .price(new BigDecimal(4.29))\n .build()\n );\n productRepository.addProduct(Product.builder()\n .name(\"Beer\")\n .barcode(new Barcode(\"5905927001114\"))\n .price(new BigDecimal(2.99))\n .build()\n );\n }",
"public Product(String name, int price, int photoId) {\n this.name = name;\n this.price = price;\n this.profileID = photoId;\n }",
"public Produto() {}",
"private Cart() {\n }",
"public ProductBean(final Instance _prodInst)\n {\n instance = _prodInst;\n }",
"public StockDemo(StockManager manager)\n {\n this.manager = manager;\n \n manager.addProduct(new Product(101, \"Television\"));\n manager.addProduct(new Product(102, \"Android phone\"));\n manager.addProduct(new Product(103, \"Washing machine\"));\n manager.addProduct(new Product(104, \"LED\"));\n manager.addProduct(new Product(105, \"Toshiba Laptop\"));\n manager.addProduct(new Product(106, \"Belkin Router\"));\n manager.addProduct(new Product(107, \"Wi-fi Extender\"));\n manager.addProduct(new Product(108, \"Freezer\"));\n manager.addProduct(new Product(109, \"Microwave\"));\n manager.addProduct(new Product(110, \"Toaster\"));\n }",
"public ProductoCreable newInstance(int codigo, String nombre){\r\n \r\n }",
"public Product(String id, String name, String description) {\n this.id = id;\n this.name = name;\n this.description = description;\n }",
"public InternetProductOption() {\n\t}",
"public InstanciaProductoExample() {\n oredCriteria = new ArrayList<Criteria>();\n }"
] | [
"0.8593474",
"0.85242164",
"0.85242164",
"0.8454821",
"0.8306941",
"0.8306941",
"0.8192195",
"0.8075246",
"0.78782314",
"0.77696526",
"0.77442074",
"0.75234884",
"0.74634624",
"0.745097",
"0.7357728",
"0.72302157",
"0.71901435",
"0.71272314",
"0.7120751",
"0.71077985",
"0.706026",
"0.7057897",
"0.6966224",
"0.6916744",
"0.68945587",
"0.68857276",
"0.680159",
"0.6798893",
"0.6792055",
"0.6721478",
"0.6685337",
"0.66782904",
"0.66771996",
"0.66727954",
"0.6669113",
"0.66545004",
"0.6637046",
"0.6629965",
"0.66295284",
"0.6626176",
"0.6617683",
"0.65960056",
"0.6595399",
"0.65773374",
"0.6514845",
"0.65143764",
"0.65102214",
"0.65074354",
"0.64967644",
"0.64608485",
"0.64581305",
"0.6452911",
"0.6439237",
"0.6434744",
"0.6423544",
"0.6421083",
"0.64205235",
"0.639494",
"0.6393418",
"0.63918287",
"0.638125",
"0.63722837",
"0.6357031",
"0.6348834",
"0.6346331",
"0.6331166",
"0.6330785",
"0.6327366",
"0.6308263",
"0.6307633",
"0.63070655",
"0.630353",
"0.6302353",
"0.6297495",
"0.62939095",
"0.62827235",
"0.6278195",
"0.6272847",
"0.62537456",
"0.62394476",
"0.62202245",
"0.6212139",
"0.6195526",
"0.6193724",
"0.6190364",
"0.61658597",
"0.6163775",
"0.61613363",
"0.61607856",
"0.615734",
"0.6156662",
"0.61520875",
"0.61503273",
"0.61439717",
"0.61295485",
"0.612008",
"0.6114598",
"0.60984176",
"0.60957366",
"0.6092302"
] | 0.7378803 | 14 |
Parameterized constructor to initialize the values of the product attributes. | public Product(String name, double price, boolean imported, int quantity)
{
this.name = name;
this.price = price * quantity;
this.imported = imported;
this.quantity = quantity;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected Product()\n\t{\n\t}",
"protected Product() {\n\t\t\n\t}",
"public Product() {\n\t}",
"public Product() {}",
"public Product() { }",
"public Product() { }",
"public Product()\n\t{\n\t\tthis.name = \"\";\n\t\tthis.price = 0.0;\n\t\tthis.imported = false;\n\t\tthis.quantity = 0;\n\t\tthis.taxedCost = 0.0;\n\t}",
"public Product() {\n }",
"public Product() {\n }",
"@Override\n public void initialize() {\n this.product = new Product(this.productId,this.productName,this.productPrice,this.productInv,this.productMin,this.productMax);\n productTitleLabel.setText(\"Modify Product\");\n }",
"private void initialize() {\r\n //Below are for testing purposes\r\n this.addProductQuantity(new Product(\"1984\", 1, 1.99), 10);\r\n this.addProductQuantity(new Product(\"The Great Gatsby\", 2, 2.45), 25);\r\n this.addProductQuantity(new Product(\"Silent Spring\", 3, 1.86), 3);\r\n this.addProductQuantity(new Product(\"A Room of One's Own\", 4, 3.75), 15);\r\n this.addProductQuantity(new Product(\"Catcher in The Rye\", 5, 2.89), 11);\r\n this.addProductQuantity(new Product(\"The Code Breaker\", 6, 2.50), 26);\r\n this.addProductQuantity(new Product(\"Crime and Punishment\", 7, 2.75), 1);\r\n this.addProductQuantity(new Product(\"Moby Dick\", 8, 2.50), 13);\r\n this.addProductQuantity(new Product(\"The Sixth Extinction\", 9, 3.10), 10);\r\n }",
"public Product() {\n\t\tthis.name = \"\";\n\t\tthis.price = 0;\n\t\tthis.quantity = 0;\n\t}",
"public SuperProduct() {\n\t\tsuper();\n\t}",
"public ConstantProduct() {\n constProperty = \"constant\";\n constProperty2 = \"constant2\";\n }",
"public ProductCode() {\n }",
"public Product(Name productName, int productQuantity) {\n this.productName = productName;\n this.productQuantity = productQuantity;\n }",
"public Producto() {\r\n }",
"public ProductManager() {\n\t\tsuper();\n\t\ttotalQuantity = 0;\n\t\tcategoryList = new HashMap<Integer, ArrayList>();\n\t\tavailableProducts = new HashMap<String, String>();\n\t}",
"public Producto (){\n\n }",
"public Product(){\n // Default constructor required for calls to DataSnapshot.getValue(Product.class)\n }",
"public Product(String name) {\n setName(name);\n setProductionNumber(currentProductionNumber);\n\n // Increment current production number in loop\n currentProductionNumber++;\n manufacturer = MANUFACTURER;\n manufacturedOn = new Date();\n }",
"protected DirectProductNodeModel() {\n\t\tsuper(2, 1);\n\t}",
"public CartProduct() {\n }",
"public ModuleObjectAttributeItem() {}",
"public Product(int productID, String productName, double costPrice, double sellingPrice, String productDescription, int amountInStock, int minimumStock) {\r\n this.productID = productID;\r\n this.productName = productName;\r\n this.costPrice = costPrice;\r\n this.sellingPrice = sellingPrice;\r\n this.productDescription = productDescription;\r\n this.amountInStock = amountInStock;\r\n this.minimumStock = minimumStock;\r\n \r\n }",
"public ProductResource() {\n }",
"public AttributeDiscretization() {\n\n }",
"public Producto() {\r\n\t\tsuper();\r\n\t\tID = getIDnuevoProducto();\r\n\t\tnombre = \"\";\r\n\t\tvendedor = \"\";\r\n\t\tprecio = 0;\r\n\t\tcantidad = 0;\r\n\t\tenVenta = false;\r\n\t\tdescripcion = \"\";\r\n\t\tcategorias = new Categoria();\r\n\t\tcaracteristicas = null;//TODO CORREGIR\r\n\t}",
"public Productos() {\n super();\n // TODO Auto-generated constructor stub\n }",
"public ProductFruit() {\r\n }",
"public Product(String productName, float price, int quantity, String supplierName, String supplierPhone) {\n this.productName = productName;\n mProductPrice = price;\n productQuantity = quantity;\n this.supplierName = supplierName;\n this.supplierPhone = supplierPhone;\n }",
"public Product() { \n initComponents();\n table();\n \n }",
"public ProductSKUInfo(List<SKUAttrInfo> attributes, String cargoNumber, Integer amountOnSale, Double retailPrice, Double price, List<ProductPriceRange> priceRange, String skuCode, Long skuId, String specId) {\n this.attributes = attributes;\n this.cargoNumber = cargoNumber;\n this.amountOnSale = amountOnSale;\n this.retailPrice = retailPrice;\n this.price = price;\n this.priceRange = priceRange;\n this.skuCode = skuCode;\n this.skuId = skuId;\n this.specId = specId;\n }",
"public AttributeContainer() {\n super();\n }",
"public Attributes(int n, int m) {\n\t\tnominalAttributes = new Object[n];\n\t\trealValuedAttributes = new double[m];\n\t}",
"public IRAttribute ( ) {\n\t\tsuper();\n\t}",
"public Products(){\n services = new LinkedHashMap<>();\n\n //Setting up products\n services.put(\"Consultation\", 30.0);\n services.put(\"Special Acupuncture Treatment\", 80.0);\n services.put(\"Medical Machine Therapy\", 30.0);\n services.put(\"Tapping Treatment\", 25.0);\n\n //Initializing the counter\n numCounter = services.size()+1;\n }",
"Product(String name, int quantity, double price, double totalCost) {\n this.name = name;\n this.quantity = quantity;\n this.price = price;\n this.totalCost = totalCost;\n }",
"public CartProduct(int cartId, int uId, int cartQuantity, int pId, String pName, String pImage, double pPrice, int pWeight, String pDescription, int pQuantity, String pCreateDate) {\n this.cartId = cartId;\n this.uId = uId;\n this.cartQuantity = cartQuantity;\n this.pId = pId;\n this.pName = pName;\n this.pImage = pImage;\n this.pPrice = pPrice;\n this.pWeight = pWeight;\n this.pDescription = pDescription;\n this.pQuantity = pQuantity;\n this.pCreateDate = pCreateDate;\n }",
"protected Product(Parcel in) {\r\n quantity = in.readInt();\r\n name = in.readString();\r\n checked = in.readByte() != 0;\r\n }",
"public ProductImpl(ActivationID id, MarshalledObject data) \n throws RemoteException, IOException, ClassNotFoundException\n { \n super(id, 0);\n name = (String) data.get();\n System.out.println(\"Constructed \" + name);\n }",
"public ProductImp() {\n insert(new Product(\"hammer\", 9.99));\n insert(new Product(\"screwdriver\", 9.99));\n insert(new Product(\"drill\", 19.99));\n }",
"public ItemRecord(String itemid, String productid, BigDecimal listprice, BigDecimal unitcost, Integer supplier, String status, String attr1, String attr2, String attr3, String attr4, String attr5) {\n super(Item.ITEM);\n\n set(0, itemid);\n set(1, productid);\n set(2, listprice);\n set(3, unitcost);\n set(4, supplier);\n set(5, status);\n set(6, attr1);\n set(7, attr2);\n set(8, attr3);\n set(9, attr4);\n set(10, attr5);\n }",
"public ProductDecorator() {}",
"public AttributeMap()\r\n\t{\r\n\t\tsuper();\r\n\t}",
"public Product(String name, double price, int quantity) {\r\n this.name = name;\r\n this.price = price;\r\n this.quantity = quantity;\r\n }",
"public Product(String name, double price) {\r\n this.name = name;\r\n this.price = price;\r\n quantity = 0;\r\n }",
"@Test\n public void purchaseCustomConstructor_isCorrect() throws Exception {\n\n int purchaseId = 41;\n int userId = 99;\n int accountId = 6541;\n double price = 99.99;\n String date = \"02/19/2019\";\n String time = \"12:12\";\n String category = \"test category\";\n String location = \"test location\";\n String comment = \"test comment\";\n\n //Create empty purchase\n Purchase purchase = new Purchase(purchaseId, userId, accountId, price, date, time, category, location, comment);\n\n // Verify Values\n assertEquals(purchaseId, purchase.getPurchaseId());\n assertEquals(userId, purchase.getUserId());\n assertEquals(accountId, purchase.getAccountId());\n assertEquals(price, purchase.getPrice(), 0);\n assertEquals(date, purchase.getDate());\n assertEquals(time, purchase.getTime());\n assertEquals(category, purchase.getCategory());\n assertEquals(location, purchase.getLocation());\n assertEquals(comment, purchase.getComment());\n }",
"public Attr() {\n\t\t\tsuper();\n\t\t}",
"OrderedProduct(int quantity, String prodCode, String prodName, int prodSize, String prodVariety,\n double prodPrice) {\n this.quantity = quantity;\n this.prodCode = prodCode;\n this.prodName = prodName;\n this.prodSize = prodSize;\n this.prodVariety = prodVariety;\n this.prodPrice = prodPrice;\n }",
"public Product(Long idIn, String nameIn, String productClassIn, Boolean freeIn, Boolean baseIn) {\n id = idIn;\n name = nameIn;\n productClass = productClassIn;\n free = freeIn;\n base = baseIn;\n }",
"private void initialize() {\nproductCatalog.add(new ProductStockPair(new Product(100.0, \"SYSC2004\", 0), 76));\nproductCatalog.add(new ProductStockPair(new Product(55.0, \"SYSC4906\", 1), 0));\nproductCatalog.add(new ProductStockPair(new Product(45.0, \"SYSC2006\", 2), 32));\nproductCatalog.add(new ProductStockPair(new Product(35.0, \"MUSI1001\", 3), 3));\nproductCatalog.add(new ProductStockPair(new Product(0.01, \"CRCJ1000\", 4), 12));\nproductCatalog.add(new ProductStockPair(new Product(25.0, \"ELEC4705\", 5), 132));\nproductCatalog.add(new ProductStockPair(new Product(145.0, \"SYSC4907\", 6), 322));\n}",
"public Attribute(String name, int metricFactor, int priority){\n this.name = name;\n this.maxOccurance = 0;\n this.metric = 0.0;\n subGrps = new Vector<SubGroup>();\n this.maxSubGroups = new Vector<SubGroup>();\n this.metricFactor = metricFactor;\n this.priority = priority;\n this.isDominating = true;\n}",
"private Productos(int codigo, String descripcion, double precio) {\n this.codigo = codigo;\n this.descripcion = descripcion;\n this.precio = precio;\n }",
"public ProAddAttrRecord() {\n super(ProAddAttr.PRO_ADD_ATTR);\n }",
"public UpdateProduct() {\n\t\tsuper();\t\t\n\t}",
"public Product(Name productName, int productQuantity, Set<Tag> productTags) {\n this.productName = productName;\n this.productQuantity = productQuantity;\n this.productTags.addAll(productTags);\n }",
"public PotionEffect(PotionEffect paramwq)\r\n/* 35: */ {\r\n/* 36: 44 */ this.id = paramwq.id;\r\n/* 37: 45 */ this.duration = paramwq.duration;\r\n/* 38: 46 */ this.amplifier = paramwq.amplifier;\r\n/* 39: 47 */ this.ambient = paramwq.ambient;\r\n/* 40: 48 */ this.showParticles = paramwq.showParticles;\r\n/* 41: */ }",
"public Weapon ()\r\n\t{\r\n\t\t//no default values for Weapon attributes are set here as the specific weapon type unspecified at super level\r\n\t}",
"public InternetProductOption() {\n\t}",
"public Salmon(String manufacturer, String productName, double price, int minimumAge,\n double weight) {\n super(PRODUCT_TYPE, manufacturer, productName, price, minimumAge, weight);\n }",
"public PcProductpropertyExample() {\n oredCriteria = new ArrayList<Criteria>();\n }",
"public PurchaseOrderItem () {\n\t\tsuper();\n\t}",
"public Product(String name) {\n setProductionNumber(currentProductionNumber);\n this.name = name;\n this.serialNumber = currentProductionNumber;\n this.manufacturedOn = new java.util.Date();\n }",
"public GoodsSpecProduct() {\n this(DSL.name(\"b2c_goods_spec_product\"), null);\n }",
"public product() {\n initComponents();\n }",
"public Product(String code, String name) {\n this.code = code;\n this.name = name;\n }",
"public Supermarket(HashMap productList)\n {\n this.productList = productList;\n }",
"public Product(String categeory, String name, String description,int productSize, int packQuantity,\n double cost, double price, Business manufacturer) {\n this(categeory,name,description,packQuantity,cost,price,manufacturer);\n setProductSizeUnit(categeory); \n }",
"public AttributeForm() \n {\n initComponents();\n mJerseyNumberUpDown.setModel(new SpinnerNumberModel(0,0,99,1));\n \n m_Parser = new InputParser();\n m_Attributes = new JComboBox[8];\n m_Attributes[0] = m_RSBox;\n m_Attributes[1] = m_RPBox;\n m_Attributes[2] = m_MSBox;\n m_Attributes[3] = m_HPBox;\n m_Attributes[4] = m_PS_BC_PI_KABox;\n m_Attributes[5] = m_PC_REC_QU_KABox;\n m_Attributes[6] = m_ACCBox;\n m_Attributes[7] = m_APBBox;\n\n m_SimAttrs = new JSpinner[4];\n m_SimAttrs[0] = m_Sim1UpDown;\n m_SimAttrs[1] = m_Sim2UpDown;\n m_SimAttrs[2] = m_Sim3UpDown;\n m_SimAttrs[3] = m_Sim4UpDown;\n \n m_DoneInit = true;\n setCurrentState(StateEnum.QB);\n \n }",
"@Test\n public void constructorSetsEmptyExtra()\n {\n //act\n ProductInfo actual = new ProductInfo();\n\n //assert\n assertEquals(\"\", Deencapsulation.getField(actual, \"extra\"));\n }",
"public J3DAttribute () {}",
"Product()\r\n\t{\r\n\t\tSystem.out.println(\"\");\r\n\t}",
"public Shampoo(String manufacturer, String productName, double price, int minAge, int unit) {\n super(manufacturer, productName, price, minAge, unit);\n }",
"public ProductoAbm() {\n initComponents();\n }",
"public DiscountProduct(String productCode, String description, int unitPrice, double discountRate) \n\t{\n\t super(productCode, description, unitPrice);\n\t this.discountRate = discountRate;\n\t}",
"public addproduct() {\n\t\tsuper();\n\t}",
"public CustomerPolicyProperties() {\n }",
"public ProductAdapter(Context context, List<Product> products){\n super(context, -1, products);\n this.products = products;\n\n }",
"public Inventory(String kodeWh,String kodeProd,double hargaProd,int jumlahProd){\n this.kodeWh=kodeWh;\n this.kodeProd=kodeProd;\n this.hargaProd=hargaProd;\n this.jumlahProd=jumlahProd;\n }",
"public StockItem(T product, Integer quantity) {\n this.product = product;\n this.quantity = quantity;\n }",
"public ProductionPower(){\n this(0, new NumberOfResources(), new NumberOfResources(), 0, 0);\n }",
"public Sku() {\n\t}",
"public Product(String name, double price, int quantity) {\n\t\tthis.name=name;\n\t\tthis.price=price;\n\t\tthis.quantity=quantity;\n\t\t\n\t}",
"public Item()\r\n\t{\r\n\t\tserialNum = 00000;\r\n\t\tweight = 0.0;\r\n\t}",
"private ProductData(int id, String name, double price) {\n\t\t\tthis.id = id;\n\t\t\tthis.name = name;\n\t\t\tthis.price = price;\n\t\t}",
"public Product(Name productName, Set<Tag> productTags) {\n this.productName = productName;\n this.productQuantity = 0;\n this.productTags.addAll(productTags);\n }",
"public ParamShoppingCartTest(int precio1, int precio2) {\n \n this.precio1 = precio1;\n this.precio2 = precio2; \n }",
"public ProductListContract() {}",
"public BaseParameters(){\r\n\t}",
"public Product(String name, String group){\n \tthis.name = name;\n this.group = group;\n \tbDate = new Date();\n pastEDays = new ArrayList<Integer>();\n pastUDays = new ArrayList<Integer>();\n }",
"ProductInventory()\n\t{\n\n\t\t// Initialize the Product Inventory Array List\n\t\tmyProductInventory = new ArrayList<Product>();\n\n\t}",
"public ProductTestReport() {}",
"public Vending_Machine(ArrayList<Products> p) {\n\t\tproducts = p;\n\t\tcurrentCoin = new CoinSet();\n\t\tcoin = new CoinSet();\n\t}",
"public XxGamVtaUniformsPricesLOVVORowImpl() {\n }",
"public DefaultAttribute( byte[] upId )\n {\n setUpId( upId );\n }",
"ProductType(String name)\n {\n this.name = name;\n }",
"public Identity()\n {\n super( Fields.ARGS );\n }",
"public Producto(double precioCompra, double precioVenta) {\n\t//\tsuper();\n\t\tthis.precioCompra = precioCompra;\n\t\tthis.precioVenta = precioVenta;\n\t}",
"public ProductContainerImpl()\r\n {\r\n assert(true);\r\n groups = new TreeSet<ChangableProductContainer>();\r\n products = new TreeSet<ProductBarcode>();\r\n ID = BarcodeGenerator.instance().generatePCID();\r\n }",
"public Car () {\n\n Make = \"\";\n Model = \"\";\n Year = 2017;\n Price = 0.00;\n }"
] | [
"0.71877086",
"0.7156086",
"0.7058626",
"0.7005337",
"0.6947394",
"0.6947394",
"0.6861748",
"0.68219143",
"0.68219143",
"0.68052053",
"0.66898924",
"0.6684502",
"0.6648674",
"0.6554209",
"0.63630897",
"0.63171273",
"0.6316314",
"0.6282001",
"0.6250334",
"0.62503064",
"0.6228763",
"0.62030524",
"0.61985135",
"0.6193737",
"0.61853373",
"0.6178659",
"0.6168534",
"0.61543244",
"0.6151479",
"0.6130123",
"0.61166626",
"0.610438",
"0.6092979",
"0.60845584",
"0.6072449",
"0.6066722",
"0.6062825",
"0.6056329",
"0.6046202",
"0.6041498",
"0.6015776",
"0.60023427",
"0.5960625",
"0.59548765",
"0.59490865",
"0.59312195",
"0.59109336",
"0.5896249",
"0.5862534",
"0.58597744",
"0.5857163",
"0.5853983",
"0.5850857",
"0.58413535",
"0.5839147",
"0.5830053",
"0.5829784",
"0.58248115",
"0.58233243",
"0.5809368",
"0.58030117",
"0.5802257",
"0.57996964",
"0.5798212",
"0.57799864",
"0.5766674",
"0.57494336",
"0.574787",
"0.57443756",
"0.5739921",
"0.57381105",
"0.5725653",
"0.5723475",
"0.57212216",
"0.5712518",
"0.5710591",
"0.5707829",
"0.57063967",
"0.56962377",
"0.5696174",
"0.56908774",
"0.56819564",
"0.56781864",
"0.5678091",
"0.56763625",
"0.5673638",
"0.56717616",
"0.5667566",
"0.56665105",
"0.56664765",
"0.56661105",
"0.5665849",
"0.56576425",
"0.56549",
"0.565441",
"0.5649269",
"0.56468576",
"0.56381345",
"0.56370014",
"0.56303716",
"0.5623876"
] | 0.0 | -1 |
Gets the name of the product | public String getName()
{
return name;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic String getName() {\n\t\treturn product.getName();\n\t}",
"public String getName(){\n\t\treturn Name; // Return the product's name\n\t}",
"public java.lang.String getProductName () {\r\n\t\treturn productName;\r\n\t}",
"public java.lang.String getProductName() {\n return productName;\n }",
"public String getProductName() {\r\n return productName;\r\n }",
"public String getProductName() {\n return productName;\n }",
"public String getProductName() {\n return productName;\n }",
"public String getProductName() {\n return productName;\n }",
"public String getProductName() {\r\n\t\treturn productName;\r\n\t}",
"public String getProductName(){\n return productRelation.getProductName();\n }",
"public String getProductName() {\n\t\treturn productName;\n\t}",
"public String getNameProd() {\n\t\treturn nameProd;\n\t}",
"public String getProdDetailsName(){\n String prodName = productDetailsName.toString();\n return prodName;\n }",
"@Override\n public String getEISProductName() throws ResourceException {\n return repository.getDescriptor(Repository.REP_NAME_DESC);\n }",
"public java.lang.String getProduct() {\n return product;\n }",
"public String getProdName() {\n\t\treturn prodName;\n\t}",
"public String getProductTypeName() {\r\n return productTypeName;\r\n }",
"String getProduct();",
"private String randomProductName() {\n\n String productName = this.products.get(intRandom(products.size() - 1));\n return productName;\n }",
"public String getProduct() {\r\n return this.product;\r\n }",
"public String getProduct() {\n return product;\n }",
"public String getProduct() {\n return product;\n }",
"public String getProduct() {\n return this.product;\n }",
"public String product() {\n return this.product;\n }",
"public String getProduct()\n {\n return product;\n }",
"java.lang.String getProductDescription();",
"public java.lang.String getProductInfo () {\n\t\treturn productInfo;\n\t}",
"public String getNomeProduto() {\r\n\t\treturn nomeProduto;\r\n\t}",
"public synchronized WebElement shoppingBagProductName() throws Exception {\n\n\t\treturn utils.findElementByLocator(driver, \"PDP_ShoppingBagProduct\",\n\t\t\t\t\"| PDP:Content(Product Name) of the Shopping bag page\");\n\t}",
"String getNombreProducto();",
"public Product getProductFromName(String prodName) throws BackendException;",
"public String getProductLabel(){\n return productLabel.getText().trim();\n }",
"@Override\n public String getProductName() {\n return ProductName.REFLECTIONS_II_BOOSTER_PACK;\n }",
"public String getNombre() {\n\t\treturn producto.getNombre();\n\t}",
"String getTheirProductId();",
"java.lang.String getProductCode();",
"public String getNamePro() {\n return namePro;\n }",
"public String getName() {\n return item.getName();\n }",
"public java.lang.String getName();",
"public String getName()\r\n\t{\r\n\t\treturn theItem.getName();\r\n\t}",
"String getStockName();",
"String getProductId();",
"public String getProductOwner();",
"public synchronized WebElement txt_ProductName() throws Exception {\n\n\t\treturn utils.findElementByLocator(driver, \"PDP_ProductName\", \"| PDP:Product Name not present\");\n\t}",
"public com.commercetools.api.models.common.LocalizedString getName() {\n return this.name;\n }",
"public String getNoSqlDbProductName() throws StoreFactoryException;",
"public static String getName()\n {\n read_if_needed_();\n \n return _get_name;\n }",
"String getName() ;",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();"
] | [
"0.8871685",
"0.86436415",
"0.83718365",
"0.8369664",
"0.8334876",
"0.8318786",
"0.8318786",
"0.8318786",
"0.8315846",
"0.82718456",
"0.82678413",
"0.7829804",
"0.7743637",
"0.76926094",
"0.76215506",
"0.7605279",
"0.7569406",
"0.7342058",
"0.7278459",
"0.7165201",
"0.7147162",
"0.7147162",
"0.7141321",
"0.7085406",
"0.70439667",
"0.7034399",
"0.7018568",
"0.7000076",
"0.69041055",
"0.68281937",
"0.682817",
"0.6820549",
"0.67962706",
"0.67571527",
"0.67102313",
"0.6706707",
"0.67035705",
"0.6700662",
"0.6688243",
"0.66675293",
"0.66441935",
"0.6636214",
"0.66350144",
"0.6633284",
"0.6610081",
"0.659393",
"0.6593224",
"0.65740955",
"0.6574046",
"0.6574046",
"0.6574046",
"0.6574046",
"0.6574046",
"0.6574046",
"0.6574046",
"0.6574046",
"0.6574046",
"0.6574046",
"0.6574046",
"0.6574046",
"0.6574046",
"0.6574046",
"0.6574046",
"0.6574046",
"0.6574046",
"0.6574046",
"0.6574046",
"0.6574046",
"0.6574046",
"0.6574046",
"0.6574046",
"0.6574046",
"0.6574046",
"0.6574046",
"0.6574046",
"0.6574046",
"0.6574046",
"0.6574046",
"0.6574046",
"0.6574046",
"0.6574046",
"0.6574046",
"0.6574046",
"0.6574046",
"0.6574046",
"0.6574046",
"0.6574046",
"0.6574046",
"0.6574046",
"0.6574046",
"0.6574046",
"0.6574046",
"0.6574046",
"0.6574046",
"0.6574046",
"0.6574046",
"0.6574046",
"0.6574046",
"0.6574046",
"0.6574046",
"0.6574046"
] | 0.0 | -1 |
Sets the name of the product | public void setName(String name)
{
this.name = name;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setProductName(final String productName);",
"public void setName (Product product) {\n\t\tproductNameLbl.setText(product.getName());\n\t\tproductNameLbl.repaint();\n\t}",
"public void setProductName(String productName) {\r\n this.productName = productName;\r\n }",
"public void setProductName(java.lang.String productName) {\n this.productName = productName;\n }",
"public void changeProductName(int id,String name)\n {\n Product product = findProduct(id);\n \n if(product != null)\n {\n System.out.println(\"Name change from \" + product.getName() + \" to \"\n + name);\n product.name = name;\n }\n }",
"public void setProductName (java.lang.String productName) {\r\n\t\tthis.productName = productName;\r\n\t}",
"public void setProductName(String productName) {\n this.productName = productName;\n }",
"public void setProductName(String productName) {\n this.productName = productName;\n }",
"public void setProductName(String productName) {\n this.productName = productName;\n }",
"public void setItemName(String product) {\n itemName = product;\n }",
"public void setProductName(String productName) {\r\n\t\tthis.productName = productName;\r\n\t}",
"public void setProductName(String productName) {\n\t\tthis.productName = productName;\n\t}",
"public static void setName(String name) {\n catalogue.name = name;\n }",
"public void setName( String name ) {\n this.name = name;\n }",
"public void setName(String name){\r\n\t\tthis.name = name;\r\n\t}",
"public void setName(String name){\r\n\t\tthis.name = name;\r\n\t}",
"public void setName(String name){\r\n\t\tthis.name = name;\r\n\t}",
"public void setName (String name) {\n this.name = name;\n }",
"public void setName (String name) {\n this.name = name;\n }",
"public void setName (String name) {\n this.name = name;\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"@Override\n\tpublic String getName() {\n\t\treturn product.getName();\n\t}",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName( String name )\n {\n this.name = name;\n }",
"public void setName( String name )\n {\n this.name = name;\n }",
"public void setName(String name) {\r\n this._name = name;\r\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n\t\tName = name;\n\t}",
"public void setName(String name) {\n _name = name;\n }",
"public void setName(String name) {\n\n this.name = name;\n }",
"public void setName(String name){\r\n this.name = name;\r\n }",
"public void setName(String name){\r\n this.name = name;\r\n }",
"public void setName(String name){\r\n this.name = name;\r\n }",
"public void setName (String name) {\n this.name = name;\n }",
"public void setName(String name)\n {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }",
"public void setName(String name) {\n this.name = name;\n }"
] | [
"0.8533996",
"0.8304681",
"0.78597885",
"0.7761212",
"0.77607065",
"0.7750818",
"0.7744055",
"0.7744055",
"0.7744055",
"0.7630407",
"0.756223",
"0.73846745",
"0.73554164",
"0.7333179",
"0.7329249",
"0.7329249",
"0.7329249",
"0.731923",
"0.731923",
"0.731923",
"0.7318407",
"0.7318407",
"0.7318407",
"0.73126686",
"0.7310946",
"0.7310946",
"0.7310946",
"0.7310946",
"0.7310946",
"0.7310946",
"0.7310946",
"0.7310946",
"0.7310946",
"0.7310946",
"0.7310946",
"0.7310946",
"0.7310946",
"0.7310946",
"0.7310946",
"0.7310946",
"0.7310946",
"0.7310946",
"0.7310946",
"0.73098505",
"0.7306068",
"0.7305894",
"0.7305894",
"0.7305894",
"0.7305894",
"0.729712",
"0.729712",
"0.7296767",
"0.7294481",
"0.7294481",
"0.7294481",
"0.7294481",
"0.7294481",
"0.7294481",
"0.7294481",
"0.7294481",
"0.7294481",
"0.7294481",
"0.7294481",
"0.72935086",
"0.7292581",
"0.7292203",
"0.72920156",
"0.72920156",
"0.72920156",
"0.7287391",
"0.72865665",
"0.72864085",
"0.72864085",
"0.72864085",
"0.72864085",
"0.72864085",
"0.72864085",
"0.72864085",
"0.72864085",
"0.72864085",
"0.72864085",
"0.72864085",
"0.72864085",
"0.72864085",
"0.72864085",
"0.72864085",
"0.72864085",
"0.72864085",
"0.72864085",
"0.72864085",
"0.72864085",
"0.72864085",
"0.72864085",
"0.72864085",
"0.72864085",
"0.72864085",
"0.72864085",
"0.72864085",
"0.72864085",
"0.72864085",
"0.72864085"
] | 0.0 | -1 |
Gets the price of the product. | public double getPrice()
{
return price;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double getPrice(){\n\t\treturn Price; // Return the product's price\n\t}",
"public java.lang.Double getProductPrice () {\r\n\t\treturn productPrice;\r\n\t}",
"public Integer getProductPrice() {\n\t\treturn productPrice;\n\t}",
"public double getProductPrice() {\n return productPrice;\n }",
"@Override\n\tpublic int getPrice() {\n\t\treturn product.getPrice();\n\t}",
"public double getPrice() {\n return price_;\n }",
"public double getPrice() {\n\t\t\treturn price;\n\t\t}",
"public Double getProductPrice(String product){\n return services.get(product);\n }",
"public double getPrice(){\n\t\t\treturn price;\n\t\t}",
"public double getPrice() {\n\t\treturn this.price;\n\t}",
"public double getPrice(){\n\t\t\n\t\treturn price;\n\t}",
"public double getPrice() {\r\n\t\treturn this.price;\r\n\t}",
"public double getPrice() {\r\n\t\treturn this.price;\r\n\t}",
"public double getPrice() {\r\n\t\treturn this.price;\r\n\t}",
"public double getPrice() {\n return price_;\n }",
"public double getPrice() {\n\t\treturn this.price;\n\t\t\n\t}",
"public java.math.BigDecimal getPrice() {\n return price;\n }",
"public double getPrice()\n\t{\n\t\treturn this.price;\n\t}",
"public double getPrice() {\n\t\treturn price;\n\t}",
"public double getPrice() {\n\t\treturn price;\n\t}",
"public double getPrice() {\n\t\treturn price;\n\t}",
"public double getPrice() {\n\t\treturn price;\n\t}",
"public double getPrice() {\n\t\treturn price;\n\t}",
"public Double getPrice() {\r\n\t\treturn price;\r\n\t}",
"public Double getPrice() {\n\t\treturn price;\n\t}",
"public double getPrice(){\n\t\treturn this.price;\n\t}",
"public BigDecimal getPrice()\n\t{\n\t\treturn price;\n\t}",
"public Number getPrice() {\n return (Number)getAttributeInternal(PRICE);\n }",
"public double getPrice(){\r\n\t\treturn price;\r\n\t}",
"public double getPrice(){\n\t\treturn price;\n\t}",
"@Override\r\n\tpublic double getPrice() {\n\t\treturn price;\r\n\t}",
"public BigDecimal getPrice() {\n return (BigDecimal)getAttributeInternal(PRICE);\n }",
"public double getPrice() {\n return this.price;\n }",
"public Money getPrice() {\n\t\treturn price;\n\t}",
"public double price() {\n return price;\n }",
"public double getPrice()\r\n\t{\r\n\t\tif(isSpecial())\r\n\t\t{\r\n\t\t\treturn price * .5;\r\n\t\t}\r\n\t\treturn price;\r\n\t}",
"public java.lang.Integer getPrice()\n {\n return price;\n }",
"@Override\n\tpublic double getPrice() {\n\t\treturn constantPO.getPrice();\n\t}",
"protected float getPrice() {\n\t\t\treturn price;\n\t\t}",
"public long getPrice() {\n return price;\n }",
"public double getpPrice() {\n return pPrice;\n }",
"public double getPrice() {\r\n return price;\r\n }",
"public double getPrice() {\r\n return price;\r\n }",
"public double getPrice() {\r\n return price;\r\n }",
"public double getPrice() {\r\n return price;\r\n }",
"public BigDecimal getPrice() {\r\n return price;\r\n }",
"public BigDecimal getPrice() {\r\n return price;\r\n }",
"public java.lang.String getPrice() {\n return price;\n }",
"public double getPrice()\n {\n \treturn price;\n }",
"public BigDecimal getPrice() {\n return price;\n }",
"public BigDecimal getPrice() {\n return price;\n }",
"public BigDecimal getPrice() {\n return price;\n }",
"public BigDecimal getPrice() {\n return price;\n }",
"public BigDecimal getPrice() {\n return price;\n }",
"public double getPrice() {\n return price;\n }",
"public double getPrice() {\n return price;\n }",
"public double getPrice() {\n return price;\n }",
"public double getPrice() {\n return price;\n }",
"public double getPrice() {\n return price;\n }",
"public double getPrice() {\n return price;\n }",
"public double getPrice() {\n return price;\n }",
"public double getPrice() {\n return price;\n }",
"public double getPrice() {\n return price;\n }",
"public double getPrice() {\n return price;\n }",
"public double getPrice() {\n return price;\n }",
"public Double getPrice() {\n return price;\n }",
"public Double getPrice() {\n return price;\n }",
"public BigDecimal getpPrice() {\n return pPrice;\n }",
"public int getPrice() {\n return price_;\n }",
"public double getPrice()\n {\n return this.price;\n }",
"public BigDecimal\tgetPrice();",
"public Double getPrice() {\r\n return price;\r\n }",
"public double getPrice() {\n return price;\n }",
"public int getProductPrice(){\n return this.productRelation.getCost();\n }",
"public double getPrice()\r\n {\r\n return this.price;\r\n }",
"public int getPrice() {\n return price_;\n }",
"public Long getPrice() {\n return price;\n }",
"public double getPrice(){\r\n\t\ttry {\r\n\t\t\treturn this.workerobj.getDouble(WorkerController.PRICE);\r\n\t\t} catch (JSONException e) {\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t}",
"public int getPrice()\r\n\t{\r\n\t\treturn theItem.getPrice();\r\n\t}",
"public String getPrice() {\n return price;\n }",
"public String getPrice() {\n return price;\n }",
"public double getPrice()\r\n {\r\n return price;\r\n }",
"BigDecimal getPrice();",
"public double getPrice()\n\t{\n\t\treturn this.totalPrice + this.getFlightCosts() + this.excursionSubTotal\n\t\t\t\t+ this.getLodgingCost();\n\t}",
"public Double getPrice();",
"public float getPrice() {\n return _price;\n }",
"double getPrice();",
"double getPrice();",
"double getPrice();",
"public int getPrice() {\r\n\t\treturn price;\r\n\t}",
"public float getPrice() {\n return price;\n }",
"public float getPrice() {\n return price;\n }",
"public float getPrice() {\n return price;\n }",
"public double getPrice();",
"public int getPrice() {\n\t\treturn price;\n\t}",
"public double getItemPrice(){\n\t\t\t String priceStr;\n\t\t\t double price;\n\t\t\t String elemVal = driver.findElement(productPrice).getText();\n\t Reporter.log(\"==========Item Price is \" + elemVal + \"=======\", true);\n\t priceStr = elemVal.substring(1, elemVal.length());\n\t //return double as it is a price\n\t price = Double.parseDouble(priceStr);\n\t return price;\n\t }",
"public Integer getPrice() {\r\n return price;\r\n }",
"public Integer getPrice() {\r\n return price;\r\n }",
"protected Double getItemPrice() {\n return itemPrice;\n }"
] | [
"0.8373802",
"0.8137353",
"0.8043654",
"0.8011962",
"0.7989144",
"0.7955646",
"0.79393935",
"0.79317194",
"0.78810555",
"0.7876843",
"0.7872129",
"0.7869956",
"0.7869956",
"0.7869956",
"0.7849356",
"0.7836552",
"0.78225714",
"0.78021914",
"0.77802604",
"0.77802604",
"0.77802604",
"0.77802604",
"0.77802604",
"0.775865",
"0.7755412",
"0.7688129",
"0.76666456",
"0.76403224",
"0.75642854",
"0.75441027",
"0.75364995",
"0.75250214",
"0.75229406",
"0.75207573",
"0.75087684",
"0.7491538",
"0.7490562",
"0.7478427",
"0.7471958",
"0.7471113",
"0.74705416",
"0.74672025",
"0.74672025",
"0.74672025",
"0.74672025",
"0.7464735",
"0.7464735",
"0.7464633",
"0.74570924",
"0.7411067",
"0.7411067",
"0.7411067",
"0.7411067",
"0.7411067",
"0.740386",
"0.740386",
"0.740386",
"0.740386",
"0.740386",
"0.740386",
"0.740386",
"0.740386",
"0.740386",
"0.740386",
"0.740386",
"0.7398829",
"0.7398829",
"0.7387318",
"0.7368069",
"0.73636276",
"0.73484206",
"0.73416704",
"0.72997916",
"0.7293083",
"0.72866756",
"0.725917",
"0.723696",
"0.72228074",
"0.72195137",
"0.71966904",
"0.71966904",
"0.7195814",
"0.7194855",
"0.71767604",
"0.7172331",
"0.71649235",
"0.7164048",
"0.7164048",
"0.7164048",
"0.7156906",
"0.71447897",
"0.71447897",
"0.71447897",
"0.71327263",
"0.7127829",
"0.71273875",
"0.71228117",
"0.71228117",
"0.71112096"
] | 0.7683055 | 27 |
Calculates the price for the number of items mentioned in the quantity. | public void setPrice(double price)
{
this.price = price * quantity;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void calculatePrice(int quantity) {\n int price = quantity * priceOfCoffee;\n }",
"public double calculatePrice() {\r\n\t\treturn menuItem.getPrice() * quantity;\t\r\n\t}",
"public int calculatePrice() {\n int price = 5;\n if(hasWhippedCream) {\n price += 1;\n }\n if(hasChocolate) {\n price += 2;\n }\n return quantity * price;\n }",
"private void calculatePrice(int quantity, int pricePerCup) {\n int price = quantity * pricePerCup;\n }",
"@Override\n public double calculatePrice() {\n return getVolume() * (1.0 + (getAlcoholPercent() / 100.0)) * this.liquids.size();\n }",
"public int getPrice() {\n for (Item item : items) {\n price +=item.getPrice();\n }\n return price;\n }",
"float calculatePrice () \n\t{\n\t\tfloat final_price = 0;\n\t\tfinal_price = (float)(price * quantity); // price * number of items\n\t\tfinal_price += final_price*(.10); // add tax\n\t\tif(perishable.equals(\"P\"))\n\t\t{\n\t\t\tfloat ship = (float)(20* weight)*quantity; // add shipping\n\t\t\tship += ship*.20;\n\t\t\tfinal_price += ship;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfinal_price += (20* weight)*quantity; // add shipping\n\t\t}\n\t\treturn final_price;\n\t}",
"@Override\n public USMoney calculatePrice() {\n USMoney sumPrice = new USMoney();\n for (int i = 0; i < curArrayIndex; i++) {\n sumPrice = sumPrice.add(items[i].getPrice());\n if (items[i].isFragile()) {\n sumPrice.addTo(10, 0);\n }\n }\n sumPrice.addTo(100, 0);\n return sumPrice;\n }",
"@Override\n\tpublic int howmuch() {\n\t\treturn price;\n\t}",
"public int numberProduct() {\n\t\tint number = 0;\n\t\tfor (ItemCart item : listItemcart) {\n\t\t\tnumber += item.getQuantity();\n\t\t}\n\t\treturn number;\n\t}",
"public double calculatePrice(Order order){\r\n return order.quantity * order.itemPrice -\r\n Math.max(0, order.quantity - 500) * order.itemPrice * 0.05 +\r\n Math.min(order.quantity * order.itemPrice * 0.1, 100);\r\n }",
"public double priceFor(int quantity) {\n if(quantity < 0) throw new IllegalArgumentException();\n if(!hasBulk || quantity < bulk) return price*quantity;\n int amountInBulk = (int) (quantity/bulk);\n double total = amountInBulk * bulkPrice;\n total += (quantity%bulk) * price;\n return total;\n }",
"public double calculateSubTotal() {\n return candy.getPrice() * quantity;\n\n }",
"private void calcPrice() {\n double itemPrice = 0;\n \n //get price of burger (base)\n if (singleRad.isSelected())\n {\n itemPrice = 3.50;\n }\n else \n {\n itemPrice = 4.75;\n }\n \n //check options add to item price\n if(cheeseCheckbox.isSelected())\n itemPrice = itemPrice += 0.50;\n if(baconCheckbox.isSelected())\n itemPrice = itemPrice += 1.25;\n if(mealCheckbox.isSelected())\n itemPrice = itemPrice += 4.00;\n \n //include the quantity for the item price\n int quantity= 1;\n if (quantityTextField.getText().equals(\"\"))\n quantityTextField.setText(\"1\");\n quantity = Integer.parseInt(quantityTextField.getText());\n itemPrice = itemPrice * quantity;\n\n \n //show the price no $ symbol\n \n itemPriceTextField.setText(d2.format(itemPrice));\n }",
"private double totalPrice(){\n\n double sum = 0;\n\n for (CarComponent carComponent : componentsCart) {\n sum += (carComponent.getCompPrice() * carComponent.getCompQuantity()) ;\n }\n return sum;\n }",
"private int calculatePrice() {\n int price = numberOfCoffees * 5;\n\n return price;\n\n\n }",
"void calculateTotalPrice(){\n totalPrice = 0;\n cartContents.forEach(Product-> this.totalPrice = totalPrice + Product.getSellPrice());\n }",
"public double getPrice(int quantity) {\n\t\tif (minPrice == maxPrice)\n\t\t\treturn minPrice;\n\t\treturn maxPrice - (double)(quantity - minQty) / (maxQty - minQty) * (maxPrice - minPrice);\n\t}",
"public double calculateMoneySell(int quantity){\n\t\treturn this.getPriceSell() * quantity + (quantity * this.getPriceSell()) * 0.1;\n\t}",
"private CharSequence calculateTotalPrice() {\n float totalPrice = 0.0f;\n totalPrice += UserScreen.fishingRodQuantity * 25.50;\n totalPrice += UserScreen.hockeyStickQuantity * 99.99;\n totalPrice += UserScreen.runningShoesQuantity * 85.99;\n totalPrice += UserScreen.proteinBarQuantity * 5.25;\n totalPrice += UserScreen.skatesQuantity * 50.79;\n return Float.toString(totalPrice);\n }",
"public void calcPrice() {\r\n\t\tsuper.price = 3 * super.height;\r\n\t}",
"public BigDecimal getTotal() {\n BigDecimal total = new BigDecimal(0);\n for (Item item : items){\n int quantity = item.getQuantity();\n BigDecimal subtotal = item.getPrice().multiply(new BigDecimal(quantity));\n total = total.add(subtotal);\n }\n return total;\n }",
"public synchronized int getNumberOfItems(){\n int totalItems=0;\n \n for(ShoppingCartItem item : getItems()){\n //we sum the quantity of products for each item\n totalItems += item.getQuantity();\n }\n \n return totalItems;\n }",
"public float getCartPrice() {\n float totalSum = 0.0F;\n for(Publication book : shoppingCart){\n totalSum += book.getPrice();\n }\n\n return totalSum;\n }",
"public double totalPrice() {\n\t\tdouble result = 0.0;\n\t\tfor (ItemCart itemCart : listItemcart) {\n\t\t\tresult += itemCart.getQuantity() * itemCart.getP().getPrice();\n\t\t}\n\t\treturn result;\n\t}",
"BigDecimal getQuantity();",
"public float totalCost() {\r\n float total = 0;\r\n for (int i=0; i<numItems; i++) {\r\n total += cart[i].getPrice();\r\n }\r\n return total;\r\n }",
"public double getPricePerItem()\r\n {\r\n return pricePerItem;\r\n }",
"public double total(){\n\tdouble total=0;\n\tfor(Map.Entry<String, Integer> pro:proScan.getProducts().entrySet()){\n\t\tString proName=pro.getKey();\n\t\tint quantity=pro.getValue();\n\t\tProductCalculator proCal=priceRule.get(proName);\n\t\tif(proCal==null)\n\t\t\tthrow new MissingProduct(proName);\n\t\t\n\t\tProductCalculator cal=priceRule.get(proName);\n\t\tdouble subtotal=cal.getTotal(quantity);\n\t\ttotal+=subtotal;\n\t\t//System.out.println(total);\n\t}\n\t//round the total price to two digit\n\treturn round(total, 2);\n}",
"public double calculatePrice(){\r\n\t\treturn getBasePrice()+getBasePrice()*getVat()+(getBasePrice()+getBasePrice()*getVat())*0.3;\r\n\t}",
"public int totalprice() {\n\t\tint totalPrice=0;\r\n\t\tfor (int i=0; i<arlist.size();i++) {\r\n\t\t\t totalPrice+=arlist.get(i).price;\r\n\t\t}\r\n\t\treturn totalPrice;\r\n\t}",
"public double getTotalValue(){\r\n return this.quantity * this.price;\r\n }",
"public double calculateMoneyBuy(int quantity){\n\t\treturn this.getPriceBuy() * quantity;\n\t}",
"public void increaseQuantity() {\n this.quantity++;\n this.updateTotalPrice();\n }",
"public ItemPrice getItemsPriceByCartons(Item itm) {\n ItemPrice itmPrice = new ItemPrice();\n itmPrice.calculateTotalByCarton(itm);\n return itmPrice;\n }",
"private void calculatePrice() {\n\t\tint temp = controller.getQualityPrice(hotel.getText(), quality.getText());\n\n\t\ttemp *= getDays();\n\n\t\tif (discountChoice > 0) {\n\t\t\tdouble discountTmp = (double) discountChoice / 100;\n\t\t\ttemp *= (1.00 - discountTmp);\n\t\t}\n\n\t\tprice.setText(Integer.toString(temp));\n\n\t}",
"private BigDecimal calculateSubtotal(List<CartItem> cartItems) {\n BigDecimal total = BigDecimal.ZERO;\n for (CartItem cartItem : cartItems) {\n total = total.add(cartItem.getSalePrice().multiply(new BigDecimal(cartItem.getQuantity())));\n }\n return total;\n }",
"public Double getTotalPrice()\n {\n Double total = 0.0;\n for(DrinkAndQuantity d : drinksAndQuantities){\n Drink drink = d.getDrink();\n double tempPrice = drink.getPrice();\n Integer quantity = d.getQuantity();\n total += (tempPrice * quantity);\n }\n\n return total;\n }",
"public int getQuantity(Product p){\n int count = 0;\n for (Product i : cartContents)\n {\n if (i.getProductID().equals(p.getProductID()))\n {\n count++;\n }\n }\n return count;\n }",
"public int sumEquipmentPrice(){\n int sum = 0;\n for (Equipment e: equipment){\n sum += e.getPrice();\n }\n return sum;\n }",
"public double calculatingCostO(int quantity)\n { \n cost = 750 + (0.25 * quantity);\n return cost;\n \n }",
"private int calculatePrice(boolean hasWhipped, boolean hasChocolate){\n return quantity * (5 + (hasWhipped ? 1 : 0) + (hasChocolate ? 2 : 0));\n }",
"public int checkout(String items) throws ProductNotFoundException {\n Integer totalPrice = 0;\n\n HashMap<Character, Product> productTotalList = new HashMap<Character, Product>();\n for (Character c : items.toCharArray()) {\n if (productList.containsKey(c)) {\n Product product = (Product)productList.get(c);\n if (productTotalList.containsKey(c)) {\n Product totalProduct = productTotalList.get(c);\n totalProduct.setTotalNumberOfProducts(product.getTotalNumberOfProducts() + 1);\n }\n else {\n product.setTotalNumberOfProducts(product.getTotalNumberOfProducts() + 1);\n productTotalList.put(c, product);\n }\n }\n else {\n throw new ProductNotFoundException(\"Product '\" + c + \"' not found.\");\n }\n }\n\n for (Map.Entry<Character,Product> entry : productTotalList.entrySet()) {\n Product product = entry.getValue();\n totalPrice += product.calculateTotalPrice();\n }\n\n return totalPrice;\n }",
"public int getPrice()\r\n\t{\r\n\t\treturn theItem.getPrice();\r\n\t}",
"public int howManyPieces() {\n int totalPieces = 0;\n // for each item in stock\n for (int i = 0; i < this._noOfItems; i++) {\n // add the quantity of the item to the sum\n totalPieces += this._stock[i].getQuantity();\n }\n // and return the total of quantities\n return totalPieces;\n }",
"public double getTotalCostOfOrder() {\n double total = 0;\n for (AbstractProduct item :\n this.itemsReceived) {\n total += item.getPrice();\n }\n return total;\n }",
"public float getTotalPrice(){\n return price * amount;\n }",
"@Override\n public BigDecimal calculate(List<String> skuIds) {\n Collection<PricingRule> items = pricingRulesReader.fetchPricingRules();\n Map<String, PricingRule> pricingRuleMap = items.stream().collect(Collectors.toMap(PricingRule::getSkuId, Function.identity()));\n\n // Step 2: Map of SKUID and number of items for the SKUID\n Map<String, Long> itemsSkuAndQuantity = skuIds.stream().collect(Collectors.groupingBy(Function.identity(), Collectors.counting()));\n\n // Step 3: Calculate total price of items based on pricing rule and the number of items in the list\n return itemsSkuAndQuantity.entrySet().stream().reduce(BigDecimal.ZERO, (currentSum, entry) ->\n currentSum.add(pricingRuleMap.get(entry.getKey()).calculatePriceFor(entry.getValue())), BigDecimal::add);\n }",
"public static void calculateTotal(){\n int i=0;\n total=0;\n while(i<CustomAdapter.selecteditems.size()){\n total+= CustomAdapter.selecteditems.get(i).getPrice() * CustomAdapter.selecteditems.get(i).getQuantity();\n i++;\n }\n String s=\"Rs \"+String.valueOf(total);\n tv_total.setText(s);\n }",
"private double getProductsTotal() {\n\t\t\n\t\tdouble total = 0;\n\t\t\n\t\tif(!soldProducts.isEmpty()) {\n\t\t\t\n\t\t\tfor(Sellable product : soldProducts) {\n\t\t\t\t\n\t\t\t\ttotal += (product.getPrice() * product.getQuantitySold());\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\treturn total;\n\t}",
"public ItemPrice getItemsPriceByUnits(Item itm) {\n ItemPrice itmPrice = new ItemPrice();\n itmPrice.calculateTotalByUnits(itm);\n return itmPrice;\n }",
"private int calculateInputStock_Items() {\n\t\tint total = 0;\n\t\tArrayList<Integer> stock = getAllStockValues();\n\t\tif (!stock.isEmpty()) {\n\t\t\t// get for all K\n\t\t\ttotal += (stock.get(0) * getSetUpMachine().getVending_item().get(\"K\"));\n\t\t\t// get for all S\n\t\t\ttotal += (stock.get(1) * getSetUpMachine().getVending_item().get(\"S\"));\n\t\t\t// get for all F\n\t\t\ttotal += (stock.get(2) * getSetUpMachine().getVending_item().get(\"F\"));\n\t\t\t// get for all N\n\t\t\ttotal += (stock.get(3) * getSetUpMachine().getVending_item().get(\"N\"));\n\t\t}\n\t\treturn total;\n\t}",
"public double discountPrice() {\n double tot = 0;\n for (Equipment e : equipments) {\n tot += e.discountPrice();\n }\n\n return tot;\n }",
"private BigDecimal calculateTotalAmount(Product product, int quantity) throws ScriptException {\n return eval(Expressions.EXPRESSION_TOTAL, product, quantity);\n }",
"private void updateTotalPayment(PLUCodedItem pluCodedItem, int quantity) {\n\n\t\tdouble weight = pluCodedItem.getWeight() / 1000;\n\t\t\n\t\tBigDecimal price = ProductDatabases.PLU_PRODUCT_DATABASE.get(pluCodedItem.getPLUCode())\n\t\t\t\t.getPrice().multiply(new BigDecimal(quantity)).multiply(new BigDecimal(weight));\n\t\t\n\n\t\n\t\t\n\t\tprice = price.setScale(2, BigDecimal.ROUND_HALF_UP);\n\t\t\t\t\t\t\n\t\ttotalPayment = totalPayment.add(price);\n\t\t\n\t\tString description = ProductDatabases.PLU_PRODUCT_DATABASE.get(pluCodedItem.getPLUCode()).getDescription();\n\t\t\n\t\tSystem.out.println(\"Subtotal of \" + description + \" is: \" + totalPayment.toString());\n\t\n\t}",
"static int calculateTotalOf(Set<Fruit> basket) {\n\t\tint totalPrice = 0;\n\t\tint Qty = 0;\n\t\tfor (Fruit fruit : basket) {\n\t\t\tQty = getQuantityOf(fruit);\n\t\t\tQty = Qty <= 0 ? 1 : Qty;\n\t\t\ttotalPrice = totalPrice + (fruit.price * Qty);\n\t\t}\n\t\tSystem.out.println(\"Total Price = \" + totalPrice);\n\t\treturn totalPrice;\n\t}",
"private int getTotalPrice() {\n int unitPrice = 0;\n if (((CheckBox) findViewById(R.id.whipped_cream_checkbox)).isChecked()) {\n unitPrice += Constants.PRICE_TOPPING_WHIPPED_CREAM;\n }\n\n if (((CheckBox) findViewById(R.id.chocolate_checkbox)).isChecked()) {\n unitPrice += Constants.PRICE_TOPPING_CHOCOLATE;\n }\n\n unitPrice += Constants.PRICE_PER_COFFEE;\n return getNumberOfCoffees() * unitPrice;\n }",
"double calculatePrice();",
"public static double calculations(int quantity, double cost) {\r\n\tdouble price = 0;\r\n\tprice = quantity*cost;\r\n\treturn price = price+calculateTax(price);\r\n\t}",
"@Override\n public int pizzaPrice() {\n if (size.equals(\"Small\"))\n return SMALLPIZZA;\n else if (size.equals(\"Medium\"))\n return SMALLPIZZA + 2;\n else\n return SMALLPIZZA + 4;\n }",
"private double calculatePrice(boolean hasExtraCheese, boolean hasPepperoni, boolean hasHawaiian, String size) {\n double basePrice = PIZZA_PRICE;\n if (hasExtraCheese) {\n basePrice += BASIC_TOPPING_PRICE;\n }\n if (hasPepperoni) {\n basePrice += BASIC_TOPPING_PRICE;\n }\n if (hasHawaiian) {\n basePrice += HAWAIIAN_PRICE;\n }\n\n if (size.equals(getString(R.string.personal))){\n basePrice += PERSONAL_PRICE;\n }else if (size.equals(getString(R.string.medium))){\n basePrice += MEDIUM_PRICE;\n }else if (size.equals(getString(R.string.large))){\n basePrice += LARGE_PRICE;\n }else if (size.equals(getString(R.string.xtra))){\n basePrice += XTRA_PRICE;\n }\n return quantity * basePrice;\n }",
"int getSellQuantity();",
"public static double calculateSubTotal(double quantity, double itemPrice)\r\n\t{\n\t\tdouble currentSubTotal = quantity * itemPrice;\r\n\t\tSystem.out.println(\"Subtotal: $\" + currentSubTotal);\r\n\t\treturn currentSubTotal;\r\n\t}",
"private double calculateTotal(){\r\n double total = 0;\r\n for(int i = 0; i < orderList.size(); i++){\r\n total += orderList.getOrder(i).calculatePrice();\r\n }\r\n return total;\r\n }",
"public float totalCost() {\n\t\tttCost = 0;\n\t\tfor (int i = 0; i < itemsOrdered.size(); i++) {\n\t\t\tttCost += itemsOrdered.get(i).getCost();\n\t\t}\n\t\treturn ttCost;\n\t}",
"@Override\r\n\tpublic double getCost() {\r\n\t\tdouble total = 0;\r\n\t\t\r\n\t\tfor(Product p: parts) {\r\n\t\t\ttotal += p.getCost();\r\n\t\t}\r\n\t\t\r\n\t\treturn total;\r\n\t}",
"public synchronized double getTotal(){\n double totalPrice=0;\n \n for(ShoppingCartItem item : getItems()){\n totalPrice += item.getTotal();\n }\n \n return totalPrice;\n }",
"public float getSubtotal()\n {\n if ( donutTypeComboBox.getSelectionModel().isEmpty() || flavorComboBox.getSelectionModel().isEmpty() )\n {\n return -1f;\n } else\n {\n Donut donut = new Donut(donutTypeComboBox.getSelectionModel().getSelectedIndex(), flavorComboBox.getSelectionModel().getSelectedIndex());\n Float quantity = Float.parseFloat(quantityTextField.getText());\n\n\n return (donut.getItemPrice() * quantity);\n }\n }",
"public float calcOrderTotal()\r\n\t{\r\n\t\tOrderItem temp;\r\n\t\tfloat total = 0;\r\n\t\t\r\n\t\t//iterate through list and get quantity and unit price of each item\r\n\t\t//then multiply together and add to running total\r\n\t\tfor (int x = 0; x < orderItemList.size(); x++)\r\n\t\t{\r\n\t\t\ttemp = orderItemList.get(x);\r\n\t\t\ttotal = total + (temp.getProductQuant() * temp.getProductPrice());\r\n\t\t}\r\n\t\t\r\n\t\treturn total;\r\n\t}",
"public int pizzaPrice()\r\n {\r\n int toppingCount = this.toppings.size();\r\n if (toppingCount < 1 || toppingCount > BYO_MAX_TOPPING_COUNT)\r\n {\r\n return -1;\r\n }\r\n\r\n int toppingsPrice = toppingCount * BYO_TOPPING_PRICE;\r\n\r\n if (this.size.equals(Pizza.SMALL_SIZE))\r\n {\r\n return BYO_SMALL_BASE_PRICE + toppingsPrice;\r\n }\r\n else if (this.size.equals(Pizza.MEDIUM_SIZE))\r\n {\r\n return BYO_MEDIUM_BASE_PRICE + toppingsPrice;\r\n }\r\n else if (this.size.equals(Pizza.LARGE_SIZE))\r\n {\r\n return BYO_LARGE_BASE_PRICE + toppingsPrice;\r\n }\r\n else\r\n {\r\n return -1;\r\n }\r\n }",
"public double calculatePrice() {\n return 0;\n }",
"public Float getSubTotal() {\n return item.getUnitCost() * quantity;\n }",
"private BigDecimal calculateAmountPayable(Product product, int quantity) throws ScriptException {\n BigDecimal totalAmountPayable;\n Optional<Discount> optional = product.getDiscounts().stream().findFirst();\n if (optional.isPresent()) {\n Discount discount = optional.get();\n switch (discount.getDiscountType()) {\n case QUANTITIVE:\n totalAmountPayable = eval(Expressions.EXPRESSION_QUANTITIVE, product, quantity);\n break;\n case PERCENTILE:\n totalAmountPayable = eval(Expressions.EXPRESSION_PERCENTAGE, product, quantity);\n break;\n default:\n totalAmountPayable = new BigDecimal(0);\n }\n } else {\n totalAmountPayable = new BigDecimal(0);\n }\n return totalAmountPayable;\n }",
"public double calcPrice()\n {\n double price = getWidth() * getLength() * getHeight() + this.getMyLoc().getBasePrice();\n if (tempLvl <= 49 || tempLvl >=65) { \n price += 30;\n }\n return price;\n }",
"private int calculatePrice(boolean addWhippedCream, boolean addChocolate, boolean addCinnamon, boolean addMarshmallows) {\n int basePrice = 5;\n if (addWhippedCream){\n basePrice = basePrice + 1;\n }\n if (addChocolate){\n basePrice = basePrice + 1;\n }\n if (addCinnamon){\n basePrice = basePrice + 1;\n }\n if (addMarshmallows){\n basePrice = basePrice + 1;\n }\n return quantity * basePrice;\n\n }",
"BigDecimal calculateTotalPrice(Order order);",
"@Transient\n public Double getTotalOrderPrice() {\n double sum = 0;\n for (OrderItem oi : getOrderItems()) {\n sum += oi.getTotalPrice();\n }\n return sum;\n }",
"@Override\n public double getPrice() {\n return components.stream().mapToDouble(Component::getPrice).sum();\n }",
"public float calculateTotalPrice(ArrayList<Food> totalOrder) {\n totalPrice = 0.0f;\n for (Food itemOfFood : totalOrder) {\n totalPrice = totalPrice + itemOfFood.getPrice();\n }\n return totalPrice;\n }",
"@JsonIgnore\r\n public Double priceReduction() {\n if (wasPrice == null || nowPrice == null)\r\n return 0D;\r\n\r\n return wasPrice - nowPrice;\r\n }",
"@Override\n public int summarizeQuantity() {\n int sum = 0;\n\n for ( AbstractItem element : this.getComponents() ) {\n sum += element.summarizeQuantity();\n }\n\n return sum;\n }",
"public double totalQuantity() {\r\n\t\tdouble t = 0;\r\n\t\tfor(int i=0;i<boxes[0];i++)\r\n\t\t\tfor(int j=0;j<boxes[1];j++)\r\n\t\t\t\tfor(int k=0;k<boxes[2];k++) t += quantity[i][j][k];\r\n\t\treturn t;\r\n\t}",
"@Override\r\n\tpublic int getTotalPrice() {\n\t\treturn totalPrice;\r\n\t}",
"public int calculateTotalPrice(ArrayList<Product> basket) {\n int countPrice = 0;\n for (int i = 0; i < basket.size(); i++) {\n System.out.println(\"Je hebt 1 \" + basket.get(i).getNameProduct() + \" in je mandje gestopt\");\n countPrice += basket.get(i).getPriceProduct();\n }\n return countPrice;\n }",
"public double getTotal() {\n double amount = 0;\n amount = (this.getQuantity() * product.getPrice().doubleValue());\n return amount;\n }",
"public double getCost() {\n return quantity*ppu;\n\n }",
"public int getSellPrice(){\n\t\treturn (int)(price * 0.6);\n\t}",
"@java.lang.Override\n public int getPriceCount() {\n return price_.size();\n }",
"@Override \r\n public double getPaymentAmount() \r\n { \r\n return getQuantity() * getPricePerItem(); // calculate total cost\r\n }",
"@Override\r\n public long priceBasket(List<String> items) throws UnrecognisedItemException {\n Order order = orderService.createOrder(items);\r\n\r\n //NOTE - in real world, offers are expected to change very frequently and hence its best\r\n //to encapsulate it into a separate service.\r\n List<Offer> offers = orderService.getOffers(order);\r\n\r\n long discount = orderService.calculateDiscount(order, offers);\r\n\r\n return order.getTotalOriginalPriceInPence() - discount;\r\n }",
"public double getNewPrice(CartObject item, ShoppingCartViewHolder holder) {\n double price = item.getmPrice();\n double newPrice;\n int qty = helper.getQuantityFromTable(item);\n int position = holder.getAdapterPosition();\n if (qty > 0) {\n if (qty == 1) {\n return price;\n }\n newPrice = price*qty;\n newPrice = Math.floor(newPrice * 100) / 100;\n // total += helper.getQuantityFromTable(item) * item.getmPrice();\n return newPrice;\n\n } else {\n removeByPosition(position);\n Toast.makeText(mContext, \"Adios, \" + item.getmName() + \"!\", Toast.LENGTH_SHORT).show();\n Log.d(KEY, \"quantity hit 0, removed \" + item.getmName());\n // total += helper.getQuantityFromTable(item) * item.getmPrice();\n return 0;\n }\n\n }",
"private int calculatePrice(boolean hasWhippedCream, boolean hasChocolate) {\n int toppings = 0;\n\n if(hasWhippedCream){\n toppings += 1;\n }\n\n if(hasChocolate){\n toppings += 2;\n }\n\n return quantity * (priceOfCoffee + toppings);\n }",
"@Override\n\tpublic double getItemPrice(String itemCode) {\n\n\t\treturn 100.00;\n\t}",
"public float getItemPrice()\n\t{\n\t\treturn itemPrice;\n\t}",
"public void calculateCost() {\n \tdouble costToShipPack;\n \tint numOfPacks = 1;\n \t\n \tfor(Package p: this.packages) {\n \t\tcostToShipPack = 3 + (p.calcVolume() - 1);\n \t\tthis.totalAmounts.put(\"Package \"+numOfPacks, costToShipPack);\n \t\tnumOfPacks++;\n \t}\n \t\n }",
"int getBuyQuantity();",
"public abstract double getDiscount(int qty, double price);",
"long getQuantity();",
"long getQuantity();",
"@Override\n\tpublic double getPrice() {\n\n\t\tfor(Car temPart:listPart){\n\t\t\tthis.totalCost +=temPart.getPrice();\n\t\t}\n\t\treturn totalCost;\n\t}",
"protected Double getItemPrice() {\n return itemPrice;\n }"
] | [
"0.7625987",
"0.7455826",
"0.7355573",
"0.7294981",
"0.7216976",
"0.7022775",
"0.6735838",
"0.6690469",
"0.66700524",
"0.6632237",
"0.66042465",
"0.6600389",
"0.6585005",
"0.6561097",
"0.6542813",
"0.6541871",
"0.6533505",
"0.6522681",
"0.6495325",
"0.6455883",
"0.64396244",
"0.63722575",
"0.6363898",
"0.6363337",
"0.6359406",
"0.6339512",
"0.63387936",
"0.6335086",
"0.6305009",
"0.6272849",
"0.62592053",
"0.62506676",
"0.6195477",
"0.6194552",
"0.61839664",
"0.61795235",
"0.6169722",
"0.6166179",
"0.6163754",
"0.6158393",
"0.6158015",
"0.61444294",
"0.6140278",
"0.6125416",
"0.61133975",
"0.6094292",
"0.6070396",
"0.6064872",
"0.6052686",
"0.6050375",
"0.60499024",
"0.6045348",
"0.6036906",
"0.60311615",
"0.6023204",
"0.60209596",
"0.60134417",
"0.60114455",
"0.6008961",
"0.60079575",
"0.60052663",
"0.6001143",
"0.6000305",
"0.5995358",
"0.59879994",
"0.5974483",
"0.597103",
"0.59663385",
"0.5966265",
"0.5966171",
"0.596351",
"0.5960766",
"0.59533393",
"0.5952405",
"0.59483665",
"0.5920299",
"0.59156764",
"0.59156644",
"0.59151757",
"0.59063816",
"0.5902027",
"0.5889959",
"0.58837014",
"0.5875083",
"0.5874224",
"0.58739656",
"0.5861293",
"0.58610517",
"0.5860609",
"0.58585393",
"0.58557695",
"0.5855004",
"0.585009",
"0.5843198",
"0.5840091",
"0.5836819",
"0.5834196",
"0.5830341",
"0.5830341",
"0.5830182",
"0.58268505"
] | 0.0 | -1 |
Checks if product is imported. | public boolean isImported()
{
return imported;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private boolean getIsImported(String productName) {\n\t\treturn productName.contains(AppConstants.IMPORTED_TOKEN);\n\t}",
"protected boolean isImport() {\n\t\t// Overrides\n\t\treturn false;\n\t}",
"public boolean isImported();",
"boolean hasImported();",
"public boolean isSetImport()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(IMPORT$0) != 0;\n }\n }",
"boolean hasImportConfiguration();",
"boolean hasPlainImport();",
"public boolean hasProduct() {\n return product_ != null;\n }",
"public boolean importable()\r\n\t{\r\n\t\treturn isImportable(getInputStream());\r\n\t}",
"public boolean hasImport(String namespace, String location, TOSCAPlan.ImportType type, TOSCAPlan buildPlan) {\n\t\tBPELProcessHandler.LOG.debug(\"Checking if import with namespace \" + namespace + \" and location \" + location\n\t\t\t\t+ \" is already imported\");\n\t\tfor (Element importElement : buildPlan.getBpelImportElements()) {\n\t\t\tBPELProcessHandler.LOG.debug(\"Checking import element\");\n\t\t\tint checkInt = 0;\n\t\t\tif (importElement.hasAttribute(\"namespace\") && importElement.getAttribute(\"namespace\").equals(namespace)) {\n\t\t\t\tBPELProcessHandler.LOG.debug(\"Found import with same namespace\");\n\t\t\t\tcheckInt++;\n\t\t\t}\n\t\t\tif (importElement.hasAttribute(\"location\") && importElement.getAttribute(\"location\").equals(location)) {\n\t\t\t\tBPELProcessHandler.LOG.debug(\"Found import with same location\");\n\t\t\t\tcheckInt++;\n\t\t\t}\n\t\t\tif (checkInt == 2) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tif (importElement.hasAttribute(\"type\") && importElement.getAttribute(\"type\").equals(type.toString())) {\n\t\t\t\tBPELProcessHandler.LOG.debug(\"Found import with same type\");\n\t\t\t\tcheckInt++;\n\t\t\t}\n\t\t\tif (checkInt == 3) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public boolean hasImportConfiguration() {\n return importConfiguration_ != null;\n }",
"boolean getImported();",
"public boolean canImport(JComponent comp, DataFlavor[] flavors) {\n\t\treturn (!container.isEmailing() && FileList.hasAnyFileFlavor(flavors));\n\t}",
"public boolean getIsImport() {\n return getAsBoolean(\"isImport\");\n }",
"public boolean productsTabVerification() {\r\n\t\t\r\n\t\t\r\n\t\twaitUntilPresenceOfElementLocated(ourProductsTab);\r\n\r\n\t\tList<WebElement> list = driver.findElements(By.xpath(\"//a[text()='OUR PRODUCTS']\"));\r\n\t\tif (list != null && !list.isEmpty()) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public boolean hasProduct() {\n return productBuilder_ != null || product_ != null;\n }",
"public boolean isI_IsImported();",
"public boolean canImport(TransferSupport sup) \n\t{\n\t\tLoc source = new Loc(get_data(sup));\n\t\tJTable.DropLocation dest = (JTable.DropLocation) sup.getDropLocation();\n\t\treturn can_import(source, dest);\n\t}",
"public boolean hasImportConfiguration() {\n return importConfigurationBuilder_ != null || importConfiguration_ != null;\n }",
"public boolean canImport(JComponent comp, DataFlavor[] flavors) {\n JTextComponent c = (JTextComponent)comp;\n if (!(c.isEditable() && c.isEnabled())) {\n return false;\n }\n return (getImportFlavor(flavors, c) != null);\n }",
"public boolean getImported();",
"private void checkProducts() {\n for (JButton prodButton : productButtons) {\n if (inventoryManager.checkProductAvailability(prodButton.getText())) {\n prodButton.setEnabled(true);\n } else {\n prodButton.setEnabled(false);\n }\n }\n }",
"public boolean tryGetInputProduct() {\n Product product = self.getInputBuffer().tryRemoveProduct();\n if (product != null) {\n self.setCurrentProduct(product);\n syncUpdateWithCheck(false);\n return true;\n }\n waitStepWithCheck();\n return false;\n }",
"public boolean canImport(JComponent c, DataFlavor[] flavors)\n {\n if (!dropEnabled)\n {\n return false;\n }\n\n // loop over the flavors list in an attempt to find a matching flavor\n for (int i = 0; i < flavors.length; i++)\n {\n if (MediaItemsTransferable.flavor.equals(flavors[i]))\n {\n return true;\n }\n }\n return false;\n }",
"private final boolean isImportable(InputStream in)\r\n\t{\r\n\t\tboolean ok = false;\r\n\t\ttry\r\n\t\t{\r\n\t\t\tBufferedReader inreader = new BufferedReader(new InputStreamReader(\r\n\t\t\t\tin));\r\n\t\t\tok = false;\r\n\t\t\tString line = new String();\r\n\t\t\tif ((line = inreader.readLine()) != null)\r\n\t\t\t{\r\n\t\t\t\t// Line with 3 columns (float, float, digit)\r\n\t\t\t\tok = Pattern.matches(\"^\\\\d+\\\\.\\\\d*[ \\\\t]\\\\d+\\\\.?\\\\d*[ \\\\t]\\\\d\",\r\n\t\t\t\t\tline);\r\n\t\t\t}\r\n\t\t\tinreader.close();\r\n\t\t}\r\n\t\tcatch (IOException e)\r\n\t\t{\r\n\t\t\tok = false;\r\n\t\t}\r\n\t\treturn ok;\r\n\t}",
"private boolean generateIsImport(String make) {\n\t\tif (make.equals(\"Chevy\") || make.equals(\"Ford\")) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}",
"public boolean hasPlainImport() {\n return dataCase_ == 1;\n }",
"@Override\n\t@Transactional\n\tpublic Boolean saveImportPro(List<FormProduct> formProduct) {\n\t\treturn importDao.saveImportPro(formProduct);\n\t}",
"public boolean hasPlainImport() {\n return dataCase_ == 1;\n }",
"public Boolean hasNextProduct() {\n\t\treturn getProducts().size() > 0;\n\t}",
"private void checkProductAvailability()\n\t{\n\n\t\tprodMsg = \"\";\n\t\tcartIsEmpty = false;\n\n\t\tMap <String,Product> products = getProducts();\n\n\t\tint qtyRequested, qtyAvailable;\n\n\t\t// Check for unavailable products\n\t\tfor ( Product p : shoppingCart.getProducts().keySet() )\n\t\t{\n\t\t\tfor ( String s : products.keySet() )\n\t\t\t{\n\t\t\t\tif ( products.get(s).getName().equals(p.getName()) )\n\t\t\t\t{\n\t\t\t\t\t// Modify product to write to file\n\t\t\t\t\tqtyRequested = shoppingCart.getProducts().get(p);\n\t\t\t\t\tqtyAvailable = products.get(s).getQtyAvailable();\n\n\t\t\t\t\tif ( qtyAvailable < qtyRequested )\n\t\t\t\t\t\tunavailableProds.put(p, new ArrayList <>(Arrays.asList(qtyRequested, qtyAvailable)));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Show warning\n\t\tif ( !unavailableProds.isEmpty() )\n\t\t{\n\t\t\tprodMsg = \"The cart products were not available anymore in the requested quantity, only the available quantity has been bought:\\n\\n\";\n\n\t\t\tfor ( Product p : unavailableProds.keySet() )\n\t\t\t{\n\t\t\t\tprodMsg += p.getName() + \": requested: \" + unavailableProds.get(p).get(0) + \", available: \"\n\t\t\t\t\t\t+ unavailableProds.get(p).get(1) + \"\\n\";\n\n\t\t\t\tif ( unavailableProds.get(p).get(1) == 0 )\n\t\t\t\t\tshoppingCart.removeProduct(p);\n\t\t\t\telse\n\t\t\t\t\tshoppingCart.getProducts().replace(p, unavailableProds.get(p).get(1));\n\t\t\t}\n\n\t\t\tif ( shoppingCart.getProducts().size() == 0 )\n\t\t\t{\n\t\t\t\tcartIsEmpty = true;\n\t\t\t\tprodMsg = \"All of your products were not available anymore for purchase: payment cancelled.\\nPlease select some new products.\";\n\t\t\t}\n\t\t}\n\t}",
"public void verifyProduct() throws Throwable{\r\n\t\twdlib.waitForElement(getProductText());\r\n\t\t\r\n\t\tif(!getProductText().getText().equals(\"None Included\"))\r\n\t\t{\r\n\t\t\tReporter.log(getProductText().getText()+\" was deleted\",true);\r\n\t\t\tdeleteProduct();\r\n\t\t}\r\n\t\t\r\n\t}",
"private boolean importOrderUpdatesJob() {\n\t\treturn importData(\"/cronJobs/orderUpdateCronJob.impex\") && //\n\t\t\t\timportData(\"/cronJobs/orderUpdateCronJobTrigger.impex\");\n\t}",
"public importProduct() {\n initComponents();\n Sql s = new Sql();\n\n s.Select_MaterialItem(Materials_combox);\n s.loadcombo(item_combox);\n s.Select_BigItem(Bigitem_combox);\n }",
"private boolean fieldQualifiesForImport(ActionImportField actionField) {\n return (actionField.hasRequiredImport() && actionField.getValue() == null) || actionField.isOptionalImportRequest();\n }",
"@Override\n\t@Transactional(readOnly=true)\n\tpublic boolean isProductAvailavle(String productId) {\n\t\treturn true;\n\t}",
"private void checkAvailability() {\n if (productList != null) {\n if (productList.size() == 0) {\n noProductText.setVisibility(View.VISIBLE);\n } else {\n noProductText.setVisibility(View.GONE);\n }\n }\n }",
"public boolean importDiscountData() {\n\t\treturn importData(\"/discounts/discountSetup.impex\");\n\t}",
"@Override\n public boolean isInstall(Context context) {\n\n return true;\n }",
"public boolean showProducts() {\n\t\ttry {\n\t\t\tFXMLLoader loader = new FXMLLoader();\n\t\t\tloader.setLocation(MainApp.class.getResource(\"view/Products.fxml\"));\n\t\t\tAnchorPane layout = (AnchorPane) loader.load();\n\t\t\t\n\t\t\tStage productStage = new Stage();\n\t\t\tproductStage.setTitle(\"Add / Edit Products\");\n\t\t\tproductStage.getIcons().add(new Image(\"file:resources/images/logo.png\"));\n\t\t\tproductStage.initModality(Modality.WINDOW_MODAL);\n\t\t\tproductStage.initOwner(dialogStage);\n\t\t\t\n\t\t\tScene scene = new Scene(layout);\n\t\t\tproductStage.setScene(scene);\n\t\t\t\n\t\t\tProductsController controller = loader.getController();\n\t\t\tcontroller.setProductStage(productStage);\n\t\t\tcontroller.setMain(main);\n\t\t\tcontroller.setAcknowledgment(acknowledgment);\n\t\t\t\n\t\t\tproductStage.showAndWait();\n\t\t\t\n\t\t\treturn controller.isOkClicked();\n\t\t\t\n\t\t} catch (IOException e) {\n\t\t\tmain.getDbHelper().insertError(e, main.getPreferenceList().get(0).getUsername());\n\t\t\treturn false;\n\t\t}\n\t}",
"boolean isFractionDataOverriddenOnImport();",
"public void isProductAvailable(String productName) {\n\n\t\tString text = WebUtility.getText(Locators.getLocators(\"loc.text.productNameAfterSearch\"));\n\t\tSystem.out.println(text);\n\t\tAssert.assertEquals(text, productName, \"product is not present\");\n\n\t}",
"private boolean hasImport(JsonObject originAst, JsonObject mergePackage) {\n boolean importFound = false;\n\n for (JsonElement node : originAst.getAsJsonArray(\"topLevelNodes\")) {\n JsonObject originNode = node.getAsJsonObject();\n if (importFound) {\n break;\n } else if (originNode.get(\"kind\").getAsString().equals(\"Import\")\n && originNode.get(\"orgName\").getAsJsonObject().get(\"value\").getAsString()\n .equals(mergePackage.get(\"orgName\").getAsJsonObject().get(\"value\").getAsString())\n && originNode.getAsJsonArray(\"packageName\").size() == mergePackage\n .getAsJsonArray(\"packageName\").size()) {\n JsonArray packageName = originNode.getAsJsonArray(\"packageName\");\n for (int i = 0; i < packageName.size(); i++) {\n JsonArray mergePackageName = mergePackage.getAsJsonArray(\"packageName\");\n if (mergePackageName.get(i).getAsJsonObject().get(\"value\").getAsString()\n .equals(packageName.get(i).getAsJsonObject().get(\"value\").getAsString())) {\n importFound = true;\n } else {\n importFound = false;\n break;\n }\n }\n }\n }\n\n return importFound;\n }",
"protected boolean handleAddImport(Object obj) {\n\t\tif (obj instanceof XSDSimpleTypeDefinition) {\r\n\t\t\t\r\n\t\t\tString targetNamespace = ((XSDSimpleTypeDefinition) obj).getTargetNamespace();\r\n\t\t\tif (targetNamespace != null) {\r\n\t\t\t\tif (((XSDSimpleTypeDefinition) obj).getTargetNamespace().equals(\r\n\t\t\t\t\t\tXSDConstants.SCHEMA_FOR_SCHEMA_URI_2001)) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tAddImportCommand cmd = new AddImportCommand(BPELUtils\r\n\t\t\t\t.getProcess(modelObject), obj);\r\n\r\n\t\tif (cmd.canDoExecute() && cmd.wouldCreateDuplicateImport() == false) {\r\n\t\t\tModelHelper.getBPELEditor(modelObject).getCommandStack().execute(\r\n\t\t\t\t\tcmd);\r\n\t\t\t// Now refresh the view to imported types.\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"protected boolean needImport(String importStatement) {\r\n\t\treturn DAOServiceConfigurationManager\r\n\t\t\t\t.getBooleanProperty(CODEGEN_HOLD_ANNOTATIONS_FOR_DAO)\r\n\t\t\t\t|| CodeGenUtils.needImportClass(importStatement);\r\n\t}",
"public boolean verifyInProductPage() {\n\t\tString ExpMsg = \"PRODUCTS\";\t// confirmation msg\n\t\tString ActMsg = Title.getText();\n\t try {\n\t \twait.until(ExpectedConditions.presenceOfElementLocated(By.xpath(\"//div[@id='inventory_container']\")));\n\t\t\tAssert.assertEquals(ActMsg, ExpMsg);\n\t\t\ttest.log(LogStatus.PASS, \"Successful assert we have landed on PRODUCTS page\");\t\n\t }\n\t catch (TimeoutException e) {\n\t\t\ttest.log(LogStatus.FAIL, \"Error: Login failed? Not leading to PRODUCTS page?\");\n\t\t\tAssert.fail(\"Login failed? Not leading to PRODUCTS page?\");\n\t\t\treturn false;\n\t }\n\t\tcatch (Throwable e) {\n\t\t\ttest.log(LogStatus.FAIL, \"Error: Not on PRODUCTS page?!\");\n\t\t\tAssert.fail(\"Not in PRODUCTS page\");\n\t\t\treturn false; \n\t\t}\n\t\treturn true;\n\t\t\n\t}",
"@Override\n\t@Transactional\n\tpublic Boolean updateImportPro(List<FormProduct> formProduct, int impId) {\n\t\treturn importDao.updateImportPro(formProduct, impId);\n\t}",
"public boolean canImport(TransferHandler.TransferSupport info)\n\t\t{\n\t\t\tif (!info.isDataFlavorSupported(BufferSwitcher.BufferDataFlavor))\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (!comboBox.isPopupVisible())\n\t\t\t{\n\t\t\t\tcomboBox.showPopup();\n\t\t\t}\n\t\t\treturn false;\n\t\t}",
"public boolean isSetProductids() {\n return this.productids != null;\n }",
"public boolean hasProductPicture(){\r\n\t\t\t\t\r\n\t\treturn\tMcsElement.isElementPresent(driver, PRODUCT_PIC_CONTAINER+\"//img\");\r\n\t\t\t\r\n\t\t}",
"private void validateBeforeMerge()\n {\n Assert.assertTrue(!isProductInfo() || type == TTransactionType.simple);\n }",
"public boolean hasProductsRS() {\n return productsRS_ != null;\n }",
"private boolean executeProductSyncJob() {\n\t\ttry {\n\t\t\tgetSyncJobService().executeCatalogSyncJob(\"Default\");\n\t\t\treturn true;\n\t\t} catch (final SystemException e) {\n\t\t\tLOG.error(\"An exception was thrown trying to sync the product content catalog 'Default'!\", e);\n\t\t\treturn false;\n\t\t}\n\t}",
"boolean importCertificate(InputStream is)\n {\n\tCertificateFactory cf = null;\n\tX509Certificate cert = null;\n\n\ttry\n\t{\n\t cf = CertificateFactory.getInstance(\"X.509\");\n\t cert = (X509Certificate)cf.generateCertificate(is);\n\n\t // Changed the certificate from the active set into the \n\t // inactive Import set. This is for import the certificate from\n\t // the store when the user clicks on Apply.\n\t //\n\t if (getRadioPos() == mh.getMessage(\"SignedApplet_value\"))\n \t model.deactivateImpCertificate(cert);\n\t else if (getRadioPos() == mh.getMessage(\"SecureSite_value\"))\n \t model.deactivateImpHttpsCertificate(cert);\n\t}\n\tcatch (CertificateParsingException cpe)\n\t{\n\t // It is PKCS#12 format.\n\t return false;\n\t}\n\tcatch (CertificateException e)\n\t{\n\t // Wrong format of the selected file\n\t DialogFactory.showExceptionDialog(this, e, getMessage(\"dialog.import.format.text\"), getMessage(\"dialog.import.error.caption\"));\n\t}\n\n\treturn true;\n }",
"io.dstore.values.BooleanValue getImportConfiguration();",
"public boolean isImportMessageDisplayed()\n {\n try\n {\n\n waitForElement(By.xpath(\".//span[contains(text(),'Website data import successful')]\"), SECONDS.convert(getDefaultWaitTime(), MILLISECONDS));\n WebElement importMessage = driver.findElement(By.xpath(\".//span[contains(text(),'Website data import successful')]\"));\n if (importMessage != null)\n return true;\n }\n catch (NoSuchElementException nse)\n {\n return false;\n }\n\n return false;\n }",
"private boolean importModels() {\n\t\tif (!isCoupledGraphSelected()) {\n\t\t\tnew InformDialog(\"Option only allowed for Coupled Models\",null);\n\t\t\treturn false;\n\t\t}\n\t\telse {\n\n\t\t\tJFileChooser fc = new JFileChooser();\n\t\t\tExtensionFilter exts = new ExtensionFilter();\n\t\t\texts.addExtension(\"ma\");\n\t\t\texts.addExtension(\"cdd\");\n\t\t\texts.addExtension(\"cpp\");\n\n\t\t\tfc.addChoosableFileFilter(exts);\n\n\t\t\tint returnVal = fc.showDialog(MainFrame.this, \"Import\");\n\n\t\t\tif (returnVal == JFileChooser.APPROVE_OPTION) {\n\t\t\t\tString inputFileName = fc.getSelectedFile().getPath();\n\n\t\t\t\ttry {\n\t\t\t\t\tFile modelFile = new File(inputFileName);\n\t\t\t\t\tgetCoupledModelEditor().importModelsFromFile(modelFile);\n\t\t\t\t}\n\t\t\t\tcatch (IOException e) {\n\t\t\t\t\tmainstatusBar.setText(\"Error importing\" + inputFileName);\n\t\t\t\t}\n\n\t\t\t\t//System.out.println(\"118111\");\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//this.repaint();\n\t\t\t\t//System.out.println(\"119111\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}",
"void reportImport() {\n this.hasImports = true;\n }",
"private boolean CheckFileOperationEnable()\n\t{\n\t ASPManager mgr = getASPManager();\n\t \n\t if (itemlay.isMultirowLayout())\n\t {\n\t itemset.storeSelections();\n\t itemset.setFilterOn();\n\t String prestructure = \" \";\n\t String structure;\n\t if (itemset.countSelectedRows() > 1)\n\t {\n\t for (int k = 0;k < itemset.countSelectedRows();k++)\n\t {\n\t structure = itemset.getValue(\"STRUCTURE\");\n\t if (\" \".equals(prestructure)) \n\t {\n\t prestructure = structure;\n\t }\n\t if (!prestructure.equals(structure)) \n\t {\n\t mgr.showAlert(mgr.translate(\"DOCMAWDOCREFERENCENOFILEOPERATIONONMIXED: File Operations are not allowed on Mixed or multiple structure documents.\"));\n\t itemset.setFilterOff();\n\t return true;\n\t }\n\t if (\"1\".equals(prestructure) && \"1\".equals(structure)) \n\t {\n\t mgr.showAlert(mgr.translate(\"DOCMAWDOCREFERENCENOFILEOPERATIONONMIXED: File Operations are not allowed on Mixed or multiple structure documents.\"));\n\t itemset.setFilterOff();\n\t return true;\n\t }\n\t prestructure = structure;\n\t itemset.next();\n\t }\n\t }\n\t itemset.setFilterOff();\n\t }\n\t return false;\n\t}",
"public boolean hasInput() {\n return basePackage != DEFAULT_BASE_PACKAGE\n || !basePackages.isEmpty()\n || bannedImport != null\n || !bannedImports.isEmpty()\n || allowedImport != null\n || !allowedImports.isEmpty()\n || exclusion != null\n || !exclusions.isEmpty();\n }",
"public boolean importTaxData() {\n\t\treturn importData(\"/tax/taxSetup.impex\");\n\t}",
"@AssertTrue (message=\"El importe del pago es incorrecto debe<= imp cheque/disponible(Nota/Otroe)\")\r\n\t\tpublic boolean validarImporteCorrecto(){\r\n\t\t\tswitch (getFormaDePago()) {\r\n\t\t\tcase T:\r\n\t\t\t\treturn getImporte().amount().doubleValue()<=getNota().getSaldoUnificado().abs().amount().doubleValue();\r\n\t\t\tcase S:\r\n\t\t\t\treturn getImporte().amount().doubleValue()<=getOtros().getDisponible().doubleValue();\r\n\t\t\tdefault:\r\n\t\t\t\treturn getImporte().amount().doubleValue()<=cheque.getSaldo().doubleValue();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}",
"boolean getImportConfigurationNull();",
"public boolean checkLoadEnable() {\n \r\n int tableRow = sflp.getXRow() + 1; // Adjusted by 1 to account for the table header\r\n int tableColumn = sflp.getXColumn();\r\n if (tableColumn < 0) return false;\r\n \r\n TableModel model = sflp.getTable().getModel();\r\n String fieldSummary = \"\";\r\n for (int i = 0; i < tableColumn; i++) {\r\n // System.out.print(model.getColumnName(i) + (i + 1 == tableColumn ? \"\\n\" : \", \"));\r\n fieldSummary += model.getColumnName(i) + (i + 1 == tableColumn ? \"\" : \", \");\r\n }\r\n \r\n sflp.setFieldsText(fieldSummary);\r\n \r\n if (tableRow >= 1 && tableColumn >= 0) {\r\n setLoadEnabled(true);\r\n return true;\r\n } else {\r\n setLoadEnabled(false);\r\n return false;\r\n }\r\n }",
"private boolean isPackValid() {\n\t\treturn (logData != null\n\t\t\t\t&& logData.entries != null\n\t\t\t\t&& logData.entries.size() > 1);\n\t}",
"boolean isNoExport();",
"public boolean needsExternalStorage() {\n return FileUtil.isExternalStorageUri(this.form, this.resolvedPath);\n }",
"public static boolean isExportError() {\n return (brainFilePath==null || brainFilePath == \"\");\n }",
"public boolean list_exists(Context context) {\n File file = context.getFileStreamPath(\"ingredientes\");\n if (file == null || !file.exists()) {\n return false;\n }\n return true;\n }",
"public boolean hasProduct(ProductBarcode code);",
"boolean hasAsset();",
"public void importProducts(com.google.cloud.retail.v2beta.ImportProductsRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getImportProductsMethod(), responseObserver);\n }",
"public boolean isLicensed() {\n\t\tAdvancedConfigurationMeta acMeta = data.getAdvancedConfiguration();\n\t\tif (acMeta.getServiceType() == ServiceType.CVS) { return true; }\n\t\tif ((acMeta.getServiceType() == ServiceType.Web) && !Const.isEmpty(getCustomerID())) { return true; }\n\t\t// check product license\n\t\tif ((acMeta.getProducts() & MDPropTags.MDLICENSE_IPLocator) != 0 || (acMeta.getProducts() & MDPropTags.MDLICENSE_Community) != 0) { return true; }\n\t\treturn false;\n\t}",
"public void loadProducts() throws RetailException {\n\t\tObjectMapper objectMapper = new ObjectMapper();\n\t\ttry {\n\t\t\tif (!dataLoadedIndicator) {\n\t\t\t\tproductData = Collections.unmodifiableMap((Map<String, Product>) objectMapper.readValue(\n\t\t\t\t\t\tThread.currentThread().getContextClassLoader().getResourceAsStream(\"products.json\"),\n\t\t\t\t\t\tnew TypeReference<HashMap<String, Product>>() {\n\t\t\t\t\t\t}));\n\t\t\t\t// load properties file\n\t\t\t\tsalesTaxConfig = new Properties();\n\t\t\t\tsalesTaxConfig.load(Thread.currentThread().getContextClassLoader()\n\t\t\t\t\t\t.getResourceAsStream(\"sales_tax_entries.properties\"));\n\t\t\t\tdataLoadedIndicator = true;\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tlogger.error(\"There was an exception trying to upoad product data {}\", e);\n\t\t\tthrow new RetailException(ErrorCodes.ERR_PRODUCT_DATA_LOAD_ERROR);\n\t\t}\n\t}",
"public void checkIsEnabled() {\r\n\t\tMcsElement.getElementByPartAttributeValueAndParentElement(driver, \"div\", \"@class\", PURCHASING_PRODUCT_WINDOW_CLASS, \"input\", \"@name\",\r\n\t\t\t\t\"isEnabled\", true, true).click();\r\n\t\tReporter.log(\"Check IsEnabled\", true);\r\n\t}",
"boolean isInstalled();",
"public String checkDBProductName() throws Exception;",
"@Override\n public boolean checkAvailability(BasketEntryDto basketEntryDto) {\n // Add communication to product micro service here for product validation\n return Boolean.TRUE;\n }",
"public boolean addProduct(Product product) {\n\t\treturn false;\n\t}",
"@Override\n public boolean hasUploadedFiles(Item item) throws SQLException\n {\n List<Bundle> bundles = getBundles(item, \"ORIGINAL\");\n for (Bundle bundle : bundles) {\n if (CollectionUtils.isNotEmpty(bundle.getBitstreams())) {\n return true;\n }\n }\n return false;\n }",
"boolean hasItemStorage();",
"boolean isSetInstallmentType();",
"@Override\r\n\tpublic boolean isProductExists(int productId) {\n\t\treturn dao.isProductExists(productId);\r\n\t}",
"@Override\r\n\tpublic boolean importData(TransferSupport support) {\n\t\tboolean imported = false;\r\n\t\t// Only import into JTables...\r\n\t\tComponent comp = support.getComponent();\r\n\t\tif (comp instanceof JTable) {\r\n\t\t\tJTable target = (JTable) comp;\r\n\t\t\t// Need to know where we are importing to...\r\n\t\t\tDropLocation dl = support.getDropLocation();\r\n\t\t\tPoint dp = dl.getDropPoint();\r\n\t\t\tint dropCol = target.columnAtPoint(dp);\r\n\t\t\tint dropRow = target.rowAtPoint(dp);\r\n\t\t\t// Get the Transferable at the heart of it all\r\n\t\t\tTransferable t = support.getTransferable();\r\n\t\t\t//do transfer\r\n\r\n\t\t}\r\n\t\treturn imported;\r\n\t}",
"synchronized public static boolean isInstalled() {\n return installed > 0;\n }",
"public boolean deleteProduct(Product selectedProduct) {\n for(Product product: allProducts) {\n if (product.getId() == selectedProduct.getId() &&\n product.getName().equals(selectedProduct.getName()) &&\n product.getPrice() == selectedProduct.getPrice() &&\n product.getStock() == selectedProduct.getStock() &&\n product.getMin() == selectedProduct.getMin() &&\n product.getMax() == selectedProduct.getMax()) {\n return allProducts.remove(product);\n }\n }\n System.out.println(\"No matching part was found\");\n return false;\n }",
"public boolean isSetPackagename() {\n return this.packagename != null;\n }",
"private void checkQPairIsInstalled() {\n try {\n if (!isPackageInstalled(getString(R.string.qpair_package))) {\n createDialog(getString(R.string.dialog_qpair_not_installed), getString(R.string.dialog_qpair_not_installed_description), new OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n openPlayStore(getString(R.string.qpair_package));\n }\n });\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"@Override\n public void onClick(View v) {\n if(checkEmptyFields() && !productBrand.isEmpty()) // check for empty fields then upload\n {\n updateProduct();\n }\n }",
"@Override\n\tpublic boolean supports(Class<?> clazz) {\n\t\treturn Product.class.equals(clazz);\n\t}",
"public boolean hasProductsRS() {\n return productsRSBuilder_ != null || productsRS_ != null;\n }",
"@java.lang.Override\n public boolean hasCatalog() {\n return catalog_ != null;\n }",
"private void cargarProductos() {\r\n\t\tproductos = productoEJB.listarInventariosProductos();\r\n\r\n\t\tif (productos.size() == 0) {\r\n\r\n\t\t\tList<Producto> listaProductos = productoEJB.listarProductos();\r\n\r\n\t\t\tif (listaProductos.size() > 0) {\r\n\r\n\t\t\t\tMessages.addFlashGlobalWarn(\"Para realizar una venta debe agregar los productos a un inventario\");\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}",
"protected boolean checkLicense() {\n\t\t\t\t\treturn false;\n\t\t\t\t}",
"public boolean isProdEnvironment() {\n\n\t\tif (driver.getCurrentUrl().contains(\"www.homedepot.com\")\n\t\t\t\t|| dataHelper.getCommonData(CommonDataColumn.EnvironmentUrl)\n\t\t\t\t\t\t.contains(\"www.homedepot.com\")\n\t\t\t\t|| HelperClass.baseModel.runEnvironment.equals(\"Prod\")) {\n\n\t\t\treturn true;\n\n\t\t} else {\n\n\t\t\treturn false;\n\t\t}\n\t}",
"@SuppressWarnings(\"unchecked\")\n private void fetchProductInformation() {\n // Query the App Store for product information if the user is is allowed\n // to make purchases.\n // Display an alert, otherwise.\n if (SKPaymentQueue.canMakePayments()) {\n // Load the product identifiers fron ProductIds.plist\n String filePath = NSBundle.getMainBundle().findResourcePath(\"ProductIds\", \"plist\");\n NSArray<NSString> productIds = (NSArray<NSString>) NSArray.read(new File(filePath));\n\n StoreManager.getInstance().fetchProductInformationForIds(productIds.asStringList());\n } else {\n // Warn the user that they are not allowed to make purchases.\n alert(\"Warning\", \"Purchases are disabled on this device.\");\n }\n }",
"public com.google.common.util.concurrent.ListenableFuture<com.google.longrunning.Operation> importProducts(\n com.google.cloud.retail.v2beta.ImportProductsRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getImportProductsMethod(), getCallOptions()), request);\n }",
"public boolean removeAndCheck(String product) {\n\t\tif(this.product.contains(product)) {\n\t\t\tthis.product.remove(product);\n\t\t\tif(!this.product.isEmpty()) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"This item is not in the cart.\");\n\t\t\treturn false;\n\t\t}\n\t\t//TODO Create a new method that will check for it.\n\t}",
"public void importProducts(com.google.cloud.retail.v2beta.ImportProductsRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getImportProductsMethod(), getCallOptions()), request, responseObserver);\n }",
"public boolean importData(JComponent c, Transferable t)\n {\n if (canImport(c, t.getTransferDataFlavors()))\n {\n try\n {\n List mediaItemList = (List)t.getTransferData(MediaItemsTransferable.flavor);\n\n JTable target = (JTable)c;\n if (target != contentMetadataTablePanel.getTable())\n {\n throw new IllegalArgumentException(\"mismatched transfer handler\");\n }\n addIndex = target.getSelectedRow();\n ArrayList items = Util.contentMetadataCollectionToContentIdArrayList(contentMetadataTablePanel.getMetadata());\n items.addAll(addIndex, mediaItemList);\n contentMetadataTablePanel.updateModel(items);//XXX:0:20050111iain:\n\n return true;\n }\n catch (UnsupportedFlavorException ufe)\n {\n }\n catch (IOException ioe)\n {\n }\n }\n\n return false;\n }"
] | [
"0.77243394",
"0.6969761",
"0.68355674",
"0.6684317",
"0.66574234",
"0.6555168",
"0.65219504",
"0.6342474",
"0.6261834",
"0.62502044",
"0.6197154",
"0.6171368",
"0.6150006",
"0.61281884",
"0.61032313",
"0.60841584",
"0.60764515",
"0.6027135",
"0.60142314",
"0.58512324",
"0.5838149",
"0.57967395",
"0.5793175",
"0.5792095",
"0.5778524",
"0.5767514",
"0.5764152",
"0.5764151",
"0.5757394",
"0.57556975",
"0.5746079",
"0.572627",
"0.57253665",
"0.57130975",
"0.56897557",
"0.5612034",
"0.5587133",
"0.55492127",
"0.5547336",
"0.5533595",
"0.5530981",
"0.5490462",
"0.54598635",
"0.5457173",
"0.54441214",
"0.5440918",
"0.5390173",
"0.53853256",
"0.5385003",
"0.53446203",
"0.53053015",
"0.53009003",
"0.5299907",
"0.5291887",
"0.5284599",
"0.5279719",
"0.5267689",
"0.5267383",
"0.52521604",
"0.5243254",
"0.5221623",
"0.52070045",
"0.5206091",
"0.5195981",
"0.51667607",
"0.5165635",
"0.5142974",
"0.51396537",
"0.5136796",
"0.5132259",
"0.51272726",
"0.5121729",
"0.51155615",
"0.51140356",
"0.51133096",
"0.51100516",
"0.51077354",
"0.5095695",
"0.5084936",
"0.50789213",
"0.507819",
"0.5074722",
"0.5062496",
"0.5058039",
"0.5057465",
"0.505625",
"0.50467634",
"0.5045841",
"0.5041889",
"0.503929",
"0.5039025",
"0.50363225",
"0.50349927",
"0.502936",
"0.5019223",
"0.5010887",
"0.4992903",
"0.49845973",
"0.4982782",
"0.49814954"
] | 0.63097984 | 8 |
Sets a boolean value for imported attribute | public void setImported(boolean imported)
{
this.imported = imported;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setI_IsImported (boolean I_IsImported);",
"public void setImported(boolean imported);",
"public boolean getIsImport() {\n return getAsBoolean(\"isImport\");\n }",
"public boolean getImported();",
"boolean getImported();",
"@Override\n public void setAttribute(boolean f)\n {\n checkState();\n attribute = f;\n }",
"public void setRequiresTaxCertificate (boolean RequiresTaxCertificate)\n{\nset_Value (COLUMNNAME_RequiresTaxCertificate, Boolean.valueOf(RequiresTaxCertificate));\n}",
"public void setAugment(boolean aValue);",
"void setBinaryFileAttribute(boolean flag);",
"void setBoolean(boolean value);",
"public Boolean getBooleanAttribute();",
"public Builder setImportConfiguration(io.dstore.values.BooleanValue value) {\n if (importConfigurationBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n importConfiguration_ = value;\n onChanged();\n } else {\n importConfigurationBuilder_.setMessage(value);\n }\n\n return this;\n }",
"public void setOn(boolean arg) {\n isOn = arg;\n }",
"public void setTallied(java.lang.Boolean value);",
"void set(boolean value);",
"void setBoolean(String key, boolean val);",
"public void setEnabled(boolean aFlag) { _enabled = aFlag; }",
"public void setIsModifier(java.lang.Boolean value);",
"void setIsManaged(boolean isManaged);",
"void set(boolean on);",
"public void setEnabled(Boolean value) { this.myEnabled = value.booleanValue(); }",
"public void setProcessed (boolean Processed)\n{\nset_Value (\"Processed\", new Boolean(Processed));\n}",
"public void setAktif(java.lang.Boolean value) {\n this.aktif = value;\n }",
"public boolean isImported();",
"public void setBool(String parName, boolean parVal) throws HibException;",
"public void set_boolean(boolean param) {\n this.local_boolean = param;\n }",
"public void setElement(boolean value) {\r\n this.element = value;\r\n }",
"public void setExternallyManaged(java.lang.Boolean value);",
"@Accessor(qualifier = \"singleFile\", type = Accessor.Type.SETTER)\n\tpublic void setSingleFile(final Boolean value)\n\t{\n\t\tgetPersistenceContext().setPropertyValue(SINGLEFILE, value);\n\t}",
"public Literal setLiteralBoolean(Boolean literalData);",
"public abstract void setInput(boolean value);",
"public boolean isImported()\n\t{\n\t\treturn imported;\n\t}",
"public void setMyBool(boolean myBoolIn) {\n myBool = myBoolIn;\n }",
"public void set(boolean bol);",
"String booleanAttributeToGetter(String arg0);",
"public void setHasCustom(boolean hasCustom);",
"protected boolean isImport() {\n\t\t// Overrides\n\t\treturn false;\n\t}",
"public boolean importable()\r\n\t{\r\n\t\treturn isImportable(getInputStream());\r\n\t}",
"public boolean isI_IsImported();",
"void setString(boolean string);",
"public void setA ( boolean a ) {\n\n\tthis.a = a;\n }",
"public void setValid(boolean value)\r\n {\r\n //Override this method in MediaItem object\r\n getSemanticObject().setBooleanProperty(swb_valid, value,false);\r\n }",
"public void setDirezione(boolean direzione) {\n\r\n }",
"protected void loadBoolean(int location, boolean value){\r\n\t\tif(value){\r\n\t\t\tGL20.glUniform1f(location, 1);\r\n\t\t}\r\n\t\telse{\r\n\t\t\tGL20.glUniform1f(location, 0);\r\n\t\t}\r\n\t}",
"public void setIsExist(boolean value) {\n this.isExist = value;\n }",
"public void setValue(boolean value) {\n this.value = value;\n }",
"public void setNewlyImported(boolean newlyImported) {\n ((com.guidewire.commons.entity.Sourceable)__getDelegateManager().getImplementation(\"com.guidewire.commons.entity.Sourceable\")).setNewlyImported(newlyImported);\n }",
"public void setNewlyImported(boolean newlyImported) {\n ((com.guidewire.commons.entity.Sourceable)__getDelegateManager().getImplementation(\"com.guidewire.commons.entity.Sourceable\")).setNewlyImported(newlyImported);\n }",
"public void setNewlyImported(boolean newlyImported) {\n ((com.guidewire.commons.entity.Sourceable)__getDelegateManager().getImplementation(\"com.guidewire.commons.entity.Sourceable\")).setNewlyImported(newlyImported);\n }",
"public void setNewlyImported(boolean newlyImported) {\n ((com.guidewire.commons.entity.Sourceable)__getDelegateManager().getImplementation(\"com.guidewire.commons.entity.Sourceable\")).setNewlyImported(newlyImported);\n }",
"public void setNewlyImported(boolean newlyImported) {\n ((com.guidewire.commons.entity.Sourceable)__getDelegateManager().getImplementation(\"com.guidewire.commons.entity.Sourceable\")).setNewlyImported(newlyImported);\n }",
"public void setNewlyImported(boolean newlyImported) {\n ((com.guidewire.commons.entity.Sourceable)__getDelegateManager().getImplementation(\"com.guidewire.commons.entity.Sourceable\")).setNewlyImported(newlyImported);\n }",
"public void setForua(boolean newValue);",
"io.dstore.values.BooleanValue getImportConfiguration();",
"public void setBooleanValue(String booleanValue) { this.booleanValue = booleanValue; }",
"public void setImport(org.apache.geronimo.deployment.xbeans.ImportType.Enum ximport)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(IMPORT$0, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(IMPORT$0);\n }\n target.setEnumValue(ximport);\n }\n }",
"@Override\n\tpublic void setValue(String path, boolean value) {\n\t\tsetValue(path, new Boolean(value));\n\t}",
"public void setValue(boolean value) {\n this.value = value;\n }",
"public ElementDefinitionDt setIsModifier( boolean theBoolean) {\n\t\tmyIsModifier = new BooleanDt(theBoolean); \n\t\treturn this; \n\t}",
"public Value.Builder setAktif(boolean value) {\n validate(fields()[6], value);\n this.aktif = value;\n fieldSetFlags()[6] = true;\n return this;\n }",
"public void setreadFlag(Boolean value) {\r\n setAttributeInternal(READFLAG, value);\r\n }",
"public Builder setImportConfigurationNull(boolean value) {\n \n importConfigurationNull_ = value;\n onChanged();\n return this;\n }",
"void setManualCheck (boolean value);",
"public PropertyBoolean(String uid, String value) {\n super(uid, value);\n setFixedValues(new HashSet<Boolean>(Arrays.asList(Boolean.TRUE, Boolean.FALSE)));\n }",
"public void setEnabled(String tmp) {\n enabled = DatabaseUtils.parseBoolean(tmp);\n }",
"public void setEnabled(boolean arg){\r\n\t\tenabled = arg;\r\n\t\tif(!arg){\r\n\t\t\tstop(0);\r\n\t\t}\r\n\t\telse{\r\n\t\t\tsonido = new Sonido(path,true);\r\n\t\t}\r\n\t}",
"void setRequired(boolean required);",
"public static void attribute(String name, boolean value) {\n openAttribute(name); Log.write(value); closeAttribute();\n }",
"public boolean isSetImport()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(IMPORT$0) != 0;\n }\n }",
"io.dstore.values.BooleanValueOrBuilder getImportConfigurationOrBuilder();",
"public io.dstore.values.BooleanValue getImportConfiguration() {\n return importConfiguration_ == null ? io.dstore.values.BooleanValue.getDefaultInstance() : importConfiguration_;\n }",
"public void setIsPrimary(boolean isPrimary);",
"public void setIsLat(Boolean boo) {\n\t this.isLat = boo;\n }",
"@Test\n\tpublic void test_TCM__boolean_getBooleanValue() {\n\t\tfinal Attribute attribute = new Attribute(\"test\", \"true\");\n\t\ttry {\n\t\t\tassertTrue(\"incorrect boolean true value\", attribute.getBooleanValue());\n\n attribute.setValue(\"false\");\n\t\t\tassertTrue(\"incorrect boolean false value\", !attribute.getBooleanValue());\n\n attribute.setValue(\"TRUE\");\n\t\t\tassertTrue(\"incorrect boolean TRUE value\", attribute.getBooleanValue());\n\n attribute.setValue(\"FALSE\");\n\t\t\tassertTrue(\"incorrect boolean FALSE value\", !attribute.getBooleanValue());\n\n attribute.setValue(\"On\");\n\t\t\tassertTrue(\"incorrect boolean TRUE value\", attribute.getBooleanValue());\n\n attribute.setValue(\"Yes\");\n\t\t\tassertTrue(\"incorrect boolean TRUE value\", attribute.getBooleanValue());\n\n attribute.setValue(\"1\");\n\t\t\tassertTrue(\"incorrect boolean TRUE value\", attribute.getBooleanValue());\n\n attribute.setValue(\"OfF\");\n\t\t\tassertTrue(\"incorrect boolean FALSE value\", !attribute.getBooleanValue());\n\n attribute.setValue(\"0\");\n\t\t\tassertTrue(\"incorrect boolean FALSE value\", !attribute.getBooleanValue());\n\n attribute.setValue(\"No\");\n\t\t\tassertTrue(\"incorrect boolean FALSE value\", !attribute.getBooleanValue());\n\n\t\t} catch (DataConversionException e) {\n\t\t\tfail(\"couldn't convert boolean value\");\n\t\t}\n\n\t\ttry {\n attribute.setValue(\"foo\");\n\t\t\tassertTrue(\"incorrectly returned boolean from non boolean value\", attribute.getBooleanValue());\n\n\t\t} catch (DataConversionException e) {\n\t\t\t// good\n\t\t} catch (Exception e) {\n\t\t\tfail(\"Expected DataConversionException, but got \" + e.getClass().getName());\n\t\t}\n\n\n\t}",
"public void set()\r\n {\r\n isSet = true;\r\n }",
"public void setIsFromMassUpdate (boolean IsFromMassUpdate);",
"public void putBoolean(ResourceLocation name, boolean value) {\n data.putBoolean(name.toString(), value);\n }",
"public void setIsTaxIncluded (boolean IsTaxIncluded);",
"public void setAA(boolean value) {\n this.AA = value;\n }",
"public void setActivo(boolean activo)\r\n/* 115: */ {\r\n/* 116:142 */ this.activo = activo;\r\n/* 117: */ }",
"public void setAtmo(boolean value) {\n this.atmo = value;\n }",
"public void setInDatabase(boolean b) {\n \n }",
"void setSet(boolean set);",
"void xsetIsManaged(org.apache.xmlbeans.XmlBoolean isManaged);",
"@Test\n public void setEnabled() {\n cleanEntity0();\n\n entity0.setEnabled(enabledS);\n assertEquals(enabledS, ReflectionTestUtils.getField(entity0, \"enabled\"));\n }",
"public void setData(boolean isData);",
"public void setLocal(boolean isLocal);",
"void setEnabled(boolean enabled);",
"void setEnabled(boolean enabled);",
"void setEnabled(boolean enabled);",
"void setEnabled(boolean enabled);",
"void setLoading(boolean isLoading);",
"public boolean setEnabled(boolean enable);",
"public void setClaim(boolean a){\n isClaimed= a;\n \n}",
"public void setIsPrimary(boolean value) {\r\n this.isPrimary = value;\r\n }",
"boolean hasImportConfiguration();",
"public void setActivo(boolean activo)\r\n/* 178: */ {\r\n/* 179:328 */ this.activo = activo;\r\n/* 180: */ }",
"BooleanProperty getOn();",
"public Boolean getBoolean(String attr) {\n return (Boolean) super.get(attr);\n }",
"public void setVar74(java.lang.Boolean value) {\n this.var74 = value;\n }"
] | [
"0.77917594",
"0.7626825",
"0.64503914",
"0.632467",
"0.6292131",
"0.6279957",
"0.6268332",
"0.62642115",
"0.6258317",
"0.62409675",
"0.6233856",
"0.62094635",
"0.61860836",
"0.61781806",
"0.6144493",
"0.6114986",
"0.60748804",
"0.60661197",
"0.6061175",
"0.605338",
"0.60327715",
"0.60127926",
"0.5947347",
"0.5914661",
"0.59052247",
"0.5900399",
"0.58936787",
"0.5888241",
"0.5878597",
"0.5873266",
"0.5852032",
"0.58469176",
"0.5840704",
"0.5788732",
"0.5773532",
"0.57718384",
"0.5767498",
"0.5759512",
"0.57506037",
"0.5742148",
"0.57277036",
"0.5722186",
"0.5721741",
"0.57201415",
"0.571822",
"0.57123446",
"0.5703522",
"0.5703522",
"0.5703522",
"0.5681438",
"0.5681438",
"0.5681438",
"0.56588393",
"0.56577194",
"0.56516",
"0.5650805",
"0.5646732",
"0.56428796",
"0.5641181",
"0.5635151",
"0.5629064",
"0.5627965",
"0.5626538",
"0.5623592",
"0.5621138",
"0.56142616",
"0.56061405",
"0.56051534",
"0.5602965",
"0.5599574",
"0.55958873",
"0.55873287",
"0.5584861",
"0.55846393",
"0.5580785",
"0.55798036",
"0.55726844",
"0.5562677",
"0.5555905",
"0.55551326",
"0.5548903",
"0.5545311",
"0.5536739",
"0.5536645",
"0.55298644",
"0.55274206",
"0.5521464",
"0.5519323",
"0.5519323",
"0.5519323",
"0.5519323",
"0.5516466",
"0.55162454",
"0.5505283",
"0.54923946",
"0.5487186",
"0.5481246",
"0.54808676",
"0.547725",
"0.54741"
] | 0.69767183 | 2 |
Gets the quantity of the product. | public int getQuantity()
{
return quantity;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public long getQuantity() {\n return quantity_;\n }",
"public long getQuantity() {\n return quantity_;\n }",
"public long getQuantity() {\n return quantity_;\n }",
"public long getQuantity() {\n return quantity_;\n }",
"public java.math.BigDecimal getQuantity() {\n return quantity;\n }",
"public Integer getQuantity() {\n return this.quantity;\n }",
"public int getQuantity() {\r\n\t\treturn this.quantity;\r\n\t}",
"public Integer getQuantity() {\r\n return this.quantity;\r\n }",
"public int getQuantity() {\r\n\t\treturn quantity;\r\n\t}",
"public java.math.BigDecimal getQuantity() {\r\n return quantity;\r\n }",
"public int getQuantity() {\n\t\treturn quantity;\n\t}",
"public int getQuantity() {\n\t\treturn quantity;\n\t}",
"public int getQuantity() {\n\t\treturn quantity;\n\t}",
"public int getQuantity() {\n\t\treturn quantity;\n\t}",
"public int getQuantity() {\n\t\treturn quantity;\n\t}",
"public Integer getQuantity() {\n return quantity;\n }",
"public Integer getQuantity() {\n return quantity;\n }",
"public Long getQuantity() {\r\n return quantity;\r\n }",
"public Long getQuantity() {\n return quantity;\n }",
"@Schema(description = \"Number of units consumed\")\n public Long getQuantity() {\n return quantity;\n }",
"public Integer getQuantity() {\n return this.quantity;\n }",
"public Number getQuantity() {\n return (Number) getAttributeInternal(QUANTITY);\n }",
"public Integer getQuantity();",
"public int getProductQuantity(String product) {\n //\n try {\n return shoppingBasket.get(product);\n } catch (NullPointerException exception) {\n throw exception;\n }\n }",
"public int numberProduct() {\n\t\tint number = 0;\n\t\tfor (ItemCart item : listItemcart) {\n\t\t\tnumber += item.getQuantity();\n\t\t}\n\t\treturn number;\n\t}",
"Quantity getQuantity();",
"public Double getProductQty() {\n return productQty;\n }",
"long getQuantity();",
"long getQuantity();",
"public String getQuantity() {\n return quantity;\n }",
"public int getQuantity(Product p){\n int count = 0;\n for (Product i : cartContents)\n {\n if (i.getProductID().equals(p.getProductID()))\n {\n count++;\n }\n }\n return count;\n }",
"public int getQuantity() {\n return this.quantity;\n }",
"public int getQuantity() {\r\n return quantity;\r\n }",
"public Integer getpQuantity() {\n return pQuantity;\n }",
"public int getQuantity()\n {\n \treturn quantity;\n }",
"@Override\r\n public int getProductQuantity(Product product) {\r\n int i = 0;\r\n for (Product p : this.productList) {\r\n if (p.getId() == product.getId()) {\r\n return this.productQuantity.get(i);\r\n }\r\n i++;\r\n }\r\n return -1;\r\n }",
"public int getQuantity(){\n\t\treturn quantity;\n\t}",
"public int getQuantity() {\r\n return quantity;\r\n }",
"public int getQuantity() {\n return quantity;\n }",
"public int getQuantity() {\n return quantity;\n }",
"public int getQuantity() {\n return quantity;\n }",
"public int getQuantity() {\n return quantity;\n }",
"public int getQuantity() {\n return quantity;\n }",
"public int getQuantity() {\n return quantity;\n }",
"int getQuantity();",
"public double getQuantity() {\n return quantity;\n }",
"public int getQuantity();",
"BigDecimal getQuantity();",
"public org.hl7.fhir.Integer getQuantity()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.hl7.fhir.Integer target = null;\n target = (org.hl7.fhir.Integer)get_store().find_element_user(QUANTITY$10, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }",
"public float getQuantity() {\n return quantity;\n }",
"public int getQty() {\n return qty;\n }",
"public int getpQuantity() {\n return pQuantity;\n }",
"public int getTotalQuantity() {\n\t\treturn totalQuantity;\n\t}",
"public int getQuantity()\n {\n return quantity;\n }",
"public int getItemQty() {\n return itemQty;\n }",
"public String getProductQuantity() throws InterruptedException\n\t{\n\t\tThread.sleep(2000);\n\t\twaitForVisibility(quantityInputFieldShoppingCart);\n\t\treturn quantityInputFieldShoppingCart.getAttribute(\"value\");\n\t}",
"public CQ getProductServiceQuantity() { \r\n\t\tCQ retVal = this.getTypedField(12, 0);\r\n\t\treturn retVal;\r\n }",
"public int getQuantity()\r\n {\r\n return _quantity;\r\n }",
"String getQuantity() {\n return Integer.toString(quantity);\n }",
"public int getQuantity() {\r\n return quantity;\r\n }",
"public static int getProductQuantity(Product product) {\n ShoppingCartEntry curEntry = cartMap.get(product);\n\n if(curEntry != null)\n return curEntry.getQuantity();\n\n return 0;\n }",
"public Number getSizeQty() {\n return (Number)getAttributeInternal(SIZEQTY);\n }",
"protected Double getQuantity() {\n return quantity;\n }",
"public static int getProductQuantity(Products product) {\n ShoppingCartEntry curEntry = cartMap.get(product);\n\n if (curEntry != null)\n return curEntry.getQuantity();\n\n return 0;\n }",
"public Float getQuantity() {\n return quantity;\n }",
"public CQ getPsl12_ProductServiceQuantity() { \r\n\t\tCQ retVal = this.getTypedField(12, 0);\r\n\t\treturn retVal;\r\n }",
"public int getCartQuantity() {\n return cartQuantity;\n }",
"MeasureType getQuantity();",
"public java.math.BigDecimal getQty() throws java.rmi.RemoteException;",
"public String Quantity() {\n return OCCwrapJavaJNI.Units_Dimensions_Quantity(swigCPtr, this);\n }",
"public int getQty() {\n return (isReturn ? qty * -1 : qty);\n }",
"public int getQuantidade() {\r\n\r\n return produtos.size();\r\n }",
"public Integer getProductCount() {\n return productCount;\n }",
"@Override\n\tpublic int getNoofQuantity() {\n\t String sql=\"SELECT SUM(quantity) FROM supplier_product\";\n\t int total=this.getJdbcTemplate().queryForObject(sql, Integer.class);\n\t\treturn total;\n\t}",
"public int getQuantity() { \n return myOrderQuantity;\n }",
"public int getQuantity(String code) {\n if(itemExists(code)) {\n return cart.get(code);\n }\n return 0;\n }",
"int getSellQuantity();",
"int getBuyQuantity();",
"public int getNumberOfProducts(){\n return this.products.size();\n }",
"public java.math.BigDecimal getQUANTITY() {\r\n return QUANTITY;\r\n }",
"@Override\r\n public int getItemQuantity() {\n return this.quantity;\r\n }",
"public int getQuantityByName(String prodName) {\n\t\ttry {\n\t\t\tst = db.prepare(\"SELECT quantity FROM Products WHERE name=?\");\n\t\t\tst.bind(1, prodName);\n\t\t\tif (st.step())\n\t\t\t\treturn st.columnInt(0);\n\t\t\telse\n\t\t\t\treturn -1;\n\t\t} catch (SQLiteException e) {\n\t\t\tlogger.error(\"No such product name \"+prodName);\n\t\t\treturn -1;\n\t\t}\n\t}",
"public String getSelectQuantity() {\n\t\tactionStartTime = new Date();\n\t\ttry {\n\t\t\tInteger quantityUnit = promotionProgramMgr.getSelectQuantity(groupKMId, levelKMId);\n\t\t\tresult.put(ERROR, false);\n\t\t\tresult.put(\"quantityUnit\", quantityUnit);\n\t\t} catch (Exception e) {\n\t\t\tLogUtility.logErrorStandard(e, R.getResource(\"web.log.message.error\", \"vnm.web.action.program.PromotionCatalogAction.getMaxOrderNumber\"), createLogErrorStandard(actionStartTime));\n\t\t\tresult.put(\"errMsg\", ValidateUtil.getErrorMsg(ConstantManager.ERR_SYSTEM));\n\t\t\tresult.put(ERROR, true);\n\t\t}\n\t\treturn SUCCESS;\n\t}",
"public int getSize()\n\t{\n\n\t\t// Return the number of Products in the inventory\n\t\treturn myProductInventory.size();\n\n\t}",
"public int getQuantidade() {\r\n\t\treturn quantidade;\r\n\t}",
"public int getNumberOfProducts ()\n {\n return (numberOfProducts);\n }",
"public double getQtyProduced() {\n\t\treturn qtyProduced;\n\t}",
"public int getSize() {\n return cart.size();\n }",
"@Override\n // This is not right, please do not use.\n public int getQuantity() {\n String a = null;\n a.isEmpty();\n\n return super.getQuantity();\n }",
"public static final int quantityAvailable(String productKey) {\n\t\tInteger tValue = sConsumableProducts.get(productKey);\n\t\tif (tValue == null) {\n\t\t\treturn 0;\n\t\t} else {\n\t\t\treturn tValue.intValue();\n\t\t}\n\t}",
"public int getproductCount() {\n\t\treturn getFieldCount(productPlate);\n\t}",
"public int getSize() {\n\t\treturn cart.size();\n\t}",
"@Override\n\tpublic java.lang.String getNeedQuantity() {\n\t\treturn _lineaGastoCategoria.getNeedQuantity();\n\t}",
"public Number getInseamQty() {\n return (Number)getAttributeInternal(INSEAMQTY);\n }",
"public double getFruitQuantity() {\r\n\t\treturn fruitQuantity;\r\n\t}",
"public int getProductCount();",
"BigDecimal getDisplayQuantity();",
"private int checkItemQuantity() {\n\n int desiredQuantity = initialQuantity;\n MenusItem tempItem = null;\n tempItem = ItemCart.getInstance().checkItem(menusItem);\n\n if(tempItem != null){\n desiredQuantity = tempItem.getDesiredQuantity();\n }\n\n\n return desiredQuantity;\n }",
"@Override\n\tpublic int getQuantidade() {\n\t\treturn hamburguer.getQuantidade();\n\t}",
"public int getWeight() {\n\t\treturn quantity*weight; \n\t}"
] | [
"0.79308015",
"0.79308015",
"0.7892754",
"0.7892754",
"0.7772161",
"0.77557033",
"0.77530056",
"0.7747068",
"0.7743807",
"0.7732663",
"0.77143127",
"0.77143127",
"0.77143127",
"0.77143127",
"0.77143127",
"0.77045774",
"0.77045774",
"0.76777524",
"0.7660681",
"0.7652603",
"0.7639496",
"0.7627866",
"0.7616786",
"0.75522465",
"0.7535236",
"0.7529334",
"0.7522372",
"0.75149935",
"0.75149935",
"0.74997437",
"0.74994546",
"0.74871343",
"0.7482535",
"0.74670756",
"0.74669546",
"0.74572664",
"0.74513173",
"0.7432445",
"0.7414308",
"0.7414308",
"0.7414308",
"0.7414308",
"0.7414308",
"0.7414308",
"0.7404156",
"0.7400982",
"0.7366644",
"0.73614967",
"0.73525566",
"0.7267017",
"0.7256594",
"0.7248547",
"0.72231054",
"0.7219791",
"0.7217587",
"0.72111005",
"0.7181687",
"0.7155694",
"0.7135588",
"0.7134836",
"0.7099281",
"0.7091502",
"0.70703185",
"0.70612293",
"0.705731",
"0.69487476",
"0.693333",
"0.69186544",
"0.6889775",
"0.6870559",
"0.6866074",
"0.6836162",
"0.6818944",
"0.6800758",
"0.67576593",
"0.67404443",
"0.6730903",
"0.66361934",
"0.66004294",
"0.65981597",
"0.6577039",
"0.65622824",
"0.6548515",
"0.65195",
"0.65144736",
"0.64890647",
"0.64883393",
"0.64413893",
"0.6427628",
"0.6420247",
"0.64124185",
"0.64016277",
"0.6398329",
"0.6396279",
"0.6344281",
"0.63429236",
"0.63407195",
"0.6340475",
"0.63257736",
"0.63113075"
] | 0.76977104 | 17 |
Sets the quantity of product. | public void setQuantity(int quantity)
{
this.quantity = quantity;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setQuantity(int value) {\n this.quantity = value;\n }",
"public void setQuantity(int value) {\n this.quantity = value;\n }",
"public void setQuantity(int value) {\n this.quantity = value;\n }",
"public void setQuantity(int quantity) {\n this.quantity = quantity;\n this.updateTotalPrice();\n }",
"public void setQuantity(int quantity) {\r\n this.quantity = quantity;\r\n }",
"public void setQuantity(int quantity) {\r\n\t\tthis.quantity = quantity;\r\n\t}",
"public void setQuantity(int qty) {\r\n\t\tthis.quantity = qty;\r\n\t}",
"public void setQuantity(int quantity) {\n this.quantity = quantity;\n }",
"public void setQuantity(int quantity) {\n this.quantity = quantity;\n }",
"public void setQuantity(int quantity) {\n\t\tthis.quantity = quantity;\n\t}",
"public void setQuantity(Integer quantity) {\n this.quantity = quantity;\n }",
"protected void setQuantity(Double quantity) {\n this.quantity = quantity;\n }",
"public void setQuantity(Integer quantity) {\r\n this.quantity = quantity;\r\n }",
"public void setQuantity(Integer quantity) {\n this.quantity = quantity;\n }",
"public void setQuantity(Integer quantity) {\n this.quantity = quantity;\n }",
"@Override\r\n public void ItemQuantity(int quantity) {\n this.quantity = quantity;\r\n }",
"public void setQuantity(java.math.BigDecimal quantity) {\r\n this.quantity = quantity;\r\n }",
"public void setQuantity(int quant){\n\t\t// store into the instance variable quantity the value of the parameter quant\n\t\tquantity = quant;\n\t}",
"public void setQuantity(java.math.BigDecimal quantity) {\n this.quantity = quantity;\n }",
"public void setQuantity(String quantity) {\n this.quantity = quantity;\n }",
"public void setQuantity(int quantity) {\r\n if (quantity >= 0) {\r\n this.quantity = quantity;\r\n }\r\n else {\r\n System.out.print(\"Sorry no negative quantities -- setting to 1\");\r\n this.quantity = 1;\r\n }\r\n }",
"public void setQuantity(Number value) {\n setAttributeInternal(QUANTITY, value);\n }",
"public void setQty(int qty) {\n this.qty = qty;\n }",
"public void setProductQuantity (Product key, int quant) {\n\t\tm_prodList.remove(key);\n\t\tm_prodList.put(key,new Integer(quant));\n\n\t}",
"public void setQuantity(float value) {\n this.quantity = value;\n }",
"public void setQuantity(Float quantity) {\n this.quantity = quantity;\n }",
"public void setQuantity(Long quantity) {\r\n this.quantity = quantity;\r\n }",
"public void setpQuantity(int pQuantity) {\n this.pQuantity = pQuantity;\n }",
"public void setQuantity(Long quantity) {\n this.quantity = quantity;\n }",
"public void setProductStock(int qty){\n\t\tstockQuantity = qty;\r\n\t}",
"void setQuantity(int quantity) {\n mQuantityTextView.setText(String.valueOf(quantity));\n }",
"public void setProductQty(Double productQty) {\n this.productQty = productQty;\n }",
"public void setpQuantity(Integer pQuantity) {\n this.pQuantity = pQuantity;\n }",
"public void setCurrentQuantity(int currentQuantity) {\n this.currentQuantity = currentQuantity;\n }",
"public void setQuantity(org.hl7.fhir.Integer quantity)\n {\n generatedSetterHelperImpl(quantity, QUANTITY$10, 0, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_SINGLETON);\n }",
"public static void setQuantity(Product product, int quantity) {\n ShoppingCartEntry curEntry = cartMap.get(product);\n\n // If the quantity is zero or less, remove the products\n if(quantity <= 0) {\n if(curEntry != null)\n removeProduct(product);\n return;\n }\n\n // If a current cart entry doesn't exist, create one\n if(curEntry == null) {\n curEntry = new ShoppingCartEntry(product, quantity);\n cartMap.put(product, curEntry);\n return;\n }\n\n // Update the quantity\n curEntry.setQuantity(quantity);\n }",
"public void setQuantity(int quantity) {\n\t\tthis.quantity = quantity;\n\t\tif(this.quantity>0){\n\t\t\tthis.setItemState(false);\n\t\t}\n\t\telse{\n\t\t\tthis.setItemState(false);\n\t\t}\n\t}",
"public void setQty (BigDecimal Qty)\n\t{\n\t\tsetQtyEntered(Qty);\n\t\tsetMovementQty(getQtyEntered());\n\t}",
"public Builder setQuantity(long value) {\n \n quantity_ = value;\n onChanged();\n return this;\n }",
"public Builder setQuantity(long value) {\n \n quantity_ = value;\n onChanged();\n return this;\n }",
"void setValueQuantity(org.hl7.fhir.Quantity valueQuantity);",
"public synchronized void update(Product product, String quantity){\n ShoppingCartItem item = carrito.get(product.getId());\n item.setQuantity(Integer.parseInt(quantity));\n }",
"public static void setQuantity(Products product, int quantity,String product_id) {\n ShoppingCartEntry curEntry = cartMap.get(product);\n\n // If the quantity is zero or less, remove the products\n if (quantity <= 0) {\n if (curEntry != null)\n removeProduct(product);\n return;\n }\n\n // If a current cart entry doesn't exist, create one\n if (curEntry == null) {\n curEntry = new ShoppingCartEntry(product, quantity);\n cartMap.put(product, curEntry);\n return;\n }\n\n // Update the quantity\n curEntry.setQuantity(quantity);\n }",
"public void setCartQuantity(int cartQuantity) {\n this.cartQuantity = cartQuantity;\n }",
"public void setItemsQuantity(Integer itemsQuantity) {\r\n this.itemsQuantity = itemsQuantity;\r\n }",
"public void setSizeQty(Number value) {\n setAttributeInternal(SIZEQTY, value);\n }",
"@NonNull\n public BasketItemBuilder incrementQuantity() {\n this.quantity++;\n return this;\n }",
"public void setQty(java.math.BigDecimal newQty)\n\t\tthrows java.rmi.RemoteException;",
"@Override\n public void changeQuantity(Product product, int position) {\n changeProductQuantity(product, -1);\n }",
"public void increaseQuantity() {\n this.quantity++;\n this.updateTotalPrice();\n }",
"public void increaseQuantityOfProductByOne() {\n int intQuantity = Integer.parseInt(quantityOfProducts.getAttribute(\"value\"));\n plusButton.click();\n testClass.waitTillValueOfElementIsIncreasedByOne(\n QUANTITY_OF_PRODUCTS_XPATH, intQuantity + 1);\n }",
"public void updateProductQuantity(double quantity) {\n\t\t\n\t\ttry {\n\t\t\tString quan = \"\";\n\t\t\tPreparedStatement state1 = connect.prepareStatement(getProductQuantity);\n\t\t\tstate1.setString(1, productName);\n\t\t\t\n\t\t\tResultSet rs1 = state1.executeQuery();\n\t\t\twhile(rs1.next()) {\n\t\t\t\tquan = (String) rs1.getObject(\"quantity\");\n\t\t\t}\n\t\t\tquantity += Double.parseDouble(quan.split(\" \")[0]);\n\t\t\tquantity -= getQuantityFromBill();\n\t\t\tPreparedStatement state2 = connect.prepareStatement(updateProductQuantity);\n\t\t\tstate2.setString(1, quantity+\" \"+quan.split(\" \")[1]);\n\t\t\tstate2.setString(2, productName);\n\t\t\t\n\t\t\tstate2.executeUpdate();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}",
"public long getQuantity() {\n return quantity_;\n }",
"public long getQuantity() {\n return quantity_;\n }",
"public void update() {\n\t\tthis.quantity = item.getRequiredQuantity();\n\t}",
"public void setThisClassQuantity() {\n quantity = spinnerValue + \" pieces\";\n }",
"public long getQuantity() {\n return quantity_;\n }",
"public long getQuantity() {\n return quantity_;\n }",
"private void changeProductQuantity(Product product, int position) {\n if (position == -1) {\n for (int i=0; i<productList.size();i++) {\n if (productList.get(i).getProductName().equals(product.getProductName())) {\n position = i;\n }\n }\n }\n //set new quantity\n productList.get(position).setQuantity(product.getQuantity());\n\n //update user\n user.setShoppingLists(shoppingLists);\n dataController.saveUser(user);\n\n //set total price\n totalPriceTextView.setText(utils.calculateTotalPrice(productList));\n }",
"public int getQuantity() {\r\n\t\treturn quantity;\r\n\t}",
"@Override\r\n public void addProductQuantity(Product product, int quantity) {\r\n int stock;\r\n int i = 0;\r\n for (Product p : this.productList) {\r\n if (p.getId() == product.getId()) {\r\n stock = this.productQuantity.get(i);\r\n this.productQuantity.set(i, stock + quantity);\r\n break;\r\n }\r\n i++;\r\n }\r\n this.productList.add(product);\r\n this.productQuantity.add(quantity);\r\n }",
"void setQuantity(int quantity) throws NegativeNumberException {\n if (quantity <= 0) {\n throw new NegativeNumberException(\"Negative number.Try again.\");\n }\n this.quantity = quantity;\n }",
"public ItemQuantity(Item item, int quantity) {\n this.item = item;\n this.quantity = quantity;\n }",
"public void setQtyMulPrice(Number value) {\n setAttributeInternal(QTYMULPRICE, value);\n }",
"public Long getQuantity() {\r\n return quantity;\r\n }",
"public void setNumberOfProducts (int p)\n {\n if (p <= 0)\n {\n System.out.println (\"Please try again and enter a valid number of products.\");\n }\n else{\n numberOfProducts = p;\n }\n\n }",
"public PhoneNumberSearchOptions setQuantity(Integer quantity) {\n this.quantity = quantity;\n return this;\n }",
"public void setInseamQty(Number value) {\n setAttributeInternal(INSEAMQTY, value);\n }",
"public int getQuantity() {\n\t\treturn quantity;\n\t}",
"public int getQuantity() {\n\t\treturn quantity;\n\t}",
"public int getQuantity() {\n\t\treturn quantity;\n\t}",
"public int getQuantity() {\n\t\treturn quantity;\n\t}",
"public int getQuantity() {\n\t\treturn quantity;\n\t}",
"void setDisplayQuantity(BigDecimal inDisplayQuantity);",
"@Schema(description = \"Number of units consumed\")\n public Long getQuantity() {\n return quantity;\n }",
"public Long getQuantity() {\n return quantity;\n }",
"public String getQuantity() {\n return quantity;\n }",
"public Double getProductQty() {\n return productQty;\n }",
"public Integer getQuantity() {\n return quantity;\n }",
"public Integer getQuantity() {\n return quantity;\n }",
"@Override\n\tpublic void setMovementQty (BigDecimal MovementQty)\n\t{\n\t\tMProduct product = getProduct();\n\t\tif (MovementQty != null && product != null)\n\t\t{\n\t\t\tint precision = product.getUOMPrecision();\n\t\t\tMovementQty = MovementQty.setScale(precision, BigDecimal.ROUND_HALF_UP);\n\t\t}\n\t\tsuper.setMovementQty(MovementQty);\n\t}",
"public int getQuantity() \n\t{\n\t\treturn quantity;\n\t}",
"protected void setQuantityOfShares(int quantity){\n\t\tif(quantity < 0){\n\t\t\tthrow new IllegalArgumentException(\"Quantity can't be less than 0: \" + quantity);\n\t\t}\n\t\tsynchronized(this){\n\t\t\tthis.quantityOfShares = quantity;\n\t\t}\n\t}",
"public void setFruitQuantity(double fruitQuantity) {\r\n\t\tthis.fruitQuantity = fruitQuantity;\r\n\t}",
"public void setQtyEntered (BigDecimal QtyEntered);",
"public void increase(int quantity) {\r\n\r\n\t\tif (getAmount() == Integer.MAX_VALUE)\r\n\r\n\t\t\treturn;\r\n\r\n\t\tsetAmount(getAmount() + quantity);\r\n\r\n\t}",
"public int getQuantity(){\n\t\treturn quantity;\n\t}",
"public Integer getQuantity() {\r\n return this.quantity;\r\n }",
"public int getQuantity() {\r\n\t\treturn this.quantity;\r\n\t}",
"public void addItemQty(int itemQty) {\n this.itemQty += itemQty;\n }",
"public Integer getQuantity() {\n return this.quantity;\n }",
"public void setQUANTITY(java.math.BigDecimal QUANTITY) {\r\n this.QUANTITY = QUANTITY;\r\n }",
"public void updateQuantity(Product p, String distCenter, int quantity){\r\n\t\tp.distCenters.put(distCenter, p.distCenters.get(distCenter) + quantity);\r\n\t\tp.quantity += quantity;\r\n\t}",
"public LineItem(Product product, int quantity) {\n this.product = product;\n this.quantity = quantity;\n }",
"public Integer getQuantity() {\n return this.quantity;\n }",
"public void setQuantidade(Integer quantidade) { this.quantidade = quantidade; }",
"public void setProduct(Product product) {\n this.product = product;\n this.updateTotalPrice();\n }",
"public double getQuantity() {\n return quantity;\n }",
"public int getQuantity() {\r\n return quantity;\r\n }",
"public void incQty() {\n b.qty.setText(\"\" + ++qty);\n\n }"
] | [
"0.8048079",
"0.8048079",
"0.8048079",
"0.8043982",
"0.80250525",
"0.79756707",
"0.794721",
"0.79419476",
"0.79419476",
"0.7870442",
"0.7818646",
"0.7798737",
"0.7773459",
"0.7739116",
"0.7739116",
"0.7714987",
"0.7653766",
"0.76329285",
"0.76190984",
"0.75431997",
"0.7513897",
"0.7442982",
"0.7409403",
"0.7382661",
"0.73816645",
"0.73807615",
"0.73701894",
"0.7365661",
"0.7340122",
"0.73354036",
"0.72765315",
"0.7270691",
"0.7245202",
"0.7212116",
"0.7146806",
"0.7108784",
"0.70302826",
"0.7024685",
"0.70087296",
"0.70087296",
"0.6943717",
"0.69190663",
"0.69181603",
"0.6907073",
"0.68916965",
"0.68512905",
"0.6804697",
"0.67721695",
"0.67561907",
"0.6752095",
"0.6634319",
"0.6621208",
"0.657905",
"0.657905",
"0.65277004",
"0.6515475",
"0.6482667",
"0.6482667",
"0.6479511",
"0.64557064",
"0.6451661",
"0.6436033",
"0.6435909",
"0.6434824",
"0.6424422",
"0.6419134",
"0.640832",
"0.6391454",
"0.6391444",
"0.6391444",
"0.6391444",
"0.6391444",
"0.6391444",
"0.63807833",
"0.6380502",
"0.6377803",
"0.6356242",
"0.6337827",
"0.63369465",
"0.63369465",
"0.6331519",
"0.6315534",
"0.6312373",
"0.6310473",
"0.62932265",
"0.6277114",
"0.6276412",
"0.626753",
"0.62637365",
"0.62496847",
"0.62393504",
"0.6237994",
"0.6237715",
"0.62346524",
"0.6231015",
"0.6225797",
"0.6218606",
"0.62143373",
"0.62118554",
"0.6198406"
] | 0.7908217 | 9 |
Gets the net cost of the product including tax. | public double getTaxedCost()
{
return taxedCost;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double netPrice () {\n return discountedPrice() + taxCharged();\n }",
"public double netPrice() {\n double tot = 0;\n for (Equipment e : equipments) {\n tot += e.netPrice();\n }\n\n return tot;\n }",
"public double calculateCost() {\n double output = price * (1 + taxRate);\n return output;\n }",
"public double getProductCost() {\r\n\t\treturn (this.getPricePerUnit() * this.getNumUnits());\r\n\t}",
"public MMDecimal getNetAmount() {\r\n if (this.netAmount == null) {\r\n return getGrossAmount();\r\n }\r\n return this.netAmount;\r\n }",
"public MonetaryAmount getTotalNet() {\n\t\treturn this.totalNet;\n\t}",
"public double getCost() {\n\t\treturn 1.25;\n\t}",
"public double cost() {\n\t\t\n\t\treturn 150.00;\n\t}",
"public double calculateNetPay() {\r\n return net_pay = grosspay - Statetax - Fedtax; }",
"@Override public double getCosto(){\n double d = 190.00;\n return d;\n }",
"@Override\r\n\tpublic double getNettoPrice() {\n\t\treturn 0;\r\n\t}",
"public int getCost() {\n\t\treturn (int) Math.round(weight*price_per_pound);\n\t\t\n\t}",
"public float totalCost() {\r\n float total = 0;\r\n for (int i=0; i<numItems; i++) {\r\n total += cart[i].getPrice();\r\n }\r\n return total;\r\n }",
"public CP getProductServiceUnitCost() { \r\n\t\tCP retVal = this.getTypedField(13, 0);\r\n\t\treturn retVal;\r\n }",
"public double getNetIncome() {\n\t\tDouble netIncome = 0.00;\n\t\tfor (HashMap.Entry<Integer, Bill> entry : ab.entrySet()) {\n\t\t\tnetIncome += entry.getValue().getDiscountedPrice();\n\t\t\t\n\t\t}//for\n\t\treturn netIncome;\n\t}",
"public java.math.BigDecimal getTotalCost () {\n\t\treturn totalCost;\n\t}",
"public BigDecimal getCost() {\r\n return cost;\r\n }",
"public Number getActualCost()\r\n {\r\n return (m_actualCost);\r\n }",
"public BigDecimal getCost() {\n return this.cost;\n }",
"public double calculateTotalCost() {\n finalTotal = (saleAmount + taxSubtotal + SHIPPINGCOST);\n\n return finalTotal;\n }",
"@Pure\n\tdouble getCost();",
"public double getCost()\n\t{\n\t\treturn 0.9;\n\t}",
"public float getCost() {\r\n\t\treturn this.cost.floatValue();\r\n\t}",
"public BigDecimal getPriceStdWTax();",
"public double getTotalCost() {\r\n\t\treturn cost;\r\n\t}",
"public double getCost() {\n\n\t\treturn cost;\n\t}",
"public float getTotalCost() {\n return this.totalCost;\n }",
"public double getTotalCost() {\r\n return totalCost;\r\n }",
"public double getCost() {\n double price = 0;\n price += this.numPizzas * this.pizzaType.getCost();\n if(this.numPizzas >= 20) // Discount if >=20 pizzas\n return price * 0.9;\n else if(this.numPizzas >= 10) // Discount if between 10 and 20 pizzas\n return price * 0.95;\n return price; // No discount\n }",
"public double cost()\n\t{\n\t\treturn _dblCost;\n\t}",
"public BigDecimal getLineNetAmt();",
"public double getCost() {\n\t\treturn this.cost;\n\t}",
"public double getCost() {\n\t\treturn this.cost;\n\t}",
"public double cost()\n\t{\n\t\treturn (price * weight);\n\t}",
"@NotNull\n public BigDecimal getCost() {\n return cost;\n }",
"public Double getCostNetWorth() {\r\n return costNetWorth;\r\n }",
"public double getCost() {\r\n\t\treturn cost;\r\n\t}",
"public double getCost() {\n return this.product.getPrice() * quanity;\n }",
"public BigDecimal getCostPrice() {\n return costPrice;\n }",
"public double getCost() {\n\t\treturn cost;\n\t}",
"public double getCost() {\n return price;\n }",
"public double getCost() {\t\t \n\t\treturn cost;\n\t}",
"public double getTotalCost() {\n cost = spr.calculateCost();\n return cost;\n }",
"public double getPrice()\n\t{\n\t\treturn this.totalPrice + this.getFlightCosts() + this.excursionSubTotal\n\t\t\t\t+ this.getLodgingCost();\n\t}",
"public double getTotal() {\n return totalCost;\n }",
"public Number getCost()\r\n {\r\n return (m_cost);\r\n }",
"public double getBaseCost() {\n return BASE_COST;\n }",
"double getCost();",
"double getCost();",
"@Override\n public double cost()\n {\n return this.price * this.number;\n }",
"public double getCost() {\r\n return cost;\r\n }",
"@Override\n\tpublic double cost() {\n\t\treturn Double.parseDouble(rateOfLatte);\n\t}",
"public double getCost() {\n return cost;\n }",
"public double getCost() {\n return cost;\n }",
"public CoreComponentTypes.apis.ebay.BasicAmountType getNetAmount() {\r\n return netAmount;\r\n }",
"public double getCost() {\n\t\treturn costOverride > 0 ? costOverride : getDefaultCost();\n\t}",
"public double getTax() {\r\n\r\n return getSubtotal() * 0.06;\r\n\r\n }",
"public double getCost() {\r\n\t \treturn(cost);\r\n\t}",
"public Integer getCost() {\r\n\t\treturn cost;\r\n\t}",
"public double GetCost() {\n if( LotSize != CurLotSize ) {\n double CostPerShot = Cost / (double) LotSize;\n return CommonTools.RoundFractionalTons( CostPerShot * (double) CurLotSize );\n }\n return Cost;\n }",
"public double getPrice() {\n double price = BASE_PRICE;\n for (Topping topping : toppings) {\n if (topping.isPremium()) {\n price += 1.25;\n } else {\n price += 0.75;\n }\n }\n return price;\n }",
"@Override\r\n\tpublic double cost() {\n\t\treturn this.cost;\r\n\t}",
"public BigDecimal getPriceLimitWTax();",
"public double getCost() {\r\n\t\t\r\n\t\tif (super.getSize() == \"Small\") { totalCost = 2.00; }\r\n\t\t\r\n\t\tif (super.getSize() == \"Medium\") { totalCost = 2.50; }\r\n\t\t\r\n\t\tif (super.getSize() == \"Large\") { totalCost = 3.00; }\r\n\t\t\r\n\t\treturn totalCost;\r\n\t}",
"BigDecimal getTax();",
"@Override\n public double calcCost() {\n return calcSalesFee()+calcTaxes();\n }",
"@Override\n\tpublic double getCost() {\n\t\treturn price * weight; // cost = price of the candy * weight of candies\n\t}",
"public float totalCost() {\n\t\tttCost = 0;\n\t\tfor (int i = 0; i < itemsOrdered.size(); i++) {\n\t\t\tttCost += itemsOrdered.get(i).getCost();\n\t\t}\n\t\treturn ttCost;\n\t}",
"public double getCostOverride() {\n\t\treturn costOverride;\n\t}",
"@Override\r\n\tpublic double getCost() {\r\n\t\tdouble total = 0;\r\n\t\t\r\n\t\tfor(Product p: parts) {\r\n\t\t\ttotal += p.getCost();\r\n\t\t}\r\n\t\t\r\n\t\treturn total;\r\n\t}",
"public String getCost() {\n\t\tString t = doc.get(\"cost\");\n\n\t\tif (t == null) {\n\t\t\treturn \"\";\n\t\t} else {\n\t\t\treturn t;\n\t\t}\n\t}",
"public double getCost()\r\n\t{\treturn this.cost;\t}",
"public int totalTax()\n {\n double tax = taxRate / 100;\n return (int)Math.round(totalCost() * tax);\n }",
"public double getTotalCostOfOrder() {\n double total = 0;\n for (AbstractProduct item :\n this.itemsReceived) {\n total += item.getPrice();\n }\n return total;\n }",
"@Override\n\tpublic double getSumOfCost() {\n\t String sql=\"SELECT SUM(cost) FROM supplier_product\";\n\t double total=this.getJdbcTemplate().queryForObject(sql, double.class);\n\t\treturn total;\n\t}",
"public String getCost() {\n // Formats the cost amount into money format.\n NumberFormat n = NumberFormat.getCurrencyInstance(Locale.US);\n String s = n.format(Double.parseDouble(_cost));\n return s;\n }",
"public Integer getCost() {\n return cost;\n }",
"public double getNetBalance() {\r\n\t\treturn netBalance;\r\n\t}",
"public String getNetAmount() {\n\t\treturn this.token.get(\"netAmount\").toString();\n\t}",
"public String getTotalCost() {\n return this.TotalCost;\n }",
"public double getCost() {\n\t\t\n\t\tdouble cost = 0;\n\t\t\n\t\tif (Objects.equals(Size, \"small\"))\n\t\t\tcost = 7.00;\n\t\telse if (Objects.equals(Size, \"medium\"))\n\t\t\tcost = 9.00;\n\t\telse if (Objects.equals(Size, \"large\"))\n\t\t\tcost = 11.00;\n\t\t\n\t\tcost += (Cheese - 1)*1.50;\n\t\tcost += Ham*1.50;\n\t\tcost += Pepperoni*1.50;\n\t\t\n\t\treturn cost;\t\t\n\t}",
"public BigDecimal getTaxAmtPriceStd();",
"public int getCost() {\n \t\treturn cost;\n \t}",
"public double getCost() {\n return quantity*ppu;\n\n }",
"public CP getPsl13_ProductServiceUnitCost() { \r\n\t\tCP retVal = this.getTypedField(13, 0);\r\n\t\treturn retVal;\r\n }",
"String getTotalCost() {\n return Double.toString(totalCost);\n }",
"public BigDecimal getUnitCost() {\r\n return unitCost;\r\n }",
"@Override\n public double getCost() {\n return cost;\n }",
"public int getCost() {\n\t\treturn cost;\n\t}",
"public int getCosto() {\n\t\treturn producto.getCosto();\n\t}",
"public double discountPrice() {\n double tot = 0;\n for (Equipment e : equipments) {\n tot += e.discountPrice();\n }\n\n return tot;\n }",
"@Override\n\tpublic double neto() {\n\t\treturn 2000;\n\t}",
"public abstract double getCost();",
"@Override\r\n public double getBaseCost() { return type.getCost(); }",
"public int getCost() {\n return cost;\n }",
"double getTotalCost();",
"public BigDecimal getTax() {\n return tax;\n }",
"@Override\n public double calcTaxes() {\n return getCost() * 0.07;\n }",
"@Pure\n\tdouble getEstimatedCost();",
"public BigDecimal getPriceListWTax();"
] | [
"0.7804965",
"0.74183154",
"0.7251599",
"0.69888926",
"0.68650883",
"0.67505527",
"0.67387",
"0.67376065",
"0.67110896",
"0.66748345",
"0.66422904",
"0.6589733",
"0.65712327",
"0.6565083",
"0.6557812",
"0.655213",
"0.6541139",
"0.6522932",
"0.65214103",
"0.6520505",
"0.65015763",
"0.6501101",
"0.6496061",
"0.647701",
"0.64668864",
"0.64651275",
"0.64604694",
"0.6453576",
"0.6445006",
"0.64387304",
"0.64381385",
"0.6435206",
"0.6435206",
"0.64253086",
"0.6424645",
"0.64202094",
"0.64117247",
"0.64091617",
"0.6398016",
"0.6397404",
"0.638518",
"0.6379407",
"0.63689",
"0.6350265",
"0.6343953",
"0.63336766",
"0.6318237",
"0.631516",
"0.631516",
"0.63089865",
"0.630627",
"0.6297235",
"0.629677",
"0.629677",
"0.62847865",
"0.6276463",
"0.62752926",
"0.62684745",
"0.6259115",
"0.62532926",
"0.62467885",
"0.62332636",
"0.62324816",
"0.6221177",
"0.6213944",
"0.62131447",
"0.6207969",
"0.6204016",
"0.62020284",
"0.61964995",
"0.61882704",
"0.61821085",
"0.61728734",
"0.61668116",
"0.61609507",
"0.6156044",
"0.61545366",
"0.61440825",
"0.6142156",
"0.6128084",
"0.6125414",
"0.61008304",
"0.60996616",
"0.60984254",
"0.6079325",
"0.60792977",
"0.6079176",
"0.6073288",
"0.606505",
"0.6057121",
"0.60540867",
"0.6041456",
"0.6041348",
"0.60375607",
"0.6035302",
"0.6032745",
"0.603099",
"0.60275877",
"0.60120636",
"0.60076827"
] | 0.6389169 | 40 |
Sets the total taxed cost of the product. | public void setTaxedCost(double taxedCost)
{
this.taxedCost = taxedCost;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setSalesTaxTotal(BigDecimal amount){\r\n\t\ttaxTotal = amount.doubleValue();\r\n\t}",
"void setTax(BigDecimal tax);",
"public void setTaxAmount(double value) {\n this.taxAmount = value;\n }",
"public void setTax(Double tax);",
"public void setTotalCost(float totalCost) {\n this.totalCost = totalCost;\n }",
"public void setTotalCost(float totalCost)\r\n\t{\r\n\t\tthis.totalCost = totalCost;\r\n\t}",
"public void setTax(BigDecimal tax) {\n this.tax = tax;\n }",
"public void setTotalTaxAmt(BigDecimal totalTaxAmt) {\n\t\tthis.totalTaxAmt = totalTaxAmt;\n\t}",
"public void setTotalCost (java.math.BigDecimal totalCost) {\n\t\tthis.totalCost = totalCost;\n\t}",
"public void setTaxRate(BigDecimal taxRate) {\n this.taxRate = taxRate;\n }",
"public void setTaxAmount(double _taxAmount){\n\t\ttaxAmount = _taxAmount;\n\t}",
"public void changeTaxRate (double value) {\n this.taxRate = value;\n }",
"public void setTaxAmtPriceStd (BigDecimal TaxAmtPriceStd);",
"public final void setCost(java.math.BigDecimal cost)\n\t{\n\t\tsetCost(getContext(), cost);\n\t}",
"public void setTotal(BigDecimal amount){\r\n\t\ttotal = amount.doubleValue();\r\n\t}",
"public Builder setTax(double value) {\n \n tax_ = value;\n onChanged();\n return this;\n }",
"public final void setCost(com.mendix.systemwideinterfaces.core.IContext context, java.math.BigDecimal cost)\n\t{\n\t\tgetMendixObject().setValue(context, MemberNames.Cost.toString(), cost);\n\t}",
"public void setTotalCost(String TotalCost) {\n this.TotalCost = TotalCost;\n }",
"private static void updateTotals()\r\n\t{\r\n\t\ttaxAmount = Math.round(subtotalAmount * salesTax / 100.0);\r\n\t\ttotalAmount = subtotalAmount + taxAmount;\r\n\t}",
"public double useTax() {\n \n return super.useTax() + getValue()\n * PER_AXLE_TAX_RATE * getAxles();\n }",
"@Override\n public double calcCost() {\n return calcSalesFee()+calcTaxes();\n }",
"@Override\r\n\tpublic double taxAmount(long itemSold, double price) {\n\t\treturn 100.230;\r\n\t}",
"public void tpsTax() {\n TextView tpsView = findViewById(R.id.checkoutPage_TPStaxValue);\n tpsTaxTotal = beforeTaxTotal * 0.05;\n tpsView.setText(String.format(\"$%.2f\", tpsTaxTotal));\n }",
"public void salesTotal(){\n\t\tif (unitsSold<10){\n\t\t\tsetTotalCost(basePrice);\n\t\t\tsetDiscount(basePrice - this.getCost());\n\t\t}\n\t\telse if (unitsSold<20){\n\t\t\tsetTotalCost((RETAIL_PRICE*.8)*unitsSold);\n\t\t\tsetDiscount(basePrice - this.getCost());\n\t\t\t\n\t\t}\n\t\telse if (unitsSold<50){\n\t\t\tsetTotalCost((RETAIL_PRICE*.7)*unitsSold);\n\t\t\tsetDiscount(basePrice - this.getCost());\n\t\t}\n\t\telse if (unitsSold<100){\n\t\t\tsetTotalCost((RETAIL_PRICE*.6)*unitsSold);\n\t\t\tsetDiscount(basePrice - this.getCost());\n\t\t}\n\t\telse {\n\t\t\tsetTotalCost((RETAIL_PRICE*.5)*unitsSold);\n\t\t\tsetDiscount(basePrice - this.getCost());\n\t\t}\n\t}",
"public void setTaxPercentage(double newTax) {\n tax = newTax;\n }",
"public void setPriceStdWTax (BigDecimal PriceStdWTax);",
"@Override\n public double calcTaxes() {\n return getCost() * 0.07;\n }",
"void setTotal(BigDecimal total);",
"public void tvqTax() {\n TextView tvqView = findViewById(R.id.checkoutPage_TVQtaxValue);\n tvqTaxTotal = beforeTaxTotal * 0.09975;\n tvqView.setText(String.format(\"$%.2f\", tvqTaxTotal));\n }",
"public void setTaxAmount(MMDecimal taxAmount) {\r\n this.taxAmount = taxAmount;\r\n }",
"public int totalTax()\n {\n double tax = taxRate / 100;\n return (int)Math.round(totalCost() * tax);\n }",
"public void setTaxRate(double taxRate) {\n this.taxRate = taxRate;\n }",
"public void setTaxAmtPriceLimit (BigDecimal TaxAmtPriceLimit);",
"public void setTaxAmt(BigDecimal taxAmt) {\n\t\tthis.taxAmt = taxAmt;\n\t}",
"public BigDecimal getTotalTaxAmt() {\n\t\treturn totalTaxAmt;\n\t}",
"public void updateTotalPrice(){\n\t\tBigDecimal discount = currentOrder.getDiscount();\n\t\tBigDecimal subtotal = currentOrder.getSubtotal();\n\t\tthis.subtotal.text.setText(CURR+subtotal.add(discount).toString());\n\t\tthis.discount.text.setText(CURR + discount.toString());\n\t\tthis.toPay.text.setText(CURR+subtotal.toString());\n\t}",
"public void setTotalBuyFee(Double totalBuyFee) {\r\n this.totalBuyFee = totalBuyFee;\r\n }",
"public abstract void setTotalPrice();",
"public void setTotal(Double total);",
"void setCost(double cost);",
"@Override\n protected void chooseTax(){\n // Lets impose a tax rate that is inversely proportional to the number of subordinates I have:\n // That is, the more subordinates I have, the lower the tax rate.\n if(myTerritory.getSubordinates().isEmpty()){\n tax = 0;\n }\n else tax = 0.5;\n\n // Of course, if there are tax rates higher than .5, the system will set it to zero, so you should check on that\n }",
"void calculateTotalPrice(){\n totalPrice = 0;\n cartContents.forEach(Product-> this.totalPrice = totalPrice + Product.getSellPrice());\n }",
"public double calculateTotalCost() {\n finalTotal = (saleAmount + taxSubtotal + SHIPPINGCOST);\n\n return finalTotal;\n }",
"public void totalprice(float tprice)\n {\n \t this.mTotalPrice=tprice;\n }",
"public void setLBR_DIFAL_TaxAmtFCPUFDest (BigDecimal LBR_DIFAL_TaxAmtFCPUFDest);",
"public void setCost(double value) {\n this.cost = value;\n }",
"protected void setCost(double cost) \r\n\t{\tthis.cost = cost;\t}",
"public void setTaxscore(BigDecimal taxscore) {\n this.taxscore = taxscore;\n }",
"public void setTotalTaxValues(final Collection<TaxValueDTO> totalTaxValues)\n\t{\n\t\tthis.totalTaxValues = totalTaxValues;\n\t}",
"public double calculateTax() {\n taxSubtotal = (saleAmount * SALESTAXRATE);\n\n return taxSubtotal;\n }",
"public void setCost(double cost) {\r\n this.cost = cost;\r\n }",
"public void setMaxTotalCost(int amount);",
"public void setLBR_TaxAmt (BigDecimal LBR_TaxAmt);",
"public void setCost(double cost) {\n this.cost = cost;\n }",
"public double calculateCost() {\n double output = price * (1 + taxRate);\n return output;\n }",
"public void setCost(BigDecimal cost) {\r\n this.cost = cost;\r\n }",
"public double getTotal() {\r\n\r\n return getSubtotal() + getTax();\r\n }",
"public void totalBill(){\r\n\t\tint numOfItems = ItemsList.size();\r\n\t\t\r\n\t\tBigDecimal runningSum = new BigDecimal(\"0\");\r\n\t\tBigDecimal runningTaxSum = new BigDecimal(\"0\");\r\n\t\t\r\n\t\tfor(int i = 0;i<numOfItems;i++){\r\n\t\t\t\r\n\t\t\trunningTaxSum = BigDecimal.valueOf(0);\r\n\t\t\t\r\n\t\t\tBigDecimal totalBeforeTax = new BigDecimal(String.valueOf(this.ItemsList.get(i).getPrice()));\r\n\t\t\t\r\n\t\t\trunningSum = runningSum.add(totalBeforeTax);\r\n\t\t\t\r\n\t\t\tif(ItemsList.get(i).isSalesTaxable()){\r\n\t\t\t\r\n\t\t\t BigDecimal salesTaxPercent = new BigDecimal(\".10\");\r\n\t\t\t BigDecimal salesTax = salesTaxPercent.multiply(totalBeforeTax);\r\n\t\t\t \r\n\t\t\t salesTax = round(salesTax, BigDecimal.valueOf(0.05), RoundingMode.UP);\r\n\t\t\t runningTaxSum = runningTaxSum.add(salesTax);\r\n\t\t\t \r\n \r\n\t\t\t} \r\n\t\t\t\r\n\t\t\tif(ItemsList.get(i).isImportedTaxable()){\r\n\r\n\t\t\t BigDecimal importTaxPercent = new BigDecimal(\".05\");\r\n\t\t\t BigDecimal importTax = importTaxPercent.multiply(totalBeforeTax);\r\n\t\t\t \r\n\t\t\t importTax = round(importTax, BigDecimal.valueOf(0.05), RoundingMode.UP);\r\n\t\t\t runningTaxSum = runningTaxSum.add(importTax);\r\n\t\t\t \r\n\t\t\t}\r\n\r\n\t\t\t\r\n\t\t\tItemsList.get(i).setPrice(runningTaxSum.floatValue() + ItemsList.get(i).getPrice());\r\n\t\t\r\n\t\t\ttaxTotal += runningTaxSum.doubleValue();\r\n\t\t\t\r\n\t\t\trunningSum = runningSum.add(runningTaxSum);\r\n\t\t}\r\n\t\t\ttaxTotal = roundTwoDecimals(taxTotal);\r\n\t\t\ttotal = runningSum.doubleValue();\r\n\t}",
"double setEstimatedCost(double cost);",
"public void setLBR_TaxBaseAmt (BigDecimal LBR_TaxBaseAmt);",
"public void setCost(double cost) {\n\t\tthis.cost = cost;\n\t}",
"public void setCost(double cost) {\n\n\t\tthis.cost = cost;\n\t}",
"public void setTotalFee(BigDecimal totalFee) {\n this.totalFee = totalFee;\n }",
"@Override\n public void setTotalMoney(BigDecimal inputMoney) {\n totalMoney = inputMoney;\n }",
"public void setGrandTotal (BigDecimal GrandTotal);",
"public void setGrandTotal (BigDecimal GrandTotal);",
"public void setTotal(Number value) {\n setAttributeInternal(TOTAL, value);\n }",
"public void setCost(double cost){\n this.cost = cost;\n }",
"public void setSalesTax(double salesTax) {\r\n this.salesTax = salesTax;\r\n }",
"public void setTotalTransactrateMoney(BigDecimal totalTransactrateMoney) {\n this.totalTransactrateMoney = totalTransactrateMoney;\n }",
"double setCost(double cost);",
"public void afterTax() {\n TextView afterView = findViewById(R.id.checkoutPage_afterTaxValue);\n afterTaxTotal = beforeTaxTotal + tpsTaxTotal + tvqTaxTotal;\n afterView.setText(String.format(\"$%.2f\", afterTaxTotal));\n }",
"public void setsaleamt(BigDecimal value) {\n setAttributeInternal(SALEAMT, value);\n }",
"public void setshippingcost() {\r\n\t\tshippingcost = getweight() * 3;\r\n\t}",
"public double getTaxedCost()\n\t{\n\t\treturn taxedCost;\n\t}",
"public double taxCharged (){\n return discountedPrice() * taxRate;\n }",
"public void setPriceLimitWTax (BigDecimal PriceLimitWTax);",
"public void setTotale(double totale) {\n\t\t\tthis.totale = totale;\n\t\t}",
"public int calculateTax() {\n int premium = calculateCost();\n return (int) Math.round(premium * vehicle.getType().getTax(surety.getSuretyType()));\n }",
"public void setFxUfTasaCosto(double value) {\r\n this.fxUfTasaCosto = value;\r\n }",
"public static void setTaxRate(double taxRateIn) {\n taxRate = taxRateIn;\n }",
"public double getTax() {\r\n\r\n return getSubtotal() * 0.06;\r\n\r\n }",
"public void setTotal(Double total) {\n this.total = total;\n }",
"public void setTotal(Double total) {\n this.total = total;\n }",
"public void setTotal(Double total) {\n this.total = total;\n }",
"public final void setTotalAmount(com.mendix.systemwideinterfaces.core.IContext context, Double totalamount)\r\n\t{\r\n\t\tgetMendixObject().setValue(context, MemberNames.TotalAmount.toString(), totalamount);\r\n\t}",
"public void setLBR_TaxBase (BigDecimal LBR_TaxBase);",
"public void setTotal(BigDecimal total) {\n this.total = total;\n }",
"public void setTotal(BigDecimal total) {\n this.total = total;\n }",
"public MMDecimal getTaxAmount() {\r\n return this.taxAmount;\r\n }",
"public void setLBR_TaxBaseOwnOperation (BigDecimal LBR_TaxBaseOwnOperation);",
"public final void setTotalAmount(Double totalamount)\r\n\t{\r\n\t\tsetTotalAmount(getContext(), totalamount);\r\n\t}",
"public void calculateItemTax(CartItem cartItem) {\n double calculatedTaxes = 0;\n for (TaxCalculatorBusiness taxCalculatorBusiness : ObjectFactory.getTaxCalculatorBusiness()) {\n if (taxCalculatorBusiness.taxApplicable(cartItem.getProduct())) {\n double tax = taxCalculatorBusiness.calculateTax(cartItem.getProduct());\n calculatedTaxes = calculatedTaxes + tax;\n }\n }\n cartItem.setTax(calculatedTaxes * cartItem.getQuantity());\n }",
"public void calculateItemCost(CartItem cartItem) {\n cartItem.setCost((cartItem.getProduct().getPrice() * cartItem.getQuantity()) + cartItem.getTax());\n }",
"public BigDecimal getTax() {\n return tax;\n }",
"public void setTotalBuyMoney(Double totalBuyMoney) {\r\n this.totalBuyMoney = totalBuyMoney;\r\n }",
"public void setPriceListWTax (BigDecimal PriceListWTax);",
"public void setTaxAmtPriceList (BigDecimal TaxAmtPriceList);",
"public BigDecimal getTotalPrice() {\n\t\t// the current total cost which the customer owes in the transaction\n\t\tBigDecimal total = new BigDecimal(0);\n\n\t\tArrayList<Item> currentPurchases = purchaseList.getCurrentPurchases(); \n\n\t\tfor (Item item : currentPurchases) {\n\t\t\ttotal = total.add(this.getItemPrice(item));\n\t\t}\n\n\t\treturn total;\n\t}",
"public void setPromotionalPrice(double value) {\n this.promotionalPrice = value;\n }"
] | [
"0.68407506",
"0.6745595",
"0.6597978",
"0.65516704",
"0.64978087",
"0.64454913",
"0.64172834",
"0.6313737",
"0.6247956",
"0.62106586",
"0.62051016",
"0.6181032",
"0.6056915",
"0.60492796",
"0.6030765",
"0.60125256",
"0.60097873",
"0.60079163",
"0.59942216",
"0.59813493",
"0.5970179",
"0.5957874",
"0.5942456",
"0.5923508",
"0.5922677",
"0.58967847",
"0.5895285",
"0.5883218",
"0.5870375",
"0.5866781",
"0.58528847",
"0.5839827",
"0.5832077",
"0.5829513",
"0.5804063",
"0.57946426",
"0.5782672",
"0.5767602",
"0.57671565",
"0.57660544",
"0.5756324",
"0.57561636",
"0.57491374",
"0.5745709",
"0.5729203",
"0.5724782",
"0.5715958",
"0.571296",
"0.57015437",
"0.568728",
"0.5682677",
"0.56779087",
"0.56632745",
"0.565301",
"0.5642928",
"0.56390446",
"0.563453",
"0.56274694",
"0.56216395",
"0.5619693",
"0.56182754",
"0.56130904",
"0.5603638",
"0.5598504",
"0.5596491",
"0.5596491",
"0.55924886",
"0.5576271",
"0.55739665",
"0.556751",
"0.55659217",
"0.5562539",
"0.5551734",
"0.55478483",
"0.55446565",
"0.5542865",
"0.5537739",
"0.55313593",
"0.55300635",
"0.55252624",
"0.55235493",
"0.5521282",
"0.5516022",
"0.5516022",
"0.5516022",
"0.5514523",
"0.5503866",
"0.5503044",
"0.5503044",
"0.54850245",
"0.5484063",
"0.5476256",
"0.5464112",
"0.54638124",
"0.54609746",
"0.54421157",
"0.54412264",
"0.5435461",
"0.5433404",
"0.54291314"
] | 0.6953863 | 0 |
Gets a String representation for the imported attribute. | public String toString(boolean imported)
{
if(imported == false)
{
return "";
}
else
{
return "imported";
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getLable () {\n return getString(ATTRIBUTE_LABEL);\n }",
"public String getStringAttribute();",
"public final String getPerunSourceAttribute() {\n\t\treturn JsUtils.getNativePropertyString(this, \"perunSourceAttribute\");\n\t}",
"public String getExtAttribute4() {\n return (String) getAttributeInternal(EXTATTRIBUTE4);\n }",
"public java.lang.String getImporte() {\n return importe;\n }",
"public abstract ImportAttributes getAttributes();",
"@Transient\n @JsonIgnore\n public String getAttributeWithVariableValues() {\n return insertVariableValues(attribute);\n }",
"@Override\n public String getAttributesToString() {\n StringBuilder attributes = new StringBuilder();\n attributes.append(\"1 - Nominal Power: \" + nominalPower + \"\\n\");\n attributes.append(\"2 - Number of Bottles: \" + numberOfBottles + \"\\n\");\n attributes.append(\"3 - Annual Energy Consumption: \" + annualEnergyConsumption + \"\\n\");\n\n return attributes.toString();\n }",
"protected String exportAttributes() {\n\t\treturn \"\";\n\t}",
"public String getAttribute() {\n return attribute;\n }",
"public String toString() {\r\n\t\tString result = \" \" + StunConstants.getAttributeName(type) \r\n\t\t\t+ \"=[\" + Conversion.hexString(type)\r\n\t\t\t+ \"] valueLen=[\" + length \r\n\t\t\t+ \"] value=[\" + Conversion.hexString(value) + \"] padding=[\" + padding + \"]\";\r\n\t\treturn result;\r\n\t}",
"private String getClassAttribute() {\n return String.join(\" \", classAttribute);\n }",
"public String getExtAttribute3() {\n return (String) getAttributeInternal(EXTATTRIBUTE3);\n }",
"public String getImportTxt() {\n\t\treturn importTxt;\n\t}",
"java.lang.String getAttribute();",
"public String getStr(String attr) {\n return (String) super.get(attr);\n }",
"public String attribute() {\n return this.attribute;\n }",
"@Override\r\n\tpublic String toString() {\r\n\t\tString text = getElement();\r\n\t\tif (mainAttr!=null) {\r\n\t\t\ttext += \" \" + mainAttr;\r\n\t\t}\r\n\t\treturn text;\r\n\t}",
"public String getAttribute() {\n\t\treturn attribute;\n\t}",
"public String getAttribute() {\n\t\treturn attribute;\n\t}",
"private String getCustomAttributes() {\n StringBuilder sb = new StringBuilder();\n\n customAttribute.forEach((key, value) -> {\n sb.append(key).append(\"='\").append(value).append(\"' \");\n });\n\n return sb.toString().trim();\n }",
"public String getExtAttribute10() {\n return (String) getAttributeInternal(EXTATTRIBUTE10);\n }",
"String getAttribute();",
"public String getAttribute4() {\n return (String) getAttributeInternal(ATTRIBUTE4);\n }",
"public String encode() {\n\t\tString encoded_string = ATTRIBUTE_FIELD;\n\t\tif (attribute != null)\n\t\t\tencoded_string += attribute.encode();\n\t\treturn encoded_string + Separators.NEWLINE;\n\t}",
"private String loadAttributeName() {\n return parseMapField().getKey();\n }",
"public final String getAttributesString() {\n String returnAttributes = \"\";\n boolean debut = true;\n for (int i = 0; i < this.attributes.length; i++) {\n if (debut) {\n debut = false;\n } else {\n returnAttributes += \"|\";\n }\n returnAttributes += this.attributes[i];\n }\n return returnAttributes;\n }",
"public String getIntAttribute4() {\n return (String) getAttributeInternal(INTATTRIBUTE4);\n }",
"private String getStringAttr(String attrName)\n {\n return String.valueOf(getAttributes().get(attrName));\n }",
"public String getSourceAttribute() {\n return sourceAttribute;\n }",
"protected String getAttributeStr(String attr)\n {\n Object res = getAttributes().get(attr);\n return (res != null) ? res.toString() : null;\n }",
"public String getExtAttribute13() {\n return (String) getAttributeInternal(EXTATTRIBUTE13);\n }",
"public String getImport () throws CGException {\n return ivImport;\n }",
"public String getAttr() {\n return attr;\n }",
"public final String attributeNameRef ()\r\n {\r\n return _value.xmlTreePath().attribute();\r\n }",
"public String getAttribute4() {\n return (String)getAttributeInternal(ATTRIBUTE4);\n }",
"public String getAttribute4() {\n return (String)getAttributeInternal(ATTRIBUTE4);\n }",
"public String getAttribute4() {\n return (String)getAttributeInternal(ATTRIBUTE4);\n }",
"public String getAttribute4() {\n return (String)getAttributeInternal(ATTRIBUTE4);\n }",
"public String getAttribute4() {\n return (String)getAttributeInternal(ATTRIBUTE4);\n }",
"String getAttStrForAtt(Attribute att ){\n\tif(!att.getNamespace().equals(Namespace.NO_NAMESPACE)){\n\t\treturn att.getNamespacePrefix() + \":\"+att.getName();\n\t}else {\n\t\treturn att.getName();\n\t}\n\t\n}",
"public String getExtAttribute8() {\n return (String) getAttributeInternal(EXTATTRIBUTE8);\n }",
"public String asText() {\n return getValueAttribute();\n }",
"public String identity () throws CGException {\n return new String(\"ModelImport\");\n }",
"public String getAttributeDisplay() {\r\n\t\treturn String.valueOf(this.getAttributeValue());\r\n\t}",
"public String getExtAttribute15() {\n return (String) getAttributeInternal(EXTATTRIBUTE15);\n }",
"public String toString() {\n\n\t\tfinal StringBuilder buffer = new StringBuilder();\n\n\t\tbuffer.append(\"tAttrDataTypeId=[\").append(tAttrDataTypeId).append(\"] \");\n\t\tbuffer.append(\"dataTypeName=[\").append(dataTypeName).append(\"] \");\n\t\tbuffer.append(\"dataTypeDesc=[\").append(dataTypeDesc).append(\"] \");\n\t\tbuffer.append(\"activeFlag=[\").append(activeFlag).append(\"] \");\n\n\t\treturn buffer.toString();\n\t}",
"public String getId() {\n return (String)getAttributeInternal(ID);\n }",
"public String getId() {\n return (String)getAttributeInternal(ID);\n }",
"public String getAttribute4()\n {\n return (String)getAttributeInternal(ATTRIBUTE4);\n }",
"@Override\n\tpublic String toString(final Attribute att) {\n\t\treturn null;\n\t}",
"public String getExtAttribute14() {\n return (String) getAttributeInternal(EXTATTRIBUTE14);\n }",
"public String getExtAttribute12() {\n return (String) getAttributeInternal(EXTATTRIBUTE12);\n }",
"public String toString() {\n return getQualifiedName();\n }",
"public String getSourceAttributeId() {\n\t\treturn sourceAttribute;\n\t}",
"private String getDataAttributes() {\n StringBuilder sb = new StringBuilder();\n\n dataAttribute.forEach((key, value) -> {\n sb.append(key).append(\"='\").append(value).append(\"' \");\n });\n\n return sb.toString().trim();\n }",
"public String printAttributes() {\n checkNotUnknown();\n StringBuilder b = new StringBuilder();\n if (hasDontDelete()) {\n b.append(\"(DontDelete\");\n if (isMaybeDontDelete())\n b.append(\"+\");\n if (isMaybeNotDontDelete())\n b.append(\"-\");\n b.append(\")\");\n }\n if (hasDontEnum()) {\n b.append(\"(DontEnum\");\n if (isMaybeDontEnum())\n b.append(\"+\");\n if (isMaybeNotDontEnum())\n b.append(\"-\");\n b.append(\")\");\n }\n if (hasReadOnly()) {\n b.append(\"(ReadOnly\");\n if (isMaybeReadOnly())\n b.append(\"+\");\n if (isMaybeNotReadOnly())\n b.append(\"-\");\n b.append(\")\");\n }\n return b.toString();\n }",
"public String getExtAttribute5() {\n return (String) getAttributeInternal(EXTATTRIBUTE5);\n }",
"@Override\n\tpublic String stringValue(final Attribute att) {\n\t\treturn null;\n\t}",
"public String getExtAttribute1() {\n return (String) getAttributeInternal(EXTATTRIBUTE1);\n }",
"public String getattribut() \n\t{\n\t\treturn attribut;\n\t}",
"public String getExtAttribute9() {\n return (String) getAttributeInternal(EXTATTRIBUTE9);\n }",
"public String getAttribute3() {\n return (String) getAttributeInternal(ATTRIBUTE3);\n }",
"public String getGeneratedAttribute() {\n return generatedAttribute;\n }",
"public String getIntAttribute3() {\n return (String) getAttributeInternal(INTATTRIBUTE3);\n }",
"public String getExtAttribute11() {\n return (String) getAttributeInternal(EXTATTRIBUTE11);\n }",
"public String getExtra() {\n Object ref = extra_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n extra_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }",
"@Override\n public String toString() {\n String fieldStr = getTag() + \"=\" + getTagVal();\n return fieldStr;\n }",
"String getAttributeStringValue(Object attr);",
"public String getListAttributesPref()\n {\n Serializer<Collection<RecognizedElement>> serializer = new Serializer<Collection<RecognizedElement>>();\n return serializer.serialize(tree.getChildren());\n }",
"public String getAttribute10() {\n return (String) getAttributeInternal(ATTRIBUTE10);\n }",
"public String toString() {\n String output = this.name + \"(\";\n for (int i = 0; i < attributes.size(); i++) {\n output = output + attributes.get(i) + \":\" + domains.get(i);\n // Don't add a comma on the last key, value pair\n if (i < attributes.size() - 1)\n output = output + \",\";\n }\n return output + \")\";\n }",
"public String toString() {\n StringBuffer sb = new StringBuffer();\n for (int i = 0; i < numfields; i += 1) {\n String item = \"\" + types[i];\n if (attrNames == null || attrNames[i] == null) {\n sb.append(item).append(\"()\");\n } else {\n sb.append(item).append(\"(\").append(attrNames[i]).append(\")\");\n }\n if (i < numfields-1) {\n sb.append(\",\");\n }\n }\n return sb.toString();\n }",
"public String getAttribute12() {\n return (String) getAttributeInternal(ATTRIBUTE12);\n }",
"public String getIntAttribute14() {\n return (String) getAttributeInternal(INTATTRIBUTE14);\n }",
"public String getIntAttribute13() {\n return (String) getAttributeInternal(INTATTRIBUTE13);\n }",
"public String getAttribute3() {\n return (String)getAttributeInternal(ATTRIBUTE3);\n }",
"public String getAttribute3() {\n return (String)getAttributeInternal(ATTRIBUTE3);\n }",
"public String getAttribute3() {\n return (String)getAttributeInternal(ATTRIBUTE3);\n }",
"public String getAttribute3() {\n return (String)getAttributeInternal(ATTRIBUTE3);\n }",
"public String getAttribute3() {\n return (String)getAttributeInternal(ATTRIBUTE3);\n }",
"public String toString()\n\t{\n\t\treturn myFilename;\n\t}",
"public String getATTR_ID() {\n return ATTR_ID;\n }",
"@Override\n public String toString() {\n return aircraftId.getModel();\n }",
"public String toString()\n {\n String rr = \"\";\n \n // First process the normal (non-wildcard non-static) imports\n Iterator i = normalImports.values().iterator();\n while (i.hasNext()) {\n // String importName = ()\n JavaEntity importEntity = (JavaEntity) i.next();\n \n // build the statement string\n rr += \"import \";\n rr += importEntity.getName() + \";\" + Config.nl;\n }\n \n // Now do the (non-static) wildcard imports\n i = wildcardImports.iterator();\n while (i.hasNext()) {\n PackageOrClass importEntity = (PackageOrClass) i.next();\n rr += \"import \";\n rr += importEntity.getName() + \".*;\" + Config.nl;\n }\n \n // Now the static imports (non-wildcard)\n i = staticImports.keySet().iterator();\n while (i.hasNext()) {\n String importName = (String) i.next();\n List l = (List) staticImports.get(importName);\n Iterator j = l.iterator();\n while (j.hasNext()) {\n ClassEntity importEntity = (ClassEntity) j.next();\n rr += \"import static \" + importEntity.getName();\n rr += \".\" + importName + \";\" + Config.nl;\n }\n }\n \n // Finally the wildcard static imports\n i = staticWildcardImports.iterator();\n while (i.hasNext()) {\n ClassEntity importEntity = (ClassEntity) i.next();\n rr += \"import static \" + importEntity.getName();\n rr += \".*;\" + Config.nl;\n }\n \n return rr;\n }",
"public String getAttribute15() {\n return (String) getAttributeInternal(ATTRIBUTE15);\n }",
"@Override\r\n public String toString() {\r\n final StringBuilder strBuild = new StringBuilder();\r\n \r\n AttributeUtil.appendIfNotNull(strBuild, getName());\r\n strBuild.append(EIDASValues.ATTRIBUTE_TUPLE_SEP.toString());\r\n AttributeUtil.appendIfNotNull(strBuild, String.valueOf(isRequired()));\r\n strBuild.append(EIDASValues.ATTRIBUTE_TUPLE_SEP.toString());\r\n strBuild.append('[');\r\n \r\n if (isEmptyValue()) {\r\n if (!isEmptyComplexValue()) {\r\n AttributeUtil.appendIfNotNull(strBuild, AttributeUtil.mapToString(\r\n getComplexValue(), EIDASValues.ATTRIBUTE_VALUE_SEP.toString()));\r\n }\r\n } else {\r\n AttributeUtil.appendIfNotNull(\r\n strBuild,\r\n AttributeUtil.listToString(getValue(),\r\n EIDASValues.ATTRIBUTE_VALUE_SEP.toString()));\r\n }\r\n \r\n strBuild.append(']');\r\n strBuild.append(EIDASValues.ATTRIBUTE_TUPLE_SEP.toString());\r\n AttributeUtil.appendIfNotNull(strBuild, getStatus());\r\n strBuild.append(EIDASValues.ATTRIBUTE_SEP.toString());\r\n \r\n return strBuild.toString();\r\n }",
"public String getLocalAttribute(String name) {\n\t\treturn localAttributes.get(name);\n\t}",
"public String getAttribute1() {\n return (String) getAttributeInternal(ATTRIBUTE1);\n }",
"public java.lang.String getAttributeValue() {\r\n return localAttributeValue;\r\n }",
"public String getExtAttribute6() {\n return (String) getAttributeInternal(EXTATTRIBUTE6);\n }",
"com.google.protobuf.ByteString getAttributeBytes();",
"public String getExtra() {\n Object ref = extra_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n extra_ = s;\n return s;\n }\n }",
"public String toString() {\n String id = element.getAttributeNS(null, \"id\");\n return element.getTagName() + (id.equals(\"\") ? \"\" : \"#\" + id) + \".\"\n + (attributeNamespaceURI == null || attributeNamespaceURI.equals(\"\") ? \"\" : attributeNamespaceURI + \":\")\n + attributeLocalName + \" = \" + expression;\n }",
"public String getAttribute14() {\n return (String) getAttributeInternal(ATTRIBUTE14);\n }",
"public String toString() {\n\t\treturn getName();\r\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn getId().getName();\n\t}",
"public String getIntAttribute12() {\n return (String) getAttributeInternal(INTATTRIBUTE12);\n }",
"public String toString()\n {\n return m_strFieldName;\n }",
"public String getAsString() {\n\t\treturn new String(this.getAsBytes());\n\t}"
] | [
"0.66767454",
"0.6526992",
"0.6177588",
"0.61680925",
"0.611424",
"0.6102165",
"0.6090142",
"0.6087254",
"0.6062181",
"0.590718",
"0.5897092",
"0.58793414",
"0.58775693",
"0.5857765",
"0.5827747",
"0.5818369",
"0.5803078",
"0.580256",
"0.57970816",
"0.57970816",
"0.57806414",
"0.5748609",
"0.5719034",
"0.57070005",
"0.5703219",
"0.56828064",
"0.56812185",
"0.5669136",
"0.5663208",
"0.5658747",
"0.5650366",
"0.56419486",
"0.563956",
"0.5635621",
"0.56296414",
"0.5621479",
"0.5621479",
"0.5621479",
"0.5621479",
"0.5621479",
"0.56151444",
"0.5607244",
"0.56015044",
"0.56006104",
"0.55833024",
"0.55814576",
"0.55762297",
"0.5565225",
"0.5565225",
"0.55589765",
"0.5555839",
"0.5545072",
"0.5542453",
"0.55404353",
"0.5525629",
"0.5520524",
"0.5518587",
"0.55170596",
"0.55096465",
"0.5505688",
"0.5497332",
"0.5487182",
"0.54830176",
"0.54760325",
"0.5452426",
"0.54480124",
"0.5446436",
"0.54353017",
"0.54208726",
"0.5408433",
"0.54077643",
"0.5402225",
"0.5398391",
"0.53920233",
"0.53881943",
"0.53852844",
"0.5382867",
"0.5382867",
"0.5382867",
"0.5382867",
"0.5382867",
"0.5376874",
"0.5371357",
"0.5367192",
"0.5365149",
"0.535299",
"0.5337424",
"0.5334103",
"0.5333953",
"0.533227",
"0.532916",
"0.5325427",
"0.5322785",
"0.53129333",
"0.5307582",
"0.53038466",
"0.5294886",
"0.5290541",
"0.5286683",
"0.5284584"
] | 0.5922542 | 9 |
Gets the factory object to create a product. | public abstract ProductFactory getFactory(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract Product productFactory(String type);",
"public interface ProductFactory {\n Product createProduct();\n}",
"@Override\r\n\tpublic Product factory() {\n\t\treturn new ConcreteProduct2();\r\n\t}",
"public interface Factory {\n Product create();\n}",
"public ObjectifyFactory factory() {\n return ofy().factory();\n }",
"public Product createProduct() {\n\t\tProduct prod = new Product();\n\t\tprod.setProdId(this.getProdId());\n\t\tprod.setProductName(this.getProductName());\n\t\tprod.setPrice(this.getPrice());\n\t\tprod.setStock(this.getStock());\n\t\tprod.setDescription(this.getDescription());\n\t\tprod.setImage(this.getImage());\n\t\tprod.setSellerId(this.getSellerId());\n\t\tprod.setCategory(this.getCategory());\n\t\tprod.setSubcategory(this.getSubcategory());\n\t\tprod.setProductrating(this.getProductrating());\n\t\treturn prod;\n\t}",
"public interface IFactory {\n IProductA getProductA();\n IProductB getProductB();\n}",
"public OBStoreFactory getFactory();",
"@Override\n\tpublic IProduct factoryMethod() {\n\t\treturn new Toy();\n\t}",
"@Override\n\tpublic <T extends Product> T createProduct(Class<T> clazz) {\n\t\tT product = null;\n\t\t\n\t\ttry {\n\t\t\tproduct = clazz.newInstance();\n\t\t} catch (InstantiationException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IllegalAccessException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn (T) product;\n\t}",
"public Product createProduct() {\n String code, name;\n int quantity;\n float price;\n String color;\n String producer;\n int productType;\n\n Scanner scanner = new Scanner(System.in);\n System.out.println(\"1. for dairy 2. for color product \");\n productType = scanner.nextInt();\n\n System.out.println(\"Give product Code\");\n code = scanner.next();\n System.out.println(\"Give product Name\");\n name = scanner.next();\n System.out.println(\"Give product Quantity\");\n quantity = scanner.nextInt();\n System.out.println(\"Give product Price\");\n price = scanner.nextFloat();\n\n Product product;\n switch (productType) {\n case 1:\n System.out.println(\"Give producer \");\n producer = scanner.next();\n product = new DairyProduct(code, name, price, quantity, producer);\n return product;\n case 2:\n System.out.println(\"Give color \");\n color = scanner.next();\n product = new ColorProducts(code, name, price, quantity, color);\n return product;\n default: return null;\n }\n }",
"@Override\n public Productor getProductor() {\n return new ProductorImp1();\n }",
"public Factory getFactory()\r\n {\r\n if( m_factory != null ) return m_factory;\r\n m_factory = FactoryHelper.narrow( m_primary );\r\n return m_factory;\r\n }",
"public static Product createProduct(String type) {\n\n if (type.equals(\"A\")) {\n return new ConctreteProductA();\n }\n\n if (type.equals(\"B\")) {\n return new ConctreteProductB();\n }\n\n throw new UnsupportedOperationException(\"The type: \" + type + \" is incorrect!\");\n }",
"@Bean(name = \"product\")\n\tpublic Product getProduct() {\n\t\treturn new Product(\"C0001\", \"테스트\", 1000); // Constructor Injection\n\t}",
"protected Object buildFactory() throws DescriptorException {\n if (this.getFactoryClass() == null) {\n return null;\n }\n\n // If there is a factory class specified but no factory method name,\n // instantiate the factory using the default constructor\n if (this.getFactoryMethodName() == null) {\n return this.buildFactoryUsingDefaultConstructor();\n }\n\n // If both the factory class and the factory method name have been specified,\n // instantiate the factory by invoking the static factory method\n return this.buildFactoryUsingStaticMethod();\n }",
"@Allow(Permission.CreateCatalog)\n public Product createProduct(CreateProductInput input, DataFetchingEnvironment dfe) {\n RequestContext ctx = RequestContext.fromDataFetchingEnvironment(dfe);\n ProductEntity productEntity = this.productService.create(ctx, input);\n return BeanMapper.map(productEntity, Product.class);\n }",
"public ProductoCreable newInstance(int codigo, String nombre){\r\n \r\n }",
"public interface XxxFactory<T> {\n T createAaXxxProduct();\n T createBbXxxProduct();\n}",
"public static PedidoFactory init() {\n\t\ttry {\n\t\t\tPedidoFactory thePedidoFactory = (PedidoFactory) EPackage.Registry.INSTANCE\n\t\t\t\t\t.getEFactory(PedidoPackage.eNS_URI);\n\t\t\tif (thePedidoFactory != null) {\n\t\t\t\treturn thePedidoFactory;\n\t\t\t}\n\t\t} catch (Exception exception) {\n\t\t\tEcorePlugin.INSTANCE.log(exception);\n\t\t}\n\t\treturn new PedidoFactoryImpl();\n\t}",
"void create(Product product) throws IllegalArgumentException;",
"protected final Product getProduct() {\n Product.Builder product = new Product.Builder()\n .implementationTitle(getClass())\n .implementationVersion(getClass());\n Optional.ofNullable(getClass().getPackage())\n .flatMap(p -> Optional.ofNullable(p.getSpecificationVersion()))\n .map(specVersion -> \"(specification \" + specVersion + \")\")\n .ifPresent(product::comment);\n return product.build();\n }",
"@Override\n\tpublic DAOProducto crearDAOProductoAlmacen() {\n\t\treturn new DAOProducto();\n\t}",
"public static ProyectoFactory init() {\r\n\t\ttry {\r\n\t\t\tProyectoFactory theProyectoFactory = (ProyectoFactory)EPackage.Registry.INSTANCE.getEFactory(ProyectoPackage.eNS_URI);\r\n\t\t\tif (theProyectoFactory != null) {\r\n\t\t\t\treturn theProyectoFactory;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (Exception exception) {\r\n\t\t\tEcorePlugin.INSTANCE.log(exception);\r\n\t\t}\r\n\t\treturn new ProyectoFactoryImpl();\r\n\t}",
"public static Factory factory() {\n return ext_h::new;\n }",
"public static ProductService getProductDetailsServiceImpl() {\n\t\treturn new ProductServiceImpl();\n\t}",
"public static Factory factory() {\n return ext_dbf::new;\n }",
"private GeneProduct createGeneProduct( Gene gene ) {\n GeneProduct geneProduct = GeneProduct.Factory.newInstance();\n geneProduct.setGene( gene );\n geneProduct.setName( gene.getName() );\n geneProduct.setDescription( \"Gene product placeholder\" );\n return geneProduct;\n }",
"@objid (\"0078ca26-5a20-10c8-842f-001ec947cd2a\")\n GenericFactory getGenericFactory();",
"public ValueFactory<K, V> getFactory()\n {\n return factory;\n }",
"public static CostFactory init() {\n\t\ttry {\n\t\t\tCostFactory theCostFactory = (CostFactory)EPackage.Registry.INSTANCE.getEFactory(CostPackage.eNS_URI);\n\t\t\tif (theCostFactory != null) {\n\t\t\t\treturn theCostFactory;\n\t\t\t}\n\t\t}\n\t\tcatch (Exception exception) {\n\t\t\tEcorePlugin.INSTANCE.log(exception);\n\t\t}\n\t\treturn new CostFactoryImpl();\n\t}",
"public interface Factory {\n Cup productCup();\n Cover productCover();\n}",
"private Product getProduct(ProductVO product) {\n return Product.builder()\n .id(product.getId())\n .description(product.getDescription())\n .name(product.getName())\n .price(product.getPrice())\n .stock(product.getStock())\n .build();\n }",
"@Override\r\n\tpublic Product create(Product p) throws CustomServiceUnavailableException, CustomBadRequestException {\r\n\t\tProductTypeDAO ptDao = new ProductTypeDAOImpl();\r\n\t\ttry {\r\n\t\t\tp.getId_product_type().setId_product_type(\r\n\t\t\t\t\tptDao.getIdByName(p.getId_product_type().getName()));\r\n\t\t\tProductDAO productDao = new ProductDAOImp();\r\n\t\t\tProduct product = productDao.insert(p);\r\n\t\t\tif (!(p.getImage() == null)) {\r\n\t\t\t\tDecodeImage(p.getImage(), product.getId_product());\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tcopyDefaultImage(product.getId_product());\r\n\t\t\t}\r\n\t\t\treturn product;\r\n\t\t} catch (SQLException e) {\r\n\t\t\tif (e.getErrorCode() == 1062) {\r\n\t\t\t\tthrow new CustomBadRequestException(\"This product already exist!\");\r\n\t\t\t} else\r\n\t\t\t\tthrow new CustomServiceUnavailableException(\"Service Unavailable\");\r\n\t\t}\r\n\t}",
"ProvenanceFactory getProvenanceFactory();",
"public final Method getFactoryMethod() {\n\treturn factoryMethod;\n }",
"public static BookFactory getInstance()\r\n {\r\n \r\n if(bookFactoryInstance == null)\r\n {\r\n bookFactoryInstance = new BookFactory();\r\n }\r\n \r\n return bookFactoryInstance;\r\n }",
"public Product() {}",
"@Override\n IDeviceFactory getFactory();",
"public Product instantiateProduct (String prodId, String prodLocation) {\n\t\tif (productMap.containsKey(prodId)) {\n\t\t\tSystem.out.println(prodId+\" ERROR: product already exists @ \"+productMap.get(prodId).getLocation()+\" use restock to add more\" );\n\t\t\treturn productMap.get(prodId);\n\t\t} else {\n\t\t\tProduct temp = new Product (prodId, prodLocation);\n\t\t\tproductMap.put(prodId, temp);\n\t\t\treturn temp;\n\t\t}\n\t}",
"public AoDai chooseFactory(){\n\t\treturn new ModernAoDai();\n\t}",
"private com.google.protobuf.SingleFieldBuilderV3<\n org.mrk.grpc.catalog.Product, org.mrk.grpc.catalog.Product.Builder, org.mrk.grpc.catalog.ProductOrBuilder> \n getProductFieldBuilder() {\n if (productBuilder_ == null) {\n productBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<\n org.mrk.grpc.catalog.Product, org.mrk.grpc.catalog.Product.Builder, org.mrk.grpc.catalog.ProductOrBuilder>(\n getProduct(),\n getParentForChildren(),\n isClean());\n product_ = null;\n }\n return productBuilder_;\n }",
"Class<?> getFactoryClass();",
"public interface Creator {\n //<T extends Product> 定义了泛型,必须是Product的实现类\n\n public <T extends Product> T createProduct(Class<T> c);\n}",
"Object getProduct();",
"public Factory() {\n this(getInternalClient());\n }",
"public Product build() {\n Product product = new Product();\n product.product_id = this.product_id;\n product.product_name = this.product_name;\n product.price = this.price;\n product.in_stock = this.in_stock;\n product.amount = this.amount;\n product.ordered_amount = this.ordered_amount;\n product.order_price = this.order_price;\n\n return product;\n }",
"public Product create(@NonNull ProductDTO productDTO, @NonNull User creator) {\n // TODO maybe add check for the products with the same name\n productDTO.setId(null);\n return productRepository.saveAndFlush(initProduct(productDTO, creator));\n }",
"public static Order createOrder() {\n OrderFactory orderFactory;\n Cuisine cuisine = ORDERING_FACADE.askForCuisine(); // choosing cuisine\n Meal mealType = ORDERING_FACADE.askForMealType(); // choosing meal type\n if (mealType.equals(Meal.LUNCH)) { // setting factory for meal choosen\n orderFactory = LUNCH_FACTORY;\n \n } else {\n orderFactory = DRINK_FACTORY;\n \n }\n return orderFactory.createOrder(cuisine); // creating and returning concrete meal order\n }",
"public static borFactory init() {\n\t\ttry {\n\t\t\tborFactory theborFactory = (borFactory)EPackage.Registry.INSTANCE.getEFactory(borPackage.eNS_URI);\n\t\t\tif (theborFactory != null) {\n\t\t\t\treturn theborFactory;\n\t\t\t}\n\t\t}\n\t\tcatch (Exception exception) {\n\t\t\tEcorePlugin.INSTANCE.log(exception);\n\t\t}\n\t\treturn new borFactoryImpl();\n\t}",
"PlanningFactory getFactory();",
"public static Factory factory() {\n return Document_print::new;\n }",
"public static AbstractStackFactory getFactory(String factorial){\n if(factorial.equalsIgnoreCase(\"Lista\")){\n return new StackListFactory();\n\n }else if(factorial.equalsIgnoreCase(\"Vector\")){\n return new StackVectorFactory();\n\n }else if(factorial.equalsIgnoreCase(\"ArrayList\")){\n return new StackArrayListFactory();\n }\n\n return null;\n }",
"public PriceFactory getCurrentPriceFactory()\r\n\t{\n\t\treturn OrderManager.getInstance().getPriceFactory();\r\n\t}",
"TransformFactory getFactory();",
"public static Pack2Factory init() {\n\t\ttry {\n\t\t\tPack2Factory thePack2Factory = (Pack2Factory)EPackage.Registry.INSTANCE.getEFactory(Pack2Package.eNS_URI);\n\t\t\tif (thePack2Factory != null) {\n\t\t\t\treturn thePack2Factory;\n\t\t\t}\n\t\t}\n\t\tcatch (Exception exception) {\n\t\t\tEcorePlugin.INSTANCE.log(exception);\n\t\t}\n\t\treturn new Pack2FactoryImpl();\n\t}",
"GramaticaFactory getGramaticaFactory();",
"public static ProductBuilder builder() {\n return ProductBuilder.of();\n }",
"public static ProyectFactory init() {\r\n\t\ttry {\r\n\t\t\tProyectFactory theProyectFactory = (ProyectFactory)EPackage.Registry.INSTANCE.getEFactory(ProyectPackage.eNS_URI);\r\n\t\t\tif (theProyectFactory != null) {\r\n\t\t\t\treturn theProyectFactory;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (Exception exception) {\r\n\t\t\tEcorePlugin.INSTANCE.log(exception);\r\n\t\t}\r\n\t\treturn new ProyectFactoryImpl();\r\n\t}",
"public Product instantiateProduct (String prodId, String prodLocation, int stock) {\n\t\tif (productMap.containsKey(prodId)) {\n\t\t\tSystem.out.println(prodId+\" ERROR: product already exists @ \"+productMap.get(prodId).getLocation()+\" use restock to add more\" );\n\t\t\treturn productMap.get(prodId);\n\t\t} else {\n\t\t\tProduct temp = new Product (prodId, prodLocation, stock);\n\t\t\tproductMap.put(prodId, temp);\n\t\t\treturn temp;\n\t\t}\n\t}",
"public Product() { }",
"public Product() { }",
"public StoreFactory getStoreFactory()\r\n {\r\n return (StoreFactory)getEFactoryInstance();\r\n }",
"public PedidoFactoryImpl() {\n\t\tsuper();\n\t}",
"public Factory() {\n\t\tsuper();\n\t}",
"@Override\n\tpublic DAOProducto_Lab crearDAOProducto() {\n\t\treturn null;\n\t}",
"Factory getFactory()\n {\n return configfile.factory;\n }",
"public static Tp2Factory init() {\n\t\ttry {\n\t\t\tTp2Factory theTp2Factory = (Tp2Factory)EPackage.Registry.INSTANCE.getEFactory(\"http:///recette1-tp2-v0\"); \n\t\t\tif (theTp2Factory != null) {\n\t\t\t\treturn theTp2Factory;\n\t\t\t}\n\t\t}\n\t\tcatch (Exception exception) {\n\t\t\tEcorePlugin.INSTANCE.log(exception);\n\t\t}\n\t\treturn new Tp2FactoryImpl();\n\t}",
"public static Product generateProduct()\n {\n Random r = new Random();\n Product p = new Product();\n String [] itemName = {\"Cool Hat\" , \"Cool Watch\" , \"Cool Necklace\", \"Black Lipstick\" , \"Red LipStick\" ,\n \"Black Eyeliner\" , \"Blue Shirt\" , \"Blue Jeans\" , \"Black Dress\" , \"Red Bag\" ,\n \"White Bag\" , \"Yellow Bag\" , \"Cool Flip Flops\", \"Cool Shoes\" , \"Cool Heels\" ,\n \"Cool Blender\" , \"Cool Mixer\" , \"Cool Juicer\" };\n p.productID = 1 + r.nextInt(6);\n\n if( p.productID == 1){\n p.productName = itemName[r.nextInt(3)];\n p.productType = (\"Accessory\");\n p.productSize = 1;\n }\n if( p.productID == 2) {\n p.productName = itemName[3 + r.nextInt(3)];\n p.productType = (\"Beauty\");\n p.productSize = 2;\n }\n if( p.productID == 3) {\n p.productName = itemName[6 + r.nextInt(3)];\n p.productType = (\"Clothes\");\n p.productSize = 2;\n }\n if( p.productID == 4){\n p.productName = itemName[9 + r.nextInt(3)];\n p.productType = (\"Bags\");\n p.productSize = 3;\n }\n if( p.productID == 5){\n p.productName = itemName[12 + r.nextInt(3)];\n p.productType = (\"Shoes\");\n p.productSize = 3;\n }\n if( p.productID == 6) {\n p.productName = itemName[15 + r.nextInt(3)];\n p.productType = (\"Housewares\");\n p.productSize = 5;\n }\n\n p.productSku = 1000000 + r.nextInt(9999999);\n\n\n\n\n return p;\n }",
"private static void createProducts() {\n productRepository.addProduct(Product.builder()\n .name(\"Milk\")\n .barcode(new Barcode(\"5900017304007\"))\n .price(new BigDecimal(2.90))\n .build()\n );\n productRepository.addProduct(Product.builder()\n .name(\"Butter\")\n .barcode(new Barcode(\"5906217041483\"))\n .price(new BigDecimal(4.29))\n .build()\n );\n productRepository.addProduct(Product.builder()\n .name(\"Beer\")\n .barcode(new Barcode(\"5905927001114\"))\n .price(new BigDecimal(2.99))\n .build()\n );\n }",
"public static QuizFactory getFactoryInstance(){\n\t\tif (defQuizFactory == null)\n\t\t\tdefQuizFactory = new DefaultQuizFactory();\n\t\t\n\t\treturn defQuizFactory;\n\t}",
"public static CertificationFactory init() {\n\t\ttry {\n\t\t\tCertificationFactory theCertificationFactory = (CertificationFactory)EPackage.Registry.INSTANCE.getEFactory(CertificationPackage.eNS_URI);\n\t\t\tif (theCertificationFactory != null) {\n\t\t\t\treturn theCertificationFactory;\n\t\t\t}\n\t\t}\n\t\tcatch (Exception exception) {\n\t\t\tEcorePlugin.INSTANCE.log(exception);\n\t\t}\n\t\treturn new CertificationFactoryImpl();\n\t}",
"private EntityFactory() {}",
"@SuppressWarnings(\"unchecked\")\n\tprivate static XmlEntityObjectFactory getFactory() {\n\t\tif (factory == null) {\n\t\t\tfactory = new XmlEntityObjectFactory();\n\t\t\ttry {\n\t\t\t\tClass<IXmlEntityResolverLoader> loaderClass = (Class<IXmlEntityResolverLoader>) Class\n\t\t\t\t\t\t.forName(defaulEntityResolverLoaderClassName);\n\t\t\t\tIXmlEntityResolverLoader loader;\n\t\t\t\tloader = loaderClass.newInstance();\n\t\t\t\tloader.loadTo(factory);\n\t\t\t} catch (Exception ex) {\n\t\t\t\tthrow new UnexpectedRuntimeException(ex);\n\t\t\t}\n\t\t}\n\t\treturn factory;\n\t}",
"default Factory<T> toFactory() {\n throw new UnsupportedOperationException();\n }",
"public Product() {\n }",
"public Product() {\n }",
"public CreationWithParamsFactory getCreationFactory(Class aClass) {\n\t\treturn new CreationWithParamsFactory(aClass);\n\t}",
"public Product Product() {\n return null;\n }",
"public static SpecificationFactory init()\r\n {\r\n try\r\n {\r\n SpecificationFactory theSpecificationFactory = (SpecificationFactory)EPackage.Registry.INSTANCE.getEFactory(\"http://www.reclipse.org/ns/specification\"); \r\n if (theSpecificationFactory != null)\r\n {\r\n return theSpecificationFactory;\r\n }\r\n }\r\n catch (Exception exception)\r\n {\r\n EcorePlugin.INSTANCE.log(exception);\r\n }\r\n return new SpecificationFactoryImpl();\r\n }",
"Demo1Factory getDemo1Factory();",
"public Producto (){\n\n }",
"@Produces @IWSBean\n public ServiceFactory produceServiceFactory() {\n return new ServiceFactory(iwsEntityManager, notifications, settings);\n }",
"public ObjectFactory() {}",
"public ObjectFactory() {}",
"public ObjectFactory() {}",
"public Product() {\n\t}",
"public static XCanopusFactory init()\r\n {\r\n try\r\n {\r\n XCanopusFactory theXCanopusFactory = (XCanopusFactory)EPackage.Registry.INSTANCE.getEFactory(XCanopusPackage.eNS_URI);\r\n if (theXCanopusFactory != null)\r\n {\r\n return theXCanopusFactory;\r\n }\r\n }\r\n catch (Exception exception)\r\n {\r\n EcorePlugin.INSTANCE.log(exception);\r\n }\r\n return new XCanopusFactoryImpl();\r\n }",
"public interface Factory {\r\n}",
"FactoryBean getFactoryBean();",
"public interface FruitFactory {\n\n Fruit getApple();\n\n Fruit getBanana();\n}",
"static public Product create(String name, String description, double price) {\n\t\t\n\t\tProduct p = new Product();\n\t\tp.name = name;\n\t\tp.description = description;\n\t\tp.price = price;\n\t\t\n\t\treturn p;\n\t}",
"public ProductType getProductType(String productTypeName){ \n\t if (productTypeName == null) { \n\t return null; \n\t } \n\t if (productTypeName.equalsIgnoreCase(\"PHOTOSET\")) { \n\t return new PhotoSet(); \n\t } \n\t else if (productTypeName.equalsIgnoreCase(\"SINGLECD\")) { \n\t return new SingleCD(); \n\t } \n\t else if (productTypeName.equalsIgnoreCase(\"TWOSHOT\")) { \n\t return new TwoShot(); \n\t } \n\t return null; \n\t}",
"public interface IFactory<T extends MaterialCastingRecipe> {\n T create(ResourceLocation id, String group, @Nullable Ingredient cast, int itemCost, IMaterialItem result,\n boolean consumed, boolean switchSlots);\n }",
"public static AutomatizacionrevisionFactory init() {\r\n\t\ttry {\r\n\t\t\tAutomatizacionrevisionFactory theAutomatizacionrevisionFactory = (AutomatizacionrevisionFactory)EPackage.Registry.INSTANCE.getEFactory(AutomatizacionrevisionPackage.eNS_URI);\r\n\t\t\tif (theAutomatizacionrevisionFactory != null) {\r\n\t\t\t\treturn theAutomatizacionrevisionFactory;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (Exception exception) {\r\n\t\t\tEcorePlugin.INSTANCE.log(exception);\r\n\t\t}\r\n\t\treturn new AutomatizacionrevisionFactoryImpl();\r\n\t}",
"public interface Factory {\n LeiFeng createLeiFeng();\n}",
"public static ResultFactory init() {\n\t\ttry {\n\t\t\tResultFactory theResultFactory = (ResultFactory)EPackage.Registry.INSTANCE.getEFactory(\"http://www.eclipselabs.org/emftriple/result\"); \n\t\t\tif (theResultFactory != null) {\n\t\t\t\treturn theResultFactory;\n\t\t\t}\n\t\t}\n\t\tcatch (Exception exception) {\n\t\t\tEcorePlugin.INSTANCE.log(exception);\n\t\t}\n\t\treturn new ResultFactoryImpl();\n\t}",
"public T create()\n {\n IProxyFactory<T> proxyFactory = getProxyFactory(type);\n T result = proxyFactory.createProxy();\n return result;\n }",
"@Override\n\tprotected Employee factoryMethod() {\n\t\treturn new Developer();\n\t}",
"@Override\n\tpublic DAOProveedor crearDAOProveedor() {\n\t\treturn new DAOProveedor();\n\t}"
] | [
"0.75730896",
"0.7543739",
"0.7442037",
"0.74143386",
"0.693716",
"0.6770003",
"0.67310554",
"0.6610687",
"0.6588278",
"0.6581557",
"0.641901",
"0.6221749",
"0.61923844",
"0.6174224",
"0.6127991",
"0.61115754",
"0.6103985",
"0.6103817",
"0.60802233",
"0.6042809",
"0.6020056",
"0.60039866",
"0.59932",
"0.5987203",
"0.59427804",
"0.5888539",
"0.58670974",
"0.585115",
"0.58134896",
"0.5804858",
"0.5795542",
"0.5789784",
"0.5781175",
"0.57704127",
"0.576981",
"0.5768445",
"0.5758724",
"0.5755166",
"0.57549524",
"0.5744694",
"0.5743547",
"0.5742424",
"0.5729603",
"0.57156014",
"0.571507",
"0.57098204",
"0.57070386",
"0.5699774",
"0.56953967",
"0.5692109",
"0.56874603",
"0.5670001",
"0.56572884",
"0.56571186",
"0.5646054",
"0.5645975",
"0.5637723",
"0.5627947",
"0.5623881",
"0.5623581",
"0.56180584",
"0.56180584",
"0.55976826",
"0.5593318",
"0.55900043",
"0.5589021",
"0.55869865",
"0.5583174",
"0.5581769",
"0.5577944",
"0.55626976",
"0.5560247",
"0.5551058",
"0.5549366",
"0.5544344",
"0.553977",
"0.553977",
"0.5536127",
"0.5534829",
"0.5532416",
"0.55310416",
"0.5520945",
"0.55204004",
"0.5517468",
"0.5517468",
"0.5517468",
"0.5516353",
"0.5516075",
"0.5513548",
"0.55105025",
"0.5507677",
"0.5501285",
"0.55003756",
"0.54970497",
"0.5487537",
"0.5487386",
"0.5479735",
"0.5465706",
"0.54632485",
"0.54597586"
] | 0.7878763 | 0 |
Gets the tax value of the product in a particular region. | public abstract double getTaxValue(String country); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"double getTax();",
"BigDecimal getTax();",
"public double getTax() {\n return tax_;\n }",
"public Double getTax();",
"public double getTax() {\n return tax_;\n }",
"double getTaxAmount();",
"public BigDecimal getTax() {\n return tax;\n }",
"public double getTaxValue() {\n\t\treturn TaxCalculatorUtil.getTaxValue(getConfiguredPrice(),getPromotionValue(), getCouponDiscountValue(), getTaxRate(), getTaxationType());\n\t}",
"public double getTax(){\n\n return this.tax;\n }",
"public double getTaxAmount() {\n return taxAmount;\n }",
"public double getTax() {\r\n\r\n return getSubtotal() * 0.06;\r\n\r\n }",
"@Schema(description = \"The country or region imposing the tax.\")\n public String getTaxingRegion() {\n return taxingRegion;\n }",
"@Override\n\tpublic double getTax() {\n\t\treturn 0.04;\n\t}",
"public int getLocationTax(){\r\n taxlist.add(new Tax(this.estValue,this.PPR,this.yearsowned,this.locationCategory));\r\n count++;\r\n return taxlist.get(count-1).LocationTax();\r\n }",
"public double taxRate () {\n return taxRate;\n }",
"public double getTaxRate() {\n return taxRate;\n }",
"public BigDecimal getPriceStdWTax();",
"int getRegionValue();",
"public double taxPaying() {\r\n double tax;\r\n if (profit == true) {\r\n tax = revenue / 10.00;\r\n }\r\n\r\n else\r\n tax = revenue / 2.00;\r\n return tax;\r\n }",
"public MMDecimal getTaxAmount() {\r\n return this.taxAmount;\r\n }",
"public BigDecimal getTaxRate() {\n return taxRate;\n }",
"public BigDecimal getIncludedTax()\r\n\t{\r\n\t\treturn m_includedTax;\r\n\t}",
"public double getTaxes() {\n return getArea() * TAX_RATE_PER_M2;\n }",
"public double getSalesTax() {\r\n return salesTax;\r\n }",
"@Override\t\n\tpublic double getTax() {\n\t\treturn 0;\n\t}",
"public float getServiceTax() {\n\t\treturn serviceTax;\n\t}",
"@Override\r\n\tpublic double getTaxValue() {\n\t\treturn 0;\r\n\t}",
"public double getMarketValueTaxRate(){\r\n taxlist.add(new Tax(this.estValue,this.PPR,this.yearsowned,this.locationCategory));\r\n count++;\r\n return taxlist.get(count-1).MarketValueTax();\r\n }",
"public CoreComponentTypes.apis.ebay.BasicAmountType getTaxAmount() {\r\n return taxAmount;\r\n }",
"public int getRegionValue() {\n return region_;\n }",
"public String getTaxCalculated()\n\t{\n\t\twaitForVisibility(taxCalculated);\n\t\treturn taxCalculated.getText();\n\t}",
"public int getRegionValue() {\n return region_;\n }",
"public ISalesTax getTaxObject();",
"double taxReturn() {\n\t\tdouble ddv = 0;\n\t\tif (d == 'A') {\n\t\t\tddv = 18;\n\t\t} else if (d == 'B') {\n\t\t\tddv = 5;\n\t\t}\n\t\t\n\t\tif (ddv = 0) {\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\tdouble percent = price / 100.0;\n\t\tdouble tax = ddv * percent;\n\t\treturn tax / 100.0 * 15.0;\n\t}",
"public String getTaxId()\n {\n return taxId;\n }",
"public Tax getTax() {\n if (tax == null) {\n tax = new Tax();\n }\n return tax;\n }",
"public double getTaxa() {\n\t\treturn taxa;\n\t}",
"public java.lang.String getTAX_CODE() {\r\n return TAX_CODE;\r\n }",
"public int calculateTax() {\n int premium = calculateCost();\n return (int) Math.round(premium * vehicle.getType().getTax(surety.getSuretyType()));\n }",
"public double useTax() {\n \n return super.useTax() + getValue()\n * PER_AXLE_TAX_RATE * getAxles();\n }",
"abstract protected BigDecimal getBasicTaxRate();",
"public BigDecimal getTaxAmt() {\n\t\treturn taxAmt;\n\t}",
"public java.lang.String getTAXJURCODE() {\r\n return TAXJURCODE;\r\n }",
"public BigDecimal getTaxAmtPriceStd();",
"public double calculateTax() {\n taxSubtotal = (saleAmount * SALESTAXRATE);\n\n return taxSubtotal;\n }",
"double defaultTaxOnProduct(){\n\t\treturn 12.5;\n\t}",
"public double calcTax() {\n\t\treturn 0.2 * calcGrossWage() ;\n\t}",
"public int getTax(){\n int tax=0;\n if(this.salary<this.LOWER_LIMIT){\n tax=this.taxableSalary/100*10;\n }else if(this.salary<this.UPPER_LIMIT){\n tax=this.taxableSalary/100*22;\n }else{\n tax=this.UPPER_LIMIT/100*22 + (this.taxableSalary-this.UPPER_LIMIT)/100*40;\n }\n return tax;\n }",
"String getTaxId();",
"public String getTotalTaxes(){\n String tax = driver.findElement(oTotalTaxes).getText();\n logger.debug(\"total taxes is\" + tax);\n return tax;\n }",
"public double regionValue(){\n return counter.regionValue();\n }",
"@ApiModelProperty(value = \"Total amount of TAX paid(or should be paid)\")\n @JsonProperty(\"tax\")\n public String getTax() {\n return tax;\n }",
"@Override\n\tpublic double taxReturn(String productId, int quantity) {\n\t\tString pro = productId;\n\t\tdouble p = 0;\n\t\tdouble q = quantity;\n\t\tdouble t = 0;\n\t\t\n\t\t//for loop to verify all the array\n\t\tfor(int m = 0; m < Driver.products.size(); m++) {\n\t\t\tif(Driver.products.get(m).getProductId().equals(pro)) {\n\t\t\t\tp = Driver.products.get(m).getPrice();\n\t\t\t}\n\t\t t = p * q * tvTax; //using the specific tax for this group of product \n\t\t\n\t\t}//close for loop\n\t\treturn t;\n\t}",
"public TypeOfRegion getRegion();",
"public abstract double calculateTax();",
"public float calculateTax(String state, Integer flatRate);",
"public BigDecimal getLBR_TaxBase();",
"public double getTaxedCost()\n\t{\n\t\treturn taxedCost;\n\t}",
"public int totalTax()\n {\n double tax = taxRate / 100;\n return (int)Math.round(totalCost() * tax);\n }",
"public NegotiableQuoteAddressRegion getRegion() {\n return (NegotiableQuoteAddressRegion) get(\"region\");\n }",
"public BigDecimal getLBR_ICMSST_TaxBase();",
"public double getTaxRate() {\r\n\t\treturn .07;\r\n\t}",
"public BigDecimal getPriceLimitWTax();",
"public BigDecimal getPriceListWTax();",
"public BigDecimal getLBR_ICMSST_TaxRate();",
"public String getRegion() {\n return this.region;\n }",
"@ApiModelProperty(value = \"Amount of tax expressed in the given currency\")\n\n @Valid\n\n public Money getTaxAmount() {\n return taxAmount;\n }",
"public String getRegion() {\n return region;\n }",
"public String getRegion() {\n return region;\n }",
"public double calculateTax(double amount){\n return (amount*TAX_4_1000)/1000;\n }",
"public ArmCurrency getCompositeRegionalTaxAmount() {\n return (compositePOSTransaction.getStore().usesRegionalTaxCalculations()\n ? compositePOSTransaction.getCompositeRegionalTaxAmount() : null);\n }",
"public double getTaxes(){\n\t\treturn this.getExciseTax() + this.getFlightSegmentTax() + this.get911SecurityFee() + this.getPassengerFacilityFee();\n\t}",
"public double taxCharged (){\n return discountedPrice() * taxRate;\n }",
"public BigDecimal getLBR_ICMSST_TaxAmt();",
"public BigDecimal getLBR_TaxAmt();",
"public BigDecimal getLBR_TaxBaseOwnOperation();",
"public void setTax(Double tax);",
"public java.lang.String getREGION()\n {\n \n return __REGION;\n }",
"public BigDecimal getLBR_TaxRate();",
"public String getRegion() {\n return region;\n }",
"public String getRegion() {\n return region;\n }",
"public String getRegion() {\n return region;\n }",
"public String getRegion() {\n return region;\n }",
"public String getRegion() {\n return region;\n }",
"public BigDecimal getBENEF_REGION() {\r\n return BENEF_REGION;\r\n }",
"public String getRegion() {\n return region;\n }",
"public String getRegion() {\r\n return region;\r\n }",
"public String getRegion() {\r\n return region;\r\n }",
"public String getRegion() {\r\n return region;\r\n }",
"public double computeCustomsTax(String originCountry, double tobacoValue, double regularValue) {\n\t\tTaxComputer pece = getTaxComputer(originCountry);\n\t\treturn pece.compute(tobacoValue, regularValue);\n\t}",
"public BigDecimal getTaxscore() {\n return taxscore;\n }",
"public BigDecimal getTaxRate() {\n\n\t\tBigDecimal totalTaxRate = getBasicTaxRate().add(getImportTaxRate());\n\n\t\treturn totalTaxRate;\n\t}",
"public BigDecimal getTaxGroupId() {\n return getTaxGroupIdProperty().getValue();\n }",
"double applyTax(double price);",
"public void setTax(BigDecimal tax) {\n this.tax = tax;\n }",
"public BigDecimal getTotalTaxAmt() {\n\t\treturn totalTaxAmt;\n\t}",
"public BigDecimal getLBR_ICMS_TaxAmtOp();",
"public Number getProvincialTaxPayerId() {\n return (Number)getAttributeInternal(PROVINCIALTAXPAYERID);\n }",
"@Override\n public double calcTaxes() {\n return getCost() * 0.07;\n }",
"public String getTaxcopy() {\r\n\t\treturn taxcopy;\r\n\t}"
] | [
"0.68670684",
"0.6846462",
"0.680115",
"0.6796079",
"0.6787925",
"0.67752784",
"0.6732133",
"0.66091716",
"0.6550214",
"0.6523395",
"0.64695895",
"0.64674014",
"0.64642584",
"0.6367757",
"0.63076526",
"0.628817",
"0.6228018",
"0.6226879",
"0.6205257",
"0.62024057",
"0.61934793",
"0.61921257",
"0.6179439",
"0.61758024",
"0.6158162",
"0.6114102",
"0.6107526",
"0.6106165",
"0.61039996",
"0.60290134",
"0.6016535",
"0.59982574",
"0.59950924",
"0.59940934",
"0.59509075",
"0.59499073",
"0.5949349",
"0.59429604",
"0.5907853",
"0.5905969",
"0.58980167",
"0.58702826",
"0.58676046",
"0.58655554",
"0.58635813",
"0.58472496",
"0.58147496",
"0.58122677",
"0.58015966",
"0.579667",
"0.5757058",
"0.5746074",
"0.57362044",
"0.5719818",
"0.5712361",
"0.5709777",
"0.57009715",
"0.5697856",
"0.56933546",
"0.56897604",
"0.56489265",
"0.5648106",
"0.56239134",
"0.56023365",
"0.5595205",
"0.5591171",
"0.55890495",
"0.5571002",
"0.5571002",
"0.5570501",
"0.5563627",
"0.5558066",
"0.55566734",
"0.5547272",
"0.55287886",
"0.55093455",
"0.55061203",
"0.55034035",
"0.55027115",
"0.55013865",
"0.55013865",
"0.55013865",
"0.55013865",
"0.55013865",
"0.5495897",
"0.5480488",
"0.546974",
"0.546974",
"0.546974",
"0.54526734",
"0.5405022",
"0.54040813",
"0.540273",
"0.5390782",
"0.5389697",
"0.53852487",
"0.53842777",
"0.5366743",
"0.5365608",
"0.5362869"
] | 0.7355918 | 0 |
Registers a Block without creating a matching ItemBlock for it. This is used for blocks without items or special Items that are being created manualy. | private static Block registerBlockWithoutItem(String MODID, String name, Block b){
return Registry.register(Registry.BLOCK, MODID+":"+name, b);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static <BLOCK extends Block> BLOCK register(@Nonnull final BLOCK block, @Nullable final ItemBlock itemBlock) {\n\t\tfinal ResourceLocation resourceLocation = block.getRegistryName();\n\t\tif (resourceLocation == null) {\n\t\t\tWarpDrive.logger.error(String.format(\"Missing registry name for block %s, ignoring registration...\",\n\t\t\t block));\n\t\t\treturn block;\n\t\t}\n\t\t\n\t\tassert !blocks.contains(block);\n\t\tblocks.add(block);\n\t\t\n\t\tif (itemBlock != null) {\n\t\t\titemBlock.setRegistryName(resourceLocation);\n\t\t\tregister(itemBlock);\n\t\t}\n\t\t\n\t\treturn block;\n\t}",
"private static void registerBlock(Block b)\n\t{\n\t}",
"private static Item registerBlockItem(Block block, Item.Settings settings){\n Identifier id = Registry.BLOCK.getId(block);\n return CottonItemHelper.registerItem(id.getNamespace(), id.getPath(), new BlockItem(block, settings));\n }",
"@SubscribeEvent\n public static void registerItem(final RegistryEvent.Register<Item> event){\n Item.Properties properties = new Item.Properties().maxStackSize(1).group(ItemGroup.MISC);\n walletBlockItem = new BlockItem(walletBlock, properties);\n walletBlockItem.setRegistryName(walletBlock.getRegistryName());\n event.getRegistry().register(walletBlockItem);\n }",
"public static void register(Block block, ItemBlock itemBlock) {\n\t\tGameRegistry.register(block);\n\t\tGameRegistry.register(itemBlock);\n\t}",
"public static <BLOCK extends Block> BLOCK register(@Nonnull final BLOCK block) {\n\t\tassert block instanceof IBlockBase;\n\t\treturn register(block, ((IBlockBase) block).createItemBlock());\n\t}",
"public static <T extends Block> T register(T block, String name, ItemGroup group, boolean hasItem) {\n ResourceLocation loc = new ResourceLocation(Missy.MODID, name);\n // Set the block to it.\n block.setRegistryName(loc);\n\n if(hasItem) {\n if(block instanceof IMakeItem) {\n ITEMS.add(((IMakeItem) block).getItem().setRegistryName(loc));\n }\n else ITEMS.add(new BlockItem(block, MItemProperties.BLOCK.group(group)).setRegistryName(loc));\n }\n\n BLOCKS.add(block);\n\n return block;\n }",
"public static Block registerBlock(String MODID, String name, Block block, ItemGroup itemGroup){\n return registerBlock(MODID, name, block, (new Item.Settings()).itemGroup(itemGroup));\n }",
"public static void register(GenericBlock block)\n\t{\n\t\tBLOCKS.add(block);\n\t}",
"public static Block registerBlock(String MODID, String name, Block block, Item.Settings settings){\n block = registerBlockWithoutItem(MODID, name, block);\n registerBlockItem(block, settings);\n return block;\n }",
"public void addBlock(Block newBlock) {\n\t\tBLOCK_LIST.add(newBlock);\n\t\tSPRITE_LIST.add(newBlock);\n\t}",
"public void addBlock(Block block) {\n\t\tblock.setId(this.generateID());\n\t\tthis.blocks.put(block.getId(), block);\n\t}",
"@SubscribeEvent\n public static void registerBlock(final RegistryEvent.Register<Block> event){\n walletBlock = new WalletBlock();\n event.getRegistry().register(walletBlock);\n }",
"public void addBlock(Block block){\n\t\tblocks.addElement(block);\n\t}",
"public void addBlock(int x, int y) {\r\n\t\tthis.blockMap.add(new Block(x, y));\r\n\t}",
"private static void registerBlocks() {\n for(Block block : modBlocks) {\n ForgeRegistries.BLOCKS.register(block);\n\n ItemBlock itemBlock = new ItemBlock(block);\n itemBlock.setRegistryName(block.getRegistryName());\n ForgeRegistries.ITEMS.register(itemBlock);\n }\n }",
"void removeBlock(Block block);",
"public void addBlock(Block block) {\n this.blocks.add(block);\n }",
"public static void BlockRegister()\n\t{\n\t\tString[] umberstoneBlock = {\"umberstone\"};\n\t\tString[] umbercobbleBlock = {\"cobbleUmber\"};\n\t\tStoneRegister umberstone = getStoneRegister(ModBlocks.umberstone, ModBlocks.umberstone, \"umberstone\", umberstoneBlock, umbercobbleBlock, \"erebus\");\n\t\tumberstone.mossyCobble = false;\n\t\tumberstone.genReplaceable = false;\n\t\tumberstone.register();\n\t}",
"private static void put(Block block, TempBlock tempBlock) {\r\n\t\tif (!instances_.containsKey(block)) {\r\n\t\t\tinstances_.put(block, new LinkedList<>());\r\n\t\t}\r\n\t\tinstances_.get(block).add(tempBlock);\r\n\t}",
"public ItemBlock createItemBlock() {\n\t\treturn new GenericItemBlock(this);\n\t}",
"public void addPendingBlock(Block block) {\n\n\t\tList<Block> sameIndexBlocks = pendingBlocks.get(block.getIndex());\n\t\tif(sameIndexBlocks == null) {\n\t\t\tsameIndexBlocks = new ArrayList<Block>();\n\t\t\tpendingBlocks.put(block.getIndex(), sameIndexBlocks);\n\t\t}\n\t\tsameIndexBlocks.add(block);\n\t}",
"public static void registerBlocks() {\n\t\tRegistry.register(Registry.BLOCK, new Identifier(EggMod.MOD_ID, \"egg_block\"), EGG_BLOCK);\n\t\t\n\t\t// Yolk\n\t\tSTILL_YOLK = Registry.register(Registry.FLUID, new Identifier(EggMod.MOD_ID, \"yolk_flow\"), new YolkFluid.Still());\n\t\tFLOWING_YOLK = Registry.register(Registry.FLUID, new Identifier(EggMod.MOD_ID, \"yolk_still\"), new YolkFluid.Flowing());\n\t\tYOLK = Registry.register(Registry.BLOCK, new Identifier(EggMod.MOD_ID, \"yolk\"), new FluidBlock(STILL_YOLK, FabricBlockSettings.copy(Blocks.WATER)){});\n\t}",
"public EntangledChaliceItem(Block block) {\n super(block);\n }",
"@Override\n\tpublic void addBlock(Block block) {\n\t\tem.persist(block);\n\t}",
"Block createBlock();",
"public static void registerBlockSmelting(){\n\t\t\n\t\tGameRegistry.addSmelting(blockInfo.myWood_ID, new ItemStack(items.compressedAir, 2), 0.1f);\n\t\t\n\t}",
"Block saveBlock(Block block) throws BlockExistsException;",
"public void blockAdded(Response block) {\n try {\n long id = block.getId(\"block\");\n blockList.add(0, block);\n blockMap.put(block.getId(\"block\"), block);\n fireTableRowsInserted(0, 0);\n } catch (IdentifierException exc) {\n // Ignore the block\n }\n }",
"public Block(){\n\t\tthis.type = Code.Type.NULL;\n\t}",
"public void testAddBlock_NoGame() throws Exception {\n try {\n dao.addBlock(1, 1);\n fail(\"EntryNotFoundException expected\");\n } catch (EntryNotFoundException e) {\n // should land here\n }\n }",
"synchronized void putBlock(ICBlock block) {\n mQueue.add(block);\n }",
"private static void remove(TempBlock tempBlock) {\r\n\t\tif (instances_.containsKey(tempBlock.block)) {\r\n\t\t\tinstances_.get(tempBlock.block).remove(tempBlock);\r\n\t\t\tif (instances_.get(tempBlock.block).size() == 0) {\r\n\t\t\t\tinstances_.remove(tempBlock.block);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void addExistingBlockAsProgram(IGUIBlock block) {\n Block toAdd = blockLink.getBlockFromGUIBlock(block);\n blockHandler.addToPA(toAdd);\n }",
"public abstract void removeBlock();",
"public void addBlock(Block b) {\n String previousHash = \"\";\n if (blockChain.size() == 0) {\n previousHash = \"\";\n } else {\n previousHash = getLatestBlock().proofOfWork();\n }\n b.previousHash = previousHash;\n chainHash = b.proofOfWork();\n blockChain.add(b);\n }",
"public void addBadBlock(final Block badBlock, final Optional<Throwable> cause) {\n if (badBlock != null) {\n if (cause.isEmpty() || !isInternalError(cause.get())) {\n this.badBlocks.put(badBlock.getHash(), badBlock);\n }\n }\n }",
"public static void registerBlockEntities()\n\t{\n\t}",
"private static void craftSlab(Block block)\r\n\t{\r\n\t\tBlockExtraSlab input = ((BlockExtraSlab)block);\r\n\t\tBlock parent = input.getParent();\r\n\t\tint parentMeta = input.getParentMeta();\r\n\t\t\r\n\t\tGameRegistry.addRecipe(new ItemStack(block, 6, 0), new Object[] { \"###\", '#', new ItemStack(parent, 1, parentMeta) });\r\n\t\tGameRegistry.addRecipe(new ItemStack(parent, 1, parentMeta), new Object[] { \"#\", \"#\", '#', new ItemStack(block) });\r\n\t}",
"BAnyBlock createBAnyBlock();",
"public void setBlock(Block node) {\n setChild(node, 0);\n }",
"public void setBlock(Block node) {\n setChild(node, 0);\n }",
"public void removeBlock(Block block) {\n\t\tblocks.remove(block.getId());\n\t}",
"public void setBlock(Block newBlock) {\n\t\tthis.block = newBlock;\n\t}",
"public void addBlock(Block block) {\r\n if (null == blocks) {\r\n blocks = new ArrayList<Block>();\r\n }\r\n blocks.add(block);\r\n maxEntries += block.getHowMany();\r\n }",
"public void putBlock(JsonObject block){\n blocks.put(Hash.getHashString(block.toString()), block);\n }",
"public static void registerBlocks() {\n\t\tModLoader.registerBlock(blockWirelessR,\n\t\t\t\tBlockItemRedstoneWirelessR.class);\n\t\tModLoader.addName(blockWirelessR, \"Wireless Receiver\");\n\t\tModLoader.addName(blockWirelessR, \"de_DE\", \"Drahtloser Empfänger\");\n\t\tModLoader.registerTileEntity(TileEntityRedstoneWirelessR.class,\n\t\t\t\t\"Wireless Receiver\", new TileEntityRedstoneWirelessRenderer());\n\n\t\tModLoader.registerBlock(blockWirelessT,\n\t\t\t\tBlockItemRedstoneWirelessT.class);\n\t\tModLoader.addName(blockWirelessT, \"Wireless Transmitter\");\n\t\tModLoader.addName(blockWirelessT, \"de_DE\", \"Drahtloser Sender\");\n\t\tModLoader.registerTileEntity(TileEntityRedstoneWirelessT.class,\n\t\t\t\t\"Wireless Transmitter\",\n\t\t\t\tnew TileEntityRedstoneWirelessRenderer());\n\t\tregisterBlockForCreativeGui(blockWirelessR);\n\t\tregisterBlockForCreativeGui(blockWirelessT);\n\t}",
"@Test\n public void testReplaceBlock()\n {\n Block word1 = new WordBlock(\"block1\");\n Block word2 = new WordBlock(\"block2\");\n Block word3 = new WordBlock(\"block3\");\n\n Block parentBlock = new ParagraphBlock(Arrays.asList(word1, word2));\n\n // replace by one\n parentBlock.replaceChild(word3, word1);\n\n Assert.assertEquals(2, parentBlock.getChildren().size());\n Assert.assertSame(word3, parentBlock.getChildren().get(0));\n Assert.assertSame(word2, parentBlock.getChildren().get(1));\n Assert.assertSame(word2, word3.getNextSibling());\n Assert.assertSame(word3, word2.getPreviousSibling());\n\n // replace by nothing\n parentBlock.replaceChild(Collections.<Block>emptyList(), word2);\n\n Assert.assertEquals(1, parentBlock.getChildren().size());\n Assert.assertSame(word3, parentBlock.getChildren().get(0));\n Assert.assertNull(word3.getNextSibling());\n Assert.assertNull(word3.getPreviousSibling());\n\n // replace by several\n parentBlock.replaceChild(Arrays.asList(word1, word2), word3);\n\n Assert.assertEquals(2, parentBlock.getChildren().size());\n Assert.assertSame(word1, parentBlock.getChildren().get(0));\n Assert.assertSame(word2, parentBlock.getChildren().get(1));\n Assert.assertSame(word2, word1.getNextSibling());\n Assert.assertSame(word1, word2.getPreviousSibling());\n\n // Provide not existing block to replace\n this.thrown.expect(InvalidParameterException.class);\n parentBlock.replaceChild(word3, new WordBlock(\"not existing\"));\n }",
"public Block(){\n\t\tinstns = new ArrayList<Instruction>();\n\t}",
"public static void registerBlock(boolean fireproof, ItemGroup group, String name, Block block) {\n Item.Settings normalSettings = new Item.Settings().group(group);\n Item.Settings fireproofSettings = new Item.Settings().group(group).fireproof();\n\n Registry.register(Registry.BLOCK, newID(name), block);\n Registry.register(Registry.ITEM, newID(name), new BlockItem(block, (fireproof ? fireproofSettings : normalSettings)));\n }",
"private void addBlock(Block one)\n\t{\n\t\tgetChildren().add(one);\n\t\tblocks1.add(one);\n\t\tblocks2.add(one);\n\t}",
"public void addBlock(int row, int col, Block block, GameplayState gps) {\n if (row < 4) {\n gps.setGameIsLost(true);\n }\n\n cells[row][col] = block;\n }",
"public static ItemIngredient of(Block input) {\n\t\treturn of(ItemBlock.getItemFromBlock(input));\n\t}",
"public void addBlock(Block block)\n {\n SolrInputDocument solr_doc = new SolrInputDocument();\n solr_doc.setField(\"type\",\"Block\");\n solr_doc.setField(\"hash\", block.getHash_block());\n solr_doc.setField(\"block_num\", block.getBlock_num());\n solr_doc.setField(\"version\", block.getVersion());\n solr_doc.setField(\"transaction_merkle_root\", block.getTransac_merkle_root());\n solr_doc.setField(\"timestamps\", block.getTimestamp());\n solr_doc.setField(\"datetime\", block.getDatetime());\n solr_doc.setField(\"difficulty\", block.getDifficulty());\n solr_doc.setField(\"cumulative_difficulty\", block.getCumulative_difficulty());\n solr_doc.setField(\"nonce\", block.getNonce());\n solr_doc.setField(\"how_much_transaction\", block.getHow_much_transaction());\n solr_doc.setField(\"value_out\", block.getValue_out());\n solr_doc.setField(\"block_fee\", block.getBlock_fee());\n solr_doc.setField(\"avg_coin_out\", block.getAvg_coin_age());\n solr_doc.setField(\"coin_days_destroyed\", block.getCoin_days_destroyed());\n solr_doc.setField(\"cumulative_coin_days_destroyed\", block.getCumulative_coin_days_destroyed());\n\n try {\n client.add(solr_doc);\n } catch (SolrServerException | IOException e) {\n e.printStackTrace();\n }\n\n commit();\n }",
"@Override\n public void returnBlock(Block b) {\n b.reset();\n blocks.add(b);\n if (blocks.size() > highReservedBlocks) { // too many unused blocks\n synchronized (BlocksPool.class) { // can be easily changed to lock-free\n while (blocks.size() > lowReservedBlocks) {\n this.blocks.poll().clean();\n }\n }\n }\n }",
"private void setBlock(Block block) {\r\n this.block = block;\r\n }",
"public Block()\n {\n this.blockType = BlockType.AIR;\n }",
"public static ItemFrame addItemFrame(Block block, BlockFace face) {\n\t\tfinal Material mat = Material.GLASS;\n\t\tBlock northBlock = block.getWorld().getBlockAt(block.getX(), block.getY(), block.getZ() - 1);\n\t\tBlock southBlock = block.getWorld().getBlockAt(block.getX(), block.getY(), block.getZ() + 1);\n\t\tBlock eastBlock = block.getWorld().getBlockAt(block.getX() - 1, block.getY(), block.getZ());\n\t\tBlock westBlock = block.getWorld().getBlockAt(block.getX() + 1, block.getY(), block.getZ());\n\n\t\tif (northBlock.getType() == Material.AIR) {\n\t\t\tnorthBlock.setType(mat);\n\t\t}\n\t\tif (southBlock.getType() == Material.AIR) {\n\t\t\tsouthBlock.setType(mat);\n\t\t}\n\t\tif (eastBlock.getType() == Material.AIR) {\n\t\t\teastBlock.setType(mat);\n\t\t}\n\t\tif (westBlock.getType() == Material.AIR) {\n\t\t\twestBlock.setType(mat);\n\t\t}\n\n\t\tif (face == BlockFace.NORTH) {\n\t\t\tnorthBlock.setType(Material.AIR);\n\t\t} else if (face == BlockFace.SOUTH) {\n\t\t\tsouthBlock.setType(Material.AIR);\n\t\t} else if (face == BlockFace.EAST) {\n\t\t\teastBlock.setType(Material.AIR);\n\t\t} else if (face == BlockFace.WEST) {\n\t\t\twestBlock.setType(Material.AIR);\n\t\t}\n\n\t\tItemFrame itemFrame = (ItemFrame) block.getWorld().spawnEntity(block.getLocation(), EntityType.ITEM_FRAME);\n\n\t\tif (northBlock.getType() == mat) {\n\t\t\tnorthBlock.setType(Material.AIR);\n\t\t}\n\t\tif (southBlock.getType() == mat) {\n\t\t\tsouthBlock.setType(Material.AIR);\n\t\t}\n\t\tif (eastBlock.getType() == mat) {\n\t\t\teastBlock.setType(Material.AIR);\n\t\t}\n\t\tif (westBlock.getType() == mat) {\n\t\t\twestBlock.setType(Material.AIR);\n\t\t}\n\n\t\treturn itemFrame;\n\t}",
"public void addBlock(int x, int y, int health) {\r\n\t\tthis.blockMap.add(new Block(x, y, health));\r\n\t}",
"@Override\n\tpublic void registerRecipes() {\n\n\t\tItemStack block, ingot;\n\n\t\tfor (MetalType metal : MetalType.VALUES) {\n\n\t\t\tblock = this.createItemStack(metal, 1);\n\t\t\tingot = BrItems.ingotMetals.createItemStack(metal, 1);\n\n\t\t\tGameRegistry.addShapelessRecipe(block, ingot, ingot, ingot, ingot, ingot, ingot, ingot, ingot, ingot);\n\t\t\tingot.stackSize = 9;\n\t\t\tGameRegistry.addShapelessRecipe(ingot, block);\n\t\t}\n\n\t\t// Ludicrite block. Because.\n\n\t\tfinal ItemStack ludicriteBlock = this.createItemStack(MetalType.Ludicrite, 1);\n\n\t\tGameRegistry.addRecipe(new ShapedOreRecipe(ludicriteBlock, \"BPB\", \"ENE\", \"BPB\",\n\t\t\t\t'N', Items.NETHER_STAR, 'P', Items.ENDER_PEARL, 'E', Blocks.EMERALD_BLOCK,\n\t\t\t\t'B', BigReactors.CONFIG.recipeBlutoniumIngotName));\n\n\t\tif (OreDictionaryHelper.doesOreNameExist(\"blockEnderium\")) {\n\n\t\t\t// Ok, how about some ludicrous shit here. Enderium and blaze rods. Have fun, bucko.\n\t\t\tGameRegistry.addRecipe(new ShapedOreRecipe(ludicriteBlock, \"BRB\", \"E E\", \"BRB\",\n\t\t\t\t\t'B', BigReactors.CONFIG.recipeBlutoniumIngotName, 'R', Items.BLAZE_ROD, 'E', \"blockEnderium\"));\n\t\t}\n\t}",
"public BlockExtra(Pixy2 pixy, Block block) {\n\t\tthis(pixy, block.getSignature(), block.getX(), block.getY(), block.getWidth(), block.getHeight(), block.getAngle(), block.getIndex(), block.getAge());\n\t}",
"@SubscribeEvent\n public static void onBlocksRegistry(final RegistryEvent.Register<Block> blockRegistryEvent) {\n LOGGER.info(\"HELLO from Register Block\");\n }",
"public String addNonlearBlock(LinkedList<TokenCodePair> nonlinearBody){\r\n String id = nonlinearBlocks.size()+\"\";\r\n nonlinearBlocks.put(id, ScriptingEngine.getInstance().bodyToActions(nonlinearBody));\r\n return id;\r\n }",
"public void addAttachedBlock(TempBlock tempBlock) {\r\n\t\tthis.attachedTempBlocks.add(tempBlock);\r\n\t\ttempBlock.attachedTempBlocks.add(this);\r\n\t}",
"public void addToBlock(Instruction instn){\n\t\tinstns.add(instn);\n\t}",
"public void remove(MemoryBlock block) {\n\t\tif (indexOf(block) == (-1))\n\t\t\tthrow new IllegalArgumentException();\n\t\telse\n\t\t\tremove(indexOf(block));\n\t}",
"public Builder clearNewBlock() {\n if (newBlockBuilder_ == null) {\n newBlock_ = null;\n onChanged();\n } else {\n newBlockBuilder_.clear();\n }\n bitField0_ = (bitField0_ & ~0x00000002);\n return this;\n }",
"@Override\n protected void setBlock(Block block) {\n super.setBlock(block);\n updateAffectedBlocks();\n }",
"public void fillBlock(Block block) {\n\n\t\tfor (int j = block.UpperLeft().x; j <= block.LowerRight().x; j++) { \n\t\t\tfor (int k = block.UpperLeft().y; k <= block.LowerRight().y; k++) { \n\t\t\t\tblocksPosition.put(new Point(j,k), block); \n\t\t\t\t//Blocks.add(block); \n\t\t\t} \n\t\t} \n\t}",
"public Block() {\n this((byte) 0, (byte) 0);\n }",
"public void fillBlock(TYPE typeOfBlock){\n isFull=true;\n type=typeOfBlock;\n return;\n }",
"public static void putNewParentInStubMap(Long blockID) {\n String key = Block.getBlock(blockID).getBlockLabel() + Block.getBlock(blockID).getGenusName();\n if (parentNameToParentBlocks.get(key) == null) {\n parentNameToParentBlocks.put(key, new HashSet<Long>());\n }\n parentNameToParentBlocks.get(key).add(blockID);\n\n if (parentNameToBlockStubs.get(key) == null) {\n parentNameToBlockStubs.put(key, new HashSet<Long>());\n }\n\n // notify dangling stubs and update their renderables\n // dangling stubs will be waiting to have a parent assigned to them\n // and reflect that graphically\n //TODO(user) Figure out if/how dangling stubs come about and whether they\n // should.\n for (Long stubID : parentNameToBlockStubs.get(key)) {\n BlockStub stub = (BlockStub) Block.getBlock(stubID);\n stub.notifyRenderable();\n }\n\n }",
"Block create(int xpos, int ypos);",
"public void removeBlock(Block block) {\n removeLocation(block.getLocation());\n }",
"public static void addDespawningBlock(Block block, int seconds) {\n FileConfiguration config = MyZ.instance.getBlocksConfig();\n ConfigurationSection section = config.createSection(block.getWorld().getName() + \"_\" + block.getX() + \"_\" + block.getY() + \"_\"\n + block.getZ());\n section.set(\"respawn\", false);\n section.set(\"type\", block.getType().toString());\n section.set(\"data\", block.getData());\n section.set(\"time\", ticks + seconds);\n MyZ.instance.saveBlocksConfig();\n }",
"public void ProtectMe(Block block){\n \tplugin.getProtect().add(block);\r\n \t\t//run the timer to load the block\r\n \t\r\n \tif(plugin.getTreeprotect_Timer().getPoolSize() < plugin.getTreeprotect_Timer().getMaximumPoolSize()){\r\n \t\tplugin.getTreeprotect_Timer().schedule(new Runnable() {\r\n \t\t\t\tpublic void run() {\r\n \t\t\t\t\tif(!(plugin.getProtect().isEmpty())){\r\n \t\t\t\t\t\t//remove it from the list\r\n \t\t\t\t\t\tplugin.getProtect().remove(0);\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t\t}, plugin.getProtectTime(), TimeUnit.MILLISECONDS);\r\n \t}\r\n \t}",
"private void createBlock() {\n\t\tblock = new Block(mouseX, mouseY, 25, 25);\r\n\t\tblock.addObserver(this);\r\n\t\tblock.start();\r\n\t\t// System.out.println(\"Block created (at Model.createBlock)\");\r\n\t}",
"void addBlock(final Block block, final int i) {\n days.get(i).addBlock(block);\n }",
"public static void render(Block block) {\n\t\tItem item = Item.getItemFromBlock(block);\n\t\tModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(item.getRegistryName(), \"inventory\"));\n\t}",
"@SubscribeEvent\n public static void onRegisterBlocks(RegistryEvent.Register<Block> event) {\n CoffeeMachineBlock coffeMachine = new CoffeeMachineBlock(\n Block.Properties.create(Material.ANVIL)\n .hardnessAndResistance(-1.0F, 360000F));\n event.getRegistry().registerAll(setup(coffeMachine, \"coffee_machine\"));\n }",
"public static void register() {\n Registry.register(Registry.BLOCK, new Identifier(\"cultivation\", \"sieve_block\"), SIEVE_BLOCK);\n Registry.register(Registry.ITEM, new Identifier(\"cultivation\", \"sieve_block\"), new BlockItem(SIEVE_BLOCK, new Item.Settings().group(Cultivation.GROUP)));\n Registry.register(Registry.BLOCK, new Identifier(\"cultivation\", \"pod_shell\"), POD_SHELL);\n }",
"public Block() {\r\n\t\t// TODO Auto-generated constructor stub\r\n\t\tthis.point_BlockTopRight = null;\r\n\t\tthis.point_BlockDownleft = null;\r\n\t\tthis.setpoint_BlockTopLeft(null);\r\n\t\tthis.IDBloack = 0;\r\n\t\tthis.type = \"\";\r\n\t}",
"@SubscribeEvent\n public static void registerTileEntity(final RegistryEvent.Register<TileEntityType<?>> event){\n walletBlockTileEntityType = TileEntityType.Builder.create(WalletBlockTileEntity::new, walletBlock).build(null);\n walletBlockTileEntityType.setRegistryName(\"bitcoinmod:wallet_block_tile_entity\");\n event.getRegistry().register(walletBlockTileEntityType);\n }",
"protected static Block createEmptyBlock(AST ast) {\n\t\treturn ast.newBlock();\n\t}",
"public void setBlock(boolean block) {\n this.block = block;\n }",
"@Override\n public void broadcastBlock(final Block block) {}",
"private static void addBlockToPixa(Pixa pixa, int x, int y, int width, int height, int depth) {\n final Pix pix = new Pix(width, height, depth);\n final Box box = new Box(x, y, width, height);\n\n pixa.add(pix, box, Constants.L_COPY);\n\n pix.recycle();\n box.recycle();\n }",
"protected void scanSpecialBlock(BlockPos pos, Block block) {\n/* 19 */ if (block == Blocks.CRAFTING_TABLE) {\n/* 20 */ addSpecialBlock(Blocks.CRAFTING_TABLE, pos);\n/* */ }\n/* 22 */ else if (block == Blocks.FURNACE || block == Blocks.LIT_FURNACE) {\n/* 23 */ addSpecialBlock(Blocks.FURNACE, pos);\n/* */ } \n/* */ \n/* 26 */ super.scanSpecialBlock(pos, block);\n/* */ }",
"@SubscribeEvent\n public static void registerContainer(final RegistryEvent.Register<ContainerType<?>> event){\n walletBlockContainerType = IForgeContainerType.create(WalletBlockContainer::createForClientSide);\n walletBlockContainerType.setRegistryName(\"wallet_block_container\");\n event.getRegistry().register(walletBlockContainerType);\n }",
"private InheritableBuildingBlock() {\r\n super(IInheritableBuildingBlock.TYPE_ID);\r\n }",
"public void removeBlock(Block otherBlock) {\n\t\tBLOCK_LIST.remove(otherBlock);\n\t\tIterator<Object> blockIterate = SPRITE_LIST.iterator();\n\t\twhile (blockIterate.hasNext()) {\n\t\t\tObject objBlock = blockIterate.next();\n\t\t\tif (objBlock instanceof Block) {\n\t\t\t\tBlock castBlock = (Block) objBlock;\n\t\t\t\tif (castBlock.equals(otherBlock)) {\n\t\t\t\t\tblockIterate.remove();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public interface IBlockAdded {\n\t\n\tpublic void setItemBlock(@Nullable IItemAddedBlock itemBlock);\n\t\n\tpublic void setDisplayName(String displayName);\n\t\n\tpublic void setBlockMaterial(Material blockMaterial);\n\t\n\tpublic void setPlaceSound(SoundEvent sound);\n\t\n\tpublic void setBreakSound(SoundEvent sound);\n\t\n\tpublic void setHitSound(SoundEvent sound);\n\t\n\tpublic void setStepSound(SoundEvent sound);\n\t\n\tpublic void setFallSound(SoundEvent sound);\n\t\n\tpublic void setBlockMapColor(@Nullable MapColor mapColor);\n\t\n\tpublic void setHarvestLevel(int harvestLevel);\n\t\n\tpublic void setHarvestTool(String harvestTool);\n\t\n\tpublic void setEffectiveTools(List<String> effectiveTools);\n\t\n\tpublic void setBookshelfStrength(int bookshelfStrength);\n\t\n\tpublic void setBeaconColorMultiplier(@Nullable float[] beaconColorMultiplier);\n\t\n\tpublic void setSlipperiness(float slipperiness);\n\t\n\tpublic void setIsSlime(boolean isSlime);\n\t\n\tpublic void setIsBeaconBase(boolean isBeaconBase);\n\t\n\tpublic void setCanPistonsPush(boolean canPistonsPush);\n\t\n\tpublic void setSemiTransparent(boolean semiTransparent);\n\t\n\tpublic void setXpDroppedMin(int xpMin);\n\t\n\tpublic void setXpDroppedMax(int xpMax);\n\t\n\tpublic void setDroppedFromExplosions(Boolean droppedFromExplosions);\n\t\n\tpublic default void setCanEndermenCarry(boolean canEndermenCarry) {\n\t\tif (EntityEnderman.getCarriable(this.getAsBlock()) != canEndermenCarry) {\n\t\t\tEntityEnderman.setCarriable(this.getAsBlock(), canEndermenCarry);\n\t\t}\n\t}\n\t\n\t@Nullable\n\tpublic IItemAddedBlock getItemBlock();\n\t\n\tpublic String getDisplayName();\n\t\n\tpublic Material getBlockMaterial();\n\t\n\tpublic SoundEvent getPlaceSound();\n\t\n\tpublic SoundEvent getBreakSound();\n\t\n\tpublic SoundEvent getHitSound();\n\t\n\tpublic SoundEvent getStepSound();\n\t\n\tpublic SoundEvent getFallSound();\n\t\n\t@Nullable\n\tpublic MapColor getBlockMapColor();\n\t\n\tpublic int getHarvestLevel();\n\t\n\tpublic String getHarvestTool();\n\t\n\tpublic List<String> getEffectiveTools();\n\t\n\tpublic int getBookshelfStrength();\n\t\n\t@Nullable\n\tpublic float[] getBeaconColorMultiplier();\n\t\n\tpublic float getSlipperiness();\n\t\n\tpublic boolean isSlime();\n\t\n\tpublic boolean isBeaconBase();\n\t\n\tpublic boolean canPistonsPush();\n\t\n\tpublic float getHardness();\n\t\n\tpublic float getResistance();\n\t\n\tpublic int getOpacity();\n\t\n\tpublic boolean isSemiTransparent();\n\t\n\tpublic int getLightLevel();\n\t\n\tpublic int getXpDroppedMin();\n\t\n\tpublic int getXpDroppedMax();\n\t\n\tpublic Boolean getDroppedFromExplosions();\n\t\n\tpublic default boolean canEndermenCarry() {\n\t\treturn EntityEnderman.getCarriable(this.getAsBlock());\n\t}\n\t\n\tpublic default void registerModels() {\n\t\tAdditionsMod.proxy.registerBlockRender(this.getAsBlock());\n\t}\n\t\n\tpublic default Block getAsBlock() {\n\t\tif (!(this instanceof Block)) {\n\t\t\tthrow new IllegalArgumentException(\"An IBlockAdded must be an instance of Block.\");\n\t\t}\n\t\treturn (Block) this;\n\t}\n\t\n public default String getId() {\n \tResourceLocation registryName = this.getAsBlock().getRegistryName();\n \t\n \tif (registryName != null) {\n \t\treturn registryName.getResourcePath();\n \t}\n \t\n String unlocalizedName = this.getAsBlock().getUnlocalizedName();\n \n if (unlocalizedName.startsWith(\"tile.\")) {\n \treturn unlocalizedName.substring(5);\n }\n \n return unlocalizedName;\n }\n\n public abstract static class Serializer<T extends IBlockAdded> {\n\t\t\n\t\tprivate final ResourceLocation blockAddedType;\n private final Class<T> blockAddedClass;\n\n protected Serializer(ResourceLocation location, Class<T> clazz)\n {\n this.blockAddedType = location;\n this.blockAddedClass = clazz;\n }\n\n\t\tpublic ResourceLocation getBlockAddedType() {\n\t\t\treturn this.blockAddedType;\n\t\t}\n\t\t\n\t\tpublic Class<T> getBlockAddedClass() {\n\t\t\treturn this.blockAddedClass;\n\t\t}\n\n\t\tpublic JsonObject serialize(T blockAddedObj, JsonSerializationContext context) {\n\t\t\tJsonObject json = new JsonObject();\n\t\t\tBlock blockAdded = blockAddedObj.getAsBlock();\n\t\t\t\n\t\t\tif (blockAddedObj.getItemBlock() != null) {\n\t\t\t\tjson.add(\"item_block\", AdditionTypeItem.GSON.toJsonTree(blockAddedObj.getItemBlock()));\n\t\t\t}\n\t\t\t\n\t\t\tjson.addProperty(\"name\", blockAddedObj.getDisplayName());\n\t\t\tjson.add(\"material\", OtherSerializers.BlockMaterialSerializer.serialize(blockAddedObj.getBlockMaterial()));\n\t\t\t\n\t\t\tif (blockAddedObj.getPlaceSound() != null) {\n\t\t\t\tjson.add(\"place_sound\", OtherSerializers.SoundEventSerializer.serialize(blockAddedObj.getPlaceSound()));\n\t\t\t}\n\t\t\t\n\t\t\tif (blockAddedObj.getBreakSound() != null) {\n\t\t\t\tjson.add(\"break_sound\", OtherSerializers.SoundEventSerializer.serialize(blockAddedObj.getBreakSound()));\n\t\t\t}\n\t\t\t\n\t\t\tif (blockAddedObj.getHitSound() != null) {\n\t\t\t\tjson.add(\"hit_sound\", OtherSerializers.SoundEventSerializer.serialize(blockAddedObj.getHitSound()));\n\t\t\t}\n\t\t\t\n\t\t\tif (blockAddedObj.getStepSound() != null) {\n\t\t\t\tjson.add(\"step_sound\", OtherSerializers.SoundEventSerializer.serialize(blockAddedObj.getStepSound()));\n\t\t\t}\n\t\t\t\n\t\t\tif (blockAddedObj.getFallSound() != null) {\n\t\t\t\tjson.add(\"fall_sound\", OtherSerializers.SoundEventSerializer.serialize(blockAddedObj.getFallSound()));\n\t\t\t}\n\t\t\t\n\t\t\tif (blockAddedObj.getBlockMapColor() != null) {\n\t\t\t\tjson.add(\"map_color\", OtherSerializers.BlockMapColorSerializer.serialize(blockAddedObj.getBlockMapColor()));\n\t\t\t}\n\t\t\t\n\t\t\tif (blockAddedObj.getHardness() > 0) {\n\t\t\t\tjson.addProperty(\"hardness\", blockAddedObj.getHardness());\n\t\t\t}\n\t\t\t\n\t\t\tif (blockAddedObj.getResistance() > 0) {\n\t\t\t\tjson.addProperty(\"resistance\", blockAddedObj.getResistance() / 3.0f);\n\t\t\t}\n\t\t\t\n\t\t\tif (blockAddedObj.getHarvestLevel() != 0) {\n\t\t\t\tjson.addProperty(\"harvest_level\", blockAddedObj.getHarvestLevel());\n\t\t\t}\n\t\t\t\n\t\t\tif (!blockAddedObj.getHarvestTool().isEmpty()) {\n\t\t\t\tjson.addProperty(\"harvest_tool\", blockAddedObj.getHarvestTool());\n\t\t\t}\n\t\t\t\n\t\t\tif (!blockAddedObj.getEffectiveTools().isEmpty()) {\n\t\t\t\tjson.add(\"effective_tools\", OtherSerializers.StringListSerializer.serialize(blockAddedObj.getEffectiveTools()));\n\t\t\t}\n\t\t\t\n\t\t\tif (blockAdded.getLightOpacity(blockAdded.getDefaultState()) != 15) {\n\t\t\t\tjson.addProperty(\"light_opacity\", blockAdded.getLightOpacity(blockAdded.getDefaultState()));\n\t\t\t}\n\t\t\t\n\t\t\tif (blockAdded.getLightValue(blockAdded.getDefaultState()) > 0) {\n\t\t\t\tjson.addProperty(\"light_level\", blockAdded.getLightValue(blockAdded.getDefaultState()));\n\t\t\t}\n\t\t\t\n\t\t\tif (Blocks.FIRE.getFlammability(blockAdded) > 0) {\n\t\t\t\tjson.addProperty(\"flammability\", Blocks.FIRE.getFlammability(blockAdded));\n\t\t\t}\n\t\t\t\n\t\t\tif (Blocks.FIRE.getEncouragement(blockAdded) > 0) {\n\t\t\t\tjson.addProperty(\"fire_spread_speed\", Blocks.FIRE.getEncouragement(blockAdded));\n\t\t\t}\n\t\t\t\n\t\t\tif (blockAddedObj.getBookshelfStrength() > 0) {\n\t\t\t\tjson.addProperty(\"bookshelf_strength\", blockAddedObj.getBookshelfStrength());\n\t\t\t}\n\t\t\t\n\t\t\tfloat[] beaconColorsMultiplier = blockAddedObj.getBeaconColorMultiplier();\n\t\t\tif (beaconColorsMultiplier != null && beaconColorsMultiplier.length == 3) {\n\t\t\t\tJsonObject beaconColorObj = new JsonObject();\n\t\t\t\tbeaconColorObj.addProperty(\"red\", beaconColorsMultiplier[0]);\n\t\t\t\tbeaconColorObj.addProperty(\"green\", beaconColorsMultiplier[1]);\n\t\t\t\tbeaconColorObj.addProperty(\"blue\", beaconColorsMultiplier[2]);\n\t\t\t\tjson.add(\"beacon_color_multiplier\", beaconColorObj);\n\t\t\t}\n\t\t\t\n\t\t\tif (blockAddedObj.getSlipperiness() != 0.6f) {\n\t\t\t\tjson.addProperty(\"slipperiness\", blockAddedObj.getSlipperiness());\n\t\t\t}\n\t\t\t\n\t\t\tif (blockAddedObj.isSlime()) {\n\t\t\t\tjson.addProperty(\"is_slime\", true);\n\t\t\t}\n\t\t\t\n\t\t\tif (blockAddedObj.isBeaconBase()) {\n\t\t\t\tjson.addProperty(\"is_beacon_base\", true);\n\t\t\t}\n\t\t\t\n\t\t\tif (!blockAddedObj.canPistonsPush()) {\n\t\t\t\tjson.addProperty(\"can_pistons_push\", false);\n\t\t\t}\n\t\t\t\n\t\t\tif (blockAddedObj.isSemiTransparent()) {\n\t\t\t\tjson.addProperty(\"semi_transparent\", true);\n\t\t\t}\n\t\t\t\n\t\t\tif (blockAddedObj.getXpDroppedMin() != 0) {\n\t\t\t\tjson.addProperty(\"xp_dropped_min\", blockAddedObj.getXpDroppedMin());\n\t\t\t}\n\t\t\t\n\t\t\tif (blockAddedObj.getXpDroppedMax() != 0) {\n\t\t\t\tjson.addProperty(\"xp_dropped_max\", blockAddedObj.getXpDroppedMax());\n\t\t\t}\n\t\t\t\n\t\t\tif (blockAddedObj.getDroppedFromExplosions() != null) {\n\t\t\t\tjson.addProperty(\"dropped_from_explosions\", blockAddedObj.getDroppedFromExplosions());\n\t\t\t}\n\t\t\t\n\t\t\tif (blockAddedObj.canEndermenCarry()) {\n\t\t\t\tjson.addProperty(\"can_endermen_carry\", true);\n\t\t\t}\n\t\t\t\n\t\t\treturn json;\n }\n\n\t\tpublic abstract T deserialize(JsonObject json, JsonDeserializationContext context);\n\t\t\n\t\tpublic <V extends Block & IBlockAdded> V deserializeDefaults(JsonObject json, JsonDeserializationContext context, V blockAdded) {\n\t\t\t\n\t\t\tif (json.has(\"item_block\")) {\n\t\t\t\tIItemAdded itemAdded = AdditionTypeItem.GSON.fromJson(json.get(\"item_block\"), IItemAdded.class);\n\t\t\t\t\n\t\t\t\tif (itemAdded instanceof IItemAddedBlock) {\n\t\t\t\t\tIItemAddedBlock itemAddedBlock = (IItemAddedBlock)itemAdded;\n\t\t\t\t\titemAddedBlock.setBlock(blockAdded);\n\t\t\t\t\tblockAdded.setItemBlock(itemAddedBlock);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n \tblockAdded.setDisplayName(JsonUtils.getString(json, \"name\"));\n \tblockAdded.setBlockMaterial(OtherSerializers.BlockMaterialSerializer.deserialize(json, \"material\"));\n\t\t\t\n\t\t\tif (json.has(\"map_color\")) {\n\t\t\t\tblockAdded.setBlockMapColor(OtherSerializers.BlockMapColorSerializer.deserialize(json, \"map_color\"));\n\t\t\t}\n\t\t\t\n\t\t\tblockAdded.setHardness(JsonUtils.getFloat(json, \"hardness\", 0));\n\t\t\tblockAdded.setResistance(JsonUtils.getFloat(json, \"resistance\", 0));\n\t\t\tblockAdded.setHarvestLevel(JsonUtils.getInt(json, \"harvest_level\", 0));\n\t\t\tblockAdded.setHarvestTool(JsonUtils.getString(json, \"harvest_tool\", \"\"));\n\t\t\t\n\t\t\tif (json.has(\"effective_tools\")) {\n\t\t\t\tblockAdded.setEffectiveTools(OtherSerializers.StringListSerializer.deserialize(json.get(\"effective_tools\"), \"effective_tools\"));\n\t\t\t}\n\t\t\t\n\t\t\tblockAdded.setLightOpacity(MathHelper.clamp(JsonUtils.getInt(json, \"light_opacity\", 15), 0, 15));\n\t\t\tblockAdded.setLightLevel(MathHelper.clamp(JsonUtils.getInt(json, \"light_level\", 0), 0, 15) / 15F);\n\t\t\t\n\t\t\tint flammability = JsonUtils.getInt(json, \"flammability\", 0);\n\t\t\tint fireSpreadSpeed = JsonUtils.getInt(json, \"fire_spread_speed\", 0);\n\t\t\tif (flammability > 0 || fireSpreadSpeed > 0) {\n\t\t\t\tBlocks.FIRE.setFireInfo(blockAdded, fireSpreadSpeed, flammability);\n\t\t\t}\n\t\t\t\n\t\t\tblockAdded.setBookshelfStrength(JsonUtils.getInt(json, \"bookshelf_strength\", 0));\n\t\t\t\n\t\t\tif (json.has(\"beacon_color_multiplier\")) {\n\t\t\t\tJsonObject beaconColorObj = JsonUtils.getJsonObject(json, \"beacon_color_multiplier\");\n\t\t\t\tblockAdded.setBeaconColorMultiplier(new float[]{JsonUtils.getFloat(beaconColorObj, \"red\"), JsonUtils.getFloat(beaconColorObj, \"green\"), JsonUtils.getFloat(beaconColorObj, \"blue\")});\n\t\t\t}\n\t\t\t\n\t\t\tblockAdded.setSlipperiness(JsonUtils.getFloat(json, \"slipperiness\", 0.6f));\n\t\t\tblockAdded.setIsSlime(JsonUtils.getBoolean(json, \"is_slime\", false));\n\t\t\tblockAdded.setIsBeaconBase(JsonUtils.getBoolean(json, \"is_beacon_base\", false));\n\t\t\tblockAdded.setCanPistonsPush(JsonUtils.getBoolean(json, \"can_pistons_push\", true));\n\t\t\tblockAdded.setSemiTransparent(JsonUtils.getBoolean(json, \"semi_transparent\", false));\n\t\t\tblockAdded.setXpDroppedMin(JsonUtils.getInt(json, \"xp_dropped_min\", 0));\n\t\t\tblockAdded.setXpDroppedMax(JsonUtils.getInt(json, \"xp_dropped_max\", 0));\n\t\t\tblockAdded.setCanEndermenCarry(JsonUtils.getBoolean(json, \"can_endermen_carry\", false));\n\t\t\t\n\t\t\tif (json.has(\"dropped_by_explosions\")) {\n\t\t\t\tblockAdded.setDroppedFromExplosions(JsonUtils.getBoolean(json, \"dropped_by_explosions\"));\n\t\t\t}\n \t\n \treturn blockAdded;\n }\n\t\t\n\t\tpublic void postDeserializeBlockAdded(JsonObject json, IBlockAdded blockAddedObj) {\n\t\t\tif (blockAddedObj.getClass() != this.blockAddedClass) {\n\t\t\t\tthrow new IllegalArgumentException(\"Tried to call post serialize for an object of the wrong type! Expected: \" + this.blockAddedClass + \", Actual: \" + blockAddedObj.getClass());\n\t\t\t}\n\t\t\t\n\t\t\tpostDeserialize(json, (T) blockAddedObj);\n\t\t}\n\t\t\n\t\tpublic void postDeserialize(JsonObject json, T blockAdded) {\n\t\t\tthis.postDeserializeDefaults(json, blockAdded);\n\t\t}\n\t\t\n\t\tpublic void postDeserializeDefaults(JsonObject json, T blockAdded) {\n \t\n \tIItemAdded itemAdded = blockAdded.getItemBlock();\n \tif (itemAdded != null) {\n \t\tItemAddedManager.Serializer.postDeserialize(JsonUtils.getJsonObject(json, \"item_block\"), itemAdded);\n \t}\n \t\n \tif (json.has(\"place_sound\")) {\n \t\tblockAdded.setPlaceSound(OtherSerializers.SoundEventSerializer.deserialize(json, \"place_sound\"));\n \t}\n \t\n \tif (json.has(\"break_sound\")) {\n \t\tblockAdded.setBreakSound(OtherSerializers.SoundEventSerializer.deserialize(json, \"break_sound\"));\n \t}\n \t\n \tif (json.has(\"hit_sound\")) {\n \t\tblockAdded.setHitSound(OtherSerializers.SoundEventSerializer.deserialize(json, \"hit_sound\"));\n \t}\n \t\n \tif (json.has(\"step_sound\")) {\n \t\tblockAdded.setStepSound(OtherSerializers.SoundEventSerializer.deserialize(json, \"step_sound\"));\n \t}\n \t\n \tif (json.has(\"fall_sound\")) {\n \t\tblockAdded.setFallSound(OtherSerializers.SoundEventSerializer.deserialize(json, \"fall_sound\"));\n \t}\n }\n }\n}",
"public void addBlock(Block block, int damage, long time) {\n String c = chunkToString(block.getChunk());\n if (!chunks.containsKey(c)) {\n loadChunk(block.getChunk());\n }\n ChunkWrapper chunk = chunks.get(c);\n time += System.currentTimeMillis();\n chunk.addBlockTimer(damage, time, block);\n }",
"@Override\n\tpublic boolean contains(BlockData block)\n\t{\n\t\tthrow new UnimplementedOperationException();\n\t}",
"public void addBlock(Block block, int damage) {\n String c = chunkToString(block.getChunk());\n if (!chunks.containsKey(c)) {\n loadChunk(block.getChunk());\n }\n ChunkWrapper chunk = chunks.get(c);\n chunk.addBlock(damage, block);\n }",
"public Block() {\n this.xPos = 0;\n this.yPos = 0;\n this.width = 0;\n this.height = 0;\n this.color = Color.MINTCREAM;\n }",
"public Block(Block bl) {\r\n\t\tthis.type = bl.type;\r\n\t\tthis.point_BlockTopRight = new Point3D(bl.point_BlockTopRight);\r\n\t\tthis.point_BlockDownleft = new Point3D(bl.point_BlockDownleft);\r\n\t\tthis.setpoint_BlockTopLeft(new Point3D(bl.getpoint_BlockTopRight().y(),bl.getpoint_BlockDownleft().x()));\r\n\t\tthis.setPoint_BlockDownRight(new Point3D(bl.getpoint_BlockDownleft().y(),bl.getpoint_BlockTopRight().x()));\r\n\t\tthis.IDBloack = bl.IDBloack;\r\n\r\n\t}",
"public void addBlockList(int n) {\n BlockList.add(n);\r\n }",
"@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)\n\tpublic void onPlaceBlock(BlockPlaceEvent e) {\n\t\tBlock block = e.getBlock();\n\n\t\tMaterial blockMaterial = block.getType();\n\t\tint x = block.getX();\n\t\tint y = block.getY();\n\t\tint z = block.getZ();\n\t\tWorldChunk chunk = CropControl.getDAO().getChunk(block.getChunk());\n\n\t\tif (CropControl.getDAO().isTracked(block) == true) {\n\t\t\t// We've got a replacement\n\t\t\tCropControl.getPlugin().debug(\"Ghost object? Placement is overtop a tracked object at {0}, {1}, {2}\", x, y, z);\n\t\t\thandleRemoval(block, chunk);\n\t\t}\n\t\tif (harvestableCrops.containsKey(blockMaterial)) {\n\t\t\t// we placed a block overtop an existing crop. Will be handled by a break event?\n\t\t\t/*Crop crop = chunk.getCrop(x, y, z);\n\t\t\tif (crop != null) {\n\t\t\t\tcrop.setRemoved();\n\t\t\t\tCropControl.getPlugin().debug(\"Missed an event? Replacing a Crop at {0}, {1}, {2}\", x, y, z);\n\t\t\t\t//return;\n\t\t\t}*/\n\t\t\t\n\t\t\t// We've placed a crop!\n\t\t\tCrop.create(chunk, x, y, z, blockMaterial.toString(), getBaseCropState(blockMaterial),\n\t\t\t\t\te.getPlayer().getUniqueId(), System.currentTimeMillis(), harvestableCrops.get(blockMaterial));\n\t\t} else if (blockMaterial == Material.SAPLING) {\n\t\t\t// we placed a block overtop an existing sapling. TODO: Do I need to remove sapling here, or will there be a break event?\n\t\t\t/*Sapling sapling = chunk.getSapling(x, y, z);\n\t\t\tif (sapling != null) {\n\t\t\t\tsapling.setRemoved();\n\t\t\t\tCropControl.getPlugin().debug(\"Missed an event? Replacing a Sapling at {0}, {1}, {2}\", x, y, z);\n\t\t\t\t//return;\n\t\t\t}*/\n\t\t\t// We've placed a sapling!\n\t\t\tSapling.create(chunk, x, y, z, getSaplingType(block.getData()),\n\t\t\t\t\te.getPlayer().getUniqueId(), System.currentTimeMillis(), false);\n\t\t} else if (blockMaterial == Material.CHORUS_FLOWER) {\n\t\t\t/*if (CropControl.getDAO().isTracked(block) == true) {\n\t\t\t\tCropControl.getPlugin().debug(\"Ghost object? Placement is overtop a tracked object at {0}, {1}, {2}\", x, y, z);\n\t\t\t\t//return;\n\t\t\t}*/\n\t\t\t\n\t\t\t// TODO: Check if connected to an existing chorus tree.\n\n\t\t\t// First register the \"tree\"\n\t\t\tTree chorusPlant = Tree.create(chunk, x, y, z, Material.CHORUS_PLANT.toString(),\n\t\t\t\t\te.getPlayer().getUniqueId(), System.currentTimeMillis());\n\n\t\t\t// Then the component in the tree.\n\t\t\tTreeComponent.create(chorusPlant, chunk, x, y, z, Material.CHORUS_PLANT.toString(),\n\t\t\t\t\te.getPlayer().getUniqueId(), false);\n\t\t} else if (blockMaterial.isSolid()){ // check for cactus.\n\t\t\tfor (BlockFace face : CropControlEventHandler.directions) {\n\t\t\t\tBlock adj = block.getRelative(face);\n\t\t\t\tif (Material.CACTUS == adj.getType()) {\n\t\t\t\t\tLocation loc = adj.getLocation();\n\t\t\t\t\tif (!pendingChecks.contains(loc)) {\n\t\t\t\t\t\tpendingChecks.add(loc);\n\t\t\t\t\t\thandleBreak(adj, BreakType.PLAYER, e.getPlayer().getUniqueId(), null);\n\t\t\t\t\t}\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public static void addRespawningBlock(Block block, int seconds) {\n FileConfiguration config = MyZ.instance.getBlocksConfig();\n ConfigurationSection section = config.createSection(block.getWorld().getName() + \"_\" + block.getX() + \"_\" + block.getY() + \"_\"\n + block.getZ());\n section.set(\"respawn\", true);\n section.set(\"type\", block.getType().toString());\n section.set(\"data\", block.getData());\n section.set(\"time\", ticks + seconds);\n MyZ.instance.saveBlocksConfig();\n }"
] | [
"0.7000217",
"0.6898101",
"0.65587044",
"0.64962757",
"0.64884794",
"0.6398437",
"0.6386786",
"0.62998563",
"0.6298819",
"0.62322557",
"0.6191032",
"0.6169768",
"0.60663635",
"0.6011175",
"0.59822243",
"0.59801596",
"0.59683365",
"0.5939013",
"0.590108",
"0.5894717",
"0.5894149",
"0.5879383",
"0.5877718",
"0.58727276",
"0.5826797",
"0.5797589",
"0.5759766",
"0.5739052",
"0.57374525",
"0.567717",
"0.56711",
"0.5619763",
"0.5619762",
"0.5591925",
"0.55904436",
"0.5537039",
"0.55316716",
"0.55291516",
"0.55121076",
"0.5505674",
"0.5504054",
"0.5504054",
"0.54853404",
"0.54789704",
"0.5468657",
"0.54206467",
"0.5410497",
"0.5402479",
"0.539577",
"0.53952223",
"0.5384975",
"0.53758585",
"0.53649384",
"0.5355466",
"0.5341575",
"0.5333884",
"0.5332459",
"0.53296643",
"0.5302688",
"0.5294044",
"0.52823526",
"0.5281793",
"0.5276897",
"0.52542406",
"0.5230623",
"0.52266556",
"0.5222092",
"0.5216788",
"0.519415",
"0.51919866",
"0.5184255",
"0.5128732",
"0.5128412",
"0.5124255",
"0.51216245",
"0.5093189",
"0.50790006",
"0.50768465",
"0.50703794",
"0.5046065",
"0.5040846",
"0.50224453",
"0.5016903",
"0.5009634",
"0.49852234",
"0.49827942",
"0.4969842",
"0.4969153",
"0.49654028",
"0.4965001",
"0.49637535",
"0.49515224",
"0.49399793",
"0.49300307",
"0.49295464",
"0.492772",
"0.49259037",
"0.49188083",
"0.49168506",
"0.49160516"
] | 0.7838141 | 0 |
Registers a Block and creates a matching Block Item | public static Block registerBlock(String MODID, String name, Block block, ItemGroup itemGroup){
return registerBlock(MODID, name, block, (new Item.Settings()).itemGroup(itemGroup));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void registerBlock(Block b)\n\t{\n\t}",
"private static Item registerBlockItem(Block block, Item.Settings settings){\n Identifier id = Registry.BLOCK.getId(block);\n return CottonItemHelper.registerItem(id.getNamespace(), id.getPath(), new BlockItem(block, settings));\n }",
"public static void register(Block block, ItemBlock itemBlock) {\n\t\tGameRegistry.register(block);\n\t\tGameRegistry.register(itemBlock);\n\t}",
"public static <BLOCK extends Block> BLOCK register(@Nonnull final BLOCK block, @Nullable final ItemBlock itemBlock) {\n\t\tfinal ResourceLocation resourceLocation = block.getRegistryName();\n\t\tif (resourceLocation == null) {\n\t\t\tWarpDrive.logger.error(String.format(\"Missing registry name for block %s, ignoring registration...\",\n\t\t\t block));\n\t\t\treturn block;\n\t\t}\n\t\t\n\t\tassert !blocks.contains(block);\n\t\tblocks.add(block);\n\t\t\n\t\tif (itemBlock != null) {\n\t\t\titemBlock.setRegistryName(resourceLocation);\n\t\t\tregister(itemBlock);\n\t\t}\n\t\t\n\t\treturn block;\n\t}",
"@SubscribeEvent\n public static void registerItem(final RegistryEvent.Register<Item> event){\n Item.Properties properties = new Item.Properties().maxStackSize(1).group(ItemGroup.MISC);\n walletBlockItem = new BlockItem(walletBlock, properties);\n walletBlockItem.setRegistryName(walletBlock.getRegistryName());\n event.getRegistry().register(walletBlockItem);\n }",
"public static <T extends Block> T register(T block, String name, ItemGroup group, boolean hasItem) {\n ResourceLocation loc = new ResourceLocation(Missy.MODID, name);\n // Set the block to it.\n block.setRegistryName(loc);\n\n if(hasItem) {\n if(block instanceof IMakeItem) {\n ITEMS.add(((IMakeItem) block).getItem().setRegistryName(loc));\n }\n else ITEMS.add(new BlockItem(block, MItemProperties.BLOCK.group(group)).setRegistryName(loc));\n }\n\n BLOCKS.add(block);\n\n return block;\n }",
"public static void register(GenericBlock block)\n\t{\n\t\tBLOCKS.add(block);\n\t}",
"public static Block registerBlock(String MODID, String name, Block block, Item.Settings settings){\n block = registerBlockWithoutItem(MODID, name, block);\n registerBlockItem(block, settings);\n return block;\n }",
"public void addBlock(Block block) {\n\t\tblock.setId(this.generateID());\n\t\tthis.blocks.put(block.getId(), block);\n\t}",
"@SubscribeEvent\n public static void registerBlock(final RegistryEvent.Register<Block> event){\n walletBlock = new WalletBlock();\n event.getRegistry().register(walletBlock);\n }",
"Block saveBlock(Block block) throws BlockExistsException;",
"public void addBlock(Block newBlock) {\n\t\tBLOCK_LIST.add(newBlock);\n\t\tSPRITE_LIST.add(newBlock);\n\t}",
"@Override\n\tpublic void addBlock(Block block) {\n\t\tem.persist(block);\n\t}",
"public static <BLOCK extends Block> BLOCK register(@Nonnull final BLOCK block) {\n\t\tassert block instanceof IBlockBase;\n\t\treturn register(block, ((IBlockBase) block).createItemBlock());\n\t}",
"private static Block registerBlockWithoutItem(String MODID, String name, Block b){\n return Registry.register(Registry.BLOCK, MODID+\":\"+name, b);\n }",
"Block createBlock();",
"private static void registerBlocks() {\n for(Block block : modBlocks) {\n ForgeRegistries.BLOCKS.register(block);\n\n ItemBlock itemBlock = new ItemBlock(block);\n itemBlock.setRegistryName(block.getRegistryName());\n ForgeRegistries.ITEMS.register(itemBlock);\n }\n }",
"public void addBlock(Block block){\n\t\tblocks.addElement(block);\n\t}",
"public void addBlock(int x, int y) {\r\n\t\tthis.blockMap.add(new Block(x, y));\r\n\t}",
"public void blockAdded(Response block) {\n try {\n long id = block.getId(\"block\");\n blockList.add(0, block);\n blockMap.put(block.getId(\"block\"), block);\n fireTableRowsInserted(0, 0);\n } catch (IdentifierException exc) {\n // Ignore the block\n }\n }",
"private static void put(Block block, TempBlock tempBlock) {\r\n\t\tif (!instances_.containsKey(block)) {\r\n\t\t\tinstances_.put(block, new LinkedList<>());\r\n\t\t}\r\n\t\tinstances_.get(block).add(tempBlock);\r\n\t}",
"public void addBlock(Block block) {\n this.blocks.add(block);\n }",
"public static void BlockRegister()\n\t{\n\t\tString[] umberstoneBlock = {\"umberstone\"};\n\t\tString[] umbercobbleBlock = {\"cobbleUmber\"};\n\t\tStoneRegister umberstone = getStoneRegister(ModBlocks.umberstone, ModBlocks.umberstone, \"umberstone\", umberstoneBlock, umbercobbleBlock, \"erebus\");\n\t\tumberstone.mossyCobble = false;\n\t\tumberstone.genReplaceable = false;\n\t\tumberstone.register();\n\t}",
"public static void registerBlock(boolean fireproof, ItemGroup group, String name, Block block) {\n Item.Settings normalSettings = new Item.Settings().group(group);\n Item.Settings fireproofSettings = new Item.Settings().group(group).fireproof();\n\n Registry.register(Registry.BLOCK, newID(name), block);\n Registry.register(Registry.ITEM, newID(name), new BlockItem(block, (fireproof ? fireproofSettings : normalSettings)));\n }",
"public static void registerBlockEntities()\n\t{\n\t}",
"public void putBlock(JsonObject block){\n blocks.put(Hash.getHashString(block.toString()), block);\n }",
"synchronized void putBlock(ICBlock block) {\n mQueue.add(block);\n }",
"public static void register() {\n Registry.register(Registry.BLOCK, new Identifier(\"cultivation\", \"sieve_block\"), SIEVE_BLOCK);\n Registry.register(Registry.ITEM, new Identifier(\"cultivation\", \"sieve_block\"), new BlockItem(SIEVE_BLOCK, new Item.Settings().group(Cultivation.GROUP)));\n Registry.register(Registry.BLOCK, new Identifier(\"cultivation\", \"pod_shell\"), POD_SHELL);\n }",
"public ItemBlock createItemBlock() {\n\t\treturn new GenericItemBlock(this);\n\t}",
"public static void registerBlocks() {\n\t\tRegistry.register(Registry.BLOCK, new Identifier(EggMod.MOD_ID, \"egg_block\"), EGG_BLOCK);\n\t\t\n\t\t// Yolk\n\t\tSTILL_YOLK = Registry.register(Registry.FLUID, new Identifier(EggMod.MOD_ID, \"yolk_flow\"), new YolkFluid.Still());\n\t\tFLOWING_YOLK = Registry.register(Registry.FLUID, new Identifier(EggMod.MOD_ID, \"yolk_still\"), new YolkFluid.Flowing());\n\t\tYOLK = Registry.register(Registry.BLOCK, new Identifier(EggMod.MOD_ID, \"yolk\"), new FluidBlock(STILL_YOLK, FabricBlockSettings.copy(Blocks.WATER)){});\n\t}",
"public void addBlock(Block block)\n {\n SolrInputDocument solr_doc = new SolrInputDocument();\n solr_doc.setField(\"type\",\"Block\");\n solr_doc.setField(\"hash\", block.getHash_block());\n solr_doc.setField(\"block_num\", block.getBlock_num());\n solr_doc.setField(\"version\", block.getVersion());\n solr_doc.setField(\"transaction_merkle_root\", block.getTransac_merkle_root());\n solr_doc.setField(\"timestamps\", block.getTimestamp());\n solr_doc.setField(\"datetime\", block.getDatetime());\n solr_doc.setField(\"difficulty\", block.getDifficulty());\n solr_doc.setField(\"cumulative_difficulty\", block.getCumulative_difficulty());\n solr_doc.setField(\"nonce\", block.getNonce());\n solr_doc.setField(\"how_much_transaction\", block.getHow_much_transaction());\n solr_doc.setField(\"value_out\", block.getValue_out());\n solr_doc.setField(\"block_fee\", block.getBlock_fee());\n solr_doc.setField(\"avg_coin_out\", block.getAvg_coin_age());\n solr_doc.setField(\"coin_days_destroyed\", block.getCoin_days_destroyed());\n solr_doc.setField(\"cumulative_coin_days_destroyed\", block.getCumulative_coin_days_destroyed());\n\n try {\n client.add(solr_doc);\n } catch (SolrServerException | IOException e) {\n e.printStackTrace();\n }\n\n commit();\n }",
"public void addBlock(Block b) {\n String previousHash = \"\";\n if (blockChain.size() == 0) {\n previousHash = \"\";\n } else {\n previousHash = getLatestBlock().proofOfWork();\n }\n b.previousHash = previousHash;\n chainHash = b.proofOfWork();\n blockChain.add(b);\n }",
"protected abstract int addBlock(Collection<Record> candidates,\n Map.Entry block);",
"public void addBlock(int x, int y, int health) {\r\n\t\tthis.blockMap.add(new Block(x, y, health));\r\n\t}",
"public void addBlockToPA(IGUIBlock block, int index) {\n blockLink.addBlockPair(block, blockHandler.getFromPalette(index));\n addExistingBlockAsProgram(block);\n }",
"@SubscribeEvent\n public static void onBlocksRegistry(final RegistryEvent.Register<Block> blockRegistryEvent) {\n LOGGER.info(\"HELLO from Register Block\");\n }",
"@Override\n public void createBlockchain(String name, Block genesisBlock) {\n BlockNodeEntity blockNodeEntity = getBlockNodeEntity(name, genesisBlock);\n blockRepository.save(blockNodeEntity);\n }",
"public void addExistingBlockAsProgram(IGUIBlock block) {\n Block toAdd = blockLink.getBlockFromGUIBlock(block);\n blockHandler.addToPA(toAdd);\n }",
"public static void registerBlockSmelting(){\n\t\t\n\t\tGameRegistry.addSmelting(blockInfo.myWood_ID, new ItemStack(items.compressedAir, 2), 0.1f);\n\t\t\n\t}",
"private void addBlock(Block one)\n\t{\n\t\tgetChildren().add(one);\n\t\tblocks1.add(one);\n\t\tblocks2.add(one);\n\t}",
"private void createBlock() {\n\t\tblock = new Block(mouseX, mouseY, 25, 25);\r\n\t\tblock.addObserver(this);\r\n\t\tblock.start();\r\n\t\t// System.out.println(\"Block created (at Model.createBlock)\");\r\n\t}",
"Integer add(@Param(\"tableName\") String tableName, @Param(\"block\") TbBlock tbBlock);",
"Block create(int xpos, int ypos);",
"void addBlock(final Block block, final int i) {\n days.get(i).addBlock(block);\n }",
"public void addToBlock(Instruction instn){\n\t\tinstns.add(instn);\n\t}",
"public EntangledChaliceItem(Block block) {\n super(block);\n }",
"public void addBlock(Block block) {\r\n if (null == blocks) {\r\n blocks = new ArrayList<Block>();\r\n }\r\n blocks.add(block);\r\n maxEntries += block.getHowMany();\r\n }",
"private static void craftSlab(Block block)\r\n\t{\r\n\t\tBlockExtraSlab input = ((BlockExtraSlab)block);\r\n\t\tBlock parent = input.getParent();\r\n\t\tint parentMeta = input.getParentMeta();\r\n\t\t\r\n\t\tGameRegistry.addRecipe(new ItemStack(block, 6, 0), new Object[] { \"###\", '#', new ItemStack(parent, 1, parentMeta) });\r\n\t\tGameRegistry.addRecipe(new ItemStack(parent, 1, parentMeta), new Object[] { \"#\", \"#\", '#', new ItemStack(block) });\r\n\t}",
"public static ItemFrame addItemFrame(Block block, BlockFace face) {\n\t\tfinal Material mat = Material.GLASS;\n\t\tBlock northBlock = block.getWorld().getBlockAt(block.getX(), block.getY(), block.getZ() - 1);\n\t\tBlock southBlock = block.getWorld().getBlockAt(block.getX(), block.getY(), block.getZ() + 1);\n\t\tBlock eastBlock = block.getWorld().getBlockAt(block.getX() - 1, block.getY(), block.getZ());\n\t\tBlock westBlock = block.getWorld().getBlockAt(block.getX() + 1, block.getY(), block.getZ());\n\n\t\tif (northBlock.getType() == Material.AIR) {\n\t\t\tnorthBlock.setType(mat);\n\t\t}\n\t\tif (southBlock.getType() == Material.AIR) {\n\t\t\tsouthBlock.setType(mat);\n\t\t}\n\t\tif (eastBlock.getType() == Material.AIR) {\n\t\t\teastBlock.setType(mat);\n\t\t}\n\t\tif (westBlock.getType() == Material.AIR) {\n\t\t\twestBlock.setType(mat);\n\t\t}\n\n\t\tif (face == BlockFace.NORTH) {\n\t\t\tnorthBlock.setType(Material.AIR);\n\t\t} else if (face == BlockFace.SOUTH) {\n\t\t\tsouthBlock.setType(Material.AIR);\n\t\t} else if (face == BlockFace.EAST) {\n\t\t\teastBlock.setType(Material.AIR);\n\t\t} else if (face == BlockFace.WEST) {\n\t\t\twestBlock.setType(Material.AIR);\n\t\t}\n\n\t\tItemFrame itemFrame = (ItemFrame) block.getWorld().spawnEntity(block.getLocation(), EntityType.ITEM_FRAME);\n\n\t\tif (northBlock.getType() == mat) {\n\t\t\tnorthBlock.setType(Material.AIR);\n\t\t}\n\t\tif (southBlock.getType() == mat) {\n\t\t\tsouthBlock.setType(Material.AIR);\n\t\t}\n\t\tif (eastBlock.getType() == mat) {\n\t\t\teastBlock.setType(Material.AIR);\n\t\t}\n\t\tif (westBlock.getType() == mat) {\n\t\t\twestBlock.setType(Material.AIR);\n\t\t}\n\n\t\treturn itemFrame;\n\t}",
"DefineBlock createDefineBlock();",
"public void pushComputedBlock(String block){\n JsonParser parser = new JsonParser();\n \tJsonObject Block = (JsonObject) parser.parse(block);\n\n processNewBlock(Block);\n\n }",
"public void addPendingBlock(Block block) {\n\n\t\tList<Block> sameIndexBlocks = pendingBlocks.get(block.getIndex());\n\t\tif(sameIndexBlocks == null) {\n\t\t\tsameIndexBlocks = new ArrayList<Block>();\n\t\t\tpendingBlocks.put(block.getIndex(), sameIndexBlocks);\n\t\t}\n\t\tsameIndexBlocks.add(block);\n\t}",
"public void register(WorldGenKawaiiBaseWorldGen.WorldGen gen)\r\n\t{\t\r\n\t\tif (!this.Enabled) return; \r\n\t\tGameRegistry.registerBlock(this, this.getUnlocalizedName());\r\n\t\t\r\n\t\tString saplingName = name + \".sapling\";\r\n\t\tSapling = new ItemKawaiiSeed(saplingName, SaplingToolTip, this);\r\n\t\tSapling.OreDict = SaplingOreDict;\r\n\t\tSapling.MysterySeedWeight = SeedsMysterySeedWeight;\r\n\t\tSapling.register();\r\n\r\n\t\tString fruitName = name + \".fruit\";\r\n\t\tif (FruitEdible)\r\n\t\t{\r\n\t\t\tItemKawaiiFood fruit = new ItemKawaiiFood(fruitName, FruitToolTip, FruitHunger, FruitSaturation, FruitPotionEffets);\r\n\t\t\tFruit = fruit;\r\n\t\t\tfruit.OreDict = FruitOreDict;\r\n\t\t\t\r\n\t\t\tfruit.register();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tItemKawaiiIngredient fruit = new ItemKawaiiIngredient(fruitName, FruitToolTip);\r\n\t\t\tFruit = fruit;\r\n\t\t\tfruit.OreDict = FruitOreDict;\r\n\t\t\t\r\n\t\t\tfruit.register();\r\n\t\t}\r\n\t\t\r\n\t\tif (gen.weight > 0)\r\n\t\t{\r\n\t\t\tgen.generator = new WorldGenKawaiiTree(this);\r\n\t\t\tModWorldGen.WorldGen.generators.add(gen);\r\n\t\t}\r\n\r\n\t\tModBlocks.AllTrees.add(this);\t\t\r\n\t}",
"private void setBlock(Block block) {\r\n this.block = block;\r\n }",
"public void addBlock(int row, int col, Block block, GameplayState gps) {\n if (row < 4) {\n gps.setGameIsLost(true);\n }\n\n cells[row][col] = block;\n }",
"public static void registerBlocks() {\n\t\tModLoader.registerBlock(blockWirelessR,\n\t\t\t\tBlockItemRedstoneWirelessR.class);\n\t\tModLoader.addName(blockWirelessR, \"Wireless Receiver\");\n\t\tModLoader.addName(blockWirelessR, \"de_DE\", \"Drahtloser Empfänger\");\n\t\tModLoader.registerTileEntity(TileEntityRedstoneWirelessR.class,\n\t\t\t\t\"Wireless Receiver\", new TileEntityRedstoneWirelessRenderer());\n\n\t\tModLoader.registerBlock(blockWirelessT,\n\t\t\t\tBlockItemRedstoneWirelessT.class);\n\t\tModLoader.addName(blockWirelessT, \"Wireless Transmitter\");\n\t\tModLoader.addName(blockWirelessT, \"de_DE\", \"Drahtloser Sender\");\n\t\tModLoader.registerTileEntity(TileEntityRedstoneWirelessT.class,\n\t\t\t\t\"Wireless Transmitter\",\n\t\t\t\tnew TileEntityRedstoneWirelessRenderer());\n\t\tregisterBlockForCreativeGui(blockWirelessR);\n\t\tregisterBlockForCreativeGui(blockWirelessT);\n\t}",
"public void addBlock(Block block, int damage, long time) {\n String c = chunkToString(block.getChunk());\n if (!chunks.containsKey(c)) {\n loadChunk(block.getChunk());\n }\n ChunkWrapper chunk = chunks.get(c);\n time += System.currentTimeMillis();\n chunk.addBlockTimer(damage, time, block);\n }",
"void addInlineBlockWriter(InlineBlockWriter bloomWriter);",
"private static void addBlockToPixa(Pixa pixa, int x, int y, int width, int height, int depth) {\n final Pix pix = new Pix(width, height, depth);\n final Box box = new Box(x, y, width, height);\n\n pixa.add(pix, box, Constants.L_COPY);\n\n pix.recycle();\n box.recycle();\n }",
"public static void render(Block block) {\n\t\tItem item = Item.getItemFromBlock(block);\n\t\tModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(item.getRegistryName(), \"inventory\"));\n\t}",
"public static void putNewParentInStubMap(Long blockID) {\n String key = Block.getBlock(blockID).getBlockLabel() + Block.getBlock(blockID).getGenusName();\n if (parentNameToParentBlocks.get(key) == null) {\n parentNameToParentBlocks.put(key, new HashSet<Long>());\n }\n parentNameToParentBlocks.get(key).add(blockID);\n\n if (parentNameToBlockStubs.get(key) == null) {\n parentNameToBlockStubs.put(key, new HashSet<Long>());\n }\n\n // notify dangling stubs and update their renderables\n // dangling stubs will be waiting to have a parent assigned to them\n // and reflect that graphically\n //TODO(user) Figure out if/how dangling stubs come about and whether they\n // should.\n for (Long stubID : parentNameToBlockStubs.get(key)) {\n BlockStub stub = (BlockStub) Block.getBlock(stubID);\n stub.notifyRenderable();\n }\n\n }",
"public void addAttachedBlock(TempBlock tempBlock) {\r\n\t\tthis.attachedTempBlocks.add(tempBlock);\r\n\t\ttempBlock.attachedTempBlocks.add(this);\r\n\t}",
"public void addBlock(Block block, int damage) {\n String c = chunkToString(block.getChunk());\n if (!chunks.containsKey(c)) {\n loadChunk(block.getChunk());\n }\n ChunkWrapper chunk = chunks.get(c);\n chunk.addBlock(damage, block);\n }",
"public void setBlock(Block newBlock) {\n\t\tthis.block = newBlock;\n\t}",
"BuildingBlock saveBuildingBlock(BuildingBlock buildingBlock) throws BusinessException;",
"@SubscribeEvent\n public static void onRegisterBlocks(RegistryEvent.Register<Block> event) {\n CoffeeMachineBlock coffeMachine = new CoffeeMachineBlock(\n Block.Properties.create(Material.ANVIL)\n .hardnessAndResistance(-1.0F, 360000F));\n event.getRegistry().registerAll(setup(coffeMachine, \"coffee_machine\"));\n }",
"public void insert(int index, Block block) {\r\n\t\tfor(Entry s : block) {\r\n\t\t\tinsert(index++, s.code,s.attributes());\r\n\t\t}\r\n\t}",
"TestBlock createTestBlock();",
"BranchingBlock createBranchingBlock();",
"public static ItemIngredient of(Block input) {\n\t\treturn of(ItemBlock.getItemFromBlock(input));\n\t}",
"public void putBlock(Block block){\n\t \n\t BlockPosX = 5;\n\t BlockPosY = 0;\n\t int posX = 5;\n\t int posY = 0;\n\t BlockInControl = block;\n\t \n\t int x = 0;\n\t for(int i=0;i<MAX_COL;i++){\n\t\tif(board[posY+1][i] == 1)\n\t\t x = 1;\n\t }\n\t if(x==1)\n\t\tthis.clearBoard();\n\t \n\t \n\t for(int r=0;r<4;r++){\n\t\tfor(int c=0;c<4;c++){\n\t\t if(block.getRowCol(r,c) == 1)\n\t\t\t{\n\t\t\t board[posY][posX]=1;\n\t\t\t \n\t\t\t switch(whichType){\n\t\t\t case 1: color[posY][posX] = 1;\n\t\t\t\tbreak;\n\t\t\t case 2: color[posY][posX] = 2;\n\t\t\t\tbreak;\n\t\t\t case 3: color[posY][posX] = 3;\n\t\t\t\tbreak;\n\t\t\t case 4: color[posY][posX] = 4;\n\t\t\t\tbreak;\n\t\t\t case 5: color[posY][posX] = 5;\n\t\t\t\tbreak;\n\t\t\t case 6: color[posY][posX] = 6;\n\t\t\t\tbreak;\n\t\t\t case 7: color[posY][posX] = 7;\n\t\t\t break;\n\t\t\t }\n\t\t\t}\n\t\t \n\t\t posX++;\n\t\t}\n\t posY++;\n\t posX-=4;\n\t }\n\t}",
"public interface IBlockAdded {\n\t\n\tpublic void setItemBlock(@Nullable IItemAddedBlock itemBlock);\n\t\n\tpublic void setDisplayName(String displayName);\n\t\n\tpublic void setBlockMaterial(Material blockMaterial);\n\t\n\tpublic void setPlaceSound(SoundEvent sound);\n\t\n\tpublic void setBreakSound(SoundEvent sound);\n\t\n\tpublic void setHitSound(SoundEvent sound);\n\t\n\tpublic void setStepSound(SoundEvent sound);\n\t\n\tpublic void setFallSound(SoundEvent sound);\n\t\n\tpublic void setBlockMapColor(@Nullable MapColor mapColor);\n\t\n\tpublic void setHarvestLevel(int harvestLevel);\n\t\n\tpublic void setHarvestTool(String harvestTool);\n\t\n\tpublic void setEffectiveTools(List<String> effectiveTools);\n\t\n\tpublic void setBookshelfStrength(int bookshelfStrength);\n\t\n\tpublic void setBeaconColorMultiplier(@Nullable float[] beaconColorMultiplier);\n\t\n\tpublic void setSlipperiness(float slipperiness);\n\t\n\tpublic void setIsSlime(boolean isSlime);\n\t\n\tpublic void setIsBeaconBase(boolean isBeaconBase);\n\t\n\tpublic void setCanPistonsPush(boolean canPistonsPush);\n\t\n\tpublic void setSemiTransparent(boolean semiTransparent);\n\t\n\tpublic void setXpDroppedMin(int xpMin);\n\t\n\tpublic void setXpDroppedMax(int xpMax);\n\t\n\tpublic void setDroppedFromExplosions(Boolean droppedFromExplosions);\n\t\n\tpublic default void setCanEndermenCarry(boolean canEndermenCarry) {\n\t\tif (EntityEnderman.getCarriable(this.getAsBlock()) != canEndermenCarry) {\n\t\t\tEntityEnderman.setCarriable(this.getAsBlock(), canEndermenCarry);\n\t\t}\n\t}\n\t\n\t@Nullable\n\tpublic IItemAddedBlock getItemBlock();\n\t\n\tpublic String getDisplayName();\n\t\n\tpublic Material getBlockMaterial();\n\t\n\tpublic SoundEvent getPlaceSound();\n\t\n\tpublic SoundEvent getBreakSound();\n\t\n\tpublic SoundEvent getHitSound();\n\t\n\tpublic SoundEvent getStepSound();\n\t\n\tpublic SoundEvent getFallSound();\n\t\n\t@Nullable\n\tpublic MapColor getBlockMapColor();\n\t\n\tpublic int getHarvestLevel();\n\t\n\tpublic String getHarvestTool();\n\t\n\tpublic List<String> getEffectiveTools();\n\t\n\tpublic int getBookshelfStrength();\n\t\n\t@Nullable\n\tpublic float[] getBeaconColorMultiplier();\n\t\n\tpublic float getSlipperiness();\n\t\n\tpublic boolean isSlime();\n\t\n\tpublic boolean isBeaconBase();\n\t\n\tpublic boolean canPistonsPush();\n\t\n\tpublic float getHardness();\n\t\n\tpublic float getResistance();\n\t\n\tpublic int getOpacity();\n\t\n\tpublic boolean isSemiTransparent();\n\t\n\tpublic int getLightLevel();\n\t\n\tpublic int getXpDroppedMin();\n\t\n\tpublic int getXpDroppedMax();\n\t\n\tpublic Boolean getDroppedFromExplosions();\n\t\n\tpublic default boolean canEndermenCarry() {\n\t\treturn EntityEnderman.getCarriable(this.getAsBlock());\n\t}\n\t\n\tpublic default void registerModels() {\n\t\tAdditionsMod.proxy.registerBlockRender(this.getAsBlock());\n\t}\n\t\n\tpublic default Block getAsBlock() {\n\t\tif (!(this instanceof Block)) {\n\t\t\tthrow new IllegalArgumentException(\"An IBlockAdded must be an instance of Block.\");\n\t\t}\n\t\treturn (Block) this;\n\t}\n\t\n public default String getId() {\n \tResourceLocation registryName = this.getAsBlock().getRegistryName();\n \t\n \tif (registryName != null) {\n \t\treturn registryName.getResourcePath();\n \t}\n \t\n String unlocalizedName = this.getAsBlock().getUnlocalizedName();\n \n if (unlocalizedName.startsWith(\"tile.\")) {\n \treturn unlocalizedName.substring(5);\n }\n \n return unlocalizedName;\n }\n\n public abstract static class Serializer<T extends IBlockAdded> {\n\t\t\n\t\tprivate final ResourceLocation blockAddedType;\n private final Class<T> blockAddedClass;\n\n protected Serializer(ResourceLocation location, Class<T> clazz)\n {\n this.blockAddedType = location;\n this.blockAddedClass = clazz;\n }\n\n\t\tpublic ResourceLocation getBlockAddedType() {\n\t\t\treturn this.blockAddedType;\n\t\t}\n\t\t\n\t\tpublic Class<T> getBlockAddedClass() {\n\t\t\treturn this.blockAddedClass;\n\t\t}\n\n\t\tpublic JsonObject serialize(T blockAddedObj, JsonSerializationContext context) {\n\t\t\tJsonObject json = new JsonObject();\n\t\t\tBlock blockAdded = blockAddedObj.getAsBlock();\n\t\t\t\n\t\t\tif (blockAddedObj.getItemBlock() != null) {\n\t\t\t\tjson.add(\"item_block\", AdditionTypeItem.GSON.toJsonTree(blockAddedObj.getItemBlock()));\n\t\t\t}\n\t\t\t\n\t\t\tjson.addProperty(\"name\", blockAddedObj.getDisplayName());\n\t\t\tjson.add(\"material\", OtherSerializers.BlockMaterialSerializer.serialize(blockAddedObj.getBlockMaterial()));\n\t\t\t\n\t\t\tif (blockAddedObj.getPlaceSound() != null) {\n\t\t\t\tjson.add(\"place_sound\", OtherSerializers.SoundEventSerializer.serialize(blockAddedObj.getPlaceSound()));\n\t\t\t}\n\t\t\t\n\t\t\tif (blockAddedObj.getBreakSound() != null) {\n\t\t\t\tjson.add(\"break_sound\", OtherSerializers.SoundEventSerializer.serialize(blockAddedObj.getBreakSound()));\n\t\t\t}\n\t\t\t\n\t\t\tif (blockAddedObj.getHitSound() != null) {\n\t\t\t\tjson.add(\"hit_sound\", OtherSerializers.SoundEventSerializer.serialize(blockAddedObj.getHitSound()));\n\t\t\t}\n\t\t\t\n\t\t\tif (blockAddedObj.getStepSound() != null) {\n\t\t\t\tjson.add(\"step_sound\", OtherSerializers.SoundEventSerializer.serialize(blockAddedObj.getStepSound()));\n\t\t\t}\n\t\t\t\n\t\t\tif (blockAddedObj.getFallSound() != null) {\n\t\t\t\tjson.add(\"fall_sound\", OtherSerializers.SoundEventSerializer.serialize(blockAddedObj.getFallSound()));\n\t\t\t}\n\t\t\t\n\t\t\tif (blockAddedObj.getBlockMapColor() != null) {\n\t\t\t\tjson.add(\"map_color\", OtherSerializers.BlockMapColorSerializer.serialize(blockAddedObj.getBlockMapColor()));\n\t\t\t}\n\t\t\t\n\t\t\tif (blockAddedObj.getHardness() > 0) {\n\t\t\t\tjson.addProperty(\"hardness\", blockAddedObj.getHardness());\n\t\t\t}\n\t\t\t\n\t\t\tif (blockAddedObj.getResistance() > 0) {\n\t\t\t\tjson.addProperty(\"resistance\", blockAddedObj.getResistance() / 3.0f);\n\t\t\t}\n\t\t\t\n\t\t\tif (blockAddedObj.getHarvestLevel() != 0) {\n\t\t\t\tjson.addProperty(\"harvest_level\", blockAddedObj.getHarvestLevel());\n\t\t\t}\n\t\t\t\n\t\t\tif (!blockAddedObj.getHarvestTool().isEmpty()) {\n\t\t\t\tjson.addProperty(\"harvest_tool\", blockAddedObj.getHarvestTool());\n\t\t\t}\n\t\t\t\n\t\t\tif (!blockAddedObj.getEffectiveTools().isEmpty()) {\n\t\t\t\tjson.add(\"effective_tools\", OtherSerializers.StringListSerializer.serialize(blockAddedObj.getEffectiveTools()));\n\t\t\t}\n\t\t\t\n\t\t\tif (blockAdded.getLightOpacity(blockAdded.getDefaultState()) != 15) {\n\t\t\t\tjson.addProperty(\"light_opacity\", blockAdded.getLightOpacity(blockAdded.getDefaultState()));\n\t\t\t}\n\t\t\t\n\t\t\tif (blockAdded.getLightValue(blockAdded.getDefaultState()) > 0) {\n\t\t\t\tjson.addProperty(\"light_level\", blockAdded.getLightValue(blockAdded.getDefaultState()));\n\t\t\t}\n\t\t\t\n\t\t\tif (Blocks.FIRE.getFlammability(blockAdded) > 0) {\n\t\t\t\tjson.addProperty(\"flammability\", Blocks.FIRE.getFlammability(blockAdded));\n\t\t\t}\n\t\t\t\n\t\t\tif (Blocks.FIRE.getEncouragement(blockAdded) > 0) {\n\t\t\t\tjson.addProperty(\"fire_spread_speed\", Blocks.FIRE.getEncouragement(blockAdded));\n\t\t\t}\n\t\t\t\n\t\t\tif (blockAddedObj.getBookshelfStrength() > 0) {\n\t\t\t\tjson.addProperty(\"bookshelf_strength\", blockAddedObj.getBookshelfStrength());\n\t\t\t}\n\t\t\t\n\t\t\tfloat[] beaconColorsMultiplier = blockAddedObj.getBeaconColorMultiplier();\n\t\t\tif (beaconColorsMultiplier != null && beaconColorsMultiplier.length == 3) {\n\t\t\t\tJsonObject beaconColorObj = new JsonObject();\n\t\t\t\tbeaconColorObj.addProperty(\"red\", beaconColorsMultiplier[0]);\n\t\t\t\tbeaconColorObj.addProperty(\"green\", beaconColorsMultiplier[1]);\n\t\t\t\tbeaconColorObj.addProperty(\"blue\", beaconColorsMultiplier[2]);\n\t\t\t\tjson.add(\"beacon_color_multiplier\", beaconColorObj);\n\t\t\t}\n\t\t\t\n\t\t\tif (blockAddedObj.getSlipperiness() != 0.6f) {\n\t\t\t\tjson.addProperty(\"slipperiness\", blockAddedObj.getSlipperiness());\n\t\t\t}\n\t\t\t\n\t\t\tif (blockAddedObj.isSlime()) {\n\t\t\t\tjson.addProperty(\"is_slime\", true);\n\t\t\t}\n\t\t\t\n\t\t\tif (blockAddedObj.isBeaconBase()) {\n\t\t\t\tjson.addProperty(\"is_beacon_base\", true);\n\t\t\t}\n\t\t\t\n\t\t\tif (!blockAddedObj.canPistonsPush()) {\n\t\t\t\tjson.addProperty(\"can_pistons_push\", false);\n\t\t\t}\n\t\t\t\n\t\t\tif (blockAddedObj.isSemiTransparent()) {\n\t\t\t\tjson.addProperty(\"semi_transparent\", true);\n\t\t\t}\n\t\t\t\n\t\t\tif (blockAddedObj.getXpDroppedMin() != 0) {\n\t\t\t\tjson.addProperty(\"xp_dropped_min\", blockAddedObj.getXpDroppedMin());\n\t\t\t}\n\t\t\t\n\t\t\tif (blockAddedObj.getXpDroppedMax() != 0) {\n\t\t\t\tjson.addProperty(\"xp_dropped_max\", blockAddedObj.getXpDroppedMax());\n\t\t\t}\n\t\t\t\n\t\t\tif (blockAddedObj.getDroppedFromExplosions() != null) {\n\t\t\t\tjson.addProperty(\"dropped_from_explosions\", blockAddedObj.getDroppedFromExplosions());\n\t\t\t}\n\t\t\t\n\t\t\tif (blockAddedObj.canEndermenCarry()) {\n\t\t\t\tjson.addProperty(\"can_endermen_carry\", true);\n\t\t\t}\n\t\t\t\n\t\t\treturn json;\n }\n\n\t\tpublic abstract T deserialize(JsonObject json, JsonDeserializationContext context);\n\t\t\n\t\tpublic <V extends Block & IBlockAdded> V deserializeDefaults(JsonObject json, JsonDeserializationContext context, V blockAdded) {\n\t\t\t\n\t\t\tif (json.has(\"item_block\")) {\n\t\t\t\tIItemAdded itemAdded = AdditionTypeItem.GSON.fromJson(json.get(\"item_block\"), IItemAdded.class);\n\t\t\t\t\n\t\t\t\tif (itemAdded instanceof IItemAddedBlock) {\n\t\t\t\t\tIItemAddedBlock itemAddedBlock = (IItemAddedBlock)itemAdded;\n\t\t\t\t\titemAddedBlock.setBlock(blockAdded);\n\t\t\t\t\tblockAdded.setItemBlock(itemAddedBlock);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n \tblockAdded.setDisplayName(JsonUtils.getString(json, \"name\"));\n \tblockAdded.setBlockMaterial(OtherSerializers.BlockMaterialSerializer.deserialize(json, \"material\"));\n\t\t\t\n\t\t\tif (json.has(\"map_color\")) {\n\t\t\t\tblockAdded.setBlockMapColor(OtherSerializers.BlockMapColorSerializer.deserialize(json, \"map_color\"));\n\t\t\t}\n\t\t\t\n\t\t\tblockAdded.setHardness(JsonUtils.getFloat(json, \"hardness\", 0));\n\t\t\tblockAdded.setResistance(JsonUtils.getFloat(json, \"resistance\", 0));\n\t\t\tblockAdded.setHarvestLevel(JsonUtils.getInt(json, \"harvest_level\", 0));\n\t\t\tblockAdded.setHarvestTool(JsonUtils.getString(json, \"harvest_tool\", \"\"));\n\t\t\t\n\t\t\tif (json.has(\"effective_tools\")) {\n\t\t\t\tblockAdded.setEffectiveTools(OtherSerializers.StringListSerializer.deserialize(json.get(\"effective_tools\"), \"effective_tools\"));\n\t\t\t}\n\t\t\t\n\t\t\tblockAdded.setLightOpacity(MathHelper.clamp(JsonUtils.getInt(json, \"light_opacity\", 15), 0, 15));\n\t\t\tblockAdded.setLightLevel(MathHelper.clamp(JsonUtils.getInt(json, \"light_level\", 0), 0, 15) / 15F);\n\t\t\t\n\t\t\tint flammability = JsonUtils.getInt(json, \"flammability\", 0);\n\t\t\tint fireSpreadSpeed = JsonUtils.getInt(json, \"fire_spread_speed\", 0);\n\t\t\tif (flammability > 0 || fireSpreadSpeed > 0) {\n\t\t\t\tBlocks.FIRE.setFireInfo(blockAdded, fireSpreadSpeed, flammability);\n\t\t\t}\n\t\t\t\n\t\t\tblockAdded.setBookshelfStrength(JsonUtils.getInt(json, \"bookshelf_strength\", 0));\n\t\t\t\n\t\t\tif (json.has(\"beacon_color_multiplier\")) {\n\t\t\t\tJsonObject beaconColorObj = JsonUtils.getJsonObject(json, \"beacon_color_multiplier\");\n\t\t\t\tblockAdded.setBeaconColorMultiplier(new float[]{JsonUtils.getFloat(beaconColorObj, \"red\"), JsonUtils.getFloat(beaconColorObj, \"green\"), JsonUtils.getFloat(beaconColorObj, \"blue\")});\n\t\t\t}\n\t\t\t\n\t\t\tblockAdded.setSlipperiness(JsonUtils.getFloat(json, \"slipperiness\", 0.6f));\n\t\t\tblockAdded.setIsSlime(JsonUtils.getBoolean(json, \"is_slime\", false));\n\t\t\tblockAdded.setIsBeaconBase(JsonUtils.getBoolean(json, \"is_beacon_base\", false));\n\t\t\tblockAdded.setCanPistonsPush(JsonUtils.getBoolean(json, \"can_pistons_push\", true));\n\t\t\tblockAdded.setSemiTransparent(JsonUtils.getBoolean(json, \"semi_transparent\", false));\n\t\t\tblockAdded.setXpDroppedMin(JsonUtils.getInt(json, \"xp_dropped_min\", 0));\n\t\t\tblockAdded.setXpDroppedMax(JsonUtils.getInt(json, \"xp_dropped_max\", 0));\n\t\t\tblockAdded.setCanEndermenCarry(JsonUtils.getBoolean(json, \"can_endermen_carry\", false));\n\t\t\t\n\t\t\tif (json.has(\"dropped_by_explosions\")) {\n\t\t\t\tblockAdded.setDroppedFromExplosions(JsonUtils.getBoolean(json, \"dropped_by_explosions\"));\n\t\t\t}\n \t\n \treturn blockAdded;\n }\n\t\t\n\t\tpublic void postDeserializeBlockAdded(JsonObject json, IBlockAdded blockAddedObj) {\n\t\t\tif (blockAddedObj.getClass() != this.blockAddedClass) {\n\t\t\t\tthrow new IllegalArgumentException(\"Tried to call post serialize for an object of the wrong type! Expected: \" + this.blockAddedClass + \", Actual: \" + blockAddedObj.getClass());\n\t\t\t}\n\t\t\t\n\t\t\tpostDeserialize(json, (T) blockAddedObj);\n\t\t}\n\t\t\n\t\tpublic void postDeserialize(JsonObject json, T blockAdded) {\n\t\t\tthis.postDeserializeDefaults(json, blockAdded);\n\t\t}\n\t\t\n\t\tpublic void postDeserializeDefaults(JsonObject json, T blockAdded) {\n \t\n \tIItemAdded itemAdded = blockAdded.getItemBlock();\n \tif (itemAdded != null) {\n \t\tItemAddedManager.Serializer.postDeserialize(JsonUtils.getJsonObject(json, \"item_block\"), itemAdded);\n \t}\n \t\n \tif (json.has(\"place_sound\")) {\n \t\tblockAdded.setPlaceSound(OtherSerializers.SoundEventSerializer.deserialize(json, \"place_sound\"));\n \t}\n \t\n \tif (json.has(\"break_sound\")) {\n \t\tblockAdded.setBreakSound(OtherSerializers.SoundEventSerializer.deserialize(json, \"break_sound\"));\n \t}\n \t\n \tif (json.has(\"hit_sound\")) {\n \t\tblockAdded.setHitSound(OtherSerializers.SoundEventSerializer.deserialize(json, \"hit_sound\"));\n \t}\n \t\n \tif (json.has(\"step_sound\")) {\n \t\tblockAdded.setStepSound(OtherSerializers.SoundEventSerializer.deserialize(json, \"step_sound\"));\n \t}\n \t\n \tif (json.has(\"fall_sound\")) {\n \t\tblockAdded.setFallSound(OtherSerializers.SoundEventSerializer.deserialize(json, \"fall_sound\"));\n \t}\n }\n }\n}",
"public void placeBlockInTopResSpace(Block block, TT tt){\n ResidualSpace res = rs_stack.pop();\n\n // Place the block, this also updates the locations of the parcels inside it\n block.setLocation(res.getLocation().clone());\n\n block_placements.add(block.getId()); // Add the id of the placed block\n\n for(Parcel p:block.getPacking()){\n packing.addParcel(p);\n }\n\n this.total_value = packing.getTotalValue();\n\n // Update the hashkey\n// hashKey = tt.updateHash(hashKey, block_placements.size(), block.getId());\n\n // Remove parcels from the availability\n removeFromBres(block);\n\n // Calculate the new residual spaces\n generateDaughterResSpaces(block, res);\n }",
"public void add(int index, MemoryBlock block) {\n\t\tif ((index < 1) || (index > size-1))\n\t\t\t\tthrow new IllegalArgumentException();\n\t\telse if (index == 1){\n\t\t\taddFirst(block);\n\t\t}\n\t\telse if ((index == size-1) && (index != 1))\n\t\t\taddLast(block);\n\t\telse if ((index != size-1) && (index != 1))\n\t\t{\n\t\t\t\tNode newNode = new Node(block);\n\t\t\t\tnewNode.previous = getNode(index-1);\n\t\t\t\tnewNode.next = getNode(index);\n\t\t\t\tgetNode(index-1).next = newNode;\n\t\t\t\tgetNode(index).previous = newNode;\n\t\t\t\tsize++;\n\t\t}\n\t}",
"void updateBlock(Block block) ;",
"public static RegistryObject<Block> register(Supplier<Block> supplier, @Nonnull String name, @Nullable Item.Properties properties) {\n RegistryObject<Block> block = BLOCK_DEFERRED.register(name, supplier);\n\n if (properties == null) {\n AquaItems.register(() -> new BlockItem(block.get(), new Item.Properties()), name);\n } else {\n AquaItems.registerWithTab(() -> new BlockItem(block.get(), properties), name);\n }\n\n return block;\n }",
"@SubscribeEvent\n public static void registerContainer(final RegistryEvent.Register<ContainerType<?>> event){\n walletBlockContainerType = IForgeContainerType.create(WalletBlockContainer::createForClientSide);\n walletBlockContainerType.setRegistryName(\"wallet_block_container\");\n event.getRegistry().register(walletBlockContainerType);\n }",
"@SubscribeEvent\n public static void registerTileEntity(final RegistryEvent.Register<TileEntityType<?>> event){\n walletBlockTileEntityType = TileEntityType.Builder.create(WalletBlockTileEntity::new, walletBlock).build(null);\n walletBlockTileEntityType.setRegistryName(\"bitcoinmod:wallet_block_tile_entity\");\n event.getRegistry().register(walletBlockTileEntityType);\n }",
"public void store(Block fb) throws Exception {\r\n\t\tsuper.store(fb);\r\n\t}",
"RclBlock createRclBlock();",
"BAnyBlock createBAnyBlock();",
"@Override\n\tpublic void registerRecipes() {\n\n\t\tItemStack block, ingot;\n\n\t\tfor (MetalType metal : MetalType.VALUES) {\n\n\t\t\tblock = this.createItemStack(metal, 1);\n\t\t\tingot = BrItems.ingotMetals.createItemStack(metal, 1);\n\n\t\t\tGameRegistry.addShapelessRecipe(block, ingot, ingot, ingot, ingot, ingot, ingot, ingot, ingot, ingot);\n\t\t\tingot.stackSize = 9;\n\t\t\tGameRegistry.addShapelessRecipe(ingot, block);\n\t\t}\n\n\t\t// Ludicrite block. Because.\n\n\t\tfinal ItemStack ludicriteBlock = this.createItemStack(MetalType.Ludicrite, 1);\n\n\t\tGameRegistry.addRecipe(new ShapedOreRecipe(ludicriteBlock, \"BPB\", \"ENE\", \"BPB\",\n\t\t\t\t'N', Items.NETHER_STAR, 'P', Items.ENDER_PEARL, 'E', Blocks.EMERALD_BLOCK,\n\t\t\t\t'B', BigReactors.CONFIG.recipeBlutoniumIngotName));\n\n\t\tif (OreDictionaryHelper.doesOreNameExist(\"blockEnderium\")) {\n\n\t\t\t// Ok, how about some ludicrous shit here. Enderium and blaze rods. Have fun, bucko.\n\t\t\tGameRegistry.addRecipe(new ShapedOreRecipe(ludicriteBlock, \"BRB\", \"E E\", \"BRB\",\n\t\t\t\t\t'B', BigReactors.CONFIG.recipeBlutoniumIngotName, 'R', Items.BLAZE_ROD, 'E', \"blockEnderium\"));\n\t\t}\n\t}",
"public void createItemInInventory(Item newItem) {\n\t\tinventory.createItem(newItem);\n\t}",
"BlockAssignmentType createBlockAssignmentType();",
"public void fillBlock(Block block) {\n\n\t\tfor (int j = block.UpperLeft().x; j <= block.LowerRight().x; j++) { \n\t\t\tfor (int k = block.UpperLeft().y; k <= block.LowerRight().y; k++) { \n\t\t\t\tblocksPosition.put(new Point(j,k), block); \n\t\t\t\t//Blocks.add(block); \n\t\t\t} \n\t\t} \n\t}",
"public void testAddBlock_NoGame() throws Exception {\n try {\n dao.addBlock(1, 1);\n fail(\"EntryNotFoundException expected\");\n } catch (EntryNotFoundException e) {\n // should land here\n }\n }",
"public static void addRespawningBlock(Block block, int seconds) {\n FileConfiguration config = MyZ.instance.getBlocksConfig();\n ConfigurationSection section = config.createSection(block.getWorld().getName() + \"_\" + block.getX() + \"_\" + block.getY() + \"_\"\n + block.getZ());\n section.set(\"respawn\", true);\n section.set(\"type\", block.getType().toString());\n section.set(\"data\", block.getData());\n section.set(\"time\", ticks + seconds);\n MyZ.instance.saveBlocksConfig();\n }",
"public void addRegenBlock(Material material, int percent) {\n blockValues.put(material, percent);\n }",
"public BiomeBlock(Location loc, Biome b) {\n this.world = loc.getWorld();\n this.x = loc.getBlockX();\n this.z = loc.getBlockZ();\n this.biome = b;\n this.wmChunk = new WMChunk(this.world, this.x, this.z, true);\n }",
"public void buildBlock(BptSlotInfo slot, IBptContext context)\r\n/* 26: */ {\r\n/* 27:33 */ context.world().d(slot.x, slot.y, slot.z, amq.y.cm, slot.meta);\r\n/* 28: */ }",
"void writeBlock(int blockId, byte[] buffer) throws IOException;",
"BlockFor createBlockFor();",
"public org.apache.spark.streaming.receiver.ReceivedBlockStoreResult storeBlock (org.apache.spark.storage.StreamBlockId blockId, org.apache.spark.streaming.receiver.ReceivedBlock block) { throw new RuntimeException(); }",
"ActionBlock createActionBlock();",
"public void putBlock(Boolean trackStats, MemoryBlock block){\r\n\t\tif(DEBUG_LEVEL >= 1)System.out.println(\"Memory.putBlock(\" + block.getBlockAddress() + \")\");\r\n\t\t\r\n\t\t// Validate\r\n\t\tif(block == null)throw new NullPointerException(\"block Can Not Be Null\");\r\n\t\tif((block.getBlockAddress() + block.getSize() - 1) > totalSize)throw new IllegalArgumentException(\"block Can Not Be Greater Than total Size\");\r\n\t\t\r\n\t\t// Write MemoryElements to Memory\r\n\t\tMemoryElementIterator meIterator = block.getIterator();\r\n\t\twhile(meIterator.hasNext()){\r\n\t\t\tMemoryElement element = meIterator.next();\r\n\t\t\t\r\n\t\t\tif(DEBUG_LEVEL >= 4)System.out.println(\"Memory.putBlock()...Writing memory[\" + element.getElementAddress() + \"]\");\r\n\t\t\t\r\n\t\t\tmemory[element.getElementAddress()].setData(element.getData());\r\n\t\t}\r\n\t\t\r\n\t\tif(trackStats)cacheStats.ACCESS++;\r\n\t\tif(trackStats)cacheStats.BLOCKWRITE_HIT++;\r\n\t\t\r\n\t\tif(DEBUG_LEVEL >= 2)System.out.println(\"Memory.putBlock()...Finished\");\r\n\t}",
"public void blocksAdded(List<Response> blocks) {\n for (Response block : blocks) {\n try {\n long id = block.getId(\"block\");\n blockList.add(block);\n blockMap.put(id, block);\n } catch (IdentifierException exc) {\n // Ignore the block\n }\n }\n fireTableDataChanged();\n }",
"private void registerFleshBlock(){\n\t\tgetVariantBuilder(OrganicTechBlocks.FLESH_BLOCK.get()).forAllStates(state -> {\n\t\t\t//Generate the set of rotations for a flesh block w/o eyes\n\t\t\tConfiguredModel[] rotations = ConfiguredModel.allRotations(models().cubeAll(\"flesh_block\", modLoc(BLOCK_DIR + \"/flesh_block\")), false, 4);\n\t\t\t//then append the rotations for one eye\n\t\t\trotations = ArrayUtils.addAll(rotations, ConfiguredModel.allRotations(models().cubeAll(\"flesh_block_1eye\", modLoc(BLOCK_DIR + \"/flesh_block_1eye\")), false, 1));\n\t\t\t//then append the rotations for two eyes and return\n\t\t\treturn ArrayUtils.addAll(rotations, ConfiguredModel.allRotations(models().cubeAll(\"flesh_block_2eye\", modLoc(BLOCK_DIR + \"/flesh_block_2eye\")), false, 1));\n\t\t});\n\t}",
"public Block(Block bl) {\r\n\t\tthis.type = bl.type;\r\n\t\tthis.point_BlockTopRight = new Point3D(bl.point_BlockTopRight);\r\n\t\tthis.point_BlockDownleft = new Point3D(bl.point_BlockDownleft);\r\n\t\tthis.setpoint_BlockTopLeft(new Point3D(bl.getpoint_BlockTopRight().y(),bl.getpoint_BlockDownleft().x()));\r\n\t\tthis.setPoint_BlockDownRight(new Point3D(bl.getpoint_BlockDownleft().y(),bl.getpoint_BlockTopRight().x()));\r\n\t\tthis.IDBloack = bl.IDBloack;\r\n\r\n\t}",
"public Block(){\n\t\tinstns = new ArrayList<Instruction>();\n\t}",
"public BlockExtra(Pixy2 pixy, Block block) {\n\t\tthis(pixy, block.getSignature(), block.getX(), block.getY(), block.getWidth(), block.getHeight(), block.getAngle(), block.getIndex(), block.getAge());\n\t}"
] | [
"0.7591017",
"0.75281364",
"0.7186518",
"0.71689636",
"0.7095899",
"0.70265675",
"0.6970868",
"0.68589896",
"0.68340325",
"0.673001",
"0.6702706",
"0.66629523",
"0.66210544",
"0.657349",
"0.65718764",
"0.65395546",
"0.6523188",
"0.64743",
"0.6470876",
"0.64594406",
"0.6407781",
"0.6379271",
"0.62941986",
"0.62131464",
"0.61451703",
"0.6119803",
"0.6109485",
"0.6057505",
"0.60419905",
"0.60152936",
"0.59816396",
"0.5972424",
"0.59331024",
"0.59308285",
"0.5928989",
"0.59287",
"0.5926341",
"0.591191",
"0.5907493",
"0.5888586",
"0.5879057",
"0.58742315",
"0.5863738",
"0.5842662",
"0.58401525",
"0.58320564",
"0.5829915",
"0.5788226",
"0.57563734",
"0.57265097",
"0.57256633",
"0.56966525",
"0.5693808",
"0.5682238",
"0.564877",
"0.56392103",
"0.5638211",
"0.5630299",
"0.56264323",
"0.56257504",
"0.56141233",
"0.5599619",
"0.5597339",
"0.55829376",
"0.55515474",
"0.5543389",
"0.55277246",
"0.5491521",
"0.5485655",
"0.54653364",
"0.54483116",
"0.5433242",
"0.54294044",
"0.5417822",
"0.53963864",
"0.53862655",
"0.53836316",
"0.53825194",
"0.5377577",
"0.53741395",
"0.5373869",
"0.53727984",
"0.536368",
"0.5360827",
"0.5350491",
"0.5338085",
"0.5328327",
"0.5317239",
"0.5276787",
"0.52735853",
"0.5263911",
"0.52619475",
"0.5259493",
"0.52451694",
"0.5243111",
"0.52416533",
"0.5233197",
"0.5227274",
"0.52185345",
"0.5212371"
] | 0.709003 | 5 |
Registers a Block and creates a matching Block Item | public static Block registerBlock(String MODID, String name, Block block, Item.Settings settings){
block = registerBlockWithoutItem(MODID, name, block);
registerBlockItem(block, settings);
return block;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void registerBlock(Block b)\n\t{\n\t}",
"private static Item registerBlockItem(Block block, Item.Settings settings){\n Identifier id = Registry.BLOCK.getId(block);\n return CottonItemHelper.registerItem(id.getNamespace(), id.getPath(), new BlockItem(block, settings));\n }",
"public static void register(Block block, ItemBlock itemBlock) {\n\t\tGameRegistry.register(block);\n\t\tGameRegistry.register(itemBlock);\n\t}",
"public static <BLOCK extends Block> BLOCK register(@Nonnull final BLOCK block, @Nullable final ItemBlock itemBlock) {\n\t\tfinal ResourceLocation resourceLocation = block.getRegistryName();\n\t\tif (resourceLocation == null) {\n\t\t\tWarpDrive.logger.error(String.format(\"Missing registry name for block %s, ignoring registration...\",\n\t\t\t block));\n\t\t\treturn block;\n\t\t}\n\t\t\n\t\tassert !blocks.contains(block);\n\t\tblocks.add(block);\n\t\t\n\t\tif (itemBlock != null) {\n\t\t\titemBlock.setRegistryName(resourceLocation);\n\t\t\tregister(itemBlock);\n\t\t}\n\t\t\n\t\treturn block;\n\t}",
"@SubscribeEvent\n public static void registerItem(final RegistryEvent.Register<Item> event){\n Item.Properties properties = new Item.Properties().maxStackSize(1).group(ItemGroup.MISC);\n walletBlockItem = new BlockItem(walletBlock, properties);\n walletBlockItem.setRegistryName(walletBlock.getRegistryName());\n event.getRegistry().register(walletBlockItem);\n }",
"public static Block registerBlock(String MODID, String name, Block block, ItemGroup itemGroup){\n return registerBlock(MODID, name, block, (new Item.Settings()).itemGroup(itemGroup));\n }",
"public static <T extends Block> T register(T block, String name, ItemGroup group, boolean hasItem) {\n ResourceLocation loc = new ResourceLocation(Missy.MODID, name);\n // Set the block to it.\n block.setRegistryName(loc);\n\n if(hasItem) {\n if(block instanceof IMakeItem) {\n ITEMS.add(((IMakeItem) block).getItem().setRegistryName(loc));\n }\n else ITEMS.add(new BlockItem(block, MItemProperties.BLOCK.group(group)).setRegistryName(loc));\n }\n\n BLOCKS.add(block);\n\n return block;\n }",
"public static void register(GenericBlock block)\n\t{\n\t\tBLOCKS.add(block);\n\t}",
"public void addBlock(Block block) {\n\t\tblock.setId(this.generateID());\n\t\tthis.blocks.put(block.getId(), block);\n\t}",
"@SubscribeEvent\n public static void registerBlock(final RegistryEvent.Register<Block> event){\n walletBlock = new WalletBlock();\n event.getRegistry().register(walletBlock);\n }",
"Block saveBlock(Block block) throws BlockExistsException;",
"public void addBlock(Block newBlock) {\n\t\tBLOCK_LIST.add(newBlock);\n\t\tSPRITE_LIST.add(newBlock);\n\t}",
"@Override\n\tpublic void addBlock(Block block) {\n\t\tem.persist(block);\n\t}",
"public static <BLOCK extends Block> BLOCK register(@Nonnull final BLOCK block) {\n\t\tassert block instanceof IBlockBase;\n\t\treturn register(block, ((IBlockBase) block).createItemBlock());\n\t}",
"private static Block registerBlockWithoutItem(String MODID, String name, Block b){\n return Registry.register(Registry.BLOCK, MODID+\":\"+name, b);\n }",
"Block createBlock();",
"private static void registerBlocks() {\n for(Block block : modBlocks) {\n ForgeRegistries.BLOCKS.register(block);\n\n ItemBlock itemBlock = new ItemBlock(block);\n itemBlock.setRegistryName(block.getRegistryName());\n ForgeRegistries.ITEMS.register(itemBlock);\n }\n }",
"public void addBlock(Block block){\n\t\tblocks.addElement(block);\n\t}",
"public void addBlock(int x, int y) {\r\n\t\tthis.blockMap.add(new Block(x, y));\r\n\t}",
"public void blockAdded(Response block) {\n try {\n long id = block.getId(\"block\");\n blockList.add(0, block);\n blockMap.put(block.getId(\"block\"), block);\n fireTableRowsInserted(0, 0);\n } catch (IdentifierException exc) {\n // Ignore the block\n }\n }",
"private static void put(Block block, TempBlock tempBlock) {\r\n\t\tif (!instances_.containsKey(block)) {\r\n\t\t\tinstances_.put(block, new LinkedList<>());\r\n\t\t}\r\n\t\tinstances_.get(block).add(tempBlock);\r\n\t}",
"public void addBlock(Block block) {\n this.blocks.add(block);\n }",
"public static void BlockRegister()\n\t{\n\t\tString[] umberstoneBlock = {\"umberstone\"};\n\t\tString[] umbercobbleBlock = {\"cobbleUmber\"};\n\t\tStoneRegister umberstone = getStoneRegister(ModBlocks.umberstone, ModBlocks.umberstone, \"umberstone\", umberstoneBlock, umbercobbleBlock, \"erebus\");\n\t\tumberstone.mossyCobble = false;\n\t\tumberstone.genReplaceable = false;\n\t\tumberstone.register();\n\t}",
"public static void registerBlock(boolean fireproof, ItemGroup group, String name, Block block) {\n Item.Settings normalSettings = new Item.Settings().group(group);\n Item.Settings fireproofSettings = new Item.Settings().group(group).fireproof();\n\n Registry.register(Registry.BLOCK, newID(name), block);\n Registry.register(Registry.ITEM, newID(name), new BlockItem(block, (fireproof ? fireproofSettings : normalSettings)));\n }",
"public static void registerBlockEntities()\n\t{\n\t}",
"public void putBlock(JsonObject block){\n blocks.put(Hash.getHashString(block.toString()), block);\n }",
"synchronized void putBlock(ICBlock block) {\n mQueue.add(block);\n }",
"public static void register() {\n Registry.register(Registry.BLOCK, new Identifier(\"cultivation\", \"sieve_block\"), SIEVE_BLOCK);\n Registry.register(Registry.ITEM, new Identifier(\"cultivation\", \"sieve_block\"), new BlockItem(SIEVE_BLOCK, new Item.Settings().group(Cultivation.GROUP)));\n Registry.register(Registry.BLOCK, new Identifier(\"cultivation\", \"pod_shell\"), POD_SHELL);\n }",
"public ItemBlock createItemBlock() {\n\t\treturn new GenericItemBlock(this);\n\t}",
"public static void registerBlocks() {\n\t\tRegistry.register(Registry.BLOCK, new Identifier(EggMod.MOD_ID, \"egg_block\"), EGG_BLOCK);\n\t\t\n\t\t// Yolk\n\t\tSTILL_YOLK = Registry.register(Registry.FLUID, new Identifier(EggMod.MOD_ID, \"yolk_flow\"), new YolkFluid.Still());\n\t\tFLOWING_YOLK = Registry.register(Registry.FLUID, new Identifier(EggMod.MOD_ID, \"yolk_still\"), new YolkFluid.Flowing());\n\t\tYOLK = Registry.register(Registry.BLOCK, new Identifier(EggMod.MOD_ID, \"yolk\"), new FluidBlock(STILL_YOLK, FabricBlockSettings.copy(Blocks.WATER)){});\n\t}",
"public void addBlock(Block block)\n {\n SolrInputDocument solr_doc = new SolrInputDocument();\n solr_doc.setField(\"type\",\"Block\");\n solr_doc.setField(\"hash\", block.getHash_block());\n solr_doc.setField(\"block_num\", block.getBlock_num());\n solr_doc.setField(\"version\", block.getVersion());\n solr_doc.setField(\"transaction_merkle_root\", block.getTransac_merkle_root());\n solr_doc.setField(\"timestamps\", block.getTimestamp());\n solr_doc.setField(\"datetime\", block.getDatetime());\n solr_doc.setField(\"difficulty\", block.getDifficulty());\n solr_doc.setField(\"cumulative_difficulty\", block.getCumulative_difficulty());\n solr_doc.setField(\"nonce\", block.getNonce());\n solr_doc.setField(\"how_much_transaction\", block.getHow_much_transaction());\n solr_doc.setField(\"value_out\", block.getValue_out());\n solr_doc.setField(\"block_fee\", block.getBlock_fee());\n solr_doc.setField(\"avg_coin_out\", block.getAvg_coin_age());\n solr_doc.setField(\"coin_days_destroyed\", block.getCoin_days_destroyed());\n solr_doc.setField(\"cumulative_coin_days_destroyed\", block.getCumulative_coin_days_destroyed());\n\n try {\n client.add(solr_doc);\n } catch (SolrServerException | IOException e) {\n e.printStackTrace();\n }\n\n commit();\n }",
"public void addBlock(Block b) {\n String previousHash = \"\";\n if (blockChain.size() == 0) {\n previousHash = \"\";\n } else {\n previousHash = getLatestBlock().proofOfWork();\n }\n b.previousHash = previousHash;\n chainHash = b.proofOfWork();\n blockChain.add(b);\n }",
"protected abstract int addBlock(Collection<Record> candidates,\n Map.Entry block);",
"public void addBlock(int x, int y, int health) {\r\n\t\tthis.blockMap.add(new Block(x, y, health));\r\n\t}",
"public void addBlockToPA(IGUIBlock block, int index) {\n blockLink.addBlockPair(block, blockHandler.getFromPalette(index));\n addExistingBlockAsProgram(block);\n }",
"@SubscribeEvent\n public static void onBlocksRegistry(final RegistryEvent.Register<Block> blockRegistryEvent) {\n LOGGER.info(\"HELLO from Register Block\");\n }",
"@Override\n public void createBlockchain(String name, Block genesisBlock) {\n BlockNodeEntity blockNodeEntity = getBlockNodeEntity(name, genesisBlock);\n blockRepository.save(blockNodeEntity);\n }",
"public void addExistingBlockAsProgram(IGUIBlock block) {\n Block toAdd = blockLink.getBlockFromGUIBlock(block);\n blockHandler.addToPA(toAdd);\n }",
"public static void registerBlockSmelting(){\n\t\t\n\t\tGameRegistry.addSmelting(blockInfo.myWood_ID, new ItemStack(items.compressedAir, 2), 0.1f);\n\t\t\n\t}",
"private void addBlock(Block one)\n\t{\n\t\tgetChildren().add(one);\n\t\tblocks1.add(one);\n\t\tblocks2.add(one);\n\t}",
"private void createBlock() {\n\t\tblock = new Block(mouseX, mouseY, 25, 25);\r\n\t\tblock.addObserver(this);\r\n\t\tblock.start();\r\n\t\t// System.out.println(\"Block created (at Model.createBlock)\");\r\n\t}",
"Integer add(@Param(\"tableName\") String tableName, @Param(\"block\") TbBlock tbBlock);",
"Block create(int xpos, int ypos);",
"void addBlock(final Block block, final int i) {\n days.get(i).addBlock(block);\n }",
"public void addToBlock(Instruction instn){\n\t\tinstns.add(instn);\n\t}",
"public EntangledChaliceItem(Block block) {\n super(block);\n }",
"public void addBlock(Block block) {\r\n if (null == blocks) {\r\n blocks = new ArrayList<Block>();\r\n }\r\n blocks.add(block);\r\n maxEntries += block.getHowMany();\r\n }",
"private static void craftSlab(Block block)\r\n\t{\r\n\t\tBlockExtraSlab input = ((BlockExtraSlab)block);\r\n\t\tBlock parent = input.getParent();\r\n\t\tint parentMeta = input.getParentMeta();\r\n\t\t\r\n\t\tGameRegistry.addRecipe(new ItemStack(block, 6, 0), new Object[] { \"###\", '#', new ItemStack(parent, 1, parentMeta) });\r\n\t\tGameRegistry.addRecipe(new ItemStack(parent, 1, parentMeta), new Object[] { \"#\", \"#\", '#', new ItemStack(block) });\r\n\t}",
"public static ItemFrame addItemFrame(Block block, BlockFace face) {\n\t\tfinal Material mat = Material.GLASS;\n\t\tBlock northBlock = block.getWorld().getBlockAt(block.getX(), block.getY(), block.getZ() - 1);\n\t\tBlock southBlock = block.getWorld().getBlockAt(block.getX(), block.getY(), block.getZ() + 1);\n\t\tBlock eastBlock = block.getWorld().getBlockAt(block.getX() - 1, block.getY(), block.getZ());\n\t\tBlock westBlock = block.getWorld().getBlockAt(block.getX() + 1, block.getY(), block.getZ());\n\n\t\tif (northBlock.getType() == Material.AIR) {\n\t\t\tnorthBlock.setType(mat);\n\t\t}\n\t\tif (southBlock.getType() == Material.AIR) {\n\t\t\tsouthBlock.setType(mat);\n\t\t}\n\t\tif (eastBlock.getType() == Material.AIR) {\n\t\t\teastBlock.setType(mat);\n\t\t}\n\t\tif (westBlock.getType() == Material.AIR) {\n\t\t\twestBlock.setType(mat);\n\t\t}\n\n\t\tif (face == BlockFace.NORTH) {\n\t\t\tnorthBlock.setType(Material.AIR);\n\t\t} else if (face == BlockFace.SOUTH) {\n\t\t\tsouthBlock.setType(Material.AIR);\n\t\t} else if (face == BlockFace.EAST) {\n\t\t\teastBlock.setType(Material.AIR);\n\t\t} else if (face == BlockFace.WEST) {\n\t\t\twestBlock.setType(Material.AIR);\n\t\t}\n\n\t\tItemFrame itemFrame = (ItemFrame) block.getWorld().spawnEntity(block.getLocation(), EntityType.ITEM_FRAME);\n\n\t\tif (northBlock.getType() == mat) {\n\t\t\tnorthBlock.setType(Material.AIR);\n\t\t}\n\t\tif (southBlock.getType() == mat) {\n\t\t\tsouthBlock.setType(Material.AIR);\n\t\t}\n\t\tif (eastBlock.getType() == mat) {\n\t\t\teastBlock.setType(Material.AIR);\n\t\t}\n\t\tif (westBlock.getType() == mat) {\n\t\t\twestBlock.setType(Material.AIR);\n\t\t}\n\n\t\treturn itemFrame;\n\t}",
"DefineBlock createDefineBlock();",
"public void pushComputedBlock(String block){\n JsonParser parser = new JsonParser();\n \tJsonObject Block = (JsonObject) parser.parse(block);\n\n processNewBlock(Block);\n\n }",
"public void addPendingBlock(Block block) {\n\n\t\tList<Block> sameIndexBlocks = pendingBlocks.get(block.getIndex());\n\t\tif(sameIndexBlocks == null) {\n\t\t\tsameIndexBlocks = new ArrayList<Block>();\n\t\t\tpendingBlocks.put(block.getIndex(), sameIndexBlocks);\n\t\t}\n\t\tsameIndexBlocks.add(block);\n\t}",
"public void register(WorldGenKawaiiBaseWorldGen.WorldGen gen)\r\n\t{\t\r\n\t\tif (!this.Enabled) return; \r\n\t\tGameRegistry.registerBlock(this, this.getUnlocalizedName());\r\n\t\t\r\n\t\tString saplingName = name + \".sapling\";\r\n\t\tSapling = new ItemKawaiiSeed(saplingName, SaplingToolTip, this);\r\n\t\tSapling.OreDict = SaplingOreDict;\r\n\t\tSapling.MysterySeedWeight = SeedsMysterySeedWeight;\r\n\t\tSapling.register();\r\n\r\n\t\tString fruitName = name + \".fruit\";\r\n\t\tif (FruitEdible)\r\n\t\t{\r\n\t\t\tItemKawaiiFood fruit = new ItemKawaiiFood(fruitName, FruitToolTip, FruitHunger, FruitSaturation, FruitPotionEffets);\r\n\t\t\tFruit = fruit;\r\n\t\t\tfruit.OreDict = FruitOreDict;\r\n\t\t\t\r\n\t\t\tfruit.register();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tItemKawaiiIngredient fruit = new ItemKawaiiIngredient(fruitName, FruitToolTip);\r\n\t\t\tFruit = fruit;\r\n\t\t\tfruit.OreDict = FruitOreDict;\r\n\t\t\t\r\n\t\t\tfruit.register();\r\n\t\t}\r\n\t\t\r\n\t\tif (gen.weight > 0)\r\n\t\t{\r\n\t\t\tgen.generator = new WorldGenKawaiiTree(this);\r\n\t\t\tModWorldGen.WorldGen.generators.add(gen);\r\n\t\t}\r\n\r\n\t\tModBlocks.AllTrees.add(this);\t\t\r\n\t}",
"private void setBlock(Block block) {\r\n this.block = block;\r\n }",
"public void addBlock(int row, int col, Block block, GameplayState gps) {\n if (row < 4) {\n gps.setGameIsLost(true);\n }\n\n cells[row][col] = block;\n }",
"public static void registerBlocks() {\n\t\tModLoader.registerBlock(blockWirelessR,\n\t\t\t\tBlockItemRedstoneWirelessR.class);\n\t\tModLoader.addName(blockWirelessR, \"Wireless Receiver\");\n\t\tModLoader.addName(blockWirelessR, \"de_DE\", \"Drahtloser Empfänger\");\n\t\tModLoader.registerTileEntity(TileEntityRedstoneWirelessR.class,\n\t\t\t\t\"Wireless Receiver\", new TileEntityRedstoneWirelessRenderer());\n\n\t\tModLoader.registerBlock(blockWirelessT,\n\t\t\t\tBlockItemRedstoneWirelessT.class);\n\t\tModLoader.addName(blockWirelessT, \"Wireless Transmitter\");\n\t\tModLoader.addName(blockWirelessT, \"de_DE\", \"Drahtloser Sender\");\n\t\tModLoader.registerTileEntity(TileEntityRedstoneWirelessT.class,\n\t\t\t\t\"Wireless Transmitter\",\n\t\t\t\tnew TileEntityRedstoneWirelessRenderer());\n\t\tregisterBlockForCreativeGui(blockWirelessR);\n\t\tregisterBlockForCreativeGui(blockWirelessT);\n\t}",
"public void addBlock(Block block, int damage, long time) {\n String c = chunkToString(block.getChunk());\n if (!chunks.containsKey(c)) {\n loadChunk(block.getChunk());\n }\n ChunkWrapper chunk = chunks.get(c);\n time += System.currentTimeMillis();\n chunk.addBlockTimer(damage, time, block);\n }",
"void addInlineBlockWriter(InlineBlockWriter bloomWriter);",
"private static void addBlockToPixa(Pixa pixa, int x, int y, int width, int height, int depth) {\n final Pix pix = new Pix(width, height, depth);\n final Box box = new Box(x, y, width, height);\n\n pixa.add(pix, box, Constants.L_COPY);\n\n pix.recycle();\n box.recycle();\n }",
"public static void render(Block block) {\n\t\tItem item = Item.getItemFromBlock(block);\n\t\tModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(item.getRegistryName(), \"inventory\"));\n\t}",
"public static void putNewParentInStubMap(Long blockID) {\n String key = Block.getBlock(blockID).getBlockLabel() + Block.getBlock(blockID).getGenusName();\n if (parentNameToParentBlocks.get(key) == null) {\n parentNameToParentBlocks.put(key, new HashSet<Long>());\n }\n parentNameToParentBlocks.get(key).add(blockID);\n\n if (parentNameToBlockStubs.get(key) == null) {\n parentNameToBlockStubs.put(key, new HashSet<Long>());\n }\n\n // notify dangling stubs and update their renderables\n // dangling stubs will be waiting to have a parent assigned to them\n // and reflect that graphically\n //TODO(user) Figure out if/how dangling stubs come about and whether they\n // should.\n for (Long stubID : parentNameToBlockStubs.get(key)) {\n BlockStub stub = (BlockStub) Block.getBlock(stubID);\n stub.notifyRenderable();\n }\n\n }",
"public void addAttachedBlock(TempBlock tempBlock) {\r\n\t\tthis.attachedTempBlocks.add(tempBlock);\r\n\t\ttempBlock.attachedTempBlocks.add(this);\r\n\t}",
"public void addBlock(Block block, int damage) {\n String c = chunkToString(block.getChunk());\n if (!chunks.containsKey(c)) {\n loadChunk(block.getChunk());\n }\n ChunkWrapper chunk = chunks.get(c);\n chunk.addBlock(damage, block);\n }",
"public void setBlock(Block newBlock) {\n\t\tthis.block = newBlock;\n\t}",
"BuildingBlock saveBuildingBlock(BuildingBlock buildingBlock) throws BusinessException;",
"@SubscribeEvent\n public static void onRegisterBlocks(RegistryEvent.Register<Block> event) {\n CoffeeMachineBlock coffeMachine = new CoffeeMachineBlock(\n Block.Properties.create(Material.ANVIL)\n .hardnessAndResistance(-1.0F, 360000F));\n event.getRegistry().registerAll(setup(coffeMachine, \"coffee_machine\"));\n }",
"public void insert(int index, Block block) {\r\n\t\tfor(Entry s : block) {\r\n\t\t\tinsert(index++, s.code,s.attributes());\r\n\t\t}\r\n\t}",
"TestBlock createTestBlock();",
"BranchingBlock createBranchingBlock();",
"public static ItemIngredient of(Block input) {\n\t\treturn of(ItemBlock.getItemFromBlock(input));\n\t}",
"public void putBlock(Block block){\n\t \n\t BlockPosX = 5;\n\t BlockPosY = 0;\n\t int posX = 5;\n\t int posY = 0;\n\t BlockInControl = block;\n\t \n\t int x = 0;\n\t for(int i=0;i<MAX_COL;i++){\n\t\tif(board[posY+1][i] == 1)\n\t\t x = 1;\n\t }\n\t if(x==1)\n\t\tthis.clearBoard();\n\t \n\t \n\t for(int r=0;r<4;r++){\n\t\tfor(int c=0;c<4;c++){\n\t\t if(block.getRowCol(r,c) == 1)\n\t\t\t{\n\t\t\t board[posY][posX]=1;\n\t\t\t \n\t\t\t switch(whichType){\n\t\t\t case 1: color[posY][posX] = 1;\n\t\t\t\tbreak;\n\t\t\t case 2: color[posY][posX] = 2;\n\t\t\t\tbreak;\n\t\t\t case 3: color[posY][posX] = 3;\n\t\t\t\tbreak;\n\t\t\t case 4: color[posY][posX] = 4;\n\t\t\t\tbreak;\n\t\t\t case 5: color[posY][posX] = 5;\n\t\t\t\tbreak;\n\t\t\t case 6: color[posY][posX] = 6;\n\t\t\t\tbreak;\n\t\t\t case 7: color[posY][posX] = 7;\n\t\t\t break;\n\t\t\t }\n\t\t\t}\n\t\t \n\t\t posX++;\n\t\t}\n\t posY++;\n\t posX-=4;\n\t }\n\t}",
"public interface IBlockAdded {\n\t\n\tpublic void setItemBlock(@Nullable IItemAddedBlock itemBlock);\n\t\n\tpublic void setDisplayName(String displayName);\n\t\n\tpublic void setBlockMaterial(Material blockMaterial);\n\t\n\tpublic void setPlaceSound(SoundEvent sound);\n\t\n\tpublic void setBreakSound(SoundEvent sound);\n\t\n\tpublic void setHitSound(SoundEvent sound);\n\t\n\tpublic void setStepSound(SoundEvent sound);\n\t\n\tpublic void setFallSound(SoundEvent sound);\n\t\n\tpublic void setBlockMapColor(@Nullable MapColor mapColor);\n\t\n\tpublic void setHarvestLevel(int harvestLevel);\n\t\n\tpublic void setHarvestTool(String harvestTool);\n\t\n\tpublic void setEffectiveTools(List<String> effectiveTools);\n\t\n\tpublic void setBookshelfStrength(int bookshelfStrength);\n\t\n\tpublic void setBeaconColorMultiplier(@Nullable float[] beaconColorMultiplier);\n\t\n\tpublic void setSlipperiness(float slipperiness);\n\t\n\tpublic void setIsSlime(boolean isSlime);\n\t\n\tpublic void setIsBeaconBase(boolean isBeaconBase);\n\t\n\tpublic void setCanPistonsPush(boolean canPistonsPush);\n\t\n\tpublic void setSemiTransparent(boolean semiTransparent);\n\t\n\tpublic void setXpDroppedMin(int xpMin);\n\t\n\tpublic void setXpDroppedMax(int xpMax);\n\t\n\tpublic void setDroppedFromExplosions(Boolean droppedFromExplosions);\n\t\n\tpublic default void setCanEndermenCarry(boolean canEndermenCarry) {\n\t\tif (EntityEnderman.getCarriable(this.getAsBlock()) != canEndermenCarry) {\n\t\t\tEntityEnderman.setCarriable(this.getAsBlock(), canEndermenCarry);\n\t\t}\n\t}\n\t\n\t@Nullable\n\tpublic IItemAddedBlock getItemBlock();\n\t\n\tpublic String getDisplayName();\n\t\n\tpublic Material getBlockMaterial();\n\t\n\tpublic SoundEvent getPlaceSound();\n\t\n\tpublic SoundEvent getBreakSound();\n\t\n\tpublic SoundEvent getHitSound();\n\t\n\tpublic SoundEvent getStepSound();\n\t\n\tpublic SoundEvent getFallSound();\n\t\n\t@Nullable\n\tpublic MapColor getBlockMapColor();\n\t\n\tpublic int getHarvestLevel();\n\t\n\tpublic String getHarvestTool();\n\t\n\tpublic List<String> getEffectiveTools();\n\t\n\tpublic int getBookshelfStrength();\n\t\n\t@Nullable\n\tpublic float[] getBeaconColorMultiplier();\n\t\n\tpublic float getSlipperiness();\n\t\n\tpublic boolean isSlime();\n\t\n\tpublic boolean isBeaconBase();\n\t\n\tpublic boolean canPistonsPush();\n\t\n\tpublic float getHardness();\n\t\n\tpublic float getResistance();\n\t\n\tpublic int getOpacity();\n\t\n\tpublic boolean isSemiTransparent();\n\t\n\tpublic int getLightLevel();\n\t\n\tpublic int getXpDroppedMin();\n\t\n\tpublic int getXpDroppedMax();\n\t\n\tpublic Boolean getDroppedFromExplosions();\n\t\n\tpublic default boolean canEndermenCarry() {\n\t\treturn EntityEnderman.getCarriable(this.getAsBlock());\n\t}\n\t\n\tpublic default void registerModels() {\n\t\tAdditionsMod.proxy.registerBlockRender(this.getAsBlock());\n\t}\n\t\n\tpublic default Block getAsBlock() {\n\t\tif (!(this instanceof Block)) {\n\t\t\tthrow new IllegalArgumentException(\"An IBlockAdded must be an instance of Block.\");\n\t\t}\n\t\treturn (Block) this;\n\t}\n\t\n public default String getId() {\n \tResourceLocation registryName = this.getAsBlock().getRegistryName();\n \t\n \tif (registryName != null) {\n \t\treturn registryName.getResourcePath();\n \t}\n \t\n String unlocalizedName = this.getAsBlock().getUnlocalizedName();\n \n if (unlocalizedName.startsWith(\"tile.\")) {\n \treturn unlocalizedName.substring(5);\n }\n \n return unlocalizedName;\n }\n\n public abstract static class Serializer<T extends IBlockAdded> {\n\t\t\n\t\tprivate final ResourceLocation blockAddedType;\n private final Class<T> blockAddedClass;\n\n protected Serializer(ResourceLocation location, Class<T> clazz)\n {\n this.blockAddedType = location;\n this.blockAddedClass = clazz;\n }\n\n\t\tpublic ResourceLocation getBlockAddedType() {\n\t\t\treturn this.blockAddedType;\n\t\t}\n\t\t\n\t\tpublic Class<T> getBlockAddedClass() {\n\t\t\treturn this.blockAddedClass;\n\t\t}\n\n\t\tpublic JsonObject serialize(T blockAddedObj, JsonSerializationContext context) {\n\t\t\tJsonObject json = new JsonObject();\n\t\t\tBlock blockAdded = blockAddedObj.getAsBlock();\n\t\t\t\n\t\t\tif (blockAddedObj.getItemBlock() != null) {\n\t\t\t\tjson.add(\"item_block\", AdditionTypeItem.GSON.toJsonTree(blockAddedObj.getItemBlock()));\n\t\t\t}\n\t\t\t\n\t\t\tjson.addProperty(\"name\", blockAddedObj.getDisplayName());\n\t\t\tjson.add(\"material\", OtherSerializers.BlockMaterialSerializer.serialize(blockAddedObj.getBlockMaterial()));\n\t\t\t\n\t\t\tif (blockAddedObj.getPlaceSound() != null) {\n\t\t\t\tjson.add(\"place_sound\", OtherSerializers.SoundEventSerializer.serialize(blockAddedObj.getPlaceSound()));\n\t\t\t}\n\t\t\t\n\t\t\tif (blockAddedObj.getBreakSound() != null) {\n\t\t\t\tjson.add(\"break_sound\", OtherSerializers.SoundEventSerializer.serialize(blockAddedObj.getBreakSound()));\n\t\t\t}\n\t\t\t\n\t\t\tif (blockAddedObj.getHitSound() != null) {\n\t\t\t\tjson.add(\"hit_sound\", OtherSerializers.SoundEventSerializer.serialize(blockAddedObj.getHitSound()));\n\t\t\t}\n\t\t\t\n\t\t\tif (blockAddedObj.getStepSound() != null) {\n\t\t\t\tjson.add(\"step_sound\", OtherSerializers.SoundEventSerializer.serialize(blockAddedObj.getStepSound()));\n\t\t\t}\n\t\t\t\n\t\t\tif (blockAddedObj.getFallSound() != null) {\n\t\t\t\tjson.add(\"fall_sound\", OtherSerializers.SoundEventSerializer.serialize(blockAddedObj.getFallSound()));\n\t\t\t}\n\t\t\t\n\t\t\tif (blockAddedObj.getBlockMapColor() != null) {\n\t\t\t\tjson.add(\"map_color\", OtherSerializers.BlockMapColorSerializer.serialize(blockAddedObj.getBlockMapColor()));\n\t\t\t}\n\t\t\t\n\t\t\tif (blockAddedObj.getHardness() > 0) {\n\t\t\t\tjson.addProperty(\"hardness\", blockAddedObj.getHardness());\n\t\t\t}\n\t\t\t\n\t\t\tif (blockAddedObj.getResistance() > 0) {\n\t\t\t\tjson.addProperty(\"resistance\", blockAddedObj.getResistance() / 3.0f);\n\t\t\t}\n\t\t\t\n\t\t\tif (blockAddedObj.getHarvestLevel() != 0) {\n\t\t\t\tjson.addProperty(\"harvest_level\", blockAddedObj.getHarvestLevel());\n\t\t\t}\n\t\t\t\n\t\t\tif (!blockAddedObj.getHarvestTool().isEmpty()) {\n\t\t\t\tjson.addProperty(\"harvest_tool\", blockAddedObj.getHarvestTool());\n\t\t\t}\n\t\t\t\n\t\t\tif (!blockAddedObj.getEffectiveTools().isEmpty()) {\n\t\t\t\tjson.add(\"effective_tools\", OtherSerializers.StringListSerializer.serialize(blockAddedObj.getEffectiveTools()));\n\t\t\t}\n\t\t\t\n\t\t\tif (blockAdded.getLightOpacity(blockAdded.getDefaultState()) != 15) {\n\t\t\t\tjson.addProperty(\"light_opacity\", blockAdded.getLightOpacity(blockAdded.getDefaultState()));\n\t\t\t}\n\t\t\t\n\t\t\tif (blockAdded.getLightValue(blockAdded.getDefaultState()) > 0) {\n\t\t\t\tjson.addProperty(\"light_level\", blockAdded.getLightValue(blockAdded.getDefaultState()));\n\t\t\t}\n\t\t\t\n\t\t\tif (Blocks.FIRE.getFlammability(blockAdded) > 0) {\n\t\t\t\tjson.addProperty(\"flammability\", Blocks.FIRE.getFlammability(blockAdded));\n\t\t\t}\n\t\t\t\n\t\t\tif (Blocks.FIRE.getEncouragement(blockAdded) > 0) {\n\t\t\t\tjson.addProperty(\"fire_spread_speed\", Blocks.FIRE.getEncouragement(blockAdded));\n\t\t\t}\n\t\t\t\n\t\t\tif (blockAddedObj.getBookshelfStrength() > 0) {\n\t\t\t\tjson.addProperty(\"bookshelf_strength\", blockAddedObj.getBookshelfStrength());\n\t\t\t}\n\t\t\t\n\t\t\tfloat[] beaconColorsMultiplier = blockAddedObj.getBeaconColorMultiplier();\n\t\t\tif (beaconColorsMultiplier != null && beaconColorsMultiplier.length == 3) {\n\t\t\t\tJsonObject beaconColorObj = new JsonObject();\n\t\t\t\tbeaconColorObj.addProperty(\"red\", beaconColorsMultiplier[0]);\n\t\t\t\tbeaconColorObj.addProperty(\"green\", beaconColorsMultiplier[1]);\n\t\t\t\tbeaconColorObj.addProperty(\"blue\", beaconColorsMultiplier[2]);\n\t\t\t\tjson.add(\"beacon_color_multiplier\", beaconColorObj);\n\t\t\t}\n\t\t\t\n\t\t\tif (blockAddedObj.getSlipperiness() != 0.6f) {\n\t\t\t\tjson.addProperty(\"slipperiness\", blockAddedObj.getSlipperiness());\n\t\t\t}\n\t\t\t\n\t\t\tif (blockAddedObj.isSlime()) {\n\t\t\t\tjson.addProperty(\"is_slime\", true);\n\t\t\t}\n\t\t\t\n\t\t\tif (blockAddedObj.isBeaconBase()) {\n\t\t\t\tjson.addProperty(\"is_beacon_base\", true);\n\t\t\t}\n\t\t\t\n\t\t\tif (!blockAddedObj.canPistonsPush()) {\n\t\t\t\tjson.addProperty(\"can_pistons_push\", false);\n\t\t\t}\n\t\t\t\n\t\t\tif (blockAddedObj.isSemiTransparent()) {\n\t\t\t\tjson.addProperty(\"semi_transparent\", true);\n\t\t\t}\n\t\t\t\n\t\t\tif (blockAddedObj.getXpDroppedMin() != 0) {\n\t\t\t\tjson.addProperty(\"xp_dropped_min\", blockAddedObj.getXpDroppedMin());\n\t\t\t}\n\t\t\t\n\t\t\tif (blockAddedObj.getXpDroppedMax() != 0) {\n\t\t\t\tjson.addProperty(\"xp_dropped_max\", blockAddedObj.getXpDroppedMax());\n\t\t\t}\n\t\t\t\n\t\t\tif (blockAddedObj.getDroppedFromExplosions() != null) {\n\t\t\t\tjson.addProperty(\"dropped_from_explosions\", blockAddedObj.getDroppedFromExplosions());\n\t\t\t}\n\t\t\t\n\t\t\tif (blockAddedObj.canEndermenCarry()) {\n\t\t\t\tjson.addProperty(\"can_endermen_carry\", true);\n\t\t\t}\n\t\t\t\n\t\t\treturn json;\n }\n\n\t\tpublic abstract T deserialize(JsonObject json, JsonDeserializationContext context);\n\t\t\n\t\tpublic <V extends Block & IBlockAdded> V deserializeDefaults(JsonObject json, JsonDeserializationContext context, V blockAdded) {\n\t\t\t\n\t\t\tif (json.has(\"item_block\")) {\n\t\t\t\tIItemAdded itemAdded = AdditionTypeItem.GSON.fromJson(json.get(\"item_block\"), IItemAdded.class);\n\t\t\t\t\n\t\t\t\tif (itemAdded instanceof IItemAddedBlock) {\n\t\t\t\t\tIItemAddedBlock itemAddedBlock = (IItemAddedBlock)itemAdded;\n\t\t\t\t\titemAddedBlock.setBlock(blockAdded);\n\t\t\t\t\tblockAdded.setItemBlock(itemAddedBlock);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n \tblockAdded.setDisplayName(JsonUtils.getString(json, \"name\"));\n \tblockAdded.setBlockMaterial(OtherSerializers.BlockMaterialSerializer.deserialize(json, \"material\"));\n\t\t\t\n\t\t\tif (json.has(\"map_color\")) {\n\t\t\t\tblockAdded.setBlockMapColor(OtherSerializers.BlockMapColorSerializer.deserialize(json, \"map_color\"));\n\t\t\t}\n\t\t\t\n\t\t\tblockAdded.setHardness(JsonUtils.getFloat(json, \"hardness\", 0));\n\t\t\tblockAdded.setResistance(JsonUtils.getFloat(json, \"resistance\", 0));\n\t\t\tblockAdded.setHarvestLevel(JsonUtils.getInt(json, \"harvest_level\", 0));\n\t\t\tblockAdded.setHarvestTool(JsonUtils.getString(json, \"harvest_tool\", \"\"));\n\t\t\t\n\t\t\tif (json.has(\"effective_tools\")) {\n\t\t\t\tblockAdded.setEffectiveTools(OtherSerializers.StringListSerializer.deserialize(json.get(\"effective_tools\"), \"effective_tools\"));\n\t\t\t}\n\t\t\t\n\t\t\tblockAdded.setLightOpacity(MathHelper.clamp(JsonUtils.getInt(json, \"light_opacity\", 15), 0, 15));\n\t\t\tblockAdded.setLightLevel(MathHelper.clamp(JsonUtils.getInt(json, \"light_level\", 0), 0, 15) / 15F);\n\t\t\t\n\t\t\tint flammability = JsonUtils.getInt(json, \"flammability\", 0);\n\t\t\tint fireSpreadSpeed = JsonUtils.getInt(json, \"fire_spread_speed\", 0);\n\t\t\tif (flammability > 0 || fireSpreadSpeed > 0) {\n\t\t\t\tBlocks.FIRE.setFireInfo(blockAdded, fireSpreadSpeed, flammability);\n\t\t\t}\n\t\t\t\n\t\t\tblockAdded.setBookshelfStrength(JsonUtils.getInt(json, \"bookshelf_strength\", 0));\n\t\t\t\n\t\t\tif (json.has(\"beacon_color_multiplier\")) {\n\t\t\t\tJsonObject beaconColorObj = JsonUtils.getJsonObject(json, \"beacon_color_multiplier\");\n\t\t\t\tblockAdded.setBeaconColorMultiplier(new float[]{JsonUtils.getFloat(beaconColorObj, \"red\"), JsonUtils.getFloat(beaconColorObj, \"green\"), JsonUtils.getFloat(beaconColorObj, \"blue\")});\n\t\t\t}\n\t\t\t\n\t\t\tblockAdded.setSlipperiness(JsonUtils.getFloat(json, \"slipperiness\", 0.6f));\n\t\t\tblockAdded.setIsSlime(JsonUtils.getBoolean(json, \"is_slime\", false));\n\t\t\tblockAdded.setIsBeaconBase(JsonUtils.getBoolean(json, \"is_beacon_base\", false));\n\t\t\tblockAdded.setCanPistonsPush(JsonUtils.getBoolean(json, \"can_pistons_push\", true));\n\t\t\tblockAdded.setSemiTransparent(JsonUtils.getBoolean(json, \"semi_transparent\", false));\n\t\t\tblockAdded.setXpDroppedMin(JsonUtils.getInt(json, \"xp_dropped_min\", 0));\n\t\t\tblockAdded.setXpDroppedMax(JsonUtils.getInt(json, \"xp_dropped_max\", 0));\n\t\t\tblockAdded.setCanEndermenCarry(JsonUtils.getBoolean(json, \"can_endermen_carry\", false));\n\t\t\t\n\t\t\tif (json.has(\"dropped_by_explosions\")) {\n\t\t\t\tblockAdded.setDroppedFromExplosions(JsonUtils.getBoolean(json, \"dropped_by_explosions\"));\n\t\t\t}\n \t\n \treturn blockAdded;\n }\n\t\t\n\t\tpublic void postDeserializeBlockAdded(JsonObject json, IBlockAdded blockAddedObj) {\n\t\t\tif (blockAddedObj.getClass() != this.blockAddedClass) {\n\t\t\t\tthrow new IllegalArgumentException(\"Tried to call post serialize for an object of the wrong type! Expected: \" + this.blockAddedClass + \", Actual: \" + blockAddedObj.getClass());\n\t\t\t}\n\t\t\t\n\t\t\tpostDeserialize(json, (T) blockAddedObj);\n\t\t}\n\t\t\n\t\tpublic void postDeserialize(JsonObject json, T blockAdded) {\n\t\t\tthis.postDeserializeDefaults(json, blockAdded);\n\t\t}\n\t\t\n\t\tpublic void postDeserializeDefaults(JsonObject json, T blockAdded) {\n \t\n \tIItemAdded itemAdded = blockAdded.getItemBlock();\n \tif (itemAdded != null) {\n \t\tItemAddedManager.Serializer.postDeserialize(JsonUtils.getJsonObject(json, \"item_block\"), itemAdded);\n \t}\n \t\n \tif (json.has(\"place_sound\")) {\n \t\tblockAdded.setPlaceSound(OtherSerializers.SoundEventSerializer.deserialize(json, \"place_sound\"));\n \t}\n \t\n \tif (json.has(\"break_sound\")) {\n \t\tblockAdded.setBreakSound(OtherSerializers.SoundEventSerializer.deserialize(json, \"break_sound\"));\n \t}\n \t\n \tif (json.has(\"hit_sound\")) {\n \t\tblockAdded.setHitSound(OtherSerializers.SoundEventSerializer.deserialize(json, \"hit_sound\"));\n \t}\n \t\n \tif (json.has(\"step_sound\")) {\n \t\tblockAdded.setStepSound(OtherSerializers.SoundEventSerializer.deserialize(json, \"step_sound\"));\n \t}\n \t\n \tif (json.has(\"fall_sound\")) {\n \t\tblockAdded.setFallSound(OtherSerializers.SoundEventSerializer.deserialize(json, \"fall_sound\"));\n \t}\n }\n }\n}",
"public void placeBlockInTopResSpace(Block block, TT tt){\n ResidualSpace res = rs_stack.pop();\n\n // Place the block, this also updates the locations of the parcels inside it\n block.setLocation(res.getLocation().clone());\n\n block_placements.add(block.getId()); // Add the id of the placed block\n\n for(Parcel p:block.getPacking()){\n packing.addParcel(p);\n }\n\n this.total_value = packing.getTotalValue();\n\n // Update the hashkey\n// hashKey = tt.updateHash(hashKey, block_placements.size(), block.getId());\n\n // Remove parcels from the availability\n removeFromBres(block);\n\n // Calculate the new residual spaces\n generateDaughterResSpaces(block, res);\n }",
"public void add(int index, MemoryBlock block) {\n\t\tif ((index < 1) || (index > size-1))\n\t\t\t\tthrow new IllegalArgumentException();\n\t\telse if (index == 1){\n\t\t\taddFirst(block);\n\t\t}\n\t\telse if ((index == size-1) && (index != 1))\n\t\t\taddLast(block);\n\t\telse if ((index != size-1) && (index != 1))\n\t\t{\n\t\t\t\tNode newNode = new Node(block);\n\t\t\t\tnewNode.previous = getNode(index-1);\n\t\t\t\tnewNode.next = getNode(index);\n\t\t\t\tgetNode(index-1).next = newNode;\n\t\t\t\tgetNode(index).previous = newNode;\n\t\t\t\tsize++;\n\t\t}\n\t}",
"void updateBlock(Block block) ;",
"public static RegistryObject<Block> register(Supplier<Block> supplier, @Nonnull String name, @Nullable Item.Properties properties) {\n RegistryObject<Block> block = BLOCK_DEFERRED.register(name, supplier);\n\n if (properties == null) {\n AquaItems.register(() -> new BlockItem(block.get(), new Item.Properties()), name);\n } else {\n AquaItems.registerWithTab(() -> new BlockItem(block.get(), properties), name);\n }\n\n return block;\n }",
"@SubscribeEvent\n public static void registerContainer(final RegistryEvent.Register<ContainerType<?>> event){\n walletBlockContainerType = IForgeContainerType.create(WalletBlockContainer::createForClientSide);\n walletBlockContainerType.setRegistryName(\"wallet_block_container\");\n event.getRegistry().register(walletBlockContainerType);\n }",
"@SubscribeEvent\n public static void registerTileEntity(final RegistryEvent.Register<TileEntityType<?>> event){\n walletBlockTileEntityType = TileEntityType.Builder.create(WalletBlockTileEntity::new, walletBlock).build(null);\n walletBlockTileEntityType.setRegistryName(\"bitcoinmod:wallet_block_tile_entity\");\n event.getRegistry().register(walletBlockTileEntityType);\n }",
"public void store(Block fb) throws Exception {\r\n\t\tsuper.store(fb);\r\n\t}",
"RclBlock createRclBlock();",
"BAnyBlock createBAnyBlock();",
"@Override\n\tpublic void registerRecipes() {\n\n\t\tItemStack block, ingot;\n\n\t\tfor (MetalType metal : MetalType.VALUES) {\n\n\t\t\tblock = this.createItemStack(metal, 1);\n\t\t\tingot = BrItems.ingotMetals.createItemStack(metal, 1);\n\n\t\t\tGameRegistry.addShapelessRecipe(block, ingot, ingot, ingot, ingot, ingot, ingot, ingot, ingot, ingot);\n\t\t\tingot.stackSize = 9;\n\t\t\tGameRegistry.addShapelessRecipe(ingot, block);\n\t\t}\n\n\t\t// Ludicrite block. Because.\n\n\t\tfinal ItemStack ludicriteBlock = this.createItemStack(MetalType.Ludicrite, 1);\n\n\t\tGameRegistry.addRecipe(new ShapedOreRecipe(ludicriteBlock, \"BPB\", \"ENE\", \"BPB\",\n\t\t\t\t'N', Items.NETHER_STAR, 'P', Items.ENDER_PEARL, 'E', Blocks.EMERALD_BLOCK,\n\t\t\t\t'B', BigReactors.CONFIG.recipeBlutoniumIngotName));\n\n\t\tif (OreDictionaryHelper.doesOreNameExist(\"blockEnderium\")) {\n\n\t\t\t// Ok, how about some ludicrous shit here. Enderium and blaze rods. Have fun, bucko.\n\t\t\tGameRegistry.addRecipe(new ShapedOreRecipe(ludicriteBlock, \"BRB\", \"E E\", \"BRB\",\n\t\t\t\t\t'B', BigReactors.CONFIG.recipeBlutoniumIngotName, 'R', Items.BLAZE_ROD, 'E', \"blockEnderium\"));\n\t\t}\n\t}",
"public void createItemInInventory(Item newItem) {\n\t\tinventory.createItem(newItem);\n\t}",
"BlockAssignmentType createBlockAssignmentType();",
"public void fillBlock(Block block) {\n\n\t\tfor (int j = block.UpperLeft().x; j <= block.LowerRight().x; j++) { \n\t\t\tfor (int k = block.UpperLeft().y; k <= block.LowerRight().y; k++) { \n\t\t\t\tblocksPosition.put(new Point(j,k), block); \n\t\t\t\t//Blocks.add(block); \n\t\t\t} \n\t\t} \n\t}",
"public void testAddBlock_NoGame() throws Exception {\n try {\n dao.addBlock(1, 1);\n fail(\"EntryNotFoundException expected\");\n } catch (EntryNotFoundException e) {\n // should land here\n }\n }",
"public static void addRespawningBlock(Block block, int seconds) {\n FileConfiguration config = MyZ.instance.getBlocksConfig();\n ConfigurationSection section = config.createSection(block.getWorld().getName() + \"_\" + block.getX() + \"_\" + block.getY() + \"_\"\n + block.getZ());\n section.set(\"respawn\", true);\n section.set(\"type\", block.getType().toString());\n section.set(\"data\", block.getData());\n section.set(\"time\", ticks + seconds);\n MyZ.instance.saveBlocksConfig();\n }",
"public void addRegenBlock(Material material, int percent) {\n blockValues.put(material, percent);\n }",
"public BiomeBlock(Location loc, Biome b) {\n this.world = loc.getWorld();\n this.x = loc.getBlockX();\n this.z = loc.getBlockZ();\n this.biome = b;\n this.wmChunk = new WMChunk(this.world, this.x, this.z, true);\n }",
"public void buildBlock(BptSlotInfo slot, IBptContext context)\r\n/* 26: */ {\r\n/* 27:33 */ context.world().d(slot.x, slot.y, slot.z, amq.y.cm, slot.meta);\r\n/* 28: */ }",
"void writeBlock(int blockId, byte[] buffer) throws IOException;",
"BlockFor createBlockFor();",
"public org.apache.spark.streaming.receiver.ReceivedBlockStoreResult storeBlock (org.apache.spark.storage.StreamBlockId blockId, org.apache.spark.streaming.receiver.ReceivedBlock block) { throw new RuntimeException(); }",
"ActionBlock createActionBlock();",
"public void putBlock(Boolean trackStats, MemoryBlock block){\r\n\t\tif(DEBUG_LEVEL >= 1)System.out.println(\"Memory.putBlock(\" + block.getBlockAddress() + \")\");\r\n\t\t\r\n\t\t// Validate\r\n\t\tif(block == null)throw new NullPointerException(\"block Can Not Be Null\");\r\n\t\tif((block.getBlockAddress() + block.getSize() - 1) > totalSize)throw new IllegalArgumentException(\"block Can Not Be Greater Than total Size\");\r\n\t\t\r\n\t\t// Write MemoryElements to Memory\r\n\t\tMemoryElementIterator meIterator = block.getIterator();\r\n\t\twhile(meIterator.hasNext()){\r\n\t\t\tMemoryElement element = meIterator.next();\r\n\t\t\t\r\n\t\t\tif(DEBUG_LEVEL >= 4)System.out.println(\"Memory.putBlock()...Writing memory[\" + element.getElementAddress() + \"]\");\r\n\t\t\t\r\n\t\t\tmemory[element.getElementAddress()].setData(element.getData());\r\n\t\t}\r\n\t\t\r\n\t\tif(trackStats)cacheStats.ACCESS++;\r\n\t\tif(trackStats)cacheStats.BLOCKWRITE_HIT++;\r\n\t\t\r\n\t\tif(DEBUG_LEVEL >= 2)System.out.println(\"Memory.putBlock()...Finished\");\r\n\t}",
"public void blocksAdded(List<Response> blocks) {\n for (Response block : blocks) {\n try {\n long id = block.getId(\"block\");\n blockList.add(block);\n blockMap.put(id, block);\n } catch (IdentifierException exc) {\n // Ignore the block\n }\n }\n fireTableDataChanged();\n }",
"private void registerFleshBlock(){\n\t\tgetVariantBuilder(OrganicTechBlocks.FLESH_BLOCK.get()).forAllStates(state -> {\n\t\t\t//Generate the set of rotations for a flesh block w/o eyes\n\t\t\tConfiguredModel[] rotations = ConfiguredModel.allRotations(models().cubeAll(\"flesh_block\", modLoc(BLOCK_DIR + \"/flesh_block\")), false, 4);\n\t\t\t//then append the rotations for one eye\n\t\t\trotations = ArrayUtils.addAll(rotations, ConfiguredModel.allRotations(models().cubeAll(\"flesh_block_1eye\", modLoc(BLOCK_DIR + \"/flesh_block_1eye\")), false, 1));\n\t\t\t//then append the rotations for two eyes and return\n\t\t\treturn ArrayUtils.addAll(rotations, ConfiguredModel.allRotations(models().cubeAll(\"flesh_block_2eye\", modLoc(BLOCK_DIR + \"/flesh_block_2eye\")), false, 1));\n\t\t});\n\t}",
"public Block(Block bl) {\r\n\t\tthis.type = bl.type;\r\n\t\tthis.point_BlockTopRight = new Point3D(bl.point_BlockTopRight);\r\n\t\tthis.point_BlockDownleft = new Point3D(bl.point_BlockDownleft);\r\n\t\tthis.setpoint_BlockTopLeft(new Point3D(bl.getpoint_BlockTopRight().y(),bl.getpoint_BlockDownleft().x()));\r\n\t\tthis.setPoint_BlockDownRight(new Point3D(bl.getpoint_BlockDownleft().y(),bl.getpoint_BlockTopRight().x()));\r\n\t\tthis.IDBloack = bl.IDBloack;\r\n\r\n\t}",
"public Block(){\n\t\tinstns = new ArrayList<Instruction>();\n\t}",
"public BlockExtra(Pixy2 pixy, Block block) {\n\t\tthis(pixy, block.getSignature(), block.getX(), block.getY(), block.getWidth(), block.getHeight(), block.getAngle(), block.getIndex(), block.getAge());\n\t}"
] | [
"0.7591017",
"0.75281364",
"0.7186518",
"0.71689636",
"0.7095899",
"0.709003",
"0.70265675",
"0.6970868",
"0.68340325",
"0.673001",
"0.6702706",
"0.66629523",
"0.66210544",
"0.657349",
"0.65718764",
"0.65395546",
"0.6523188",
"0.64743",
"0.6470876",
"0.64594406",
"0.6407781",
"0.6379271",
"0.62941986",
"0.62131464",
"0.61451703",
"0.6119803",
"0.6109485",
"0.6057505",
"0.60419905",
"0.60152936",
"0.59816396",
"0.5972424",
"0.59331024",
"0.59308285",
"0.5928989",
"0.59287",
"0.5926341",
"0.591191",
"0.5907493",
"0.5888586",
"0.5879057",
"0.58742315",
"0.5863738",
"0.5842662",
"0.58401525",
"0.58320564",
"0.5829915",
"0.5788226",
"0.57563734",
"0.57265097",
"0.57256633",
"0.56966525",
"0.5693808",
"0.5682238",
"0.564877",
"0.56392103",
"0.5638211",
"0.5630299",
"0.56264323",
"0.56257504",
"0.56141233",
"0.5599619",
"0.5597339",
"0.55829376",
"0.55515474",
"0.5543389",
"0.55277246",
"0.5491521",
"0.5485655",
"0.54653364",
"0.54483116",
"0.5433242",
"0.54294044",
"0.5417822",
"0.53963864",
"0.53862655",
"0.53836316",
"0.53825194",
"0.5377577",
"0.53741395",
"0.5373869",
"0.53727984",
"0.536368",
"0.5360827",
"0.5350491",
"0.5338085",
"0.5328327",
"0.5317239",
"0.5276787",
"0.52735853",
"0.5263911",
"0.52619475",
"0.5259493",
"0.52451694",
"0.5243111",
"0.52416533",
"0.5233197",
"0.5227274",
"0.52185345",
"0.5212371"
] | 0.68589896 | 8 |
Registers a BlockItem for a given Block and Item.Settings and automatically adds it to the BLOCK_ITEM_MAP. | private static Item registerBlockItem(Block block, Item.Settings settings){
Identifier id = Registry.BLOCK.getId(block);
return CottonItemHelper.registerItem(id.getNamespace(), id.getPath(), new BlockItem(block, settings));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void register(Block block, ItemBlock itemBlock) {\n\t\tGameRegistry.register(block);\n\t\tGameRegistry.register(itemBlock);\n\t}",
"public static <BLOCK extends Block> BLOCK register(@Nonnull final BLOCK block, @Nullable final ItemBlock itemBlock) {\n\t\tfinal ResourceLocation resourceLocation = block.getRegistryName();\n\t\tif (resourceLocation == null) {\n\t\t\tWarpDrive.logger.error(String.format(\"Missing registry name for block %s, ignoring registration...\",\n\t\t\t block));\n\t\t\treturn block;\n\t\t}\n\t\t\n\t\tassert !blocks.contains(block);\n\t\tblocks.add(block);\n\t\t\n\t\tif (itemBlock != null) {\n\t\t\titemBlock.setRegistryName(resourceLocation);\n\t\t\tregister(itemBlock);\n\t\t}\n\t\t\n\t\treturn block;\n\t}",
"@SubscribeEvent\n public static void registerItem(final RegistryEvent.Register<Item> event){\n Item.Properties properties = new Item.Properties().maxStackSize(1).group(ItemGroup.MISC);\n walletBlockItem = new BlockItem(walletBlock, properties);\n walletBlockItem.setRegistryName(walletBlock.getRegistryName());\n event.getRegistry().register(walletBlockItem);\n }",
"private static void registerBlocks() {\n for(Block block : modBlocks) {\n ForgeRegistries.BLOCKS.register(block);\n\n ItemBlock itemBlock = new ItemBlock(block);\n itemBlock.setRegistryName(block.getRegistryName());\n ForgeRegistries.ITEMS.register(itemBlock);\n }\n }",
"public static Block registerBlock(String MODID, String name, Block block, Item.Settings settings){\n block = registerBlockWithoutItem(MODID, name, block);\n registerBlockItem(block, settings);\n return block;\n }",
"public static <T extends Block> T register(T block, String name, ItemGroup group, boolean hasItem) {\n ResourceLocation loc = new ResourceLocation(Missy.MODID, name);\n // Set the block to it.\n block.setRegistryName(loc);\n\n if(hasItem) {\n if(block instanceof IMakeItem) {\n ITEMS.add(((IMakeItem) block).getItem().setRegistryName(loc));\n }\n else ITEMS.add(new BlockItem(block, MItemProperties.BLOCK.group(group)).setRegistryName(loc));\n }\n\n BLOCKS.add(block);\n\n return block;\n }",
"@Override\n @SuppressWarnings(\"unchecked\")\n @SideOnly(Side.CLIENT)\n public void registerItemModels() {\n final Item item = this;\n final ResourceLocation loc = ForgeRegistries.BLOCKS.getKey(block);\n\n for(T o : (Collection<T>) mappingProperty.getAllowedValues()) {\n int meta = block.getMetaFromState(block.getDefaultState().withProperty(mappingProperty, o));\n String name = mappingProperty.getName(o);\n\n ModelLoader.setCustomModelResourceLocation(item, meta, new ModelResourceLocation(loc, \"half=bottom,\" + mappingProperty.getName() + \"=\" + name));\n }\n }",
"public static Block registerBlock(String MODID, String name, Block block, ItemGroup itemGroup){\n return registerBlock(MODID, name, block, (new Item.Settings()).itemGroup(itemGroup));\n }",
"public static void register(GenericBlock block)\n\t{\n\t\tBLOCKS.add(block);\n\t}",
"public static <BLOCK extends Block> BLOCK register(@Nonnull final BLOCK block) {\n\t\tassert block instanceof IBlockBase;\n\t\treturn register(block, ((IBlockBase) block).createItemBlock());\n\t}",
"private static void registerBlock(Block b)\n\t{\n\t}",
"public void addMappingItem( String lovDefinitionItemName, String blockItemName)\n {\n if (lovDefinitionItemName == null || lovDefinitionItemName.trim().length() == 0)\n {\n return;\n }\n \n \n EJCoreLovItemMappingProperties props = new EJCoreLovItemMappingProperties( lovDefinitionItemName, (blockItemName == null ? \"\"\n : blockItemName));\n _lovItemMappings.add(props);\n \n }",
"public void addItem(Item theItem) {\n\t\tif (inventory != null) {\n\t\t\tif (!isAuctionAtMaxCapacity()) {\n\t\t\t\t// Check item doesn't already exist as key in map\n\t\t\t\tif (inventory.containsKey(theItem)) {\n\t\t\t\t\t//ERROR CODE: ITEM ALREADY EXISTS\n\t\t\t\t\tSystem.out.println(\"That item already exists in the inventory.\");\n\t\t\t\t} else\n\t\t\t\t\tinventory.put(theItem, new ArrayList<Bid>());\n\t\t\t} else if (isAuctionAtMaxCapacity()) {\n\t\t\t\t//ERROR CODE: AUCTION AT MAX CAPACITY\n\t\t\t\tSystem.out.println(\"\\nYour auction is at maximum capacity\");\n\t\t\t} \n\t\t} else {\n\t\t\tinventory = new HashMap<Item, ArrayList<Bid>>();\n\t\t\tinventory.put(theItem, new ArrayList<Bid>());\t\t\t\t\n\t\t} \t\t\t\t\t\t\n\t}",
"public void setMappingItem(String lovDefinitionItemName, String blockItemName)\n {\n Iterator<EJCoreLovItemMappingProperties> itemMappings = getAllItemMappingProperties().iterator();\n while (itemMappings.hasNext())\n {\n EJCoreLovItemMappingProperties props = itemMappings.next();\n if ((props.getLovDefinitionItemName().equalsIgnoreCase(lovDefinitionItemName)))\n {\n props.setBlockItemName(blockItemName);\n break;\n }\n }\n }",
"public void addItem(Item item) {\n\t\thashOperations.put(KEY, item.getId(), item);\n\t\t//valueOperations.set(KEY + item.getId(), item);\n\t}",
"@SubscribeEvent\n public static void registerBlock(final RegistryEvent.Register<Block> event){\n walletBlock = new WalletBlock();\n event.getRegistry().register(walletBlock);\n }",
"public void addBlock(Block block){\n\t\tblocks.addElement(block);\n\t}",
"private static void put(Block block, TempBlock tempBlock) {\r\n\t\tif (!instances_.containsKey(block)) {\r\n\t\t\tinstances_.put(block, new LinkedList<>());\r\n\t\t}\r\n\t\tinstances_.get(block).add(tempBlock);\r\n\t}",
"public void addBlock(Block block) {\n\t\tblock.setId(this.generateID());\n\t\tthis.blocks.put(block.getId(), block);\n\t}",
"public void store(Item item) {\n this.items.add(item);\n }",
"public static void register() {\n Registry.register(Registry.BLOCK, new Identifier(\"cultivation\", \"sieve_block\"), SIEVE_BLOCK);\n Registry.register(Registry.ITEM, new Identifier(\"cultivation\", \"sieve_block\"), new BlockItem(SIEVE_BLOCK, new Item.Settings().group(Cultivation.GROUP)));\n Registry.register(Registry.BLOCK, new Identifier(\"cultivation\", \"pod_shell\"), POD_SHELL);\n }",
"public static void register(CustomItem item) {\n CUSTOM_ITEMS.put(item.getInternalName(), item);\n\n if (item.getInternalID() == 0) {\n item.setInternalID(NEXT_ID);\n\n NEXT_ID++;\n if (NEXT_ID == INVALID_ID) NEXT_ID++;\n }\n\n EventCache.registerEvents(item);\n }",
"public void addBlock(Block block) {\n this.blocks.add(block);\n }",
"public void addItemButton(ItemButton itemButton) {\r\n\r\n\t\tif (!buttonMap.containsKey(itemButton.getId())) {\r\n\t\t\tbuttonMap.put(itemButton.getId(), itemButton);\r\n\t\t}\r\n\t}",
"private void addToInventory(Item item) {\n inventory.put(item.getName(), item);\n }",
"public static void registerBlocks() {\n\t\tRegistry.register(Registry.BLOCK, new Identifier(EggMod.MOD_ID, \"egg_block\"), EGG_BLOCK);\n\t\t\n\t\t// Yolk\n\t\tSTILL_YOLK = Registry.register(Registry.FLUID, new Identifier(EggMod.MOD_ID, \"yolk_flow\"), new YolkFluid.Still());\n\t\tFLOWING_YOLK = Registry.register(Registry.FLUID, new Identifier(EggMod.MOD_ID, \"yolk_still\"), new YolkFluid.Flowing());\n\t\tYOLK = Registry.register(Registry.BLOCK, new Identifier(EggMod.MOD_ID, \"yolk\"), new FluidBlock(STILL_YOLK, FabricBlockSettings.copy(Blocks.WATER)){});\n\t}",
"public void addItem(Item item) {\n items.add(item);\n }",
"public void addItem(Item item) {\n items.add(item);\n }",
"public synchronized void addItem(IJABXAdvertisementItem item) {\n\t\tidMap.put(item.getSerialNo(), item);\n\t\titemList.add(item);\n\t}",
"public void addBlock(Block newBlock) {\n\t\tBLOCK_LIST.add(newBlock);\n\t\tSPRITE_LIST.add(newBlock);\n\t}",
"private static Block registerBlockWithoutItem(String MODID, String name, Block b){\n return Registry.register(Registry.BLOCK, MODID+\":\"+name, b);\n }",
"public void putBlock(JsonObject block){\n blocks.put(Hash.getHashString(block.toString()), block);\n }",
"public static void registerBlockEntities()\n\t{\n\t}",
"public void addBlock(int x, int y) {\r\n\t\tthis.blockMap.add(new Block(x, y));\r\n\t}",
"public void addItem(Item item) {\n\t\titems.add(item);\n\t}",
"public void addItem(Item item) {\r\n\t\titems.add(item);\r\n\t}",
"private void addItemToAllRegisteredTypes(List<String> legTypes, StatType statType, double item) {\n\t\tfor ( String legType : legTypes ) {\n\n\t\t\t// ... finally add the \"item\" to the correct bin in the container:\n\t\t\tint idx = this.statsContainer.get(statType).getIndex(item) ;\n\t\t\tthis.statsContainer.get(statType).inc( legType, idx ) ;\n\n\t\t\t// also add it to the sums container:\n\t\t\tthis.sumsContainer.get(statType).addValue( legType, item ) ;\n\n\t\t}\n\t}",
"public static void registerBlock(boolean fireproof, ItemGroup group, String name, Block block) {\n Item.Settings normalSettings = new Item.Settings().group(group);\n Item.Settings fireproofSettings = new Item.Settings().group(group).fireproof();\n\n Registry.register(Registry.BLOCK, newID(name), block);\n Registry.register(Registry.ITEM, newID(name), new BlockItem(block, (fireproof ? fireproofSettings : normalSettings)));\n }",
"public void addItem(Item item) {\n _items.add(item);\n }",
"public void addBlockToPA(IGUIBlock block, int index) {\n blockLink.addBlockPair(block, blockHandler.getFromPalette(index));\n addExistingBlockAsProgram(block);\n }",
"public static void registerBlocks() {\n\t\tModLoader.registerBlock(blockWirelessR,\n\t\t\t\tBlockItemRedstoneWirelessR.class);\n\t\tModLoader.addName(blockWirelessR, \"Wireless Receiver\");\n\t\tModLoader.addName(blockWirelessR, \"de_DE\", \"Drahtloser Empfänger\");\n\t\tModLoader.registerTileEntity(TileEntityRedstoneWirelessR.class,\n\t\t\t\t\"Wireless Receiver\", new TileEntityRedstoneWirelessRenderer());\n\n\t\tModLoader.registerBlock(blockWirelessT,\n\t\t\t\tBlockItemRedstoneWirelessT.class);\n\t\tModLoader.addName(blockWirelessT, \"Wireless Transmitter\");\n\t\tModLoader.addName(blockWirelessT, \"de_DE\", \"Drahtloser Sender\");\n\t\tModLoader.registerTileEntity(TileEntityRedstoneWirelessT.class,\n\t\t\t\t\"Wireless Transmitter\",\n\t\t\t\tnew TileEntityRedstoneWirelessRenderer());\n\t\tregisterBlockForCreativeGui(blockWirelessR);\n\t\tregisterBlockForCreativeGui(blockWirelessT);\n\t}",
"@Override\n\tpublic void addBlock(Block block) {\n\t\tem.persist(block);\n\t}",
"public void addBlacklistItem(EbayItem item, Search search, String reason) {\r\n\t\tSearchItemBlacklist sib = new SearchItemBlacklist();\r\n\t\tsib.setItem(item);\r\n\t\tsib.setSearch(search);\r\n\t\tsib.setReason(reason);\r\n\t\tif (!search.getBlacklistItems().contains(sib)) {\r\n\t\t\tsearch.getBlacklistItems().add(sib);\r\n\t\t\titemBanRepository.save(sib);\r\n\t\t\tsearchRepository.save(search);\r\n\t\t}\r\n\t}",
"synchronized void putBlock(ICBlock block) {\n mQueue.add(block);\n }",
"@Override\r\n\tpublic void addItem(AbstractItemAPI item) {\n\t\titems.add(item);\r\n\t\t\r\n\t}",
"void addBlock(final Block block, final int i) {\n days.get(i).addBlock(block);\n }",
"public void addItem(Item item) {\n\t\tObjects.requireNonNull(item);\n\t\titems.add(item);\n\t}",
"public void addPendingBlock(Block block) {\n\n\t\tList<Block> sameIndexBlocks = pendingBlocks.get(block.getIndex());\n\t\tif(sameIndexBlocks == null) {\n\t\t\tsameIndexBlocks = new ArrayList<Block>();\n\t\t\tpendingBlocks.put(block.getIndex(), sameIndexBlocks);\n\t\t}\n\t\tsameIndexBlocks.add(block);\n\t}",
"@SubscribeEvent\n public static void onBlocksRegistry(final RegistryEvent.Register<Block> blockRegistryEvent) {\n LOGGER.info(\"HELLO from Register Block\");\n }",
"public <T extends Item> void registerItem(Supplier<T> itemSupplier, ICapabilityConstructor<?, T, ItemStack> constructor) {\n checkNotBaked();\n capabilityConstructorsItemInstancePending.add((Pair) Pair.of(itemSupplier, constructor));\n\n if (!registeredItemStackEventListener) {\n registeredItemStackEventListener = true;\n MinecraftForge.EVENT_BUS.register(new ItemStackEventListener());\n }\n }",
"public static void putNewParentInStubMap(Long blockID) {\n String key = Block.getBlock(blockID).getBlockLabel() + Block.getBlock(blockID).getGenusName();\n if (parentNameToParentBlocks.get(key) == null) {\n parentNameToParentBlocks.put(key, new HashSet<Long>());\n }\n parentNameToParentBlocks.get(key).add(blockID);\n\n if (parentNameToBlockStubs.get(key) == null) {\n parentNameToBlockStubs.put(key, new HashSet<Long>());\n }\n\n // notify dangling stubs and update their renderables\n // dangling stubs will be waiting to have a parent assigned to them\n // and reflect that graphically\n //TODO(user) Figure out if/how dangling stubs come about and whether they\n // should.\n for (Long stubID : parentNameToBlockStubs.get(key)) {\n BlockStub stub = (BlockStub) Block.getBlock(stubID);\n stub.notifyRenderable();\n }\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_settings4){\n\n //adding new Block\n addNewBlock();\n\n }\n return super.onOptionsItemSelected(item);\n }",
"public ItemBlock createItemBlock() {\n\t\treturn new GenericItemBlock(this);\n\t}",
"public void addItem(Item item) {\n inventory.add(item);\n Thread updateUserThread = userController.new UpdateUserThread(LoginActivity.USERLOGIN);\n updateUserThread.start();\n synchronized (updateUserThread) {\n try {\n updateUserThread.wait();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }",
"public static ItemFrame addItemFrame(Block block, BlockFace face) {\n\t\tfinal Material mat = Material.GLASS;\n\t\tBlock northBlock = block.getWorld().getBlockAt(block.getX(), block.getY(), block.getZ() - 1);\n\t\tBlock southBlock = block.getWorld().getBlockAt(block.getX(), block.getY(), block.getZ() + 1);\n\t\tBlock eastBlock = block.getWorld().getBlockAt(block.getX() - 1, block.getY(), block.getZ());\n\t\tBlock westBlock = block.getWorld().getBlockAt(block.getX() + 1, block.getY(), block.getZ());\n\n\t\tif (northBlock.getType() == Material.AIR) {\n\t\t\tnorthBlock.setType(mat);\n\t\t}\n\t\tif (southBlock.getType() == Material.AIR) {\n\t\t\tsouthBlock.setType(mat);\n\t\t}\n\t\tif (eastBlock.getType() == Material.AIR) {\n\t\t\teastBlock.setType(mat);\n\t\t}\n\t\tif (westBlock.getType() == Material.AIR) {\n\t\t\twestBlock.setType(mat);\n\t\t}\n\n\t\tif (face == BlockFace.NORTH) {\n\t\t\tnorthBlock.setType(Material.AIR);\n\t\t} else if (face == BlockFace.SOUTH) {\n\t\t\tsouthBlock.setType(Material.AIR);\n\t\t} else if (face == BlockFace.EAST) {\n\t\t\teastBlock.setType(Material.AIR);\n\t\t} else if (face == BlockFace.WEST) {\n\t\t\twestBlock.setType(Material.AIR);\n\t\t}\n\n\t\tItemFrame itemFrame = (ItemFrame) block.getWorld().spawnEntity(block.getLocation(), EntityType.ITEM_FRAME);\n\n\t\tif (northBlock.getType() == mat) {\n\t\t\tnorthBlock.setType(Material.AIR);\n\t\t}\n\t\tif (southBlock.getType() == mat) {\n\t\t\tsouthBlock.setType(Material.AIR);\n\t\t}\n\t\tif (eastBlock.getType() == mat) {\n\t\t\teastBlock.setType(Material.AIR);\n\t\t}\n\t\tif (westBlock.getType() == mat) {\n\t\t\twestBlock.setType(Material.AIR);\n\t\t}\n\n\t\treturn itemFrame;\n\t}",
"public void addAttachedBlock(TempBlock tempBlock) {\r\n\t\tthis.attachedTempBlocks.add(tempBlock);\r\n\t\ttempBlock.attachedTempBlocks.add(this);\r\n\t}",
"private void addValidItem(Item item){\r\n\t\titems.put(item.getItemIdentifier(), item);\r\n\t\ttotal.updateTotal(item);\r\n\t}",
"void addInlineBlockWriter(InlineBlockWriter bloomWriter);",
"public EntangledChaliceItem(Block block) {\n super(block);\n }",
"@Override\n\tpublic void registerRecipes() {\n\n\t\tItemStack block, ingot;\n\n\t\tfor (MetalType metal : MetalType.VALUES) {\n\n\t\t\tblock = this.createItemStack(metal, 1);\n\t\t\tingot = BrItems.ingotMetals.createItemStack(metal, 1);\n\n\t\t\tGameRegistry.addShapelessRecipe(block, ingot, ingot, ingot, ingot, ingot, ingot, ingot, ingot, ingot);\n\t\t\tingot.stackSize = 9;\n\t\t\tGameRegistry.addShapelessRecipe(ingot, block);\n\t\t}\n\n\t\t// Ludicrite block. Because.\n\n\t\tfinal ItemStack ludicriteBlock = this.createItemStack(MetalType.Ludicrite, 1);\n\n\t\tGameRegistry.addRecipe(new ShapedOreRecipe(ludicriteBlock, \"BPB\", \"ENE\", \"BPB\",\n\t\t\t\t'N', Items.NETHER_STAR, 'P', Items.ENDER_PEARL, 'E', Blocks.EMERALD_BLOCK,\n\t\t\t\t'B', BigReactors.CONFIG.recipeBlutoniumIngotName));\n\n\t\tif (OreDictionaryHelper.doesOreNameExist(\"blockEnderium\")) {\n\n\t\t\t// Ok, how about some ludicrous shit here. Enderium and blaze rods. Have fun, bucko.\n\t\t\tGameRegistry.addRecipe(new ShapedOreRecipe(ludicriteBlock, \"BRB\", \"E E\", \"BRB\",\n\t\t\t\t\t'B', BigReactors.CONFIG.recipeBlutoniumIngotName, 'R', Items.BLAZE_ROD, 'E', \"blockEnderium\"));\n\t\t}\n\t}",
"public boolean containsItemMappingForBlockItem(String blockItemName)\n {\n Iterator<EJCoreLovItemMappingProperties> itemMappings = getAllItemMappingProperties().iterator();\n while (itemMappings.hasNext())\n {\n EJCoreLovItemMappingProperties props = itemMappings.next();\n if ((props.getBlockItemName().equalsIgnoreCase(blockItemName)))\n {\n return true;\n }\n }\n return false;\n }",
"public void addBlock(int x, int y, int health) {\r\n\t\tthis.blockMap.add(new Block(x, y, health));\r\n\t}",
"public <T extends Item> void registerItem(Class<T> clazz, ICapabilityConstructor<?, T, ItemStack> constructor) {\n checkNotBaked();\n List<ICapabilityConstructor<?, ? extends Item, ? extends ItemStack>> constructors = capabilityConstructorsItem.get(clazz);\n if (constructors == null) {\n constructors = Lists.newArrayList();\n capabilityConstructorsItem.put(clazz, constructors);\n }\n constructors.add(constructor);\n\n if (!registeredItemStackEventListener) {\n registeredItemStackEventListener = true;\n MinecraftForge.EVENT_BUS.register(new ItemStackEventListener());\n }\n }",
"public static void registerBlockSmelting(){\n\t\t\n\t\tGameRegistry.addSmelting(blockInfo.myWood_ID, new ItemStack(items.compressedAir, 2), 0.1f);\n\t\t\n\t}",
"public void addItemTrackBagging(Item item, boolean bool) {\n\t\tthis.purchaseList.setItemTrackBagging(item, bool);\n\t}",
"public void Add(String item) {\n byte[] bites = Utils.hexToBytes(item);\n mpBuffer += Utils.bytesToHex(bites);\n mLenght += bites.length;\n mBackOffset = mLenght;\n }",
"public void addToBlock(Instruction instn){\n\t\tinstns.add(instn);\n\t}",
"private static void addFakeItemDataToInWorldBlocksAndCleanUpFakeData() {\n\n Map<String, Materials> MATERIALS_MAP = null;\n\n try {\n Field f = Materials.class.getDeclaredField(\"MATERIALS_MAP\");\n f.setAccessible(true);\n MATERIALS_MAP = (Map<String, Materials>) f.get(null);\n } catch (NoSuchFieldException | IllegalAccessException | ClassCastException e) {\n e.printStackTrace();\n }\n\n if (MATERIALS_MAP == null)\n throw new NullPointerException(\"MATERIALS_MAP null!\");\n\n Materials oreMat = new Materials(-1, null, 0, 0, 0, false, \"bwores\", \"bwores\", null, true, null);\n Materials smallOreMat = new Materials(-1, null, 0, 0, 0, false, \"bwsmallores\", \"bwsmallores\", null, true, null);\n Materials blockMat = new Materials(-1, null, 0, 0, 0, false, \"bwblocks\", \"bwblocks\", null, true, null);\n\n for (int i = 0; i < 16; i++) {\n GT_OreDictUnificator.addAssociation(ore, oreMat, new ItemStack(BWOres, 1, i), true);\n GT_OreDictUnificator.addAssociation(oreSmall, smallOreMat, new ItemStack(BWSmallOres, 1, i), true);\n GT_OreDictUnificator.addAssociation(block, blockMat, new ItemStack(BWBlocks, 1, i), true);\n }\n\n MATERIALS_MAP.remove(\"bwores\");\n MATERIALS_MAP.remove(\"bwsmallores\");\n MATERIALS_MAP.remove(\"bwblocks\");\n }",
"public void addItemFromLoad(String key, Item item) {\n itemMap.get(key).add(item);\n\n if(item.getImportance().equals(\"yes\")) importantItemList.add(item);\n\n }",
"public void addBlock(Block block) {\r\n if (null == blocks) {\r\n blocks = new ArrayList<Block>();\r\n }\r\n blocks.add(block);\r\n maxEntries += block.getHowMany();\r\n }",
"public void addItem(Item i) {\r\n assert (ic != null);\r\n \r\n ic.setItem(i);\r\n ic.setHandler(handler);\r\n items.add(ic.getItem());\r\n }",
"public static void BlockRegister()\n\t{\n\t\tString[] umberstoneBlock = {\"umberstone\"};\n\t\tString[] umbercobbleBlock = {\"cobbleUmber\"};\n\t\tStoneRegister umberstone = getStoneRegister(ModBlocks.umberstone, ModBlocks.umberstone, \"umberstone\", umberstoneBlock, umbercobbleBlock, \"erebus\");\n\t\tumberstone.mossyCobble = false;\n\t\tumberstone.genReplaceable = false;\n\t\tumberstone.register();\n\t}",
"protected abstract int addBlock(Collection<Record> candidates,\n Map.Entry block);",
"public void giveItem(Item item) {\n\t\tif (hasItem()) return;\n\t\tthis.item = item;\n\t}",
"@Override\n public void addBundle(Context context, Item item, Bundle b) throws SQLException, AuthorizeException\n {\n // Check authorisation\n authorizeService.authorizeAction(context, item, Constants.ADD);\n\n log.info(LogManager.getHeader(context, \"add_bundle\", \"item_id=\"\n + item.getID() + \",bundle_id=\" + b.getID()));\n\n // Check it's not already there\n if (item.getBundles().contains(b)) {\n // Bundle is already there; no change\n return;\n }\n\n // now add authorization policies from owning item\n // hmm, not very \"multiple-inclusion\" friendly\n authorizeService.inheritPolicies(context, item, b);\n\n // Add the bundle to in-memory list\n item.addBundle(b);\n b.setItems(Arrays.asList(item));\n\n // Insert the mapping\n context.addEvent(new Event(Event.ADD, Constants.ITEM, item.getID(), Constants.BUNDLE, b.getID(), b.getName()));\n }",
"public static void addItem(BackpackItem itemName) {\n\t\t\t\n\t\t\tfor (int i = 0; i <= backpackArr.length-1; i++) { //iterate through backpackArr\n\t\t\t\t\n\t\t\t\tif (backpackArr[i] == null) { // If there is no item in slot\n\t\t\t\t\tSystem.out.println(\"You added the \" + itemName + \" to your backpack.\");\n\t\t\t\t\tbackpackArr[i] = itemName; // puts new item into next empty BackpackItem index in backpackArr\n\t\t\t\t\tbreak; // breaks out of for loop (to prevent filling up all slots with the same item\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"public static <T extends Item> T registerItem(T item, String name) {\n return registerItem(item, name, null);\n }",
"public static void loadItemTextures() {\n\t\tspriteTItem = ModLoader.addOverride(\"/gui/items.png\",\n\t\t\t\t\"/WirelessSprites/txOn.png\");\n\t\tspriteRItem = ModLoader.addOverride(\"/gui/items.png\",\n\t\t\t\t\"/WirelessSprites/rxOn.png\");\n\t}",
"public void blockAdded(Response block) {\n try {\n long id = block.getId(\"block\");\n blockList.add(0, block);\n blockMap.put(block.getId(\"block\"), block);\n fireTableRowsInserted(0, 0);\n } catch (IdentifierException exc) {\n // Ignore the block\n }\n }",
"<T> void addInstallItem(CallbackItem<T> callbackItem);",
"public void setItemRegistry(ItemRegistry itemRegistry) {\n this.itemRegistry = itemRegistry;\n }",
"@Override\n\t@RequestMapping(value=ZuelControllerValue.Manage+\"addItem\")\n\tpublic ZuelResult addItem(TbItem item) {\n\t\treturn service.addItem(item);\n\t}",
"public static void render(Block block) {\n\t\tItem item = Item.getItemFromBlock(block);\n\t\tModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(item.getRegistryName(), \"inventory\"));\n\t}",
"public void addItem(LibraryItem item){\r\n\t\t// use add method of list.class\r\n\t\tthis.inverntory.add(item);\r\n\t}",
"public abstract void addItem(AbstractItemAPI item);",
"public void addFileUploaderItem(FileUploaderItem item) {\n m_items.addView(item, new LinearLayout.LayoutParams(\n ViewGroup.LayoutParams.MATCH_PARENT,\n ViewGroup.LayoutParams.WRAP_CONTENT\n ));\n }",
"public void addItem(Item i) {\n this.items.add(i);\n }",
"public void addItem( Item anItem) {\n currentItems.add(anItem);\n }",
"void putBarcodeItem(String barcode, Item item) {\n BarcodeDataCache d = getBarcodeData();\n if (d != null) {\n d.put(barcode, item);\n }\n cacheData.postValue(d);\n }",
"public void addClassItem(WjrClassItem classItem) {\r\n checkNotNull(classItem, \"The classItem parameter is null.\");\r\n\r\n String className = classItem.getClassName();\r\n checkState(\r\n !classItems.containsKey(className),\r\n \"The %s has already existed.\",\r\n className);\r\n\r\n classItems.put(className, classItem);\r\n }",
"public void addItemtoInventoryList(String item) {\r\n InventoryList.add(item);\r\n }",
"public void addReservable(Reservable item){\n // Adds an item to the manager\n listI.add(item);\n }",
"public void setBlockBoundsForItemRender() {\n\t\tthis.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);\n\t}",
"public void addItem(String item){\n adapter.add(item);\n }",
"public void putBlock(Boolean trackStats, MemoryBlock block){\r\n\t\tif(DEBUG_LEVEL >= 1)System.out.println(\"Memory.putBlock(\" + block.getBlockAddress() + \")\");\r\n\t\t\r\n\t\t// Validate\r\n\t\tif(block == null)throw new NullPointerException(\"block Can Not Be Null\");\r\n\t\tif((block.getBlockAddress() + block.getSize() - 1) > totalSize)throw new IllegalArgumentException(\"block Can Not Be Greater Than total Size\");\r\n\t\t\r\n\t\t// Write MemoryElements to Memory\r\n\t\tMemoryElementIterator meIterator = block.getIterator();\r\n\t\twhile(meIterator.hasNext()){\r\n\t\t\tMemoryElement element = meIterator.next();\r\n\t\t\t\r\n\t\t\tif(DEBUG_LEVEL >= 4)System.out.println(\"Memory.putBlock()...Writing memory[\" + element.getElementAddress() + \"]\");\r\n\t\t\t\r\n\t\t\tmemory[element.getElementAddress()].setData(element.getData());\r\n\t\t}\r\n\t\t\r\n\t\tif(trackStats)cacheStats.ACCESS++;\r\n\t\tif(trackStats)cacheStats.BLOCKWRITE_HIT++;\r\n\t\t\r\n\t\tif(DEBUG_LEVEL >= 2)System.out.println(\"Memory.putBlock()...Finished\");\r\n\t}",
"void addMember(Item item) throws AccessManagementException;",
"public void addItem(int indexItemset, Item item) {\n itemsets.get(indexItemset).addItem(item);\n numberOfItems++;\n }",
"@Override\n\tpublic void postinit(FMLPostInitializationEvent event) {\n\t\t\n\t\tRenderItem renderItem = Minecraft.getMinecraft().getRenderItem();\n\t\t\n\t\t//blocks\n\t\trenderItem.getItemModelMesher().register(Item.getItemFromBlock(TCMBlocks.bonepile), 0, new ModelResourceLocation(techicraftmod.MODID + \":\" + ((BlockBonePile) TCMBlocks.bonepile).getName(), \"inventory\"));\n\t\trenderItem.getItemModelMesher().register(Item.getItemFromBlock(TCMBlocks.obsidianpressureplate), 0, new ModelResourceLocation(techicraftmod.MODID + \":\" + ((BlockObsidianPressurePlate) TCMBlocks.obsidianpressureplate).getName(), \"inventory\"));\n\t\trenderItem.getItemModelMesher().register(Item.getItemFromBlock(TCMBlocks.invisiblepressureplate), 0, new ModelResourceLocation(techicraftmod.MODID + \":\" + ((BlockInvisiblePressurePlate) TCMBlocks.invisiblepressureplate).getName(), \"inventory\"));\n\t\trenderItem.getItemModelMesher().register(Item.getItemFromBlock(TCMBlocks.crystaltorch), 0, new ModelResourceLocation(techicraftmod.MODID + \":\" + ((BlockCrystalTorch) TCMBlocks.crystaltorch).getName(), \"inventory\"));\n\t\trenderItem.getItemModelMesher().register(Item.getItemFromBlock(TCMBlocks.solidglass), 0, new ModelResourceLocation(techicraftmod.MODID + \":\" + ((BlockSolidGlass) TCMBlocks.solidglass).getName(), \"inventory\"));\n\n\t\t//items\n\t\trenderItem.getItemModelMesher().register(TCMItems.firestaff, 0, new ModelResourceLocation(techicraftmod.MODID + \":\" + ((ItemFireStaff) TCMItems.firestaff).getName(), \"inventory\"));\n\n\t}",
"public PageInventory addItem(ItemStack item)\n {\n this.contents.add(item);\n this.recalculate();\n return this;\n }",
"@Override\n\tpublic void registerItemRenderer(Item item, int meta, String id) {\n\t}"
] | [
"0.72989476",
"0.70351994",
"0.67818755",
"0.6445591",
"0.63013047",
"0.6264614",
"0.6095365",
"0.60819554",
"0.59812284",
"0.58638084",
"0.5788379",
"0.5727998",
"0.56500316",
"0.55932385",
"0.55757785",
"0.54676807",
"0.5431121",
"0.54260504",
"0.5424224",
"0.5374594",
"0.5368535",
"0.53638756",
"0.5324238",
"0.53228474",
"0.5289456",
"0.52790207",
"0.52768224",
"0.52768224",
"0.5263052",
"0.5262775",
"0.52616024",
"0.5216626",
"0.5203131",
"0.51980454",
"0.51973444",
"0.5191361",
"0.51850885",
"0.51682216",
"0.5128836",
"0.5112844",
"0.5098087",
"0.5087791",
"0.5082685",
"0.50634056",
"0.5030351",
"0.5006339",
"0.49939576",
"0.49815693",
"0.4960834",
"0.4954901",
"0.49544373",
"0.49420965",
"0.49251693",
"0.49218524",
"0.49189168",
"0.49179372",
"0.49178228",
"0.4915334",
"0.49134305",
"0.48936874",
"0.48856318",
"0.48834583",
"0.48740584",
"0.48704055",
"0.48661387",
"0.48594522",
"0.485938",
"0.4855773",
"0.48548293",
"0.48502877",
"0.48483878",
"0.4845183",
"0.4842197",
"0.48347393",
"0.48336178",
"0.48194513",
"0.4815423",
"0.4813182",
"0.47911757",
"0.47895148",
"0.47851166",
"0.47818214",
"0.47766212",
"0.47600827",
"0.47555855",
"0.4755446",
"0.47480187",
"0.4746473",
"0.47384682",
"0.47177595",
"0.4711756",
"0.47096744",
"0.47054857",
"0.47003275",
"0.46984786",
"0.46952468",
"0.468978",
"0.46886697",
"0.4678514",
"0.46772984"
] | 0.76402 | 0 |
Inflate the menu; this adds items to the action bar if it is present. | @Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.nav_drawer, menu);
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.actions, menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main_actions, menu);\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\t\tinflater.inflate(R.menu.action_bar_menu, menu);\r\n\t\tmMenu = menu;\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.act_bar_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_actions, menu);\r\n\t\treturn true;\r\n //return super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\r\n\t inflater.inflate(R.menu.action_bar_all, menu);\r\n\t return super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\t super.onCreateOptionsMenu(menu);\n\t\tMenuInflater muu= getMenuInflater();\n\t\tmuu.inflate(R.menu.cool_menu, menu);\n\t\treturn true;\n\t\t\n\t\t\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.adventure_archive, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.archive_menu, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n \tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n \t\tinflater.inflate(R.menu.main, menu);\n \t\tsuper.onCreateOptionsMenu(menu, inflater);\n \t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.action_menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater bow=getMenuInflater();\n\t\tbow.inflate(R.menu.menu, menu);\n\t\treturn true;\n\t\t}",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.action_menu, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\t\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\t\t\n\t\t/* Inflate the menu; this adds items to the action bar if it is present */\n\t\tgetMenuInflater().inflate(R.menu.act_main, menu);\t\t\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflate = getMenuInflater();\n inflate.inflate(R.menu.menu, ApplicationData.amvMenu.getMenu());\n return true;\n }",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.menu, menu);\n\t\t\treturn true; \n\t\t\t\t\t\n\t\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_item, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.menu, menu);\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t \n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\t//menu.clear();\n\t\tinflater.inflate(R.menu.soon_to_be, menu);\n\t\t//getActivity().getActionBar().show();\n\t\t//getActivity().getActionBar().setBackgroundDrawable(\n\t\t\t\t//new ColorDrawable(Color.rgb(223, 160, 23)));\n\t\t//return true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n this.getMenuInflater().inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.main, menu);\n }",
"@Override\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n \t// We must call through to the base implementation.\r\n \tsuper.onCreateOptionsMenu(menu);\r\n \t\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_menu, menu);\r\n\r\n return true;\r\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.inter_main, menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.action, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu (Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.custom_action_bar, menu);\n\t\treturn true;\n\t}",
"public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp=getMenuInflater();\n\t\tblowUp.inflate(R.menu.welcome_menu, menu);\n\t\treturn true;\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.listing, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.item, menu);\n return true;\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.resource, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu,menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.home_action_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.template, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Log.d(\"onCreateOptionsMenu\", \"create menu\");\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.socket_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);//Menu Resource, Menu\n\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actionbar, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(toolbar_res, menu);\n updateMenuItemsVisibility(menu);\n return true;\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t// \n\t\tMenuInflater mi = getMenuInflater();\n\t\tmi.inflate(R.menu.thumb_actv_menu, menu);\n\t\t\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n }",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.swag_list_activity_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\n\t\treturn true;\n\t}",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.jarvi, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.main, menu);\n\n }",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add__listing, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actmain, menu);\r\n return true;\r\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.buat_menu, menu);\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.layout.menu, menu);\n\t\treturn true;\n\t}",
"@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\n\t\n\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\n\treturn super.onCreateOptionsMenu(menu);\n}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ichat, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater)\n\t{\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\tinflater.inflate(R.menu.expenses_menu, menu);\n\t}",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.action_bar, menu);\n return true;\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp = getMenuInflater();\n\t\tblowUp.inflate(R.menu.status, menu);\n\t\treturn true;\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.menu, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn true;\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ui_main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_activity_actions, menu);\n return true;\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }"
] | [
"0.7246102",
"0.7201358",
"0.7194834",
"0.7176498",
"0.71066517",
"0.7039537",
"0.7037961",
"0.70112145",
"0.70094734",
"0.69807225",
"0.6944953",
"0.69389373",
"0.6933199",
"0.6916928",
"0.6916928",
"0.6891486",
"0.68831646",
"0.68754137",
"0.68745375",
"0.68621665",
"0.68621665",
"0.68621665",
"0.68621665",
"0.68515885",
"0.68467957",
"0.68194443",
"0.6817494",
"0.6813087",
"0.6813087",
"0.6812847",
"0.6805774",
"0.6801204",
"0.6797914",
"0.6791314",
"0.6789091",
"0.67883503",
"0.6783642",
"0.6759701",
"0.6757412",
"0.67478645",
"0.6744127",
"0.6744127",
"0.67411774",
"0.6740183",
"0.6726017",
"0.6723245",
"0.67226785",
"0.67226785",
"0.67208904",
"0.67113477",
"0.67079866",
"0.6704564",
"0.6699229",
"0.66989094",
"0.6696622",
"0.66952467",
"0.66865396",
"0.6683476",
"0.6683476",
"0.6682188",
"0.6681209",
"0.6678941",
"0.66772443",
"0.6667702",
"0.66673946",
"0.666246",
"0.6657578",
"0.6657578",
"0.6657578",
"0.6656586",
"0.66544783",
"0.66544783",
"0.66544783",
"0.66524047",
"0.6651954",
"0.6650132",
"0.66487855",
"0.6647077",
"0.66467404",
"0.6646615",
"0.66464466",
"0.66449624",
"0.6644209",
"0.6643461",
"0.6643005",
"0.66421187",
"0.6638628",
"0.6634786",
"0.6633529",
"0.6632049",
"0.6632049",
"0.6632049",
"0.66315657",
"0.6628954",
"0.66281766",
"0.6627182",
"0.6626297",
"0.6624309",
"0.6619582",
"0.6618876",
"0.6618876"
] | 0.0 | -1 |
if(qName.equalsIgnoreCase("customername")) row.createCell(0); else if(qName.equalsIgnoreCase("item")) row.createCell(1); | @Override
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Row createRow();",
"AttributeCell createAttributeCell();",
"MemberCell createMemberCell();",
"VARCell createVARCell();",
"public static int create(EcoSystem system){\n \n \n XSSFWorkbook workbook = new XSSFWorkbook();\n XSSFSheet sheet = workbook.createSheet(\"Customer Details\");\n\n //Custom font style for header\n CellStyle cellStyle = sheet.getWorkbook().createCellStyle();\n Font font = sheet.getWorkbook().createFont();\n font.setBold(true);\n cellStyle.setFont(font);\n \n int rowCount = 0;\n int columnCount1 = 0;\n \n //Creating header row\n \n String s[] = {\"CUSTOMER ID\",\"CUSTOMER NAME\",\"CONTACT NO.\",\"EMAIL ID\",\"USAGE(Gallons)\",\"BILLING DATE\",\"TOTAL BILL($)\"};\n Row row1 = sheet.createRow(++rowCount);\n for(String s1 : s){\n Cell header = row1.createCell(++columnCount1);\n header.setCellValue(s1);\n header.setCellStyle(cellStyle);\n }\n \n \n \n for(Network network : system.getNetworkList()){\n for(Enterprise enterprise : network.getEnterpriseDirectory().getEnterpriseList()){\n if(enterprise instanceof WaterEnterprise){\n for(Organization organization : enterprise.getOrganizationDirectory().getOrganizationList()){\n if(organization instanceof CustomerOrganization){\n for(Employee employee : organization.getEmployeeDirectory().getEmployeeList()){\n Customer customer = (Customer) employee;\n Row row = sheet.createRow(++rowCount);\n int columnCount = 0;\n for(int i = 0 ; i<7 ; i++ ){\n Cell cell = row.createCell(++columnCount);\n if(i==0){\n cell.setCellValue(customer.getId());\n }\n else if(i == 1){\n cell.setCellValue(customer.getName());\n }\n else if(i == 2){\n cell.setCellValue(customer.getContactNo());\n }\n else if(i == 3){\n cell.setCellValue(customer.getEmailId());\n }\n else if(i == 4){\n cell.setCellValue(customer.getTotalUsageVolume());\n }\n else if(i == 5){\n if(customer.getBillingDate() != null)\n cell.setCellValue(String.valueOf(customer.getBillingDate()));\n else\n cell.setCellValue(\"Bill Not yet available\");\n }\n else if(i == 6){\n if(customer.getTotalBill() != 0)\n cell.setCellValue(customer.getTotalBill());\n else\n cell.setCellValue(\"Bill Not yet available\");\n }\n }\n }\n }\n }\n }\n }\n }\n \n \n try (FileOutputStream outputStream = new FileOutputStream(\"Customer_details.xlsx\")) {\n workbook.write(outputStream);\n } catch (FileNotFoundException ex) {\n JOptionPane.showMessageDialog(null, \"File not found\");\n return 0;\n } catch (IOException ex) {\n JOptionPane.showMessageDialog(null, \"IOException\");\n return 0;\n }\n return 1;\n }",
"Rows createRows();",
"private void createRow( String name )\n {\n logger.log(Level.FINE, \"Creating Row\");\n\n JLabel label = new JLabel( name, SwingConstants.RIGHT );\n if (!isHeadless)\n label.setFont(new Font(\"Monospaced\", Font.PLAIN, 15));\n label.setHorizontalAlignment(SwingConstants.CENTER);\n label.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, Color.DARK_GRAY));\n if (name.equals(PROFIT_LOSS))\n bottomPanel.add(label, BorderLayout.NORTH);\n else\n leftPanel.add(label);\n\n JTextField field = new JTextField( 30 );\n field.setEditable(false);\n if (!isHeadless)\n field.setFont(new Font(\"Serif\", Font.BOLD, 30));\n field.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, Color.DARK_GRAY));\n field.setHorizontalAlignment(SwingConstants.CENTER);\n if (name.equals(PROFIT_LOSS)) {\n if (!isHeadless)\n field.setFont(new Font(\"Monospaced\", Font.BOLD, 55));\n bottomPanel.add(field, BorderLayout.CENTER);\n } else\n rightPanel.add(field);\n\n fields.put(name, field);\n\n logger.log(Level.FINE, \"Created Row\");\n\n }",
"Row(String name) {\r\n\t\tthis.name = name;\r\n\t\t//this.price = price;\r\n\t\t//this.type = type;\r\n\t}",
"public static Row createRow() {\n\t\treturn new Row(fsco,criteria,columns);\n\t}",
"private void initTable() {\n// String col[] = {\"Seq#\",\"PCode\",\"BCode\",\"ProductName\",\"PurPCS\",\"PurCTN\",\"PurQTY\",\"PurDMG\",\"PurRate\",\"GrossAmount\",\"Disc%\",\"DiscRS\",\"Tax%\",\"TaxRS\",\"TOPcs\",\"UCHRS\",\"SCHRS\",\"FMR%\",\"FMRRS\",\"TaxRS\",\"Expiry\",\"Batch\",\"NetAmount\"};\n String col[] = {\"Seq#\",\"PCode\",\"BCode\"};\n int k=0; \n Object row[][] = new Object[][] { { \"1\", new ButtonTextFieldCellTest.ButtonTextFieldCell(), new ButtonTextFieldCellTest.ButtonTextFieldCell() },\n { \"2\", new ButtonTextFieldCellTest.ButtonTextFieldCell(), new ButtonTextFieldCellTest.ButtonTextFieldCell() },\n { \"3\", new ButtonTextFieldCellTest.ButtonTextFieldCell(), new ButtonTextFieldCellTest.ButtonTextFieldCell() },\n { \"4\", new ButtonTextFieldCellTest.ButtonTextFieldCell(), new ButtonTextFieldCellTest.ButtonTextFieldCell() } };\n// String row[][] =new String[3][23];\n /*\n for(int i = 0; i < 3; i++){\n for(int j = 0; j < 23; j++){\n row[i][j]=\"\"+k++;\n }\n }\n \n */\n// row=new String[][]{{\"Seq#\",\"PCode\",\"BCode\",\"ProductName\",\"PurPCS\",\"PurCTN\",\"PurQTY\",\"PurDMG\",\"PurRate\",\"GrossAmount\",\"Disc%\",\"DiscRS\",\"Tax%\",\"TaxRS\",\"TOPcs\",\"UCHRS\",\"SCHRS\",\"FMR%\",\"FMRRS\",\"TaxRS\",\"Expiry\",\"Batch\",\"NetAmount\"},\n// {\"1Seq#\",\"1PCode\",\"1BCode\",\"ProductName\",\"PurPCS\",\"PurCTN\",\"PurQTY\",\"PurDMG\",\"PurRate\",\"GrossAmount\",\"Disc%\",\"DiscRS\",\"Tax%\",\"TaxRS\",\"TOPcs\",\"UCHRS\",\"SCHRS\",\"FMR%\",\"FMRRS\",\"TaxRS\",\"Expiry\",\"Batch\",\"NetAmount\"},\n// {\"2Seq#\",\"2PCode\",\"2BCode\",\"ProductName\",\"PurPCS\",\"PurCTN\",\"PurQTY\",\"PurDMG\",\"PurRate\",\"GrossAmount\",\"Disc%\",\"DiscRS\",\"Tax%\",\"TaxRS\",\"TOPcs\",\"UCHRS\",\"SCHRS\",\"FMR%\",\"FMRRS\",\"TaxRS\",\"Expiry\",\"Batch\",\"NetAmount\"}};\n model = new DefaultTableModel(row,col);\n jTable1=new JTable(model);\n jTable1.setRowHeight(30);\n jTable1.setRowHeight(0,30);\n jTable1.setPreferredSize(new Dimension(purchaseScrollPane.getWidth(), 35));\n purchaseScrollPane.setViewportView(jTable1);\n }",
"public void addRow(String rowName);",
"public TableRow build_row(String item_name, String quantity, String price){\n\n //Converts pixel to dp\n int padding_in_dp = 10;\n final float scale = getResources().getDisplayMetrics().density;\n int padd_bottom = (int) (padding_in_dp * scale + 0.5f);\n\n TableRow row = new TableRow(getContext());\n\n TextView item_view = build_view(item_name, 6, false, true, row);\n TextView quantity_view = build_view(quantity, 3,true, false, row);\n TextView price_view = build_view(price,3,true, false, row);\n TextView delete_view = build_view(\"x\",1, true, true, row);\n\n row.addView(item_view);\n row.addView(quantity_view);\n row.addView(price_view);\n row.addView(delete_view);\n\n row.setPadding(0,0,0,padd_bottom);\n\n return row;\n }",
"private int create(int row) throws FileNotFoundException {\n\t\tXSSFRow row0 = in.createRow(row);\r\n\t\tXSSFCell cell0row0 = row0.createCell(0);\r\n\t\t\r\n\t\tcell0row0.setCellValue(\"col_lookupName\");\r\n\r\n\t\tXSSFCell cell1row0 = row0.createCell(1);\r\n\t\t\r\n\t\tcell1row0.setCellValue(\"col_lookupType\");\r\n\r\nXSSFCell cell2row0 = row0.createCell(2);\r\n\t\t\r\n\t\tcell2row0.setCellValue(\"col_lookupTable\");\r\n\t\t\r\n\t\t\r\nXSSFCell cell3row0 = row0.createCell(3);\r\n\t\t\r\n\t\tcell3row0.setCellValue(\"col_lookupColumn\");\r\n\t\t\r\n\t\t\r\nXSSFCell cell4row0 = row0.createCell(4);\r\n\t\t\r\n\t\tcell4row0.setCellValue(\"\");\t\r\n\t\t\r\nXSSFCell cell5row0 = row0.createCell(5);\r\n\t\t\r\n\t\tcell5row0.setCellValue(\"\");\t\r\n\t\t\r\nXSSFCell cell6row0 = row0.createCell(6);\r\n\t\t\r\ncell6row0.setCellValue(\"Col_Constraints\");\r\n\r\n\r\nXSSFCell cell7row0 = row0.createCell(7);\r\n\r\ncell7row0.setCellValue(\"\");\r\n\r\n\r\n\r\nXSSFCell cell8row0 = row0.createCell(8);\r\n\r\ncell8row0.setCellValue(\"\");\r\n\r\n\t\t\r\n\t\r\nXSSFCell cell9row0 = row0.createCell(9);\r\n\r\ncell9row0.setCellValue(\"\");\r\n\r\n\r\nXSSFCell cell10row0 = row0.createCell(10);\r\n\r\ncell10row0.setCellValue(\"Col_Pagination\");\r\n\r\n\r\n\r\n\r\n\r\n\r\n\t\t// Placing column headings below the row.\r\n\t\tXSSFRow row1 = in.createRow(1);\r\n\t\tXSSFCell cell3row1 = row1.createCell(3);\r\n\t\t\r\n\t\tcell3row1.setCellValue(\"Col_desplayName\");\r\n\r\n\t\tXSSFCell cell4row1 = row1.createCell(4);\r\n\t\t\r\n\t\tcell4row1.setCellValue(\"Col_columnName\");\r\n\r\n\t\tXSSFCell cell5row1 = row1.createCell(5);\r\n\t\r\n\t\tcell5row1.setCellValue(\"Col_searchable\");\r\n\r\n\t\tXSSFCell cell6row1 = row1.createCell(6);\r\n\t\r\n\t\tcell6row1.setCellValue(\"Col_constraintColumn\");\r\n\r\n\t\tXSSFCell cell7row1 = row1.createCell(7);\r\n\t\t\r\n\t\tcell7row1.setCellValue(\"Col_constraintOperator\");\r\n\r\n\t\tXSSFCell cell8row1 = row1.createCell(8);\r\n\t\t\r\n\t\tcell8row1.setCellValue(\"Col_constraintValue\");\r\n\r\n\t\tXSSFCell cell9row1 = row1.createCell(9);\r\n\t\t\r\n\t\tcell9row1.setCellValue(\"Col_parameterName\");\r\n\r\n\t\tXSSFCell cell10row1 = row1.createCell(10);\r\n\t\t\r\n\t\tcell10row1.setCellValue(\"Col_allowed\");\r\n\t\t\r\n\t\t\r\nXSSFCell cell11row1 = row1.createCell(11);\r\n\t\t\r\n\t\tcell11row1.setCellValue(\"Col_recordsPerPage\");\r\n\t\t\r\n\t\t\r\n\t\tin.addMergedRegion(new CellRangeAddress(0,0,3,5));\r\n\t\tin.addMergedRegion(new CellRangeAddress(0,0,6,9));\r\n\t\tin.addMergedRegion(new CellRangeAddress(0,0,10,11));\r\n\t\t\r\n\t\t\r\n\t\tin.autoSizeColumn(0);\r\n\t\tin.autoSizeColumn(1);\r\n\t\tin.autoSizeColumn(2);\r\n\t\tin.autoSizeColumn(3);\r\n\t\tin.autoSizeColumn(4);\r\n\t\tin.autoSizeColumn(5);\r\n\t\tin.autoSizeColumn(6);\r\n\t\tin.autoSizeColumn(7);\r\n\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t FileOutputStream outputStream = new FileOutputStream(\"D://jsonFormatRAHULKADYANbyRAHULKADYAN.xlsx\");\r\n try {\r\n\t\t\tworkbook.write(outputStream);\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n /* try {\r\n\t//\t\tworkbook.close();\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}*/\r\n\t\t\r\n\t\t\r\n\t\t\r\n\r\n\t\treturn row;\r\n\t}",
"@Override\n public void actionPerformed(ActionEvent e) {\n customer = guiControl.getController().getAccountControl().vecAcc.searchCustomer(Integer.parseInt(textField1.getText()));\n String valued = \"\";\n if (customer.getValued() == 1) {\n valued += \"Valued\";\n } else {\n valued += \"Regular\";\n }\n //Creates the table model so that a table can be dispalyed\n defaultTableModel = new DefaultTableModel();\n table1.setModel(defaultTableModel);\n //Sets the column names\n defaultTableModel.addColumn(\"Account Number\");\n defaultTableModel.addColumn(\"Name\");\n defaultTableModel.addColumn(\"Phone\");\n defaultTableModel.addColumn(\"Customer Type\");\n //Checks to see if a customer name exists or not. If it doeesnt exist then it shows N/A as the\n if (customer.getName().equals(\"\")) {\n defaultTableModel.addRow(new Object[]{\"N/A\", \"N/A\", \"N/A\", \"N/A\"});\n } else {\n //Otherwise gets the values from customer class, and adds them as the rows\n defaultTableModel.addRow(new Object[]{\n customer.getAccountNo(), customer.getName(), customer.getPhone(), valued\n });\n }\n }",
"public void addRow(String data){//adds a new row of data to the table\n\t\t\t\tif(row_count<100){//checks to see if there is space left in the current datum for an additional rows\n\t\t\t\t\tif(row_count<50){//halvs the data for more efficiant row insertion\n\t\t\t\t\t\tif(row_count<10){//checks to see if it is in the first inner datum\n\t\t\t\t\t\t\tif(dataarr!=null){//makes suhure there is an innerdatum to send the data to\n\t\t\t\t\t\t\t\tdataarr[0].addRow(data);\n\t\t\t\t\t\t\t}else{//if there is not an inner datum in the current spot this adds a new one\n\t\t\t\t\t\t\t\tdataarr[0]=new InnerDatum();\n\t\t\t\t\t\t\t\tdataarr[0].addRow(data);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else if(row_count<20){//checks to see if it is in the second inner datum\n\t\t\t\t\t\t\tf(dataarr!=null){//makes suhure there is an innerdatum to send the data to\n\t\t\t\t\t\t\t\tdataarr[1].addRow(data);\n\t\t\t\t\t\t\t}else{//if there is not an inner datum in the current spot this adds a new one\n\t\t\t\t\t\t\t\tdataarr[1]=new InnerDatum();\n\t\t\t\t\t\t\t\tdataarr[1].addRow(data);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else if(row_count<30){//checks to see if it is in the third inner datum\n\t\t\t\t\t\t\tif(dataarr!=null){//makes suhure there is an innerdatum to send the data to\n\t\t\t\t\t\t\t\tdataarr[2].addRow(data);\n\t\t\t\t\t\t\t}else{//if there is not an inner datum in the current spot this adds a new one\n\t\t\t\t\t\t\t\tdataarr[2]=new InnerDatum();\n\t\t\t\t\t\t\t\tdataarr[2].addRow(data);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else if(row_count<40){//checks to see if it is in the fourth inner datum\n\t\t\t\t\t\t\tif(dataarr!=null){//makes suhure there is an innerdatum to send the data to\n\t\t\t\t\t\t\t\tdataarr[3].addRow(data);\n\t\t\t\t\t\t\t}else{//if there is not an inner datum in the current spot this adds a new one\n\t\t\t\t\t\t\t\tdataarr[3]=new InnerDatum();\n\t\t\t\t\t\t\t\tdataarr[3].addRow(data);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else{//checks to see if it is in the fifth inner datum\n\t\t\t\t\t\t\tif(dataarr!=null){//makes suhure there is an innerdatum to send the data to\n\t\t\t\t\t\t\t\tdataarr[4].addRow(data);\n\t\t\t\t\t\t\t}else{//if there is not an inner datum in the current spot this adds a new one\n\t\t\t\t\t\t\t\tdataarr[4]=new InnerDatum();\n\t\t\t\t\t\t\t\tdataarr[4].addRow(data);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\t\n\t\t\t\t\t\tif(row_count<60){//checks to see if it is in the sixth inner datum\n\t\t\t\t\t\t\tif(dataarr!=null){//makes suhure there is an innerdatum to send the data to\n\t\t\t\t\t\t\t\tdataarr[5].addRow(data);\n\t\t\t\t\t\t\t}else{//if there is not an inner datum in the current spot this adds a new one\n\t\t\t\t\t\t\t\tdataarr[5]=new InnerDatum();\n\t\t\t\t\t\t\t\tdataarr[5].addRow(data);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else if(row_count<70){//checks to see if it is in the seventh inner datum\n\t\t\t\t\t\t\tif(dataarr!=null){//makes suhure there is an innerdatum to send the data to\n\t\t\t\t\t\t\t\tdataarr[6].addRow(data);\n\t\t\t\t\t\t\t}else{//if there is not an inner datum in the current spot this adds a new one\n\t\t\t\t\t\t\t\tdataarr[6]=new InnerDatum();\n\t\t\t\t\t\t\t\tdataarr[6].addRow(data);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else if(row_count<80){//checks to see if it is in the eighth inner datum\n\t\t\t\t\t\t\tif(dataarr!=null){//makes suhure there is an innerdatum to send the data to\n\t\t\t\t\t\t\t\tdataarr[7].addRow(data);\n\t\t\t\t\t\t\t}else{//if there is not an inner datum in the current spot this adds a new one\n\t\t\t\t\t\t\t\tdataarr[7]=new InnerDatum();\n\t\t\t\t\t\t\t\tdataarr[7].addRow(data);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else if(row_count<90){//checks to see if it is in the ninth inner datum\n\t\t\t\t\t\t\tif(dataarr!=null){//makes suhure there is an innerdatum to send the data to\n\t\t\t\t\t\t\t\tdataarr[8].addRow(data);\n\t\t\t\t\t\t\t}else{//if there is not an inner datum in the current spot this adds a new one\n\t\t\t\t\t\t\t\tdataarr[8]=new InnerDatum();\n\t\t\t\t\t\t\t\tdataarr[8].addRow(data);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else{//checks to see if it is in the tenth inner datum\n\t\t\t\t\t\t\tif(dataarr!=null){//makes suhure there is an innerdatum to send the data to\n\t\t\t\t\t\t\t\tdataarr[9].addRow(data);\n\t\t\t\t\t\t\t}else{//if there is not an inner datum in the current spot this adds a new one\n\t\t\t\t\t\t\t\tdataarr[9]=new InnerDatum();\n\t\t\t\t\t\t\t\tdataarr[9].addRow(data);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else{//acctivated when there is no room left in the current outer datum}\n\t\t\t\t\tif(next==null){//checks to see if there is a next outer datum\n\t\t\t\t\t\tnext=new OuterDatum();\t\n\t\t\t\t\t}\n\t\t\t\t\tnext.addRow(data);\n\t\t\t\t}\n\t\t\t}",
"private static void createCell(Workbook wb, Row row, int column, HorizontalAlignment halign, VerticalAlignment valign) {\n Cell cell = row.createCell(column);\n cell.setCellValue(\"Align It\");\n CellStyle cellStyle = wb.createCellStyle();\n //水平对其\n// cellStyle.setAlignment(halign);\n //垂直对齐\n// cellStyle.setVerticalAlignment(valign);\n cell.setCellStyle(cellStyle);\n }",
"public boolean addToTable(String id, String name , String cell)\n\n {\n SQLiteDatabase database = getWritableDatabase();\n ContentValues values = new ContentValues();\n values.put(COLUMN1,id);\n values.put(COLUMN2,name);\n values.put(COLUMN3,cell);\n\n long check = database.insert(TABLE_NAME,null,values);\n if (check ==-1)\n {\n return false;\n }\n else{\n\n return true;\n }\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jScrollPane1 = new javax.swing.JScrollPane();\n TblItems = new javax.swing.JTable();\n jPanel2 = new javax.swing.JPanel();\n txtKeyword = new javax.swing.JTextField();\n BTNUpdate = new javax.swing.JButton();\n jButtonEdit = new javax.swing.JButton();\n jButton1 = new javax.swing.JButton();\n jButtonSave = new javax.swing.JButton();\n BTNSearch = new javax.swing.JButton();\n jPanel3 = new javax.swing.JPanel();\n txtVATValue = new javax.swing.JTextField();\n jLabel10 = new javax.swing.JLabel();\n txtSellingPrice = new javax.swing.JTextField();\n jLabel6 = new javax.swing.JLabel();\n Itemdesc = new javax.swing.JTextField();\n jLabel4 = new javax.swing.JLabel();\n ItemCode = new javax.swing.JTextField();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n ItemCode1 = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n txtItemName = new javax.swing.JTextField();\n jLabel5 = new javax.swing.JLabel();\n txtItemCostprice = new javax.swing.JTextField();\n jCheckBox1 = new javax.swing.JCheckBox();\n jLabel11 = new javax.swing.JLabel();\n TXTUOM = new javax.swing.JTextField();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"DEFINE NEW ITEM HERE\");\n setBackground(new java.awt.Color(204, 204, 255));\n setFont(new java.awt.Font(\"Times New Roman\", 1, 12)); // NOI18N\n setResizable(false);\n\n jPanel1.setBackground(new java.awt.Color(255, 255, 255));\n\n TblItems.setFont(new java.awt.Font(\"Californian FB\", 0, 14)); // NOI18N\n TblItems.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null}\n },\n new String [] {\n \"Title 1\", \"Title 2\", \"Title 3\", \"Title 4\"\n }\n ));\n TblItems.setGridColor(new java.awt.Color(255, 255, 255));\n TblItems.setRowHeight(20);\n TblItems.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n TblItemsMouseClicked(evt);\n }\n });\n jScrollPane1.setViewportView(TblItems);\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 940, javax.swing.GroupLayout.PREFERRED_SIZE)\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 148, javax.swing.GroupLayout.PREFERRED_SIZE)\n );\n\n jPanel2.setBackground(new java.awt.Color(153, 153, 255));\n\n txtKeyword.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtKeywordActionPerformed(evt);\n }\n });\n\n BTNUpdate.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Forms/Images/icons8_Update_35px.png\"))); // NOI18N\n BTNUpdate.setText(\"Update\");\n BTNUpdate.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n BTNUpdateActionPerformed(evt);\n }\n });\n\n jButtonEdit.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Forms/Images/icons8_Compose_35px.png\"))); // NOI18N\n jButtonEdit.setText(\"Edit\");\n jButtonEdit.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonEditActionPerformed(evt);\n }\n });\n\n jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Forms/Images/icons8_Trash_Can_35px.png\"))); // NOI18N\n jButton1.setText(\"Delete\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jButtonSave.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Forms/Images/icons8_Data_Recovery_35px.png\"))); // NOI18N\n jButtonSave.setText(\"Save\");\n jButtonSave.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonSaveActionPerformed(evt);\n }\n });\n\n BTNSearch.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Forms/Images/icons8_Search_35px.png\"))); // NOI18N\n BTNSearch.setText(\"Serach\");\n BTNSearch.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n BTNSearchActionPerformed(evt);\n }\n });\n\n jPanel3.setBackground(new java.awt.Color(204, 204, 255));\n jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createTitledBorder(\"\"), \"Define New Item Here\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Tahoma\", 1, 14), new java.awt.Color(51, 51, 255))); // NOI18N\n\n txtVATValue.setText(\"16\");\n\n jLabel10.setText(\"VAT Value\");\n\n jLabel6.setText(\"Selling Price\");\n\n jLabel4.setText(\"Item Description\");\n\n jLabel1.setText(\"BarCode\");\n\n jLabel2.setText(\"Item Code\");\n\n jLabel3.setText(\"Item Name\");\n\n jLabel5.setText(\"Buying Price\");\n\n jCheckBox1.setText(\"VAT Inclusive\");\n jCheckBox1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBox1ActionPerformed(evt);\n }\n });\n\n jLabel11.setText(\"Unit of Measure\");\n\n javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);\n jPanel3.setLayout(jPanel3Layout);\n jPanel3Layout.setHorizontalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 276, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(ItemCode1, javax.swing.GroupLayout.PREFERRED_SIZE, 276, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 267, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtItemName, javax.swing.GroupLayout.PREFERRED_SIZE, 276, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 276, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtItemCostprice, javax.swing.GroupLayout.PREFERRED_SIZE, 274, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(TXTUOM, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel11, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 274, Short.MAX_VALUE)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 223, Short.MAX_VALUE)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(txtSellingPrice)\n .addComponent(txtVATValue)\n .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel10, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(ItemCode)\n .addComponent(Itemdesc)\n .addComponent(jCheckBox1, javax.swing.GroupLayout.DEFAULT_SIZE, 238, Short.MAX_VALUE))\n .addGap(181, 181, 181))\n );\n jPanel3Layout.setVerticalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(ItemCode1, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(txtItemName, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel5)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(txtItemCostprice, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel11)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(TXTUOM, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(63, 63, 63))\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(ItemCode, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(Itemdesc, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel6)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(txtSellingPrice, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jCheckBox1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel10)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(txtVATValue, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jButtonSave, javax.swing.GroupLayout.PREFERRED_SIZE, 129, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButtonEdit, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(BTNUpdate, javax.swing.GroupLayout.PREFERRED_SIZE, 148, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 118, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(119, 119, 119)\n .addComponent(txtKeyword, javax.swing.GroupLayout.PREFERRED_SIZE, 154, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(BTNSearch)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtKeyword)\n .addComponent(BTNSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(BTNUpdate)\n .addComponent(jButtonEdit)\n .addComponent(jButton1)\n .addComponent(jButtonSave)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, 241, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(0, 0, 0))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n\n pack();\n }",
"RowValue createRowValue();",
"@Override\n protected void SetCellFactories() {\n columnID.setCellValueFactory(new PropertyValueFactory<>(\"airlineID\"));\n columnName.setCellValueFactory(new PropertyValueFactory<>(\"name\"));\n columnAlias.setCellValueFactory(new PropertyValueFactory<>(\"alias\"));\n columnIATA.setCellValueFactory(new PropertyValueFactory<>(\"IATA\"));\n columnICAO.setCellValueFactory(new PropertyValueFactory<>(\"ICAO\"));\n columnCallsign.setCellValueFactory(new PropertyValueFactory<>(\"callsign\"));\n columnCountry.setCellValueFactory(new PropertyValueFactory<>(\"country\"));\n columnActive.setCellValueFactory(new PropertyValueFactory<>(\"active\"));\n }",
"public void createCell(XSSFWorkbook xssfWorkbook, XSSFRow row,CellStyle cellStyle, String cellValue, int cellNum) {\n if (StringUtils.isNotBlank(cellValue)){\n XSSFCell cell = row.createCell(cellNum);\n cell.setCellValue(cellValue);\n cell.setCellStyle(cellStyle);\n }\n }",
"public abstract Cell createDataCell() throws DailyFollowUpException;",
"private static void createCell(Workbook wb, Row row, short column, short halign, short valign) {\n Cell cell = row.createCell(column);\n cell.setCellValue(\"Align It\");\n CellStyle cellStyle = wb.createCellStyle();\n cellStyle.setAlignment(halign);\n cellStyle.setVerticalAlignment(valign);\n cell.setCellStyle(cellStyle);\n }",
"@Override\n\tpublic void createCellStructure() {\n\t\t\n\t}",
"VariableCell createVariableCell();",
"@Override\n\tpublic Cell createCell()\n\t{\n\t\treturn derivedColumn.createCell();\n\t}",
"public void newRow();",
"@Override\n\tpublic Cell createCell(int arg0, int arg1) {\n\t\treturn null;\n\t}",
"protected void populateDynamicCells(int resultsRow) {\n }",
"public static void makeCell(StringBuffer aBuf, String aName, String aValue) {\n aBuf.append(aName).append(\": <b>\").append(aValue).append(\"</b>\");\n space(aBuf, 4);\n}",
"private void createTable(int columns, int rows, String[] column_name,\n\t\t\tObject[] row_data) {\n\t\ttblStationary = new Table(canvas2, SWT.MULTI | SWT.BORDER\n\t\t\t\t| SWT.FULL_SELECTION);\n\t\ttblStationary.setLinesVisible(true);\n\t\ttblStationary.setHeaderVisible(true);\n\n\t\tfor (int i = 0; i < columns; i++) {\n\t\t\tcolumn = new TableColumn(tblStationary, SWT.NONE);\n\n\t\t\tif (i == 0) {\n\t\t\t\tcolumn.setText(column_name[i]);\n\t\t\t\tcolumn.setWidth(50);\n\t\t\t} else if (i == 1) {\n\t\t\t\tcolumn.setText(column_name[i]);\n\t\t\t\tcolumn.setWidth(230);\n\t\t\t} else {\n\t\t\t\tcolumn.setText(column_name[i]);\n\t\t\t\tcolumn.setWidth(100);\n\t\t\t}\n\t\t}\n\n\t\teditor1 = new TableEditor[rows];\n\t\ttxtTopay = new Text[rows];\n\n\t\teditor2 = new TableEditor[rows];\n\t\ttxtPaid = new Text[rows];\n\n\t\teditor3 = new TableEditor[rows];\n\t\ttxtBilling = new Text[rows];\n\n\t\teditor4 = new TableEditor[rows];\n\t\ttxtCr = new Text[rows];\n\n\t\t// Drawing initial table items\n\t\tfor (int rowId = 0; rowId < rows; rowId++) {\n\n\t\t\titem = new TableItem(tblStationary, SWT.NONE);\n\n\t\t\titem.setText(0, Integer.toString((rowId + 1)));\n\n\t\t\t// First Column station\n\t\t\titem.setText(1, (((StationsDTO) (row_data[rowId])).getName()\n\t\t\t\t\t+ \" - \" + ((StationsDTO) row_data[rowId]).getId()));\n\n\t\t\t// Draw Text Field\n\t\t\teditor1[rowId] = new TableEditor(tblStationary);\n\t\t\ttxtTopay[rowId] = new Text(tblStationary, SWT.NONE);\n\t\t\ttxtTopay[rowId].addVerifyListener(new NumericValidation());\n\t\t\teditor1[rowId].grabHorizontal = true;\n\t\t\teditor1[rowId].setEditor(txtTopay[rowId], item, 2);\n\n\t\t\t// Draw Text Field\n\t\t\teditor2[rowId] = new TableEditor(tblStationary);\n\t\t\ttxtPaid[rowId] = new Text(tblStationary, SWT.NONE);\n\t\t\ttxtPaid[rowId].addVerifyListener(new NumericValidation());\n\t\t\teditor2[rowId].grabHorizontal = true;\n\t\t\teditor2[rowId].setEditor(txtPaid[rowId], item, 3);\n\n\t\t\t// Draw Text Field\n\t\t\teditor3[rowId] = new TableEditor(tblStationary);\n\t\t\ttxtBilling[rowId] = new Text(tblStationary, SWT.NONE);\n\t\t\ttxtBilling[rowId].addVerifyListener(new NumericValidation());\n\t\t\teditor3[rowId].grabHorizontal = true;\n\t\t\teditor3[rowId].setEditor(txtBilling[rowId], item, 4);\n\n\t\t\t// Draw Text Field\n\t\t\teditor4[rowId] = new TableEditor(tblStationary);\n\t\t\ttxtCr[rowId] = new Text(tblStationary, SWT.NONE);\n\t\t\ttxtCr[rowId].addVerifyListener(new NumericValidation());\n\t\t\teditor4[rowId].grabHorizontal = true;\n\t\t\teditor4[rowId].setEditor(txtCr[rowId], item, 5);\n\n\t\t}\n\t\ttblStationary.setBounds(32, 43, 750, 380);\n\n\t}",
"void appointmentListType(){\r\n if(this.appointment.getSelectedToggle().equals(this.monthRadio)){\r\n\r\n appointmentsTable.setItems(Appointment.getAppointmentMonth());\r\n appointmentID.setCellValueFactory(new PropertyValueFactory<>(\"appointmentID\"));\r\n title.setCellValueFactory(new PropertyValueFactory<>(\"title\"));\r\n Description.setCellValueFactory(new PropertyValueFactory<>(\"description\"));\r\n location.setCellValueFactory(new PropertyValueFactory<>(\"location\"));\r\n contact.setCellValueFactory(new PropertyValueFactory<>(\"contactID\"));\r\n type.setCellValueFactory(new PropertyValueFactory<>(\"type\"));\r\n startDateTime.setCellValueFactory(new PropertyValueFactory<>(\"Start\"));\r\n endDateTime.setCellValueFactory(new PropertyValueFactory<>(\"End\"));\r\n customerID.setCellValueFactory(new PropertyValueFactory<>(\"customerID\"));\r\n }\r\n\r\n else if(this.appointment.getSelectedToggle().equals(this.weekRadio)){\r\n\r\n appointmentsTable.setItems(Appointment.getAppointmentWeek());\r\n appointmentID.setCellValueFactory(new PropertyValueFactory<>(\"appointmentID\"));\r\n title.setCellValueFactory(new PropertyValueFactory<>(\"title\"));\r\n Description.setCellValueFactory(new PropertyValueFactory<>(\"description\"));\r\n location.setCellValueFactory(new PropertyValueFactory<>(\"location\"));\r\n contact.setCellValueFactory(new PropertyValueFactory<>(\"contactID\"));\r\n type.setCellValueFactory(new PropertyValueFactory<>(\"type\"));\r\n startDateTime.setCellValueFactory(new PropertyValueFactory<>(\"Start\"));\r\n endDateTime.setCellValueFactory(new PropertyValueFactory<>(\"End\"));\r\n customerID.setCellValueFactory(new PropertyValueFactory<>(\"customerID\"));\r\n }\r\n\r\n else{\r\n appointmentsTable.setItems(DBAppointments.getAllAppointments());\r\n appointmentID.setCellValueFactory(new PropertyValueFactory<>(\"appointmentID\"));\r\n title.setCellValueFactory(new PropertyValueFactory<>(\"title\"));\r\n Description.setCellValueFactory(new PropertyValueFactory<>(\"description\"));\r\n location.setCellValueFactory(new PropertyValueFactory<>(\"location\"));\r\n contact.setCellValueFactory(new PropertyValueFactory<>(\"contactID\"));\r\n type.setCellValueFactory(new PropertyValueFactory<>(\"type\"));\r\n startDateTime.setCellValueFactory(new PropertyValueFactory<>(\"Start\"));\r\n endDateTime.setCellValueFactory(new PropertyValueFactory<>(\"End\"));\r\n customerID.setCellValueFactory(new PropertyValueFactory<>(\"customerID\"));\r\n }\r\n\r\n\r\n\r\n }",
"RowValues createRowValues();",
"private void renderTitle() {\n this.row = sheet.createRow(INT_ROW_START);\n //se crea titulos de la tabla\n this.addCell(column_++, \"CODIGO DE BARRAS\", this.cellStyleTitle());\n this.addCell(column_++, \"FECHA\", this.cellStyleTitle());\n this.addCell(column_++, \"HORA\", this.cellStyleTitle());\n this.addCell(column_++, \"MARBETE\", this.cellStyleTitle());\n this.addCell(column_++, \"PRODUCTO\", this.cellStyleTitle());\n this.addCell(column_++, \"DESCRIPCIÓN\", this.cellStyleTitle());\n this.addCell(column_++, \"LOTE\", this.cellStyleTitle());\n this.addCell(column_++, \"PESO\", this.cellStyleTitle());\n this.addCell(column_++, \"RESPONSABLE\", this.cellStyleTitle());\n }",
"public Cell createCell(Row row, int column, String cellValue) {\n // Create a cell and put a value in it.\n Cell cell = row.createCell(column);\n cell.setCellValue(cellValue);\n return cell;\n }",
"private void createTableBill(){\r\n //Se crean y definen las columnas de la Tabla\r\n TableColumn col_orden = new TableColumn(\"#\"); \r\n TableColumn col_city = new TableColumn(\"Ciudad\");\r\n TableColumn col_codigo = new TableColumn(\"Código\"); \r\n TableColumn col_cliente = new TableColumn(\"Cliente\"); \r\n TableColumn col_fac_nc = new TableColumn(\"FAC./NC.\"); \r\n TableColumn col_fecha = new TableColumn(\"Fecha\");\r\n TableColumn col_monto = new TableColumn(\"Monto\"); \r\n TableColumn col_anulada = new TableColumn(\"A\");\r\n \r\n //Se establece el ancho de cada columna\r\n this.objectWidth(col_orden , 25, 25); \r\n this.objectWidth(col_city , 90, 150); \r\n this.objectWidth(col_codigo , 86, 86); \r\n this.objectWidth(col_cliente , 165, 300); \r\n this.objectWidth(col_fac_nc , 70, 78); \r\n this.objectWidth(col_fecha , 68, 68); \r\n this.objectWidth(col_monto , 73, 73); \r\n this.objectWidth(col_anulada , 18, 18);\r\n\r\n col_fac_nc.setCellFactory(new Callback<TableColumn, TableCell>() {\r\n @Override\r\n public TableCell call(TableColumn param) {\r\n return new TableCell<Fxp_Archguip_det, String>() {\r\n @Override\r\n public void updateItem(String item, boolean empty) {\r\n super.updateItem(item, empty);\r\n setText(empty ? null : getString());\r\n setAlignment(Pos.CENTER);\r\n }\r\n\r\n private String getString() {\r\n String ret = \"\";\r\n if (getItem() != null) {\r\n ret = getItem().toString();\r\n if (ret.equals(\"0\"))\r\n ret = \"\";\r\n } else {\r\n ret = \"\";\r\n }\r\n return ret;\r\n } \r\n };\r\n }\r\n }); \r\n\r\n col_fecha.setCellFactory(new Callback<TableColumn, TableCell>() {\r\n @Override\r\n public TableCell call(TableColumn param) {\r\n return new TableCell<Fxp_Archguip_det, Date>() {\r\n @Override\r\n public void updateItem(Date item, boolean empty) {\r\n super.updateItem(item, empty);\r\n if(!empty){\r\n setText(item.toLocalDate().toString());\r\n setAlignment(Pos.CENTER);\r\n }\r\n else\r\n setText(null);\r\n }\r\n };\r\n }\r\n }); \r\n\r\n col_monto.setCellFactory(new Callback<TableColumn, TableCell>() {\r\n @Override\r\n public TableCell call(TableColumn param) {\r\n return new TableCell<Fxp_Archguid, Double>() {\r\n @Override\r\n public void updateItem(Double item, boolean empty) {\r\n super.updateItem(item, empty);\r\n setText(empty ? null : getString());\r\n setAlignment(Pos.CENTER_RIGHT);\r\n }\r\n\r\n private String getString() {\r\n String ret = \"\";\r\n if (getItem() != null) {\r\n String gi = getItem().toString();\r\n NumberFormat df = DecimalFormat.getInstance();\r\n df.setMinimumFractionDigits(2);\r\n df.setRoundingMode(RoundingMode.DOWN);\r\n\r\n ret = df.format(Double.parseDouble(gi));\r\n } else {\r\n ret = \"0,00\";\r\n }\r\n return ret;\r\n } \r\n };\r\n }\r\n }); \r\n\r\n col_anulada.setCellFactory(new Callback<TableColumn, TableCell>() {\r\n @Override\r\n public TableCell call(TableColumn param) {\r\n return new TableCell<Fxp_Archguid, Integer>() {\r\n @Override\r\n public void updateItem(Integer item, boolean empty) {\r\n super.updateItem(item, empty);\r\n setText(empty ? null : getString());\r\n setAlignment(Pos.CENTER);\r\n }\r\n\r\n private String getString() {\r\n String ret = \"\";\r\n if (getItem() != null) {\r\n ret = getItem().toString();\r\n if (ret.equals(\"0\"))\r\n ret = \"\";\r\n\r\n setTextFill(isSelected() ? Color.WHITE :\r\n ret.equals(\"0\") ? Color.BLACK :\r\n ret.equals(\"1\") ? Color.RED : Color.GREEN);\r\n } else {\r\n ret = \"\";\r\n }\r\n return ret;\r\n } \r\n };\r\n }\r\n }); \r\n\r\n //Se define la columna de la tabla con el nombre del atributo del objeto USUARIO correspondiente\r\n col_orden.setCellValueFactory( \r\n new PropertyValueFactory<>(\"orden\") );\r\n col_city.setCellValueFactory( \r\n new PropertyValueFactory<>(\"ciudad\") );\r\n col_codigo.setCellValueFactory( \r\n new PropertyValueFactory<>(\"codigo\") );\r\n col_cliente.setCellValueFactory( \r\n new PropertyValueFactory<>(\"cliente\") );\r\n col_fac_nc.setCellValueFactory( \r\n new PropertyValueFactory<>(\"numdocs\") );\r\n col_fecha.setCellValueFactory( \r\n new PropertyValueFactory<>(\"fecdoc\") );\r\n col_monto.setCellValueFactory( \r\n new PropertyValueFactory<>(\"monto\") );\r\n col_anulada.setCellValueFactory( \r\n new PropertyValueFactory<>(\"anulada\") );\r\n \r\n //Se Asigna ordenadamente las columnas de la tabla\r\n tb_factura.getColumns().addAll(\r\n col_orden, col_city, col_codigo, col_cliente, col_fac_nc, col_fecha, \r\n col_monto, col_anulada \r\n ); \r\n \r\n //Se Asigna menu contextual \r\n tb_factura.setRowFactory((TableView<Fxp_Archguid> tableView) -> {\r\n final TableRow<Fxp_Archguid> row = new TableRow<>();\r\n final ContextMenu contextMenu = new ContextMenu();\r\n final MenuItem removeMenuItem = new MenuItem(\"Anular Factura\");\r\n removeMenuItem.setOnAction((ActionEvent event) -> {\r\n switch (tipoOperacion){\r\n case 1:\r\n tb_factura.getItems().remove(tb_factura.getSelectionModel().getSelectedIndex());\r\n break;\r\n case 2:\r\n tb_factura.getItems().get(tb_factura.getSelectionModel().getSelectedIndex()).setAnulada(1);\r\n col_anulada.setVisible(false);\r\n col_anulada.setVisible(true);\r\n break;\r\n }\r\n });\r\n contextMenu.getItems().add(removeMenuItem);\r\n // Set context menu on row, but use a binding to make it only show for non-empty rows:\r\n row.contextMenuProperty().bind(\r\n Bindings.when(row.emptyProperty())\r\n .then((ContextMenu)null)\r\n .otherwise(contextMenu)\r\n );\r\n return row ; \r\n });\r\n \r\n //Se define el comportamiento de las teclas ARRIBA y ABAJO en la tabla\r\n EventHandler eh = new EventHandler<KeyEvent>(){\r\n @Override\r\n public void handle(KeyEvent ke){\r\n //Si fue presionado la tecla ARRIBA o ABAJO\r\n if (ke.getCode().equals(KeyCode.UP) || ke.getCode().equals(KeyCode.DOWN)){ \r\n //Selecciona la FILA enfocada\r\n selectedRowInvoice();\r\n }\r\n }\r\n };\r\n //Se Asigna el comportamiento para que se ejecute cuando se suelta una tecla\r\n tb_factura.setOnKeyReleased(eh); \r\n }",
"public void getTableData() {\n MSApptIDCol.setCellValueFactory(new PropertyValueFactory<Appointment, Integer>(\"appointmentID\"));\n MSCustIDCol.setCellValueFactory(new PropertyValueFactory<Appointment, Integer>(\"customerID\"));\n MSTitleCol.setCellValueFactory(new PropertyValueFactory<Appointment, String>(\"appointmentTitle\"));\n MSDescriptionCol.setCellValueFactory(new PropertyValueFactory<Appointment, String>(\"description\"));\n MSContactCol.setCellValueFactory(new PropertyValueFactory<Appointment, String>(\"contactName\"));\n MSLocationCol.setCellValueFactory(new PropertyValueFactory<Appointment, String>(\"location\"));\n MSTypeCol.setCellValueFactory(new PropertyValueFactory<Appointment, String>(\"appointmentType\"));\n MSStartTimeCol.setCellValueFactory(new PropertyValueFactory<Appointment, LocalDateTime>(\"appointmentStart\"));\n MSEndTimeCol.setCellValueFactory(new PropertyValueFactory<Appointment, LocalDateTime>(\"appointmentEnd\"));\n }",
"private void custComboActionPerformed(java.awt.event.ActionEvent evt) {\n String name = \"select * from Customer WHERE fname = ?\";\n String userName = custCombo.getSelectedItem().toString();\n\n long custNum = 0;\n try {\n prepState = run.connect().prepareStatement(name);\n prepState.setString(1, userName);\n resSet = prepState.executeQuery();\n\n while (resSet.next()) {\n if (userName.equals(resSet.getString(2))) {\n custTable.setModel(new DefaultTableModel(null, new Object[]{\"Rental Number\",\n \"Date of Rent\", \"Return Date\", \"Total Price\"}));\n custNum = resSet.getLong(1);\n\n }\n }\n\n String rental = \"select * from Rental WHERE custNumber = ?\";\n prepState = run.connect().prepareStatement(rental);\n prepState.setLong(1, custNum);\n resSet = prepState.executeQuery();\n\n Object row[];\n while (resSet.next()) {\n if (custNum == resSet.getLong(2)) {\n custTable.setModel(new DefaultTableModel(null, new Object[]{\"Rental Number\",\n \"Date of Rent\", \"Return Date\", \"Total Price\"}));\n DefaultTableModel cTable = (DefaultTableModel) custTable.getModel();\n\n row = new Object[4];\n row[0] = resSet.getLong(1);\n row[1] = resSet.getString(4);\n row[2] = resSet.getString(5);\n row[3] = resSet.getDouble(7);\n\n cTable.addRow(row);\n\n } else if (custNum != resSet.getLong(2)) {\n custTable.setModel(new DefaultTableModel(null, new Object[]{\"Rental Number\",\n \"Date of Rent\", \"Return Date\", \"Total Price\"}));\n }\n }\n } catch (SQLException ex) {\n System.out.println(\"SQLException: \" + ex.getMessage());\n }\n\n }",
"public String getCellText(){return cellText;}",
"@Test\n public void testWriteRowCells() {\n XSSFWorkbook workbook = new XSSFWorkbook();\n XSSFSheet sheet = workbook.createSheet();\n XSSFRow row = sheet.createRow(0);\n List<Object> cellContents = new ArrayList<Object>();\n cellContents.add(new String(\"abc\"));\n cellContents.add(new Long(\"1\")); \n MaterialRequestHelper.writeRowCells(cellContents, row);\n assertEquals(row.getPhysicalNumberOfCells(), 2);\n assertEquals(row.getCell(0).getCellType(),XSSFCell.CELL_TYPE_STRING);\n assertEquals(row.getCell(1).getCellType(),XSSFCell.CELL_TYPE_NUMERIC);\n assertEquals(row.getCell(0).getStringCellValue(),\"abc\");\n assertEquals(row.getCell(1).getNumericCellValue(),1,0); \n }",
"public customer_table() {\n initComponents();\n getContentPane().setBackground(Color.pink);\n Toolkit tk=Toolkit.getDefaultToolkit();\n int w=(int)tk.getScreenSize().getWidth();\n int h=(int)tk.getScreenSize().getHeight();\n this.setSize(w, h);\n String ss=\"SELECT *FROM `customer`\";\n Showtable(ss);\n a.setText(\"\"+Autoid());\n d.setText(\"@gmail.com\");\n e.setText(\"+880 \");\n \n }",
"@Override\n\tpublic Item create() {\n\t\tLOGGER.info(\"Shoe Name\");\n\t\tString item_name = util.getString();\n\t\tLOGGER.info(\"Shoe Size\");\n\t\tdouble size = util.getDouble();\n\t\tLOGGER.info(\"Set Price\");\n\t\tdouble price = util.getDouble();\n\t\tLOGGER.info(\"Number in Stock\");\n\t\tlong stock = util.getLong();\n\t\tItem newItem = itemDAO.create(new Item(item_name, size, price, stock));\n\t\tLOGGER.info(\"\\n\");\n\t\treturn newItem;\n\t}",
"private void addEmployeeInfo(Section catPart) throws SQLException, IOException{\r\n PdfPTable employee = new PdfPTable(1);\r\n \r\n Paragraph empId = new Paragraph(\"Medarbejdernummer: \"+model.getTimeSheet(0).getEmployeeId());\r\n PdfPCell empIdCell = new PdfPCell(empId);\r\n empIdCell.setBorderColor(BaseColor.WHITE);\r\n String name = fal.getFiremanById(model.getTimeSheet(0).getEmployeeId()).getFirstName() +\" \"+ fal.getFiremanById(model.getTimeSheet(0).getEmployeeId()).getLastName();\r\n Paragraph empName = new Paragraph(\"Navn: \" + name);\r\n PdfPCell empNameCell = new PdfPCell(empName);\r\n empNameCell.setBorderColor(BaseColor.WHITE);\r\n \r\n employee.setHeaderRows(0);\r\n employee.addCell(empIdCell);\r\n employee.addCell(empNameCell);\r\n employee.setWidthPercentage(80.0f);\r\n \r\n catPart.add(employee);\r\n }",
"@Override\n public void initialize(URL url, ResourceBundle rb) {\n itemName.setCellValueFactory(new PropertyValueFactory<Item, String>(\"Name\"));\n type.setCellValueFactory(new PropertyValueFactory<Item, String>(\"Type\"));\n category.setCellValueFactory(new PropertyValueFactory<Category, String>(\"CategoryName\"));\n description.setCellValueFactory(new PropertyValueFactory<Item, String>(\"Description\"));\n price.setCellValueFactory(new PropertyValueFactory<Item, Double>(\"Price\"));\n quantity.setCellValueFactory(new PropertyValueFactory<Item, Integer>(\"Quantity\"));\n rating.setCellValueFactory(new PropertyValueFactory<Item, Integer>(\"Rating\"));\n author.setCellValueFactory(new PropertyValueFactory<Item, String>(\"Author\"));\n publishDate.setCellValueFactory(new PropertyValueFactory<Item, Date>(\"PublishDate\"));\n pageNumber.setCellValueFactory(new PropertyValueFactory<Item, Integer>(\"PageNumber\"));\n\n ArrayList<Item> items = sba.selectItems();\n\n ObservableList<Item> data = FXCollections.<Item>observableArrayList(items);\n itemsTable.setItems(data);\n\n if (ws.getWishlistId(cs.showcustomer(idlogin).getUserid()) == 0) {\n cs.showcustomer(idlogin).setWishId((ws.createWishlist(cs.showcustomer(idlogin).getUserid())));\n }\n\n }",
"public void buildDeacessionRows(XSSFWorkbook xssfWorkbook,XSSFSheet xssfSheet, XSSFCellStyle dateCellStyle,int rowNum,String barcode){\n List<ItemEntity> itemEntityList = itemDetailsRepository.findByBarcode(barcode);\n CellStyle cellStyle = xssfWorkbook.createCellStyle();\n cellStyle.setAlignment(HorizontalAlignment.LEFT);\n if(itemEntityList != null){\n for (ItemEntity itemEntity : itemEntityList) {\n XSSFRow row = xssfSheet.createRow(rowNum);\n createCell(xssfWorkbook, row,cellStyle, itemEntity.getBarcode(), 1);\n createCell(xssfWorkbook, row,cellStyle, itemEntity.getCustomerCode(), 2);\n createCell(xssfWorkbook, row,cellStyle, itemEntity.getInstitutionEntity().getInstitutionCode(), 8);\n createCell(xssfWorkbook, row,cellStyle, itemEntity.getItemStatusEntity().getStatusCode(),10);\n getCreatedAndLastUpdatedDate(dateCellStyle, itemEntity.getCreatedDate(),itemEntity.getLastUpdatedDate(), row);\n }\n }\n\n }",
"private void createNewSheet(SXSSFSheet sheet, int rowNum, int countColumns, ResultSet result, SXSSFWorkbook workbook) throws SQLException {\n ResultSetMetaData metaDataColumns = result.getMetaData();\n sheet.setAutobreaks(true);\n sheet.setAutoFilter(new CellRangeAddress(0, rowNum, 0, countColumns - 1));\n// sheet.autoSizeColumn(0);\n sheet.setFitToPage(true);\n // Creamos un nuevo ROW para el header\n SXSSFRow header = sheet.createRow(rowNum);\n System.out.println(\"Add Header\");\n for (int colHeader = 1; colHeader <= countColumns; colHeader++) {\n // Creamos una nueva celda para cada una de las celdas\n SXSSFCell cellHeader = header.createCell(colHeader - 1);\n // agregamos el valor de la celda\n cellHeader.setCellValue(metaDataColumns.getColumnName(colHeader).toUpperCase());\n }\n rowNum++;\n // Verificamos si hay datos\n System.out.println(\"Add Row Data\");\n while (result.next()) {\n // Creamos un nuevo ROW para los cada nueva fila del resultSet\n SXSSFRow data = sheet.createRow(rowNum);\n // Recorremos los datos de las columnas\n for (int rowdata = 1; rowdata <= countColumns; rowdata++) {\n // Creamos una nueva celda para cada una de las celdas\n SXSSFCell cellData = data.createCell(rowdata - 1);\n // agregamos el valor de la celda\n Object object = result.getObject(rowdata);\n if (object == null) {\n cellData.setCellValue(\"\");\n } else {\n switch (metaDataColumns.getColumnType(rowdata)) {\n case Types.BOOLEAN:\n cellData.setCellValue((boolean) object);\n break;\n case Types.DATE:\n cellData.setCellValue((Date) object);\n case Types.TIMESTAMP_WITH_TIMEZONE:\n cellData.setCellValue((Date) object);\n break;\n case Types.NUMERIC:\n cellData.setCellValue(((BigDecimal) object).doubleValue());\n break;\n case Types.FLOAT:\n cellData.setCellValue(((Float) object).doubleValue());\n break;\n case Types.INTEGER:\n cellData.setCellValue(((Integer) object).doubleValue());\n break;\n case Types.SMALLINT:\n cellData.setCellValue(((Integer) object).doubleValue());\n break;\n case Types.BIGINT:\n cellData.setCellValue(((Long) object).doubleValue());\n break;\n default:\n cellData.setCellValue(object + \"\");\n break;\n }\n }\n }\n // Incrementamos el contador de registros\n rowNum++;\n // Imprimimos cada 10000 registros procesados\n if ((rowNum % 10000) == 0) {\n System.out.println(\"Procesando \" + rowNum);\n }\n // Validamos el maximo de registros que soporta excel 2007\n // Creamos una nueva hoja para los siguinetes registros\n if ((rowNum % 1048570) == 0) {\n // creamos una nueva hoja\n sheet = workbook.createSheet(name + (workbook.getNumberOfSheets() + 1));\n // enviamos a llenar la hoja\n createNewSheet(sheet, 0, countColumns, result, workbook);\n }\n }\n }",
"private MyTable generateTable()\n\t{\n\t\t//this creates the column headers for the table\n\t\tString[] titles = new String[] {\"Name\"};\n\t\t//fields will store all of the entries in the database for the GUI\n\t\tArrayList<String[]> fields = new ArrayList<String[]>();\n\t\tfor (food foodStuff: items) //for each element in items do the following\n\t\t{\n\t\t\t//creates a single row of the table\n\t\t\tString[] currentRow = new String[1]; //creates an array for this row\n\t\t\tcurrentRow[1] = foodStuff.getName(); //sets this row's name\n\t\t\tfields.add(currentRow); //adds this row to the fields ArrayList\n\t\t}\n\t\t//builds a table with titles and a downgraded fields array\n\t\tMyTable builtTable = new MyTable(fields.toArray(new String[0][1]), titles);\n\t\treturn builtTable; // return\n\t}",
"private void add()\n {\n //\"Product ID\",\"Name\",\"Price\",\"Colour\",\"RawMaterial\",\"Brand\",\"Type\",\"Quality\",\"Quantity\"\n String paintId,name,colour,rawMaterial,brand,type,quality;\n int quantity,price;\n \n if(tfPaintId.getText().isEmpty())\n {\n JOptionPane.showMessageDialog(rootPane,\"Please! Enter the Paint ID\");\n }\n else if(tfName.getText().isEmpty())\n {\n JOptionPane.showMessageDialog(rootPane,\"Please! Enter the Product name\");\n }\n else if(rwCombo.getSelectedItem().toString().equals(\"Select\"))\n {\n JOptionPane.showMessageDialog(rootPane,\"Please! Select the raw materials used\");\n }\n else if(bCombo.getSelectedItem().toString().equals(\"Select\"))\n {\n JOptionPane.showMessageDialog(rootPane,\"Please! select the brand you want\");\n }\n else if(tfPrice.getText().isEmpty())\n {\n JOptionPane.showMessageDialog(rootPane,\"Please! Enter the price\");\n }\n else if(tfColor.getText().isEmpty())\n {\n JOptionPane.showMessageDialog(rootPane,\"Please! Enter the colour\");\n }\n else if(typeCombo.getSelectedItem().toString().equals(\"Select\"))\n {\n JOptionPane.showMessageDialog(rootPane,\"Select something from paint type\");\n }\n else if(getQuality()==null) \n {\n JOptionPane.showMessageDialog(rootPane,\"Quality is not selected\");\n }\n else if(tfQuantity.getText().isEmpty())\n {\n JOptionPane.showMessageDialog(rootPane,\"Please! Enter the quantity\");\n }\n else\n {\n try\n {\n paintId = tfPaintId.getText();\n name=tfName.getText();\n price=Integer.valueOf(tfPrice.getText());\n colour=tfColor.getText();\n rawMaterial=rwCombo.getSelectedItem().toString();\n brand=bCombo.getSelectedItem().toString();\n type=typeCombo.getSelectedItem().toString();\n quality=getQuality();\n quantity=Integer.valueOf(tfQuantity.getText());\n boolean exist=false;\n for (int i=0; i<toCount(); i++) \n { \n if(jtModel.getValueAt(i,0).equals(paintId))\n {\n exist = true;\n break;\n }\n else\n {\n }\n } \n if(!exist)\n {\n jtModel.addRow(new Object[]{paintId,name,price,colour,rawMaterial,brand,type,quality,quantity});\n JOptionPane.showMessageDialog(rootPane,\"Paint detail successfully added\");\n toClear();\n }\n else\n {\n JOptionPane.showMessageDialog(rootPane,\"Paint ID should be unique.\");\n }\n \n }\n catch(NumberFormatException ex)\n {\n JOptionPane.showMessageDialog(rootPane, \"Expected Integer but entered other character at price or quantity.\");\n }\n }\n }",
"protected Cell createStringCell(Row r, Object value, int cellNo) {\n\t\tCell c = r.createCell(cellNo);\n\t\tc.setCellType(Cell.CELL_TYPE_STRING);\n\t\tc.setCellValue(StringUtil.checkVal(value));\n\t\treturn c;\n\t}",
"private void addCell( String value ) {\n if ( readCol++ == 0 ) {\n rows.add( new ArrayList( ncol ) );\n }\n ((List) rows.get( rows.size() - 1 )).add( value );\n }",
"public static void createTable(SQLiteDatabase db, boolean ifNotExists) {\n String constraint = ifNotExists? \"IF NOT EXISTS \": \"\";\n db.execSQL(\"CREATE TABLE \" + constraint + \"'CUSTOMER' (\" + //\n \"'_id' INTEGER PRIMARY KEY ,\" + // 0: id\n \"'NAME' TEXT,\" + // 1: name\n \"'LASTNAME' TEXT,\" + // 2: lastname\n \"'FIRSTNAME' TEXT,\" + // 3: firstname\n \"'FIN' TEXT,\" + // 4: fin\n \"'EMAIL' TEXT,\" + // 5: email\n \"'CONTACT_NAME' TEXT,\" + // 6: contact_name\n \"'MOBILE_PHONE' TEXT,\" + // 7: mobile_phone\n \"'PHONE' TEXT,\" + // 8: phone\n \"'ADDRESS1' TEXT,\" + // 9: address1\n \"'ADDRESS2' TEXT,\" + // 10: address2\n \"'ADDRESS3' TEXT,\" + // 11: address3\n \"'LOCATION' TEXT);\"); // 12: location\n }",
"public void AddRow(String Table, String Value)\r\n {\n }",
"public void addCertainRow(String bookname, String ISBN, String author, String description,\n String quantity, String publisher, String category)\n {\n String insertStr;\n try{\n\n insertStr=\"INSERT IGNORE INTO material (bookname, ISBN, author, description, quantity, publisher, category) VALUES(\"\n +quotate(bookname)+\",\"\n +quotate(ISBN)+\",\"\n +quotate(author)+\",\"\n +quotate(publisher)+\",\"\n +quotate(quantity)+\",\"\n +quotate(publisher)+\",\"\n +quotate(category)\n +\")\";\n\n stmt.executeUpdate(insertStr);\n\n } catch(Exception e){\n System.out.println(\"Error occurred in inserting data\");\n }\n return;\n }",
"public void setCellname(String cellname) {\r\n this.cellname = cellname;\r\n }",
"void createWorkSheet() {\n wb = new HSSFWorkbook();\n for (int SheetNumber = 0; SheetNumber < keywords.length - 1; SheetNumber++) {\n sheet[SheetNumber] = wb.createSheet(keywords[SheetNumber]);\n // Create row at index zero ( Top Row)\n HSSFRow row = sheet[SheetNumber].createRow((short) 0);\n String[] headers = {\"Title\", \"Category\", \"Developer\", \"Description\", \"Release Date\", \"currentVersionReleaseDate\", \"Version\", \"Website\", \"Rating Counts\", \"Average User Rating\", \"Average User Rating For Current Version\", \"Market URL\", \"Size\"};\n for (int i = 0; i <= 12; i++) {\n\n HSSFCell cell = row.createCell((short) i);\n cell.setCellType(HSSFCell.CELL_TYPE_STRING);\n cell.setCellValue(headers[i]);\n excelFileCreated = false;\n }\n }\n }",
"private void toEdit() {\n int i=jt.getSelectedRow();\n if(toCount()==0)\n {\n JOptionPane.showMessageDialog(rootPane,\"No data has been added to the details\");\n }\n else if(i==-1)\n {\n JOptionPane.showMessageDialog(rootPane,\"No item has been selected for the update\");\n }\n else\n {\n if(tfPaintId.getText().isEmpty())\n {\n JOptionPane.showMessageDialog(rootPane,\"Please! Enter the Paint ID\");\n }\n else if(tfName.getText().isEmpty())\n {\n JOptionPane.showMessageDialog(rootPane,\"Please! Enter the Product name\");\n }\n else if(rwCombo.getSelectedItem().toString().equals(\"Select\"))\n {\n JOptionPane.showMessageDialog(rootPane,\"Please! Select the raw materials used\");\n }\n else if(bCombo.getSelectedItem().toString().equals(\"Select\"))\n {\n JOptionPane.showMessageDialog(rootPane,\"Please! select the brand you want\");\n }\n else if(tfPrice.getText().isEmpty())\n {\n JOptionPane.showMessageDialog(rootPane,\"Please! Enter the price\");\n }\n else if(tfColor.getText().isEmpty())\n {\n JOptionPane.showMessageDialog(rootPane,\"Please! Enter the colour\");\n }\n else if(typeCombo.getSelectedItem().toString().equals(\"Select\"))\n {\n JOptionPane.showMessageDialog(rootPane,\"Select something from paint type\");\n }\n else if(getQuality()==null) \n {\n JOptionPane.showMessageDialog(rootPane,\"Quality is not selected\");\n }\n else if(tfQuantity.getText().isEmpty())\n {\n JOptionPane.showMessageDialog(rootPane,\"Please! Enter the quantity\");\n }\n else\n {\n try\n {\n jtModel.setValueAt(tfPaintId.getText(),i,0);\n jtModel.setValueAt(tfName.getText(),i,1);\n jtModel.setValueAt(Integer.valueOf(tfPrice.getText()),i,2);\n jtModel.setValueAt(tfColor.getText(),i,3);\n jtModel.setValueAt(rwCombo.getSelectedItem(),i,4);\n jtModel.setValueAt(bCombo.getSelectedItem(),i,5);\n jtModel.setValueAt(typeCombo.getSelectedItem(),i,6);\n jtModel.setValueAt(getQuality(),i,7);\n jtModel.setValueAt(Integer.valueOf(tfQuantity.getText()),i,8);\n JOptionPane.showMessageDialog(rootPane,\"Successfully updated the data in details\");\n toClear();\n }\n catch(Exception ex)\n {\n JOptionPane.showMessageDialog(rootPane,\"Excepted integer but entered another character at price or quantity.\");\n }\n }\n }\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tString a=search_textField1.getText();\n\t\t\t\tString b=search_textField2.getText();\n\t\t\t\t\n\t\t\t\tif(a.equals(\"\"))a=\"any(select lei from goods)\";\n\t\t\t\telse a=\"'\"+a+\"'\";\n\t\t\t\tif(b.equals(\"\"))b=\"any(select name from goods)\";\n\t\t\t\telse b=\"'\"+b+\"'\";\n\t\t\t\t\n\t\t\t\ttable.removeAll();\n\t\t\t\ttableValueV.removeAllElements();\n\t\t\t\ttry {//插入\n\t\t\t\t\t\n\t\t Connection con = DriverManager.getConnection(conURL, Test.mysqlname, Test.mysqlpassword); // 连接数据库\n\n\t\t Statement s = con.createStatement(); // Statement类用来提交SQL语句\n\n\t\t \n\t\t String select=\"select * from goods where lei=\"+a+\" and name =\"+b; \n\t\t ResultSet rs = s.executeQuery(select); // 提交查询,返回的表格保存在rs中\n\t\t \n\t\t while(rs.next()) { // ResultSet指针指向下一个“行”\n\t\t \t\n\t\t \tVector<String> rowV = new Vector<String>();\n\t\t \trowV.add(rs.getString(\"lei\"));\n\t\t \t\t\trowV.add(rs.getString(\"name\"));\n\t\t \t\t\ttableValueV.add(rowV);\n\t\t \t\t\tSystem.out.println(rs.getString(\"lei\"));\n\t\t \t\t\t\n\t\t }\n\t\t tableModel.setDataVector(tableValueV,columnNameV); \n\t \t\t\tint rowCount = table.getRowCount(); \n\t \t\t\ttable.getSelectionModel().setSelectionInterval(rowCount-1 , rowCount- 1 ); \n\t \t\t\tRectangle rect = table.getCellRect(rowCount-1 , 0 , true );\n\t \t\t\ttable.scrollRectToVisible(rect); \n\t\t s.close(); // 释放Statement对象\n\t\t con.close(); // 关闭到MySQL服务器的连接\n\t\t TableColumnModel cm = table.getColumnModel(); \n\t\t \t\tTableColumn column = cm.getColumn(0);//得到第i个列对象 \n\t\t \t\t column.setPreferredWidth(210);//将此列的首选宽度设置为 preferredWidth。\n\t\t \t\t TableColumn column1 = cm.getColumn(1);//得到第i个列对象 \n\t\t \t\t column1.setPreferredWidth(210);//将此列的首选宽度设置为 preferredWidth。\n\t\t \t\t \n\t\t }\n\t\t catch(SQLException sql_e) { // 都是SQLExceptionss\n\t\t System.out.println(sql_e);\n\t\t }\n\t\t\t\t\n\t\t\t}",
"public Cell createCell(Sheet sheet, int c, int r, String cellValue) {\n Row row = sheet.getRow(r);\n if (row == null) {\n row = sheet.createRow(r);\n }\n // Create a cell and put a value in it.\n Cell cell = row.createCell(c);\n cell.setCellValue(cellValue);\n return cell;\n }",
"public void populateTable() {\n DefaultTableModel dtm = (DefaultTableModel)tblSalesPersonCommision.getModel();\n dtm.setRowCount(0);\n // for(OrderList orderlist:salesperson.getOrderlistcatalog().getSalesPersonOrder()){\n // for(Order order:salesperson.getOrderListSalesPerson().getOrderList()){ \n // for(OrderList orderlist:salesperson.getOrderlistcatalog().getOrCatalog()){\n // for(SalesPerson salesperson :business.getEmployeedirectory().getSalesPersonList()){\n \n for(OrderList orderlist:salesperson.getOrderlistcatalog().getOrCatalog()){\n Object [] row = new Object[4];\n // row[0]=.getCustomer().getCustomerId();\n // row[1]= market.getCustomer().getCustomerName();\n row[0]=orderlist;\n row[1]=orderlist.getOrdertotalprice();\n row[2]=orderlist.getSalespersoncomission();\n row[3]=orderlist.getTotalorderlistquantity();\n //3 tcomission = tcomission + orderlist.getSalespersoncomission();\n //3 totalquantity = totalquantity + orderlist.getTotalorderlistquantity();\n //3 totalorderprice = totalorderprice + orderlist.getOrdertotalprice();\n \n // row[0]=order;\n // row[1]=order.getAmountprice();\n \n dtm.addRow(row);\n // }\n // }\n } \n //2 salesperson.getOrderlistcatalog().setTotalquantitypersalesperson(totalquantity);\n //2 salesperson.getOrderlistcatalog().setTotalcommision(tcomission);\n //2 salesperson.getOrderlistcatalog().setTotalorderlistcsatalogprice(totalorderprice);\n}",
"QuoteItem createQuoteItem();",
"public void initTable(){\n if(counter == 0){\n getDataSemua();\n }else if(counter == 1){\n getDataMakan();\n }else if(counter == 2){\n getDataMinum();\n }else if(counter == 3){\n getDataPaket();\n }\n id.setCellValueFactory(new PropertyValueFactory<casher, String>(\"Id\"));\n nama.setCellValueFactory(new PropertyValueFactory<casher, String>(\"Nama\"));\n kategori.setCellValueFactory(new PropertyValueFactory<casher, String>(\"Kategori\"));\n harga.setCellValueFactory(new PropertyValueFactory<casher, Integer>(\"Harga\"));\n status.setCellValueFactory(new PropertyValueFactory<casher, String>(\"Status\"));\n tambah.setCellValueFactory(new PropertyValueFactory<casher,Button>(\"Tambah\"));\n\n table.setItems(list);\n\n }",
"public void prepareTable(){\n\n TableColumn<Student, String> firstNameCol = new TableColumn<>(\"FirstName\");\n firstNameCol.setMinWidth(100);\n firstNameCol.setCellValueFactory(new PropertyValueFactory<>(\"firstname\"));\n\n TableColumn<Student, String> lastNameCol = new TableColumn<>(\"LastName\");\n lastNameCol.setMinWidth(100);\n lastNameCol.setCellValueFactory(new PropertyValueFactory<>(\"lastname\"));\n\n TableColumn<Student, String> formCol = new TableColumn<>(\"Form\");\n formCol.setMinWidth(100);\n formCol.setCellValueFactory(new PropertyValueFactory<>(\"form\"));\n\n TableColumn<Student, String> streamCol = new TableColumn<>(\"Stream\");\n streamCol.setMinWidth(100);\n streamCol.setCellValueFactory(new PropertyValueFactory<>(\"stream\"));\n\n TableColumn<Student, String> dateOfBirthCol = new TableColumn<>(\"Favorite Game\");\n dateOfBirthCol.setMinWidth(100);\n dateOfBirthCol.setCellValueFactory(new PropertyValueFactory<>(\"dateOfBirth\"));\n\n TableColumn<Student, String> genderCol = new TableColumn<>(\"Gender\");\n genderCol.setMinWidth(100);\n genderCol.setCellValueFactory(new PropertyValueFactory<>(\"gender\"));\n\n TableColumn<Student, Integer> ageCol = new TableColumn<>(\"age\");\n ageCol.setMinWidth(100);\n ageCol.setCellValueFactory(new PropertyValueFactory<>(\"age\"));\n\n TableColumn<Student, Integer> admissionCol = new TableColumn<>(\"Admission\");\n admissionCol.setMinWidth(100);\n admissionCol.setCellValueFactory(new PropertyValueFactory<>(\"admission\"));\n\n\n table.getColumns().addAll(admissionCol,firstNameCol,lastNameCol,formCol,streamCol,dateOfBirthCol,genderCol,ageCol);\n table.setItems(dao.selectAll());\n\n }",
"@Override\n public void initialize(URL url, ResourceBundle rb) {\n people.addAll(sp.getAll());\n idP.setCellValueFactory(new PropertyValueFactory<>(\"path_photo\"));\n price1.setCellValueFactory(new PropertyValueFactory<>(\"price\"));\n\n tabble1.setItems(people);\n try {\n ResultSet rs = c.createStatement().executeQuery(\"select path_photo, price from shoppingcart\");\n while(rs.next()){\n data1.add(new ShoppingCart(rs.getString(\"path_photo\"), rs.getDouble(\"price\")));\n \n }\n \n\n// TODO\n } catch (SQLException ex) {\n Logger.getLogger(ShoppingCartController.class.getName()).log(Level.SEVERE, null, ex);\n }\n Item2.setCellValueFactory(new PropertyValueFactory<>(\"path_photo\"));\n Price2.setCellValueFactory(new PropertyValueFactory<>(\"price\"));\n table.setItems(data1);\n }",
"GroupCell createGroupCell();",
"private void addPersonUIRow(String name) {\n TableRow tr = new TableRow(getContext());\n TableRow.LayoutParams trTlp = new TableRow.LayoutParams(\n 0,\n TableLayout.LayoutParams.WRAP_CONTENT\n );\n tr.setLayoutParams(trTlp);\n\n //create name view\n TextView nameView = new TextView(getContext());\n nameView.setText(name);\n nameView.setTextSize(20);\n TableRow.LayoutParams tlp1 = new TableRow.LayoutParams(\n TableLayout.LayoutParams.WRAP_CONTENT,\n TableLayout.LayoutParams.MATCH_PARENT\n );\n tlp1.column=0;\n nameView.setLayoutParams(tlp1);\n\n //TODO: switch add on toggle listener\n Switch sw = new Switch(getContext());\n TableRow.LayoutParams tlp2 = new TableRow.LayoutParams(\n TableLayout.LayoutParams.WRAP_CONTENT,\n TableLayout.LayoutParams.MATCH_PARENT\n );\n tlp2.column=1;\n tlp2.gravity=Gravity.CENTER_HORIZONTAL;\n sw.setTextOff(\"OFF\");\n sw.setTextOn(\"ON\");\n sw.setHeight(20);\n //before listener so that it won't fire off\n if (faceTable.containsKey(name)){\n sw.setChecked(true);\n }\n sw.setOnCheckedChangeListener(this);\n sw.setLayoutParams(tlp2);\n\n //create sub view\n TextView subView = new TextView(getContext());\n subView.setText(\"\");\n subView.setTextSize(20);\n TableRow.LayoutParams tlp3 = new TableRow.LayoutParams(\n TableLayout.LayoutParams.WRAP_CONTENT,\n TableLayout.LayoutParams.MATCH_PARENT\n );\n tlp3.column=2;\n subView.setLayoutParams(tlp3);\n subView.setVisibility(View.INVISIBLE);\n if (faceTable.containsKey(name)){\n subView.setText(faceTable.get(name));\n subView.setVisibility(View.VISIBLE);\n }\n\n //create delete button\n ImageView deleteView = new ImageView(getContext());\n deleteView.setImageResource(R.drawable.ic_delete_black_24dp);\n TableRow.LayoutParams tlp4 = new TableRow.LayoutParams(\n TableLayout.LayoutParams.WRAP_CONTENT,\n TableLayout.LayoutParams.MATCH_PARENT\n );\n tlp4.column=3;\n deleteView.setLayoutParams(tlp4);\n deleteView.setOnClickListener(new ImageView.OnClickListener() {\n @Override\n public void onClick(View v) {\n String toBeRemovedName=null;\n PersonUIRow toBeRemovedRow=null;\n //find the name of the person to be removed\n for (PersonUIRow uiRow: personUIList){\n if (uiRow.deleteView == v){\n toBeRemovedName = (String) uiRow.nameView.getText();\n toBeRemovedRow = uiRow;\n break;\n }\n }\n if (null != toBeRemovedName){\n GabrielConfigurationAsyncTask task =\n new GabrielConfigurationAsyncTask(getActivity(),\n getMyAcitivty().currentServerIp,\n GabrielClientActivity.VIDEO_STREAM_PORT,\n GabrielClientActivity.RESULT_RECEIVING_PORT,\n Const.GABRIEL_CONFIGURATION_REMOVE_PERSON);\n task.execute(toBeRemovedName);\n trainedPeople.remove(toBeRemovedName);\n }\n\n //remove current line\n if (null != toBeRemovedRow){\n personUIList.remove(toBeRemovedRow);\n tb.removeView(toBeRemovedRow.tr);\n } else {\n Log.e(TAG, \"delete icon clicked, but didn't find any row to remove\");\n }\n\n }\n });\n\n tr.addView(nameView);\n tr.addView(sw);\n tr.addView(subView);\n tr.addView(deleteView);\n\n tb.addView(tr,\n new TableLayout.LayoutParams(TableLayout.LayoutParams.MATCH_PARENT,\n TableLayout.LayoutParams.WRAP_CONTENT));\n\n PersonUIRow uiRow = new PersonUIRow(tr,nameView, sw, subView, deleteView);\n personUIList.add(uiRow);\n }",
"public adduser() {\n initComponents();\n this.setTitle(\"Borrow Book\");\n \n try{\n f=new Functions();\n }\n catch(java.io.IOException e){\n JOptionPane.showMessageDialog(this,\"Some text file is missing!\");\n }\n \n \n// TableColumnModel l=jTable1.getColumnModel();\n// l.getColumn(0).setPreferredWidth(1);\n// l.getColumn(1).setPreferredWidth(60);\n// l.getColumn(2).setPreferredWidth(64);\n// l.getColumn(4).setPreferredWidth(70);\n \n }",
"@SuppressWarnings(\"unchecked\")\n \n \n private void table(){\n \n int c;\n \n try{\n \n Connection con1 = ConnectionProvider.getConn();\n Statement stm = con1.createStatement();\n ResultSet rst = stm.executeQuery(\"select * from sales\");\n ResultSetMetaData rstm = rst.getMetaData();\n \n c = rstm.getColumnCount();\n \n DefaultTableModel dtm2 = (DefaultTableModel)jTable1.getModel();\n dtm2.setRowCount(0);\n \n while (rst.next()){\n \n Vector vec = new Vector();\n \n for(int a =1 ; a<=c; a++)\n {\n vec.add(rst.getString(\"CustomerName\"));\n vec.add(rst.getString(\"OrderNo\"));\n vec.add(rst.getString(\"TypeOfService\"));\n vec.add(rst.getString(\"OrderType\"));\n vec.add(rst.getString(\"Descript\"));\n vec.add(rst.getString(\"OrderConfirmation\"));\n vec.add(rst.getString(\"OrderHandledBy\"));\n vec.add(rst.getString(\"OrderDate\"));\n vec.add(rst.getString(\"WarrantyExpireDate\"));\n vec.add(rst.getString(\"FullAmount\"));\n vec.add(rst.getString(\"AmountPaid\"));\n vec.add(rst.getString(\"Balance\"));\n }\n \n dtm2.addRow(vec);\n }\n \n }\n catch(Exception e)\n {\n \n }\n \n \n }",
"void editCell(Coord coord, String string);",
"int addRow(RowData row_data) throws IOException;",
"@Override\r\n\t\t\tpublic TableCell<Products, Boolean> call(TableColumn<Products, Boolean> arg0) {\n\t\t\t\tCheckBoxTableCell<Products, Boolean> cell=new CheckBoxTableCell<Products, Boolean>();\r\n\t\t\t\tcell.setAlignment(Pos.CENTER);\r\n\t\t\t\treturn cell;\r\n\t\t\t}",
"@Override\n public void initialize(URL url, ResourceBundle resourceBundle) {\n\n idColPart.setCellValueFactory(new PropertyValueFactory<>(\"id\"));\n nameColPart.setCellValueFactory(new PropertyValueFactory<>(\"name\"));\n invColPart.setCellValueFactory(new PropertyValueFactory<>(\"stock\"));\n priceColPart.setCellValueFactory(new PropertyValueFactory<>(\"price\"));\n\n idColProduct.setCellValueFactory(new PropertyValueFactory<>(\"id\"));\n nameColProduct.setCellValueFactory(new PropertyValueFactory<>(\"name\"));\n invColProduct.setCellValueFactory(new PropertyValueFactory<>(\"stock\"));\n priceColProduct.setCellValueFactory(new PropertyValueFactory<>(\"price\"));\n\n\n partTableView.setItems(Inventory.getAllParts());\n productTableView.setItems(Inventory.getAllProducts());\n\n\n\n\n\n }",
"private void insertCell(PdfPTable table, String text, int align, int colspan, Font font){\n\t\t PdfPCell cell = new PdfPCell(new Phrase(text.trim(), font));\n\t\t //set the cell alignment\n\t\t cell.setHorizontalAlignment(align);\n\t\t //set the cell column span in case you want to merge two or more cells\n\t\t cell.setColspan(colspan);\n\t\t //in case there is no text and you wan to create an empty row\n\t\t if(text.trim().equalsIgnoreCase(\"\")){\n\t\t cell.setMinimumHeight(10f);\n\t\t }\n\t\t //add the call to the table\n\t\t table.addCell(cell);\t \n\t}",
"private static TextColumnBuilder getColumnByNameField(String nameField){ \n return drColumns.get(nameField);\n }",
"@Test\n public void test(){\n ExcelUtil qa3Sheet = new ExcelUtil(\"src/test/resources/Vytrack testusers.xlsx\", \"QA3-short\");\n // 1 based , not 0 based\n int rowCount = qa3Sheet.rowCount();\n // 1 based, not 0 based\n int colCount = qa3Sheet.columnCount();\n System.out.println(\"rowCount = \" + rowCount);\n System.out.println(\"colCount = \" + colCount);\n\n List<String> columnsNames = qa3Sheet.getColumnsNames();\n System.out.println(\"columnsNames = \" + columnsNames);\n // 0 based, get specific cell value based on index\n String cellData = qa3Sheet.getCellData(2, 3);\n System.out.println(\"cellData = \" + cellData);\n\n // get all table values in a list\n List<Map<String, String>> dataList = qa3Sheet.getDataList();\n\n System.out.println(dataList.get(5).get(\"firstname\"));\n\n String[][] dataArray = qa3Sheet.getDataArray();\n\n System.out.println(dataArray[1][1]);\n\n }",
"public void fillTableFindByName(DefaultTableModel model_search){\n\t\tCashier cashierAllProductsByName = new Cashier();\r\n\t\tproductByLike = new Vector<Product>();\r\n\t\t\r\n\t\t//Remove rows from table\r\n\t\tfor (int i = model_search.getRowCount()-1; i >= 0; --i) {\r\n\t\t\tmodel_search.removeRow(i);\r\n\t\t}\r\n\t\t//Getting all products\r\n\t\tcashierAllProductsByName.getAllProductsByName(productByLike);\r\n\t\tif(productByLike.size() > 0){\r\n\t\t\tfor(int i = 0; i < productByLike.size(); i++){\r\n\t\t\t\tif(productBySearch.size() > 0){\r\n\t\t\t\t\tfor(int j = 0; j < productBySearch.size(); j++){\r\n\t\t\t\t\t\tif(productByLike.get(i).getID() == productBySearch.get(j).getID()){\r\n\t\t\t\t\t\t\tproductByLike.get(i).setQuantity(productBySearch.get(j).getQuantity());\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\t//No match\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\t//Printing it in the outside loop, the value doesn't alter here, values that alter will and will print them outside\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\telse{\r\n\t\t\ttxtpnsearch_2.setText(\"No product was found in inventory.\");\r\n\t\t}\r\n\t\tif(productByLike.size() > 0){\r\n\t\t\tfor(int k = 0; k < productByLike.size(); k++){\r\n\t\t\t\tmodel_search.addRow(new Object[]{k+1,productByLike.get(k).getName(),productByLike.get(k).getDescription(),productByLike.get(k).getQuantity(),productByLike.get(k).getSalePrice(),productByLike.get(k).getNotes()});\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public boolean createTableFromPojo(String schemaName, String table_name, List<Column> column) throws SQLException {\n\n\t\tString query = \"\";\n\t\tStringBuilder sb1 = new StringBuilder();\n\t\tString driver = excelinfoProperties.getProperty(\"drivername\");\n\t\tString connection = \"\";\n\t\tString username = \"\";\n\t\tString password = \"\";\n\t\t/*if (schemaName.equalsIgnoreCase(\"KMA_STAGE\")) {\n\t\t\tSystem.out.println(\"KMA STAGE::\" + schemaName);\n\t\t\tconnection = excelinfoProperties.getProperty(\"kmaconnectionname\");\n\t\t\tusername = excelinfoProperties.getProperty(\"kmaStgusername\");\n\t\t\tpassword = excelinfoProperties.getProperty(\"kmaStgpassword\");\n\t\t}else if(schemaName.equalsIgnoreCase(\"KMA_PROD\")) {\n\t\t\tSystem.out.println(\"KMA PROD::\" + schemaName);\n\t\t\tconnection = excelinfoProperties.getProperty(\"kmaconnectionname\");\n\t\t\tusername = excelinfoProperties.getProperty(\"kmaProdusername\");\n\t\t\tpassword = excelinfoProperties.getProperty(\"kmaProdpassword\");\n\t\t\t\n\t\t}else if(schemaName.equalsIgnoreCase(\"HMA_STAGE\")) {\n\t\t\tSystem.out.println(\"HMA STAGE::\" + schemaName);\n\t\t\tconnection = excelinfoProperties.getProperty(\"hmaconnectionname\");\n\t\t\tusername = excelinfoProperties.getProperty(\"hmaStgusername\");\n\t\t\tpassword = excelinfoProperties.getProperty(\"hmaStgpassword\");\n\t\t\t\n\t\t}else if(schemaName.equalsIgnoreCase(\"HMA_PROD\")) {\n\t\t\tSystem.out.println(\"HMA PROD::\" + schemaName);\n\t\t\tconnection = excelinfoProperties.getProperty(\"hmaconnectionname\");\n\t\t\tusername = excelinfoProperties.getProperty(\"hmaProdusername\");\n\t\t\tpassword = excelinfoProperties.getProperty(\"hmaProdpassword\");\n\t\t\t\n\t\t}else if(schemaName.equalsIgnoreCase(\"HMA_ODS\")) {\n\t\t\tSystem.out.println(\"HMA ODS::\" + schemaName);\n\t\t\tconnection = excelinfoProperties.getProperty(\"dkwhconnectionname\");\n\t\t\tusername = excelinfoProperties.getProperty(\"dkwhusername\");\n\t\t\tpassword = excelinfoProperties.getProperty(\"dkwhpaswd\");\n\t\t\t\n\t\t}else if(schemaName.equalsIgnoreCase(\"HMA_ODS\")) {\n\t\t\tSystem.out.println(\"HMA ODS::\" + schemaName);\n\t\t\tconnection = excelinfoProperties.getProperty(\"dhodsconnectionname\");\n\t\t\tusername = excelinfoProperties.getProperty(\"dhodsusername\");\n\t\t\tpassword = excelinfoProperties.getProperty(\"dhodspassword\");\n\t\t\t\n\t\t}\n\n\t\ttry {\n\t\t\tClass.forName(driver);\n\t\t\tSystem.out.println(\"driver::\" + driver);\n\t\t\t// Class.forName(\"oracle.jdbc.driver.OracleDriver\");\n\t\t} catch (ClassNotFoundException e) {\n\t\t\tSystem.out.println(\"driver::in exception clause\" + driver);\n\t\t\tlogger.error(e.getMessage());\n\t\t}\n\t\tboolean tableCreationSuccessful = true;\n\t\t// Connection\n\t\tConnection con = DriverManager.getConnection(connection, username, password);\n\t\tSystem.out.println(\"con::\" + con);\n\t\tcon.setAutoCommit(false);\n\t\tStatement stmt = con.createStatement();\n\t\tDatabaseMetaData dbm = con.getMetaData();\n\t\tResultSet rs = dbm.getTables(null, schemaName, table_name, null);\n\t\tif (rs.next()) {\n\t\t\tString sb = \"Table \" + schemaName + \".\" + table_name + \" already exists..\";\n\t\t\tlist.add(sb);\n\t\t\tlogger.info(sb);\n\n\t\t} else {\n\t\t\t*/\n\t\ttry\n\t\t{\n\t \t\n\t\t\tClass.forName(\"oracle.jdbc.driver.OracleDriver\");\n\t\t} catch (ClassNotFoundException e) {\n\n\t\t\tlogger.error(e.getMessage());\n\t\t} \n\t\tboolean tableCreationSuccessful = true;\n\t\t//Connection con=DriverManager.getConnection(connection,username,password);\n\t\tConnection con=DriverManager.getConnection(\"jdbc:oracle:thin:@hmaipcvadb-scan:1521/dhods\",\"HIS60040\",\"SRaina5*\");\n\t\tcon.setAutoCommit(false);\n\t\tStatement stmt=con.createStatement(); \n\t\t\n\t\tDatabaseMetaData dbm = con.getMetaData();\n\t ResultSet rs = dbm.getTables(null, null, table_name , null);\n\t if (rs.next()) {\n\t \tString sb = \"Table \" + table_name + \" already exists..\";\n\t\t\tlist.add(sb);\n\t logger.info(\"Table already exists..\"); \n\t \n\t } else {\n\t \ttry {\n\t\t\t\t sb1.append(\"create table \"+table_name+\"(\");\n\t \t\t\tIterator<Column> itr = column.iterator();\n\t \t\t\t while(itr.hasNext()) {\n\t\t\t\t/*sb1.append(\"create table \" + schemaName + \".\" + table_name + \"(\");\n\t\t\t\tIterator<Column> itr = column.iterator();\n\t\t\t\twhile (itr.hasNext()) {*/\n\n\t\t\t\t\tColumn element = (Column) itr.next();\n\t\t\t\t\tif (element.getDataType().equals(\"NUMERIC\") || element.getDataType().equals(\"DATE\")) {\n\t\t\t\t\t\tsb1.append(element.getColumnName() + \" \" + element.getDataType() + \" \" + \" \" + \",\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsb1.append(element.getColumnName() + \" \" + element.getDataType() + \" \" + \"(\"\n\t\t\t\t\t\t\t\t+ (int) element.getLength() + \")\" + \",\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tsb1.append(\")\");\n\n\t\t\t\tif (sb1.length() > 0) {\n\t\t\t\t\tsb1.deleteCharAt(sb1.lastIndexOf(\",\"));\n\t\t\t\t}\n\t\t\t\tquery = sb1.toString();\n\t\t\t\tlogger.info(\"sb1 formed ..\" + sb1);\n\t\t\t\tlist.add(query);\n\t\t\t\t// writer.println(query);\n\t\t\t\tstmt.execute(query);\n\t\t\t\tcon.commit();\n\n\t\t\t} catch (Exception e) {\n\t\t\t\tlogger.info(\"inside rollback function..\" + e.getMessage());\n\t\t\t\tlogger.error(e.getStackTrace());\n\t\t\t\tcon.rollback();\n\t\t\t\t// writer.close();\n\t\t\t\ttableCreationSuccessful = false;\n\n\t\t\t}\n\t\t}\n\t\treturn tableCreationSuccessful;\n\t}",
"public void addHeaders(){\n Typeface mtypeFace = Typeface.createFromAsset(getAssets(),\n \"fonts/Lato-Regular.ttf\");\n /** Create a TableRow dynamically **/\n\n tr = new TableRow(this);\n\n tr.setLayoutParams(new LayoutParams(\n\n LayoutParams.FILL_PARENT,\n\n LayoutParams.WRAP_CONTENT));\n\n /** Creating a TextView to add to the row **/\n TextView valueTV = new TextView(this);\n\n valueTV.setText(\"BK RefID\");\n\n valueTV.setTextColor(Color.WHITE);\n\n valueTV.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT));\n\n valueTV.setPadding(25, 30, 20, 30);\n\n valueTV.setTypeface(mtypeFace);\n\n tr.addView(valueTV);\n valueTV = new TextView(this);\n\n valueTV.setText(\"Status\");\n\n valueTV.setTextColor(Color.WHITE);\n\n valueTV.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT));\n\n valueTV.setPadding(30, 30, 20, 30);\n\n valueTV.setTypeface(mtypeFace);\n\n tr.addView(valueTV); // Adding textView to tablerow.\n valueTV = new TextView(this);\n\n valueTV.setText(\"Source\");\n\n valueTV.setTextColor(Color.WHITE);\n\n valueTV.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT));\n\n valueTV.setPadding(30, 30, 20, 30);\n\n valueTV.setTypeface(mtypeFace);\n\n tr.addView(valueTV);\n TextView companyTV = new TextView(this);\n\n companyTV.setText(\"Booking Type\");\n\n companyTV.setTextColor(Color.WHITE);\n\n companyTV.setTypeface(mtypeFace);\n\n companyTV.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT));\n\n companyTV.setPadding(50, 10, 5, 10);\n\n tr.addView(companyTV);\n companyTV = new TextView(this);\n companyTV.setText(\"Date\");\n\n companyTV.setTextColor(Color.WHITE);\n\n companyTV.setTypeface(mtypeFace);\n\n companyTV.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT));\n\n companyTV.setPadding(50, 10, 5, 10);\n\n tr.addView(companyTV); // Adding textView to tablerow.\n\n /** Creating another textview **/\n\n // Adding textView to tablerow.\n\n valueTV = new TextView(this);\n\n\n valueTV.setText(\"PNR\");\n\n valueTV.setTextColor(Color.WHITE);\n\n valueTV.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT));\n\n valueTV.setPadding(30, 30, 20, 30);\n\n valueTV.setTypeface(mtypeFace);\n\n tr.addView(valueTV); // Adding textView to tablerow.\n\n valueTV = new TextView(this);\n\n\n valueTV.setText(\"Name\");\n\n valueTV.setTextColor(Color.WHITE);\n\n valueTV.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT));\n\n valueTV.setPadding(30, 30, 20, 30);\n\n valueTV.setTypeface(mtypeFace);\n\n tr.addView(valueTV); // Adding textView to tablerow.\n\n\n valueTV = new TextView(this);\n\n\n valueTV.setText(\"Airline\");\n\n valueTV.setTextColor(Color.WHITE);\n\n valueTV.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT));\n\n valueTV.setPadding(30, 30, 20, 30);\n\n valueTV.setTypeface(mtypeFace);\n\n tr.addView(valueTV); // Adding textView to tablerow.\n\n valueTV = new TextView(this);\n\n valueTV.setText(\"From\");\n\n valueTV.setTextColor(Color.WHITE);\n\n valueTV.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT));\n\n valueTV.setPadding(30, 30, 20, 30);\n\n valueTV.setTypeface(mtypeFace);\n\n tr.addView(valueTV); // Adding textView to tablerow.\n\n valueTV = new TextView(this);\n\n valueTV.setText(\"To\");\n\n valueTV.setTextColor(Color.WHITE);\n\n valueTV.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT));\n\n valueTV.setPadding(30, 30, 20, 30);\n\n valueTV.setTypeface(mtypeFace);\n\n tr.addView(valueTV); // Adding textView to tablerow.\n\n valueTV = new TextView(this);\n\n valueTV.setText(\"Class\");\n\n valueTV.setTextColor(Color.WHITE);\n\n valueTV.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT));\n\n valueTV.setPadding(30, 30, 20, 30);\n\n valueTV.setTypeface(mtypeFace);\n\n tr.addView(valueTV); // Adding textView to tablerow.\n\n valueTV = new TextView(this);\n\n valueTV.setText(\"TripType\");\n\n valueTV.setTextColor(Color.WHITE);\n\n valueTV.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT));\n\n valueTV.setPadding(30, 30, 20, 30);\n\n valueTV.setTypeface(mtypeFace);\n\n tr.addView(valueTV); // Adding textView to tablerow.\n\n valueTV = new TextView(this);\n\n valueTV.setText(\"TotalPax\");\n\n valueTV.setTextColor(Color.WHITE);\n\n valueTV.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT));\n\n valueTV.setPadding(30, 30, 20, 30);\n\n valueTV.setTypeface(mtypeFace);\n\n tr.addView(valueTV); // Adding textView to tablerow.\n\n valueTV = new TextView(this);\n\n valueTV.setText(\"TotalFare\");\n\n valueTV.setTextColor(Color.WHITE);\n\n valueTV.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT));\n\n valueTV.setPadding(30, 30, 20, 30);\n\n valueTV.setTypeface(mtypeFace);\n\n tr.addView(valueTV); // Adding textView to tablerow.\n\n // Adding\n\n\n tr.setBackgroundResource(R.color.gradient);\n\n // Add the TableRow to the TableLayout\n\n tl.addView(tr, new TableLayout.LayoutParams(\n\n LayoutParams.FILL_PARENT,\n\n LayoutParams.WRAP_CONTENT));\n\n\n // we are adding two textviews for the divider because we have two columns\n\n tr = new TableRow(this);\n\n tr.setLayoutParams(new LayoutParams(\n\n LayoutParams.FILL_PARENT,\n\n LayoutParams.WRAP_CONTENT));\n\n /** Creating another textview **/\n/*\n TextView divider = new TextView(this);\n\n divider.setText(\"______________________________________________________________________________________________________________\");\n\n divider.setTextColor(Color.parseColor(\"#ffffff\"));\n\n divider.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT));\n\n divider.setPadding(5, 0, 0, 0);\n\n divider.setTypeface(Typeface.DEFAULT, Typeface.BOLD);\n\n tr.addView(divider);*/ // Adding textView to tablerow.\n\n /* TextView divider2 = new TextView(this);\n\n divider2.setText(\"-------------------------\");\n\n divider2.setTextColor(Color.GREEN);\n\n divider2.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT));\n\n divider2.setPadding(5, 0, 0, 0);\n\n divider2.setTypeface(Typeface.DEFAULT, Typeface.BOLD);\n\n tr.addView(divider2);*/ // Adding textView to tablerow.\n\n // Add the TableRow to the TableLayout\n\n tl.addView(tr, new TableLayout.LayoutParams(\n\n LayoutParams.FILL_PARENT,\n\n LayoutParams.WRAP_CONTENT));\n\n }",
"public void createColumn(String columnName){\n addColumnBtn.click();\n wait.until(ExpectedConditions.visibilityOf(columnNameLbl));\n columnNameLbl.click();\n columnNameInput.sendKeys(columnName);\n columnNameInput.sendKeys(Keys.ENTER);\n }",
"private void fillQ() {\n for (int i = 0; i < 10; i++) {\n for (int j = 0; j < 10; j++) {\n Cell cell = new Cell(i, j);\n addToQ(cell, true);\n }\n }\n }",
"public void createTablePhrase(String item2) {\r\n\t\ttry {\r\n\t\t\tstatementP = SqlCon.getConnection().prepareStatement(SqlCon.PHRASE_INDEX);\r\n\t\t\tstatementP.setString(1, item2);\r\n\t\t\trs = statementP.executeQuery();\r\n\t\t\tObject[] rows;\r\n\t\t\t// for each row returned\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\t// add the values to the temporary row\r\n\t\t\t\trows = new Object[] { rs.getString(1), rs.getInt(2), rs.getInt(3)};\r\n\t\t\t\t// add the temp row to the table\r\n\t\t\t\tmTableModel.addRow(rows);\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jTextField2 = new javax.swing.JTextField();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTable1 = new javax.swing.JTable();\n jScrollPane2 = new javax.swing.JScrollPane();\n jTable2 = new javax.swing.JTable();\n jComboBox1 = new javax.swing.JComboBox();\n jScrollPane3 = new javax.swing.JScrollPane();\n jTable3 = new javax.swing.JTable();\n jScrollPane4 = new javax.swing.JScrollPane();\n jTable4 = new javax.swing.JTable();\n jComboBox2 = new javax.swing.JComboBox();\n jScrollPane5 = new javax.swing.JScrollPane();\n jTable5 = new javax.swing.JTable();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jButton1.setText(\"New Sale\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jButton2.setText(\"Add itme\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n jLabel1.setText(\"Item ID\");\n\n jLabel2.setText(\"Quantity\");\n\n jTextField2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField2ActionPerformed(evt);\n }\n });\n\n jTable1.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"SL#\", \"Item Name\", \"Unit Price\", \"Qunatity\", \"Sub Total\"\n }\n ));\n jScrollPane1.setViewportView(jTable1);\n\n jTable2.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"Total\", \"\"\n }\n ) {\n Class[] types = new Class [] {\n java.lang.String.class, java.lang.Integer.class\n };\n\n public Class getColumnClass(int columnIndex) {\n return types [columnIndex];\n }\n });\n jScrollPane2.setViewportView(jTable2);\n\n jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\" }));\n jComboBox1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jComboBox1ActionPerformed(evt);\n }\n });\n\n jTable3.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"VAT\", \"\"\n }\n ) {\n Class[] types = new Class [] {\n java.lang.String.class, java.lang.Integer.class\n };\n\n public Class getColumnClass(int columnIndex) {\n return types [columnIndex];\n }\n });\n jScrollPane3.setViewportView(jTable3);\n\n jTable4.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"Grand Total\", \"\"\n }\n ) {\n Class[] types = new Class [] {\n java.lang.String.class, java.lang.Integer.class\n };\n\n public Class getColumnClass(int columnIndex) {\n return types [columnIndex];\n }\n });\n jScrollPane4.setViewportView(jTable4);\n\n jComboBox2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Select\", \"Senior\", \"Junior\" }));\n\n jTable5.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"Discount\", \"\"\n }\n ) {\n Class[] types = new Class [] {\n java.lang.String.class, java.lang.Integer.class\n };\n\n public Class getColumnClass(int columnIndex) {\n return types [columnIndex];\n }\n });\n jScrollPane5.setViewportView(jTable5);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(99, 99, 99)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 184, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 184, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 184, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 184, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jComboBox2, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2))\n .addGap(67, 67, 67)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jTextField2)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)))))\n .addContainerGap(1350, Short.MAX_VALUE))\n );\n\n layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jButton1, jButton2});\n\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(52, 52, 52)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jLabel2)\n .addGap(18, 18, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jComboBox2, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(18, 18, 18)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 222, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 11, Short.MAX_VALUE)\n .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE))\n );\n\n layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {jComboBox1, jLabel1, jLabel2, jTextField2});\n\n layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {jButton1, jButton2});\n\n pack();\n }",
"void addUser(String user){\n usersModel.addRow(new String[]{user});\n }",
"protected void addObject(String item) {\n\t\tString p = null;\n\t\tif (tripleTable.getText(row - 1, 2).isEmpty())\n\t\t\trow--;\n\n\t\tif (tripleTable.getText(row, 1).isEmpty()) {\n\t\t\ttripleTable.setText(row, 2, item);\n\t\t} else {\n\t\t\tp = tripleTable.getText(row, 1);\n\t\t\tp = p.substring(p.indexOf('#') + 1, p.length());\n\t\t\tif (ontology.get(ontologies.getSelectedIndex()).getProperties().contains(p) || p.equals(\"RDF.type\")) {\n\t\t\t\ttripleTable.setText(row, 2, item);\n\t\t\t} else {\n\t\t\t\tif (item.startsWith(\"http://\")) {\n\t\t\t\t\tWindow.alert(\"Must enter a literal value\");\n\t\t\t\t} else {\n\t\t\t\t\ttripleTable.setText(row, 2, item);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void createOrderInDB() {\n if (newCustomer.isSelected()) {\n\n if(customerPhone.getText().isEmpty() ) {\n customerPhone.setStyle(\"-fx-focus-color: RED\");\n customerPhone.requestFocus();\n } else if(customerName.getText().isEmpty()) {\n customerName.setStyle(\"-fx-focus-color: RED\");\n customerName.requestFocus();\n } else {\n ControllerPartner controller = new ControllerPartner();\n controller.createOrderNewCustomer(customerPhone.getText(), customerName.getText(), totalPrice.getText());\n Label successMessage = new Label(\"Order is created, an sms with invoice is sent to the customer\");\n successMessage.setLayoutX(305);\n successMessage.setLayoutY(800);\n successMessage.setTextFill(Color.CORAL);\n root.getChildren().add(successMessage);\n content();\n\n customerName.clear();\n customerPhone.clear();\n\n }\n\n\n\n\n } else if (existingCustomer.isSelected()) {\n }\n }",
"Col createCol();",
"public void addNewIDtoCells() {\n\t\t//Get iterator to all the rows in current sheet\n\t\tIterator<Row> rowIteratorA = cells.iterator();\n\t\t\n\t\trowIteratorA.next();//Ignore the column names. We actually know it.\n\t\tRow row = null;\n\t\tint previousValue = -1;\n\t\tdouble key = -1;\n\t\t//For each row we will read the info. 12\n\t\twhile(rowIteratorA.hasNext()){\n\t\t\trow = rowIteratorA.next();\n\t\t\tdouble currentValue = Math.round(row.getCell(CELLQUERY).getNumericCellValue()*100)/100;\n\t\t\t//System.out.println(i++);\n\t\t\tif(currentValue!=previousValue){\n\t\t\t\tif(table.containsKey(currentValue))\n\t\t\t\t\tkey=table.get(currentValue);\n\t\t\t\telse\n\t\t\t\t\tkey=-1;\n\t\t\t}\n\t\t\trow.createCell(CELLKEY);\n\t\t\trow.getCell(CELLKEY).setCellValue(key);\n\t\t\tif(key==-1){\n\t\t\t\tSystem.err.println(\"Error: Value \"+currentValue+\" was not found in the matching table\");\n\t\t\t}\n\t\t}\n\t\tFileOutputStream dataFileOut;\n\t\ttry {\n\t\t\tdataFileOut = new FileOutputStream(\n\t\t\t\t\tcellsFile.getAbsolutePath().replace(\".xlsx\", \"out.xlsx\"));\n\t\t\t//System.out.println(dataFileOut+\" \"+cellsWorkbook);\n\t\t\t\n\t\t\tcellsWorkbook.write(dataFileOut);\n\t\t\tdataFileOut.flush();\n\t\t\tdataFileOut.close();\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}",
"@Override\n public void writeCell(String name, Object value, int depth) throws IOException {\n this.write(this.getNewline()+this.makeTabs(depth)+\"<\"+name+\">\");\n if (value != null) {\n this.write(Val.escapeXml(value.toString()));\n }\n this.write(\"</\"+name+\">\");\n }",
"private void insertCell(PdfPTable table, String text, int align, int colspan, Font font) {\n PdfPCell cell = new PdfPCell(new Phrase(text.trim(), font));\r\n //set the cell alignment\r\n cell.setHorizontalAlignment(align);\r\n //set the cell column span in case you want to merge two or more cells\r\n cell.setColspan(colspan);\r\n //in case there is no text and you wan to create an empty row\r\n if (text.trim().equalsIgnoreCase(\"\")) {\r\n cell.setMinimumHeight(10f);\r\n }\r\n //add the call to the table\r\n table.addCell(cell);\r\n\r\n }",
"public void tcg()\n \t{\n \t\ttry\n \t\t{\n \t\t\t//Keeps track of the rows within the sheet as data is being written\n \t\t\tint rowNum;\n \t\t\t\n \t\t\t//Creates a excel file for the information to be stored\n \t\t\tHSSFWorkbook standard = new HSSFWorkbook();\n \t\t\tHSSFSheet setname;\n \t\t\tRow newRow;\n \t\t\t\n \t\t\t//Various values to screen the data\n \t\t\tString clean;\n \t\t\tdouble highprice = 0;\n \t\t\tdouble mediumPrice = 0;\n \t\t\tdouble lowPrice = 0;\n \t\t\tString temp;\n \t\t\t//Variables to take in information\n \t\t\tDocument page;\n \t\t\tElement table;\n \t\t\tElements row;\n \t\t\tElements item;\n \t\t\t\n \t\t\t//Variables for extra information about the set\n \t\t\tdouble averageHighPrice = 0;\n \t\t\tdouble averageMediumPrice = 0;\n \t\t\tdouble averageLowPrice = 0;\n \t\t\t\n \t\t\tDecimalFormat format = new DecimalFormat(\"#.00\");\n \t\t\t\n \t\t\t\n \t\t\t/*\n \t\t\t * Grabs the modified set values to then be used for the website url format\n \t\t\t * Not the most effecient for loop but will be modified as time goes on.\n \t\t\t */\n \t\t\tfor(int limit=0; limit<pointer; limit++)\n \t\t\t{\n \t\t\t\trowNum=0;\n \t\t\t\t\n \t\t\t\tSystem.out.println(\"\\nSet name: \"+Names[limit]+\"\\n\");\n \t\t\t\t\n \t\t\t\t//Creates a new sheet per set after it filters out bad characters\n \t\t\t\tif(Names[limit].contains(\":\"))\n \t\t\t\t{\t\n \t\t\t\t\tNames[limit]=Names[limit].replaceAll(\":\", \"\\\\W\");\n \t\t\t\t}\n \t\t\t\telse if(Names[limit].contains(\"/\"))\n \t\t\t\t{\n \t\t\t\t\tNames[limit]=Names[limit].replaceAll(\"/\", \"\\\\W\");\n \t\t\t\t}\n \t\t\t\tsetname=standard.createSheet(Names[limit]);\n \t\t\t\t\n \t\t\t\t//Sets up the initial row in the sheet\n \t\t\t\tnewRow = setname.createRow(0);\n \t\t\t\tnewRow.createCell(0).setCellValue(\"Card Name\");\n \t\t\t\tnewRow.createCell(1).setCellValue(\"High Price\");\n \t\t\t\tnewRow.createCell(2).setCellValue(\"Medium Price\");\n \t\t\t\tnewRow.createCell(3).setCellValue(\"Low Price\");\n \t\t\t\t\n \t\t\t\t/*Each modified string value is then put in the following url to then parse\n \t\t\t\t the information from it. */\n \t\t\t\t\n \t\t\t\tpage = Jsoup.connect(\"http://magic.tcgplayer.com/db/price_guide.asp?setname=\"+Sets[limit]).get();\n \t\t\t\ttable = page.select(\"table\").get(2);\n \t\t\t\trow=table.select(\"tr\");\n \t\t\t\t\n \t\t\t\t\n \t\t\t\t//Grabs each card that was selected\n \t\t\t\tfor(Element tableRow: row)\n \t\t\t\t{\n \t\t\t\t\t//Gets the first row \n \t\t\t\t\titem=tableRow.select(\"td\");\n \t\t\t\t\tclean=item.get(0).text();\n \t\t\t\t\t\n \t\t\t\t\t//Filters out land cards\n \t\t\t\t\tif(!clean.contains(\"Forest\")&&!clean.contains(\"Mountain\")&&!clean.contains(\"Swamp\")&&!clean.contains(\"Island\")&&!clean.contains(\"Plains\")&&!clean.isEmpty())\n \t\t\t\t\t{\n\t\t\t\t\t\tif(item.get(5).text().length()>2&&item.get(6).text().length()>2&&item.get(6).text().length()>2)\n \t\t\t\t\t\t{\n \t\t\t\t\t\t\t//Creates new row in the sheet\n \t\t\t\t\t\t\tnewRow = setname.createRow(rowNum+1);\n \t\t\t\t\t\t\t\n \t\t\t\t\t\t\t//Gets the name of the card\n \t\t\t\t\t\t\tclean=clean.substring(1);\n \t\t\t\t\t\t\tnewRow.createCell(0).setCellValue(clean);\n \t\t\t\t\t\t\t\n \t\t\t\t\t\t\t//This gets the high price\n \t\t\t\t\t\t\ttemp=item.get(5).text();\n \t\t\t\t\t\t\thighprice=removeCommas(temp.substring(1,temp.length()-2));\n \t\t\t\t\t\t\tnewRow.createCell(1).setCellValue(highprice);\n \t\t\t\t\t\t\taverageHighPrice += highprice;\n \t\t\t\t\t\t\t\n \t\t\t\t\t\t\t//This gets the medium price\n \t\t\t\t\t\t\ttemp=item.get(6).text();\n \t\t\t\t\t\t\tmediumPrice=removeCommas(temp.substring(1,temp.length()-2));\n \t\t\t\t\t\t\tnewRow.createCell(2).setCellValue(mediumPrice);\n \t\t\t\t\t\t\taverageMediumPrice +=mediumPrice;\n \t\t\t\t\t\t\t\n \t\t\t\t\t\t\t//This gets the low price\n \t\t\t\t\t\t\ttemp = item.get(7).text();\n \t\t\t\t\t\t\tlowPrice = removeCommas(temp.substring(1,temp.length()-2));\n \t\t\t\t\t\t\tnewRow.createCell(3).setCellValue(lowPrice);\n \t\t\t\t\t\t\taverageLowPrice += lowPrice;\n \t\t\t\t\t\t\t\n \t\t\t\t\t\t\tSystem.out.println(clean+\" H:$\"+highprice+\" M:$\"+mediumPrice+\" L:$\"+lowPrice);\n \t\t\t\t\t\t\trowNum++;\n \t\t\t\t\t\t\t\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t\n \t\t\t\tif(Double.isNaN(averageHighPrice)&&Double.isNaN(averageMediumPrice)&&Double.isNaN(averageLowPrice))\n \t\t\t\t{\n \t\t\t\t\t//Finds the averages\n \t\t\t\t\taverageHighPrice /= rowNum;\n \t\t\t\t\taverageMediumPrice /= rowNum;\n \t\t\t\t\taverageLowPrice /= rowNum;\n \t\t\t\t\t\n \t\t\t\t\t//Formats them\n \t\t\t\t\taverageHighPrice = Double.parseDouble(format.format(averageHighPrice));\n \t\t\t\t\taverageMediumPrice = Double.parseDouble(format.format(averageMediumPrice));\n \t\t\t\t\taverageLowPrice = Double.parseDouble(format.format(averageLowPrice));\n \t\t\t\t\t\n \t\t\t\t\t//Inserts the values into the table\n \t\t\t\t\tnewRow = setname.getRow(0); \n \t\t\t\t\t\n \t\t\t\t\tnewRow.createCell(4).setCellValue(\"Average High Price\");\n \t\t\t\t\tnewRow.createCell(5).setCellValue(\"Average Medium Price\");\n \t\t\t\t\tnewRow.createCell(6).setCellValue(\"Average Low Price\");\n \t\t\t\t\t\n \t\t\t\t\tnewRow = setname.getRow(1);\n \t\t\t\t\tnewRow.createCell(4).setCellValue(averageHighPrice);\n \t\t\t\t\tnewRow.createCell(5).setCellValue(averageMediumPrice);\n \t\t\t\t\tnewRow.createCell(6).setCellValue(averageLowPrice);\n \t\t\t\t\t\n \t\t\t\t\tSystem.out.println(\"Average Prices \"+averageHighPrice+\" \"+averageMediumPrice+\" \"+averageLowPrice);\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t//Zeroes them out\n \t\t\t\taverageHighPrice = averageMediumPrice = averageLowPrice = 0;\n \t\t\t\t\n \t\t\t\t//Sets the sheet to auto size columns\n \t\t\t\tsetname.autoSizeColumn(0);\n \t\t\t\tsetname.autoSizeColumn(1);\n \t\t\t\tsetname.autoSizeColumn(2);\n \t\t\t\tsetname.autoSizeColumn(3);\n \t\t\t\tsetname.autoSizeColumn(4);\n \t\t\t\tsetname.autoSizeColumn(5);\n \t\t\t\tsetname.autoSizeColumn(6);\n \n \t\t\t}\n \t\t\t\n \t\t\t//Creates the date to be added in the output file name. \n \t\t\tDateFormat dateFormat = new SimpleDateFormat(\"MM-dd-yyyy\");\n \t\t Date date = new Date();\n \t\t \n \t\t\tif(this.selection == 0)\n \t\t\t{\n \t\t\t\tFile standardFile = new File(\"Standard-\"+dateFormat.format(date)+\"-.xls\");\n \t\t\t\tFileOutputStream standardOutput = new FileOutputStream(standardFile);\n \t\t\t\tstandard.write(standardOutput);\n \t\t\t\tstandardOutput.close();\n \t\t\t}\n \t\t\telse if(this.selection == 1)\n \t\t\t{\n \t\t\t\tFile standardFile = new File(\"Extended-\"+dateFormat.format(date)+\"-.xls\");\n \t\t\t\tFileOutputStream standardOutput = new FileOutputStream(standardFile);\n \t\t\t\tstandard.write(standardOutput);\n \t\t\t\tstandardOutput.close();\n \t\t\t}\n \t\t\telse if(this.selection == 2)\n \t\t\t{\n \t\t\t\tFile standardFile = new File(\"Modern-\"+dateFormat.format(date)+\"-.xls\");\n \t\t\t\tFileOutputStream standardOutput = new FileOutputStream(standardFile);\n \t\t\t\tstandard.write(standardOutput);\n \t\t\t\tstandardOutput.close();\n \t\t\t}\n \t\t\telse\n \t\t\t{\n \t\t\t\tFile standardFile = new File(\"All-\"+dateFormat.format(date)+\"-.xls\");\n \t\t\t\tFileOutputStream standardOutput = new FileOutputStream(standardFile);\n \t\t\t\tstandard.write(standardOutput);\n \t\t\t\tstandardOutput.close();\n \t\t\t}\n \t\t\t\n \t\t}\n \t\n \t\tcatch(Exception e)\n \t\t{\n \t\t\te.printStackTrace();\n \t\t\tif(e.toString().contains(\"Status=400\"))\n \t\t\t{\n \t\t\t\tSystem.out.println(\"That webpage does not exist!\");\n \t\t\t}\n \t\t\telse if(e.toString().contains(\"SocketTimeout\"))\n \t\t\t{\n \t\t\t\tSystem.out.println(\"Your connection timed out\");\n \t\t\t}\n \t\t} \n \t\t\n \t}",
"private void createRowForNewColumnButton(Composite section2)\n {\n buttonNewColumn = toolkit.createButton(section, \"New Column...\", SWT.PUSH); //$NON-NLS-1$\n buttonGridData(buttonNewColumn, SWT.TOP);\n buttonNewColumn.addSelectionListener(new SelectionListener()\n {\n public void widgetDefaultSelected(SelectionEvent e)\n {\n }\n\n public void widgetSelected(SelectionEvent e)\n {\n NewColumnPopup dialog = new NewColumnPopup(getShell());\n if (dialog.open() == Dialog.OK)\n {\n // if the first field is not set\n if (valueToRecognizeReq == null)\n {\n valueToRecognizeReq = new Column(dialog.getColumnInput(), dialog.getRegexInput());\n reqIdComponent.setValueText(valueToRecognizeReq.getText());\n }\n else\n {\n tree.add(new Column(dialog.getColumnInput(), dialog.getRegexInput()));\n listFormat.refresh();\n }\n controller.removeDocumentType();\n updateWizard();\n }\n }\n });\n\n }",
"public void createInputRow() throws IOException {\n\t\tStringBuilder fileData = new StringBuilder();\n\t\tfileData.append(\"package dbmsProject;\\n\");\n\t\tfileData.append(\"public class InputRow{\\n\");\n\t\tArrayList<String> list = new ArrayList<String>( Arrays.asList(new String[]{\"cust\", \"prod\", \"day\", \"month\", \"year\", \"state\", \"quant\"}));\n\t\tfor(int i=0;i<list.size();i++ ) {\n\t\t\tString select = list.get(i);\n\t\t\tboolean found=false;\n\t\t\tfor(String str: payload.getselect_variables()) {\n\t\t\t\tif(str.contains(select)) {\n\t\t\t\t\tprojectionVars.add(select);\n\t\t\t\t\tfileData=createrSetterGetter(fileData, helper.columnMapping.get(select), select);\n\t\t\t\t\tfound=true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(found) continue;\n\t\t\tfor(String str: payload.getgrouping_attributes()) {\n\t\t\t\tif(str.contains(select)) {\n\t\t\t\t\tprojectionVars.add(select);\n\t\t\t\t\tfileData=createrSetterGetter(fileData, helper.columnMapping.get(select), select);\n\t\t\t\t\tfound=true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(found) continue;\n\t\t\tfor(String str: payload.getaggregate_functions()) {\n\t\t\t\tif(str.contains(select)) {\n\t\t\t\t\tprojectionVars.add(select);\n\t\t\t\t\tfileData=createrSetterGetter(fileData, helper.columnMapping.get(select), select);\n\t\t\t\t\tfound=true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(found) continue;\n\t\t\tfor(String str: payload.getsuch_that_predicates()) {\n\t\t\t\tif(str.contains(select)) {\n\t\t\t\t\tprojectionVars.add(select);\n\t\t\t\t\tfileData=createrSetterGetter(fileData, helper.columnMapping.get(select), select);\n\t\t\t\t\tfound=true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(found) continue;\n\t\t\tif(payload.isHavingClause() && payload.getHavingClause().contains(select)) {\n\t\t\t\tprojectionVars.add(select);\n\t\t\t\tfileData=createrSetterGetter(fileData, helper.columnMapping.get(select), select);\n\t\t\t\tfound=true;\n\t\t\t}\n\t\t\tif(found) continue;\n\t\t\tif(payload.getIsWhereClause() && payload.getWhereClause().contains(select)) {\n\t\t\t\tprojectionVars.add(select);\n\t\t\t\tfileData=createrSetterGetter(fileData, helper.columnMapping.get(select), select);\n\t\t\t}\n\t\t}\n\t\t\n\t\tfileData.append(\"}\\n\");\n\t\tFileOutputStream fos = new FileOutputStream(\"src/dbmsProject/InputRow.java\");\n\t\tfos.write(fileData.toString().getBytes());\n\t\tfos.flush();\n\t\tfos.close();\n\t}",
"private HashMap getTableRow(int rowNum)\r\n {\r\n HashMap hashRow = new HashMap() ;\r\n int colTotal = codeTableModel.getColumnCount()-1;\r\n for (int colCount=0; colCount <= codeTableModel.getColumnCount()-1; colCount++)\r\n { // for each column u will build a hashmap\r\n// if (colCount == 1 )\r\n// {//sponsor name is not in update sp.\r\n// continue;\r\n// }\r\n TableColumn column = codeTableColumnModel.getColumn(colCount) ;\r\n ColumnBean columnBean = (ColumnBean)column.getIdentifier() ;\r\n Object val = null ;\r\n // the whole idea of setting up the columnBean as the identifier is that u get to know\r\n // all abt the structure details of the column, so u can create appropriate type of object\r\n // and stick it in to the hashMap\r\n if (columnBean.getDataType().equals(\"NUMBER\"))\r\n {\r\n if (codeTableModel.getValueAt(sorter.getIndexForRow(rowNum),colCount) == null\r\n ||(codeTableModel.getValueAt(sorter.getIndexForRow(rowNum),colCount).equals(\"\")))\r\n {\r\n val = null ; //new Integer(0)\r\n }\r\n else\r\n {\r\n val = codeTableModel.getValueAt(sorter.getIndexForRow(rowNum),colCount);\r\n if (val instanceof ComboBoxBean)\r\n {\r\n if (((ComboBoxBean)val).getCode().equals(\"\"))// user deleted selection\r\n val = null;\r\n else\r\n val = new Integer(((ComboBoxBean)val).getCode().toString());\r\n }\r\n else\r\n {\r\n val = new Integer(val.toString()) ;\r\n }\r\n }\r\n }\r\n\r\n if (columnBean.getDataType().equals(\"VARCHAR2\"))\r\n {\r\n if (codeTableModel.getValueAt(sorter.getIndexForRow(rowNum),colCount)==null)\r\n {\r\n val = \"\";\r\n }\r\n else\r\n {\r\n val = codeTableModel.getValueAt(sorter.getIndexForRow(rowNum),colCount).toString() ;\r\n }\r\n }\r\n\r\n if (columnBean.getDataType().equals(\"DATE\"))\r\n {\r\n //coeusdev-568 start\r\n //Date today = new Date();\r\n //coeusdev-568 end\r\n if (codeTableModel.getValueAt(sorter.getIndexForRow(rowNum), codeTableModel.getColumnCount()-1).equals(\"I\")) // if itz an insert\r\n { //AV_ & AW_ will be the same for insert\r\n //coeusdev-568 start\r\n //val = new java.sql.Timestamp(today.getTime());\r\n val = CoeusUtils.getDBTimeStamp();\r\n //coeusdev-568 end\r\n }\r\n else\r\n { // for update\r\n // there will be only two dates in any table one AV_UPDATE_TIMESTAMP and the other one AW_UPDATE_TIMESTAMP\r\n if (columnBean.getQualifier().equals(\"VALUE\"))\r\n { //AV_...\r\n //coeusdev-568 start\r\n //val = new java.sql.Timestamp(today.getTime());\r\n val = CoeusUtils.getDBTimeStamp();\r\n //coeusdev-568 end\r\n }\r\n else\r\n { //AW_...\r\n val = java.sql.Timestamp.valueOf(codeTableModel.getValueAt(sorter.getIndexForRow(rowNum),colCount).toString()) ;\r\n }\r\n }\r\n }\r\n\r\n hashRow.put(columnBean.getColIdentifier(), val) ;\r\n } //end for\r\n return hashRow;\r\n }",
"@Override\n\tpublic void placementcell() {\n\t\t\n\t}",
"public void loadItemsTable(String reqId) {\n dao.setup();\n ObservableList<RequisitionItemEntity> items = FXCollections.observableArrayList(dao.read(RequisitionItemEntity.class));\n dao.exit();\n\n TableColumn<RequisitionItemEntity, String> poIdCol = new TableColumn<>(\"Purchase ID\");\n poIdCol.setCellValueFactory(new PropertyValueFactory<RequisitionItemEntity, String>(\"poid\"));\n\n TableColumn<RequisitionItemEntity, String> reqIdCol = new TableColumn<>(\"Requisiton ID\");\n reqIdCol.setCellValueFactory(new PropertyValueFactory<>(\"reqid\"));\n\n TableColumn<RequisitionItemEntity, Number> supidCol = new TableColumn<>(\"Supplier ID\");\n supidCol.setCellValueFactory(new PropertyValueFactory<>(\"supplier_id\"));\n\n TableColumn<RequisitionItemEntity, Double> tamontCol = new TableColumn<>(\"Total Amount\");\n tamontCol.setCellValueFactory(new PropertyValueFactory<>(\"total_amount\"));\n\n for (RequisitionItemEntity item : items){\n if(reqId == item.getReqId())\n tableItems.getItems().add(item);\n }\n\n tableItems.getColumns().addAll(poIdCol,reqIdCol,supidCol,tamontCol);\n\n\n }",
"void createItem (String name, String description, double price);",
"void addCellContent(Cell cell, String content);",
"public void fillMyGoodsTable() {\n\t\tHashMap<Goods, Integer> myGoods = ship.getMyGoods();\n\t\tDefaultTableModel model = (DefaultTableModel)this.myGoodsTable.getModel();\n\t\tint number = 1;\n\t\tfor (HashMap.Entry<Goods, Integer> set: myGoods.entrySet()) {\n\t\t\tString name = set.getKey().getName();\n\t\t\tint quantity = set.getKey().getQuantityOwned();\n\t\t\tint price = set.getValue();\n\t\t\tmodel.addRow(new Object [] {number, name, quantity, price});\n\t\t\tnumber++;\n\t\t}\n\t}",
"public HSSFWorkbook process(){\r\n\t\tHSSFSheet sheet = templateWorkbook.getSheetAt(0);\r\n\r\n\t\t//write product infmration\r\n\t\torder.putSetToList();\r\n\t\tList<InventoryOrderProduct> orderProducts = order.getProduct_List();\r\n\t\tint totalDataRow = orderProducts.size();\r\n\t\tfor (int i = 0; i < totalDataRow; i++){\r\n\r\n\t\t\tInventoryOrderProduct orderProduct = orderProducts.get(i);\r\n\t\t\tRow row = sheet.createRow(data_row + i);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tProduct product = orderProduct.getProductBarcode().getProduct();\r\n\t\t\trow.createCell(barcode_column).setCellValue(orderProduct.getProductBarcode().getBarcode());\r\n\t\t\t\r\n\t\t\tColor color = orderProduct.getProductBarcode().getColor();\r\n\t\t\tif (color == null)\r\n\t\t\t\trow.createCell(productCode_column).setCellValue(product.getProductCode());\r\n\t\t\telse \r\n\t\t\t\trow.createCell(productCode_column).setCellValue(product.getProductCode() + color.getName());\r\n\t\t\t\r\n\t\t\trow.createCell(unit_column).setCellValue(product.getUnit());\r\n\t\t\tint q = orderProduct.getQuantity();\r\n\t\t\t\r\n\t\t\trow.createCell(quantity_column).setCellValue(orderProduct.getQuantity());\r\n\t\t\trow.createCell(salePrice_column).setCellValue(orderProduct.getSalesPrice());\r\n\t\t\t\r\n\t\t\tString year = product.getYear().getYear();\r\n\t\t\tString quarter = product.getQuarter().getQuarter_Name();\r\n\t\t\tString brandName = product.getBrand().getBrand_Name();\r\n\t\t\t\r\n\t\t\tString productComment = year +\"年\" + brandName + quarter + \"装\";\r\n\t\t\t\t\t\r\n\t\t\t\r\n\t\t\trow.createCell(productComment_column).setCellValue(productComment);\r\n\t\t}\r\n\r\n\t\treturn templateWorkbook;\r\n\t}",
"public void creatTemplate(Sheet sheet, String title) {\n\n String label1 = \"TẬP ĐOÀN VIỄN THÔNG QUÂN ĐỘI\";\n String label2 = \"TỔNG CÔNG TY VIỄN THÔNG VIETTEL\";\n String label3 = \"CỘNG HOÀ XÃ HỘI CHỦ NGHĨA VIỆT NAM\";\n String label4 = \"Độc Lập - Tự Do - Hạnh Phúc\";\n\n createCellObject(sheet, 0, 0, label1, getCsSubTitle());\n createCellObject(sheet, 0, 1, label2, getCsCenterNoboderBoldweight());\n createCellObject(sheet, 5, 0, label3, getCsSubTitle());\n createCellObject(sheet, 5, 1, label4, getCsCenterNoboderBoldweight());\n createCellObject(sheet, 1, 4, title, getCsTitle());\n\n ExcelWriterUtils.mergeCells(sheet, 0, 0, 0, 2);\n ExcelWriterUtils.mergeCells(sheet, 1, 1, 0, 2);\n ExcelWriterUtils.mergeCells(sheet, 0, 0, 5, 8);\n ExcelWriterUtils.mergeCells(sheet, 1, 1, 5, 8);\n ExcelWriterUtils.mergeCells(sheet, 4, 4, 1, 6);\n\n setRowHeight(sheet, 4, 630);\n }",
"private void insertProjectTable() {\n name.setCellValueFactory(new PropertyValueFactory<>(\"nameId\"));\n dateStart.setCellValueFactory(new PropertyValueFactory<>(\"dateStart\"));\n dateFinish.setCellValueFactory(new PropertyValueFactory<>(\"dateFinish\"));\n place.setCellValueFactory(new PropertyValueFactory<>(\"place\"));\n car.setCellValueFactory(new PropertyValueFactory<>(\"cars\"));\n instructors.setCellValueFactory(new PropertyValueFactory<>(\"instructors\"));\n description.setCellValueFactory(new PropertyValueFactory<>(\"description\"));\n author.setCellValueFactory(new PropertyValueFactory<>(\"author\"));\n }",
"public void addData(){\n Typeface mtypeFace = Typeface.createFromAsset(getAssets(),\n \"fonts/Lato-Regular.ttf\");\n if (dummy != 0) {\n dummy--;\n }\n int value = dummy;\n for (int i = value; i < repdataresponselist.size()&&i<(dummy+20); i++)\n\n {\nvalue++;\n /** Create a TableRow dynamically **/\n\n tr = new TableRow(this);\n /*if (i % 2 == 0) {*/\n/*\n } else {\n tr.setBackgroundResource(R.color.grey);\n\n }*/\n ReportsDataResponse reportdataobj=repdataresponselist.get(i);\n ArrayList<String> responsestrarr=new ArrayList<>();\n responsestrarr.add(reportdataobj.getBkRefid());\n\n responsestrarr.add(reportdataobj.getStatus());\n responsestrarr.add(reportdataobj.getSource());\n\n responsestrarr.add(reportdataobj.getBookingtype());\n\n responsestrarr.add(reportdataobj.getBookingdate());\n responsestrarr.add(reportdataobj.getPNR());\n responsestrarr.add(reportdataobj.getName());\n responsestrarr.add(reportdataobj.getAirline());\n responsestrarr.add(reportdataobj.getFrom());\n responsestrarr.add(reportdataobj.getTo());\n responsestrarr.add(reportdataobj.getClasstype());\n responsestrarr.add(reportdataobj.getTriptype());\n responsestrarr.add(reportdataobj.getTotalpax());\n responsestrarr.add(reportdataobj.getTotalfare());\n\n for (int j = 0; j < 14; j++) {\n\ntry {\n\n tr.setLayoutParams(new LayoutParams(\n\n LayoutParams.FILL_PARENT,\n\n LayoutParams.WRAP_CONTENT));\n\n /** Creating a TextView to add to the row **/\n companyTV = new TextView(this);\n\n\n\n\n companyTV.setText(responsestrarr.get(j));\n\n companyTV.setTextColor(Color.parseColor(\"#000000\"));\n\n companyTV.setTypeface(mtypeFace);\n\n companyTV.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));\n\n if(j==1)\n {\n\n switch(responsestrarr.get(j)) {\n case \"Confirmed\":\n companyTV.setBackgroundColor(Color.parseColor(\"#fdba52\"));\n\n break;\n case \"Ticketed\":\n companyTV.setBackgroundColor(Color.parseColor(\"#b9eeb9\"));\n\n break;\n case \"Cancelled\":\n companyTV.setBackgroundColor(Color.parseColor(\"#f6bcbc\"));\n\n break;\n case \"Booking Started\":\n companyTV.setBackgroundColor(Color.parseColor(\"#e6c295\"));\n\n break;\n\n }\n }\n\n\n switch (j)\n {\n case 2:\n companyTV.setPadding(40, 30, 5, 30);\n break;\n case 3:\n companyTV.setPadding(50, 30, 5, 30);\n break;\n case 7:\n companyTV.setPadding(40, 30, 5, 30);\n break;\n case 8:\n companyTV.setPadding(25, 30, 5, 30);\n break;\n case 12:\n companyTV.setPadding(70, 30, 5, 30);\n break;\n case 13:\n companyTV.setPadding(40, 30, 5, 30);\n break;\n\n /* case 11:\n companyTV.setPadding(40, 30, 5, 30);\n break;\n case 12:\n companyTV.setPadding(40, 30, 5, 30);\n break;*/\n default:\n companyTV.setPadding(20, 30, 5, 30);\n\n break;\n\n\n\n\n\n\n\n }\n\n\n tr.addView(companyTV); // Adding textView to tablerow.\n\n tl.addView(tr, new TableLayout.LayoutParams(\n\n LayoutParams.FILL_PARENT,\n\n LayoutParams.WRAP_CONTENT));\n}\ncatch (Exception e)\n{\n e.printStackTrace();\n}\n\n\n }\n\n }\n dummy=value;\ntabledata=getHtmlData();\n\n }"
] | [
"0.6150395",
"0.5898453",
"0.5775248",
"0.5707832",
"0.5702784",
"0.56919473",
"0.56575614",
"0.56412625",
"0.55936915",
"0.55838335",
"0.5562821",
"0.5476855",
"0.54762876",
"0.5462564",
"0.5404857",
"0.540484",
"0.53868824",
"0.5347548",
"0.5329335",
"0.5319186",
"0.5317668",
"0.53175396",
"0.5306537",
"0.5301516",
"0.530098",
"0.52877927",
"0.52865773",
"0.52820486",
"0.52779233",
"0.526428",
"0.52621627",
"0.52544695",
"0.52481365",
"0.5243933",
"0.52283466",
"0.5218121",
"0.5173832",
"0.5170543",
"0.51410395",
"0.51355416",
"0.5124903",
"0.5115575",
"0.5104025",
"0.5096347",
"0.5088341",
"0.50837445",
"0.50661963",
"0.5051834",
"0.5024117",
"0.502275",
"0.50137544",
"0.5006561",
"0.5005166",
"0.4999718",
"0.49930352",
"0.49897525",
"0.49878484",
"0.49856347",
"0.49847424",
"0.4970394",
"0.4961358",
"0.495602",
"0.4954388",
"0.49533266",
"0.49386674",
"0.49282962",
"0.4926382",
"0.49172494",
"0.49152207",
"0.49146006",
"0.49129385",
"0.49031812",
"0.49027625",
"0.48932418",
"0.4886124",
"0.48861083",
"0.48853427",
"0.4883802",
"0.48785815",
"0.48730168",
"0.486876",
"0.48599535",
"0.48481253",
"0.48452544",
"0.48429993",
"0.48387408",
"0.4836892",
"0.48339993",
"0.48318282",
"0.48313487",
"0.48243523",
"0.48221853",
"0.4806502",
"0.4799317",
"0.4798668",
"0.4794478",
"0.47805235",
"0.47803634",
"0.47697613",
"0.47658157",
"0.47640228"
] | 0.0 | -1 |
Created by Eugen K. on 2/10/16. | public interface LayoutManagerInterface {
void setTopBarState(Long sectionId);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"public final void mo51373a() {\n }",
"protected boolean func_70814_o() { return true; }",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"private void kk12() {\n\n\t}",
"private void m50366E() {\n }",
"@Override\n\tprotected void getExras() {\n\n\t}",
"private void poetries() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\n public void init() {\n }",
"@Override\n public int describeContents() { return 0; }",
"@Override\n protected void initialize() {\n\n \n }",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\n protected void init() {\n }",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"private void init() {\n\n\t}",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"public void mo38117a() {\n }",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"private static void cajas() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {}",
"@Override\n public void init() {\n\n }",
"@Override\n public void init() {\n\n }",
"@Override\n public void init() {}",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n\tpublic void init() {\n\t}",
"public void method_4270() {}",
"@Override\n void init() {\n }",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void init()\n\t{\n\n\t}",
"@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n protected void initialize() \n {\n \n }",
"private Rekenhulp()\n\t{\n\t}",
"@Override\n\tprotected void initialize() {\n\t}",
"@Override\n\tprotected void initialize() {\n\t}",
"private void strin() {\n\n\t}",
"@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\n public void initialize() { \n }",
"@Override\n\t\tpublic void init() {\n\t\t}",
"public void mo12628c() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo21779D() {\n }"
] | [
"0.5937934",
"0.5890397",
"0.5850866",
"0.57604676",
"0.571558",
"0.5688332",
"0.56809783",
"0.56809783",
"0.5679464",
"0.56771046",
"0.56651896",
"0.5649137",
"0.5649137",
"0.5649137",
"0.5649137",
"0.5649137",
"0.56385285",
"0.5622955",
"0.5600747",
"0.55943173",
"0.55873966",
"0.55857724",
"0.55857724",
"0.55829614",
"0.55826277",
"0.5576486",
"0.5563018",
"0.55595666",
"0.55531615",
"0.5552262",
"0.55516255",
"0.5548884",
"0.55352455",
"0.5514419",
"0.5492918",
"0.54884684",
"0.5462543",
"0.5456249",
"0.5454841",
"0.5454841",
"0.5454841",
"0.54500055",
"0.54489404",
"0.5447976",
"0.5446416",
"0.54435754",
"0.5439383",
"0.5439383",
"0.5439383",
"0.54369885",
"0.5434066",
"0.54337436",
"0.54227185",
"0.54227185",
"0.54227185",
"0.5415947",
"0.54157877",
"0.5413131",
"0.5409888",
"0.5401675",
"0.5401675",
"0.54006994",
"0.53978527",
"0.53978527",
"0.53978527",
"0.53978527",
"0.53978527",
"0.53978527",
"0.5390598",
"0.5380138",
"0.53714436",
"0.53683203",
"0.53682137",
"0.5366647",
"0.5366629",
"0.5366629",
"0.5363701",
"0.5352301",
"0.5350216",
"0.53495955",
"0.53466386",
"0.534131",
"0.5335677",
"0.5331596",
"0.5331596",
"0.53313756",
"0.5325818",
"0.5305222",
"0.5287124",
"0.52768666",
"0.5276142",
"0.52659976",
"0.5253454",
"0.5251263",
"0.5251263",
"0.5251263",
"0.5251263",
"0.5251263",
"0.5251263",
"0.5251263",
"0.5248504"
] | 0.0 | -1 |
Called when a header item has been clicked. | void onHeaderClicked(RowHeaderPresenter.ViewHolder viewHolder, Row row); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void onHeaderSelected(RowHeaderPresenter.ViewHolder viewHolder, Row row);",
"private HeaderViewClickListener manageHeaderClick() {\n return new HeaderViewClickListener() {\n @Override\n public void onClickOfHeaderLeftView() {\n AppUtils.showLog(TAG, \"onClickOfHeaderLeftView\");\n mActivity.onBackPressed();\n }\n\n @Override\n public void onClickOfHeaderRightView() {\n Toast.makeText(mActivity, \"Coming Soon\", Toast.LENGTH_SHORT).show();\n }\n };\n }",
"protected void clickedHeader(int p_148132_1_, int p_148132_2_)\n {\n this.field_148218_l = -1;\n\n if (p_148132_1_ >= 79 && p_148132_1_ < 115)\n {\n this.field_148218_l = 0;\n }\n else if (p_148132_1_ >= 129 && p_148132_1_ < 165)\n {\n this.field_148218_l = 1;\n }\n else if (p_148132_1_ >= 179 && p_148132_1_ < 215)\n {\n this.field_148218_l = 2;\n }\n else if (p_148132_1_ >= 229 && p_148132_1_ < 265)\n {\n this.field_148218_l = 3;\n }\n else if (p_148132_1_ >= 279 && p_148132_1_ < 315)\n {\n this.field_148218_l = 4;\n }\n\n if (this.field_148218_l >= 0)\n {\n this.func_148212_h(this.field_148218_l);\n this.mc.getSoundHandler().play(PositionedSoundRecord.getMasterRecord(SoundEvents.UI_BUTTON_CLICK, 1.0F));\n }\n }",
"@Override\n public boolean onTouch(View v, MotionEvent event) {\n if(event.getY() < header.getHeight()\n && listen != null)\n {\n listen.onHeaderClicked( HeaderListView.this );\n return true;\n }\n\n // handle touch normally\n else\n return onTouchEvent(event);\n }",
"@Override\n\t\t\tpublic void headerClick(HeaderClickEvent event) {\n\t\t\t\t\n\t\t\t\ttry{\n\t\t\t\t\tif (event.getPropertyId().equals(\"selected\")){\n\t\t\t\t\t\tif (model.isSelectAllInvoice()==true) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tview.getTableDetail().setColumnHeader(\"selected\", \"<input type='checkbox' checked />\");\t\t\n\t\t\t\t\t\t\tmodel.setSelectAllInvoice(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tCollection itemIds = model.getBeanItemContainerModulTempDetail().getItemIds();\n\t\t\t\t\t\t\tfor (Object itemId: itemIds){\n\t\t\t\t\t\t\t\tmodel.getBeanItemContainerModulTempDetail().getItem(itemId).getBean().getSelected().setReadOnly(false);\n\t\t\t\t\t\t\t\tmodel.getBeanItemContainerModulTempDetail().getItem(itemId).getBean().getSelected().setValue(true);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tview.getTableDetail().setColumnHeader(\"selected\", \"<input type='checkbox' />\");\t\t\n\t\t\t\t\t\t\tmodel.setSelectAllInvoice(true);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tCollection itemIds = model.getBeanItemContainerModulTempDetail().getItemIds();\n\t\t\t\t\t\t\tfor (Object itemId: itemIds){\n\t\t\t\t\t\t\t\tmodel.getBeanItemContainerModulTempDetail().getItem(itemId).getBean().getSelected().setReadOnly(false);\n\t\t\t\t\t\t\t\tmodel.getBeanItemContainerModulTempDetail().getItem(itemId).getBean().getSelected().setValue(false);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\t\n\t\t\t\t\t\t//KASIH SELEKSI >> buat SELECTED READONLY(TRUE) LAGI\t\t\t\t\n\t\t\t\t\t\tview.setDisplayTableFooter();\n\n\t\t\t\t\t}\n\t\t\t\t} catch(Exception ex){}\n\t\t\t}",
"void onChannelTitleClick(Item item);",
"@Override\n public void onItemClicked(int itemPosition, Object dataObject) {\n }",
"@Override\n\tpublic void OnTitleSelected(int index) {\n\t\tif()\n\t}",
"void onNavigationItemClicked(Element element);",
"@Override\n public void itemClick(int pos) {\n }",
"@Override\n public void OnItemClick(int position) {\n }",
"void onChamaItemClicked(int position);",
"public void onHeaderRefresing();",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tfireDetailEvent(new DetailEvent(this, 'H'));\r\n\t\t\t}",
"void onMenuItemClicked();",
"@Override\n public void onClick(View view) {\n itemInterface.OnItemClickedListener(tracks, getAdapterPosition());\n }",
"public interface HeadItemListener {\n public void onClick (HeadItem headItem);\n\n public void onBackgroundClick (HeadItem headItem);\n}",
"public /* synthetic */ void lambda$getHeaderIconListener$6$PanelFragment(View view) {\n getActivity().startActivity(this.mPanel.getHeaderIconIntent());\n }",
"abstract public void onSingleItemClick(View view);",
"public void menuClicked(MenuItem menuItemSelected);",
"@Override\n public void onClick(View view) { listener.onItemClick(view, getPosition()); }",
"@Override\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\t}",
"@Override\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\t\t\n\t}",
"@Override\r\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\t\t\r\n\t}",
"@Override\n public void onClick(View view) {\n\n addItem();\n recyclerAdapterHeader.swap(rowsCalculated(dataCategories));\n //all really bad practices, bound to be bugs\n }",
"@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\n\t\t\t}",
"@VisibleForTesting\n public View.OnClickListener getHeaderIconListener() {\n return new View.OnClickListener() {\n /* class com.android.settings.panel.$$Lambda$PanelFragment$N3DMhbGuDEaImQpPovL7Ug2k3kc */\n\n public final void onClick(View view) {\n PanelFragment.this.lambda$getHeaderIconListener$6$PanelFragment(view);\n }\n };\n }",
"@Override\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\n\t}",
"@Override\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\n\t}",
"@Override\n public void onItemClick(int pos) {\n }",
"@Override\n\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\tlong arg3) {\n\t\t\t\n\t\t}",
"@Override\n public void onClick(View view) {\n clickListener.onItemClicked(getBindingAdapterPosition());\n }",
"@Override\n public void onClick(View arg0) {\n System.out.println(mPosition);\n\n HomeActivity sct = (HomeActivity) activity;\n sct.onItemClick(mPosition);\n\n }",
"@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\t\t\t\t\tlong arg3) {\n\t\t\t}",
"void onItemClick(HorizontalGridView parent, View view, int position,\n long id);",
"@Override\n\t\t\t\t\t\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n\t\t\t\t\t\t\t\t\t\tint position, long id) {\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}",
"@Override\r\n\tpublic void itemSelectedAtIndexPath(IndexPath path) {\n\r\n\t}",
"@Override\r\n\t\tpublic void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\t\t\tdisplayView(position);\r\n\t\t}",
"@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\t\t\t}",
"@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tpublic void onItemClick(AdapterView<?> parent, View view, int position,\n\t\t\tlong id) {\n\t\tpresenter.onItemClicked(position);\n\t}",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n String name = navDrawerItems.get(position).getListItemName();\n // call a helper method to perform a corresponding action\n performActionOnNavDrawerItem(name);\n }",
"@Override\n\tpublic void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n\t}",
"@Override\n\tpublic void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n\t}",
"@Override\n public void onClickItem(MeowBottomNavigation.Model item) {\n }",
"@Override\n public void onClickItem(MeowBottomNavigation.Model item) {\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif (itemClicked != null)\n\t\t\t\t\titemClicked.OnItemClicked((BusinessType)item.getTag(), item);\n\t\t\t}",
"@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\n\t\t\t}",
"abstract public void header();",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n switch (view.getId()) {\n case R.id.id_contact_title:\n LinearLayout ll = (LinearLayout) view.findViewById(R.id.id_contact_title);\n Log.i(TAG, \"Clicked : \" + ll.getTag());\n break;\n }\n }",
"public void clickOnTableHeading() {\r\n\t\tsafeClick(addMarkerOkButton.replace(\".ant-modal-footer button.ant-btn.ant-btn-primary\",\r\n\t\t\t\t\".ant-table-column-has-actions.ant-table-column-has-sorters.ant-table-column-sort\"), SHORTWAIT);\r\n\t}",
"@Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n }",
"@Override\n public void onItemClick(int position) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }",
"void issuedClick(String item);",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position,\n long id) {\n displayView(position);\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position,\n long id) {\n displayView(position);\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position,\n long id) {\n displayView(position);\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position,\n long id) {\n displayView(position);\n }",
"@Override\n\t\t\tpublic void menuSelected(MenuItem selectedItem)\n\t\t\t{\n\n\t\t\t}",
"@Override\n\t\t\tpublic void menuSelected(MenuItem selectedItem)\n\t\t\t{\n\n\t\t\t}",
"void onDialogNavigationItemClicked(Element element);",
"@Override\r\n\tpublic void onMenuItemSelected(MenuItem item) {\n\r\n\t}",
"@Override\r\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\r\n\t\t\t\t\tlong arg3) {\n\r\n\t\t\t}",
"@Override\n\tpublic void onTabHeaderCreated(TabHeader tabHeader, View v, int position)\n\t{\n\t\t// TODO Auto-generated method stub\n\t\tfinal RuntimeApplication runtimeApp = new RuntimeApplication();\n \t\t\t//(RuntimeApplication) this.getActivity().getApplication();\n\t\t\n\t\t\n\t\tButton btnTab = (Button) v.findViewById(R.id.btnTab);\n\t\tint color = 0;\n\t\tbtnTab.postInvalidate();\n\t\t\n\t\tTabSelection tabSelection = LayoutConfig.INNER_TAB_BACKGROUND[position];\n\t\t\n\t\tif(position == 0)\n\t\t{\n\t\t\tbtnTab.setBackgroundResource(tabSelection.tabSelectedResid);\n\t\t\tif(runtimeApp.switcher!=null)\n\t\t\tcolor = runtimeApp.switcher.getSelectedColorSwitcher();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tbtnTab.setBackgroundResource(tabSelection.tabUnselectedResid);\n\t\t\t\n\t\t\tcolor = R.color.text_unselected_color;\n\t\t}\n\t\t\n\t\tTextTint.tintButtonText(Tab3Fragment.this.getActivity(), btnTab, color);\n\t\tbtnTab.requestLayout();\n\t}",
"void onItemClick(int position);",
"@Override\n public void onItemClick(View view, int position) {\n presenter.onSelectedCarreer(position);\n }",
"public void clickMenuButton(){\n waitForClickable(menuHeaderIcon);\n driver.findElement(menuHeaderIcon).click();\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n }",
"void itemSelected(OutlineItem item);",
"public interface OnItemClickedListener {\n\n\tvoid onItemClicked(Integer itemId);\n}",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position,\n long id) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position,\n long id) {\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\titemClickListener.Callback(itemInfo);\n\t\n\t\t\t}",
"@Override\n\tpublic void onItemClick(Object o, int position) {\n\n\t}",
"@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}",
"@Override\r\n\t\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\r\n\t\t\t\t\t\tint position, long id) {\n\t\t\t\t}",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position,\n long id) {\n\n\n }",
"void clickItem(int uid);",
"@Override\r\n\t\t\tpublic void onItemClick(AdapterView<?> adapter, View view, int position,\r\n\t\t\t\t\tlong arg3) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }",
"@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\r\n\t\t\t}",
"public void menuItemClicked( Menu2DEvent e );",
"@Override\r\n\t\t\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}",
"public void initComponetNavHeader() {\n\n navigationView.setNavigationItemSelectedListener(this);\n View headerView = navigationView.getHeaderView(0);\n imageViewProfil = headerView.findViewById(R.id.imageViewProfil);\n tvName = headerView.findViewById(R.id.tvName);\n tvEmail = headerView.findViewById(R.id.tvEmail);\n\n tvName.setText(name);\n tvEmail.setText(email);\n\n imageViewProfil.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n startActivity(new Intent(SettingActivity.this, ProfilActivity.class).\n addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK));\n }\n });\n\n }"
] | [
"0.74611896",
"0.71911097",
"0.6773529",
"0.66529703",
"0.6526214",
"0.64229053",
"0.6232215",
"0.6206",
"0.6201299",
"0.6177325",
"0.6171155",
"0.6101871",
"0.6007496",
"0.60012895",
"0.59973115",
"0.59917337",
"0.5980597",
"0.5961826",
"0.5918938",
"0.59149486",
"0.59102476",
"0.58785427",
"0.5876269",
"0.58677006",
"0.58586144",
"0.58580726",
"0.58488584",
"0.5837435",
"0.5837435",
"0.5834981",
"0.5824853",
"0.5816971",
"0.5816584",
"0.58010226",
"0.5797922",
"0.5783318",
"0.577903",
"0.57616806",
"0.57605314",
"0.5754947",
"0.5748009",
"0.57473975",
"0.57390815",
"0.57390815",
"0.5737684",
"0.5737684",
"0.5736302",
"0.5733082",
"0.5733082",
"0.571944",
"0.57172483",
"0.57089204",
"0.57086647",
"0.5703446",
"0.57015824",
"0.57015824",
"0.56997126",
"0.56997126",
"0.56997126",
"0.56997126",
"0.56997126",
"0.56955636",
"0.56948286",
"0.56948286",
"0.56948286",
"0.56948286",
"0.56891096",
"0.56891096",
"0.5688897",
"0.5687844",
"0.5686565",
"0.568334",
"0.56823397",
"0.5678781",
"0.5675944",
"0.56748354",
"0.566737",
"0.56627274",
"0.5660356",
"0.5660356",
"0.56587064",
"0.5647641",
"0.56435794",
"0.56435794",
"0.56435794",
"0.56435794",
"0.56435794",
"0.56435794",
"0.56435794",
"0.56411207",
"0.5639998",
"0.5639273",
"0.56359607",
"0.5630611",
"0.5630611",
"0.5630611",
"0.5627594",
"0.5625645",
"0.5622178",
"0.56221163"
] | 0.78793675 | 0 |
Called when a header item has been selected. | void onHeaderSelected(RowHeaderPresenter.ViewHolder viewHolder, Row row); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void OnTitleSelected(int index) {\n\t\tif()\n\t}",
"void onHeaderClicked(RowHeaderPresenter.ViewHolder viewHolder, Row row);",
"@Override\n\t\t\tpublic void headerClick(HeaderClickEvent event) {\n\t\t\t\t\n\t\t\t\ttry{\n\t\t\t\t\tif (event.getPropertyId().equals(\"selected\")){\n\t\t\t\t\t\tif (model.isSelectAllInvoice()==true) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tview.getTableDetail().setColumnHeader(\"selected\", \"<input type='checkbox' checked />\");\t\t\n\t\t\t\t\t\t\tmodel.setSelectAllInvoice(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tCollection itemIds = model.getBeanItemContainerModulTempDetail().getItemIds();\n\t\t\t\t\t\t\tfor (Object itemId: itemIds){\n\t\t\t\t\t\t\t\tmodel.getBeanItemContainerModulTempDetail().getItem(itemId).getBean().getSelected().setReadOnly(false);\n\t\t\t\t\t\t\t\tmodel.getBeanItemContainerModulTempDetail().getItem(itemId).getBean().getSelected().setValue(true);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tview.getTableDetail().setColumnHeader(\"selected\", \"<input type='checkbox' />\");\t\t\n\t\t\t\t\t\t\tmodel.setSelectAllInvoice(true);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tCollection itemIds = model.getBeanItemContainerModulTempDetail().getItemIds();\n\t\t\t\t\t\t\tfor (Object itemId: itemIds){\n\t\t\t\t\t\t\t\tmodel.getBeanItemContainerModulTempDetail().getItem(itemId).getBean().getSelected().setReadOnly(false);\n\t\t\t\t\t\t\t\tmodel.getBeanItemContainerModulTempDetail().getItem(itemId).getBean().getSelected().setValue(false);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\t\n\t\t\t\t\t\t//KASIH SELEKSI >> buat SELECTED READONLY(TRUE) LAGI\t\t\t\t\n\t\t\t\t\t\tview.setDisplayTableFooter();\n\n\t\t\t\t\t}\n\t\t\t\t} catch(Exception ex){}\n\t\t\t}",
"@Override\n\t\t\tpublic void menuSelected(MenuItem selectedItem)\n\t\t\t{\n\n\t\t\t}",
"@Override\n\t\t\tpublic void menuSelected(MenuItem selectedItem)\n\t\t\t{\n\n\t\t\t}",
"@Override\r\n\tpublic void itemSelectedAtIndexPath(IndexPath path) {\n\r\n\t}",
"public void widgetSelected(SelectionEvent arg0) {\n\t\t\t}",
"@Override\r\n\tpublic void onMenuItemSelected(MenuItem item) {\n\r\n\t}",
"@Override\n public void onContactSelected(Contact selected, int rowId)\n {\n contactIndex = rowId;\n selectedContact = selected;\n\n // Visa detaljvyn när en rad i listan klickas\n showDetails();\n }",
"void itemSelected(OutlineItem item);",
"protected void onSelectedItemChanged() {\n if (selectedItem == null) {\n anchorLabel();\n getInputWidget().setText(\"\");\n } else {\n String playerName = ((Player)selectedItem).getName();\n getInputWidget().setText(playerName);\n floatLabel();\n }\n\n if (itemChooserListener != null) itemChooserListener.onSelectionChanged(this, selectedItem);\n }",
"@Override\n\t\tpublic void onItemSelected(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\tlong arg3) {\n\t\t\t\n\t\t}",
"@Override\n\tpublic void setSelectedNavigationItem(int position) {\n\t\t\n\t}",
"public interface OnSelectedItemChangeListener {\n void OnSelectedItemChange(PieMenuView source, int currentItem);\n }",
"@Override\n public void onItemSelected(AdapterView<?> adapterView, View view, int position, long id)\n {\n }",
"void onItemSelected(int index, T item) throws RemoteException;",
"@Override\n public void onItemSelected(AdapterView<?> parent, View v, int position, long id)\n {\n }",
"@Override\n public void onItemSelected(AdapterView<?> parent, View view,\n int position, long id) {\n }",
"protected void clickedHeader(int p_148132_1_, int p_148132_2_)\n {\n this.field_148218_l = -1;\n\n if (p_148132_1_ >= 79 && p_148132_1_ < 115)\n {\n this.field_148218_l = 0;\n }\n else if (p_148132_1_ >= 129 && p_148132_1_ < 165)\n {\n this.field_148218_l = 1;\n }\n else if (p_148132_1_ >= 179 && p_148132_1_ < 215)\n {\n this.field_148218_l = 2;\n }\n else if (p_148132_1_ >= 229 && p_148132_1_ < 265)\n {\n this.field_148218_l = 3;\n }\n else if (p_148132_1_ >= 279 && p_148132_1_ < 315)\n {\n this.field_148218_l = 4;\n }\n\n if (this.field_148218_l >= 0)\n {\n this.func_148212_h(this.field_148218_l);\n this.mc.getSoundHandler().play(PositionedSoundRecord.getMasterRecord(SoundEvents.UI_BUTTON_CLICK, 1.0F));\n }\n }",
"@Override\n\tpublic void onItemSelected(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\tlong arg3) {\n\n\t}",
"@Override\n\tpublic void onItemSelected(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\tlong arg3) {\n\n\t}",
"public void itemSelected(boolean selected);",
"@Override\n public void selectItem(String selection) {\n vendingMachine.setSelectedItem(selection);\n vendingMachine.changeToHasSelectionState();\n }",
"void onItemSelected();",
"void onItemSelected();",
"@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n }",
"@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n }",
"@Override\n\t\tpublic void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n\n\t\t}",
"public void onItemSelected(int id);",
"@Override\n\t\t\tpublic void onItemSelected(AdapterView<?> parent, View view,\n\t\t\t\t\tint position, long id) {\n\t\t\t}",
"@Override\n public void onItemSelected(AdapterView<?> arg0, View arg1, int arg2,\n long arg3) {\n\n }",
"@Override\n\tpublic void widgetSelected(SelectionEvent arg0) {\n\n\t}",
"@Override\n public boolean onTouch(View v, MotionEvent event) {\n if(event.getY() < header.getHeight()\n && listen != null)\n {\n listen.onHeaderClicked( HeaderListView.this );\n return true;\n }\n\n // handle touch normally\n else\n return onTouchEvent(event);\n }",
"@Override\r\n\t\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\t\r\n\t\t\t\t}",
"public void onItemStateChanged(String id, boolean selected);",
"@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n }",
"@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n }",
"public void onHeaderRefresing();",
"public interface ItemSelectedListener {\n void itemSelected(Object object);\n}",
"public void fireTableRowSelected(Object source, int iRowIndex, int iSelectionType);",
"public void onPageSelected(int pageSelected) {\n\t\t\t}",
"public void onIndividualSelected(Individual individual) {\n\t\t\n\t}",
"public void onItemSelected(String id);",
"public void onItemSelected(String id);",
"public void onItemSelected(String id);",
"public void onItemSelected(String id);",
"public void onItemSelected(String id);",
"private HeaderViewClickListener manageHeaderClick() {\n return new HeaderViewClickListener() {\n @Override\n public void onClickOfHeaderLeftView() {\n AppUtils.showLog(TAG, \"onClickOfHeaderLeftView\");\n mActivity.onBackPressed();\n }\n\n @Override\n public void onClickOfHeaderRightView() {\n Toast.makeText(mActivity, \"Coming Soon\", Toast.LENGTH_SHORT).show();\n }\n };\n }",
"@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n }",
"@Override\n\tpublic void menuSelected(MenuEvent e) {\n\n\t}",
"public void onSelectionChanged();",
"public interface OnHeadlineSelectedListener {\n public void onArticleSelected(int position);\n }",
"public interface OnHeadlineSelectedListener {\n public void onArticleSelected(int position);\n }",
"@Override\n public void menuSelected(MenuEvent e) {\n \n }",
"public void onItemSelected(int position);",
"@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position,\n long id) {\n\n }",
"void onItemSelected(Bundle args);",
"@Override\n public void onItemSelected(AdapterView<?> arg0, View arg1,\n int arg2, long arg3) {\n\n\n }",
"@Override\n public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\n }",
"@Override\n public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\n }",
"@Override\n public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\n }",
"@SuppressWarnings(\"rawtypes\")\n\t@Override\n\tpublic void itemStateChanged(ItemEvent arg0) {\n\n\t\t/* If it is a selection event, and not a de-selection event (both are typically fired\n\t\t * when the combo box is changed) */\n\t\tif (arg0.getStateChange() == ItemEvent.SELECTED) {\n\n\t\t\t/* Set the selected STCA (program-wide for simplicity) */\n\t\t\tGlobalAttributes.automata=((JComboBox)(arg0.getSource())).getSelectedIndex();\n\t\t\tMainFrame.automata.setSelectedIndex(GlobalAttributes.automata);\n\t\t\tMainFrame.cellSpace.repaint();\n\t\t}\n\t}",
"@Override\n public void onItemRangeInserted(int positionStart, int itemCount) {\n\n calculateHeaderIndices();\n }",
"@Override\n\tpublic void onItemSelected(AdapterView<?> parent, View view, int pos,\n\t\t\tlong id) {\n\t\t\n\t\t\n\t}",
"public interface OnSelectedItemListener {\n /**\n * On selected item.\n *\n * @param view the view\n * @param position the position\n */\n void onSelectedItem(View view, int position);\n }",
"@Override\n\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\n\t}",
"public void onItemSelected(AdapterView<?> parent, View view,\n int pos, long id) {\n }",
"@Override\n public void onItemSelected(View view, int position) {\n }",
"@Override\r\n\t\t\tpublic void itemStateChanged(ItemEvent e) {\n\t\t\t\tif (e.getStateChange() == ItemEvent.SELECTED) { \r\n\t\t\t\t\tselectSource(e.getItem());\r\n\t\t\t\t}\r\n\t\t\t}",
"@Override\n\tpublic void onTabHeaderCreated(TabHeader tabHeader, View v, int position)\n\t{\n\t\t// TODO Auto-generated method stub\n\t\tfinal RuntimeApplication runtimeApp = new RuntimeApplication();\n \t\t\t//(RuntimeApplication) this.getActivity().getApplication();\n\t\t\n\t\t\n\t\tButton btnTab = (Button) v.findViewById(R.id.btnTab);\n\t\tint color = 0;\n\t\tbtnTab.postInvalidate();\n\t\t\n\t\tTabSelection tabSelection = LayoutConfig.INNER_TAB_BACKGROUND[position];\n\t\t\n\t\tif(position == 0)\n\t\t{\n\t\t\tbtnTab.setBackgroundResource(tabSelection.tabSelectedResid);\n\t\t\tif(runtimeApp.switcher!=null)\n\t\t\tcolor = runtimeApp.switcher.getSelectedColorSwitcher();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tbtnTab.setBackgroundResource(tabSelection.tabUnselectedResid);\n\t\t\t\n\t\t\tcolor = R.color.text_unselected_color;\n\t\t}\n\t\t\n\t\tTextTint.tintButtonText(Tab3Fragment.this.getActivity(), btnTab, color);\n\t\tbtnTab.requestLayout();\n\t}",
"@Override\n public void onTitleSelected(String classTitle, String key) {\n if (key.equals(ClassPickerFragment.PICKER_KEY)) {\n addTitleToChosenClassList(classTitle);\n } else if (key.equals(ClassPickerFragment.REMOVER_KEY)) {\n removeTitleFromChosenClassList(classTitle);\n }\n }",
"public void onItemSelected(String studentSelected);",
"@Override\n\t\t\tpublic void onItemSelected(AdapterView<?> arg0, View paramView, int arg2, long arg3) {\n\t\t\t\tmItemListCurPosition = arg2;\n\t\t\t\tif (isFirstInit) {\n\t\t\t\t\tfocusView.initFocusView(paramView, false, 0);\n\t\t\t\t}\n\t\t\t\tfocusView.moveTo(paramView);\n\t\t\t\tif (mTextView != null) {\n\t\t\t\t\tmTextView.setTextColor(mContext.getResources().getColor(R.color.grey5_color));\n\t\t\t\t}\n\t\t\t\tif (mTextViewSetting != null) {\n\t\t\t\t\tmTextViewSetting.setTextColor(mContext.getResources().getColor(\n\t\t\t\t\t\t\tR.color.grey5_color));\n\t\t\t\t}\n\t\t\t\tmTextView = (TextView) paramView.findViewById(R.id.item_name);\n\t\t\t\tmTextViewSetting = (TextView) paramView.findViewById(R.id.item_setting);\n\t\t\t\tif (isFirstInit) {\n\t\t\t\t\tisFirstInit = false;\n\t\t\t\t\tmTextColorChangeFlag = true;\n\t\t\t\t\tlistTextColorSet();\n\t\t\t\t}\n\t\t\t}",
"public void selectionChanged(Action item);",
"@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n\n }",
"@Override\n\t\tpublic void onPageSelected(int arg0)\n\t\t{\n\t\t\t\n\t\t}",
"public void updateHeader() {\n if (this.mBarState == 1) {\n updateHeaderKeyguardAlpha();\n }\n updateQsExpansion();\n }",
"public void onItemSelected(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\tlong arg3) {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void onPageSelected(int arg0) {\n\n\t\t\t}",
"@Override\r\n\t\t\tpublic void onPageSelected(int arg0) {\n\t\t\t}",
"private static SelectionListener getHeaderListener( final TableViewer tableViewer, final int columnIndex )\n {\n return new SelectionAdapter()\n {\n public void widgetSelected( SelectionEvent e )\n {\n if ( tableViewer == null )\n {\n return;\n }\n\n TableColumn column = ( TableColumn ) e.widget;\n resortTable( tableViewer, column, columnIndex );\n }\n };\n }",
"public void onHeaderRefreshComplete() {\n onHeaderRefreshComplete(true);\n }",
"public void onEventSelected(int position);",
"protected void informAboutSelection(int selectedIndex, ItemType itemType) {\n\t\t//System.out.println(\"GeneralItemList.informAboutSelection()\"+selectedIndex);\n\t}",
"public interface OnHeadlineSelectedListener {\n public void onChangeFragment(Fragment newFragment);\n }",
"private static SelectionListener getHeaderListener( final TreeViewer treeViewer, final int columnIndex )\n {\n return new SelectionAdapter()\n {\n public void widgetSelected( SelectionEvent e )\n {\n if ( treeViewer == null )\n {\n return;\n }\n\n TreeColumn column = ( TreeColumn ) e.widget;\n resortTree( treeViewer, column, columnIndex );\n }\n };\n }",
"@Override\n public void onPageSelected(int arg0) {\n }",
"public void menuClicked(MenuItem menuItemSelected);",
"public interface OnItemSelecetedListener {\n void onItemSelected(String link);\n }",
"public void onItemSelected(Long id);",
"public void onItemSelected(AdapterView<?> parent, View view,\n int pos, long id) {\n\n }",
"public interface OnSelectionChangeListener {\n void onItemSelect(HorizontalPicker picker, int index);\n }",
"@Override\n\tpublic void itemStateChanged(ItemEvent arg0) {\n\n\t}",
"@Override\n\tpublic void itemStateChanged(ItemEvent arg0) {\n\n\t}",
"@Override\n\tpublic boolean onMenuItemSelected(int featureId, MenuItem item) {\n\t\tOptionsMenu.selectItem(item,getApplicationContext());\n\t\treturn super.onMenuItemSelected(featureId, item);\n\t}",
"@FXML\n\tpublic void setSelectedItem(MouseEvent event) {\n\t\ttry {\n\t\t\tString s=inventoryList.getSelectionModel().getSelectedItem();\t// Get selected item\n\t\t\tItem i=Item.getItem(ItemList, s);\n\t\t\titemselect.setText(s);\t// Set selected item information\n\t\t\tif(i.getStat().equals(\"HP\"))\n\t\t\t\titemStats.setText(\"+\"+i.getChange()+\" Health\");\n\t\t\telse if(i.getStat().equals(\"DMG\"))\n\t\t\t\titemStats.setText(\"+\"+i.getChange()+\" Damage\");\n\t\t\telse\n\t\t\t\titemStats.setText(\"+\"+i.getChange()+\" Evasion\");\n\t\t} catch(Exception e) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t}",
"public void widgetSelected(SelectionEvent e) {\n table.setSelection(new TableItem[]{cursor.getRow()});\n }",
"@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n itemname = parent.getItemAtPosition(position).toString();\n }",
"@Override\n\tpublic boolean onMenuItemSelected(int featureId, MenuItem item) {\n\t\treturn super.onMenuItemSelected(featureId, item);\n\t}",
"@Override\n\t\tpublic void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n\t\t\tListView listView = (ListView) parent;\n\t\t\tString item = (String) listView.getSelectedItem();\n//\t\t\tToast.makeText(SearchGroupActivity.this, \"onItemSelected = \" + item, Toast.LENGTH_LONG).show();\n\t\t}"
] | [
"0.6965692",
"0.67747146",
"0.6742936",
"0.66799605",
"0.66799605",
"0.6542337",
"0.6192444",
"0.6168849",
"0.615",
"0.6149981",
"0.6092758",
"0.60149103",
"0.6008258",
"0.6008038",
"0.60028195",
"0.5994418",
"0.59768975",
"0.59589183",
"0.5949025",
"0.5940291",
"0.5940291",
"0.59387785",
"0.59230345",
"0.5913404",
"0.5913404",
"0.5909731",
"0.5909731",
"0.5900047",
"0.58923024",
"0.58836144",
"0.5876074",
"0.58601123",
"0.5852245",
"0.585114",
"0.5850199",
"0.5849173",
"0.5849173",
"0.58412313",
"0.58360475",
"0.5835853",
"0.58328605",
"0.5831355",
"0.5831059",
"0.5831059",
"0.5831059",
"0.5831059",
"0.5831059",
"0.5829657",
"0.5813939",
"0.5811708",
"0.58092356",
"0.5794238",
"0.5794238",
"0.57929295",
"0.5787297",
"0.5781221",
"0.577714",
"0.57668626",
"0.57358485",
"0.57358485",
"0.57358485",
"0.57310104",
"0.5724932",
"0.5723571",
"0.5719205",
"0.57158196",
"0.5711483",
"0.5710944",
"0.5708393",
"0.570628",
"0.5701773",
"0.5683777",
"0.5681938",
"0.56796837",
"0.5679472",
"0.5678722",
"0.5672967",
"0.56725675",
"0.5671145",
"0.56699497",
"0.5663819",
"0.566257",
"0.5657722",
"0.5655237",
"0.5654954",
"0.5654701",
"0.56493527",
"0.5649262",
"0.5642577",
"0.5637519",
"0.56344724",
"0.5633124",
"0.5627364",
"0.5627364",
"0.5621088",
"0.56115294",
"0.55985796",
"0.55898196",
"0.558289",
"0.55828637"
] | 0.77490926 | 0 |
Avoid creating hardware layer for header dock. | @Override
public boolean hasOverlappingRendering() {
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void createMainMenuHeaderComposite() {\n\n\t\tGridData gridData8 = new GridData();\n\t\tgridData8.grabExcessHorizontalSpace = true;\n\t\tgridData8.horizontalAlignment = GridData.FILL;\n\t\tgridData8.verticalAlignment = GridData.BEGINNING;\n\t\tgridData8.grabExcessVerticalSpace = true;\n\t\tGridData gridData7 = new GridData();\n\t\tgridData7.grabExcessHorizontalSpace = true;\n\t\tgridData7.horizontalAlignment = GridData.FILL;\n\t\tgridData7.verticalAlignment = GridData.END;\n\t\tgridData7.grabExcessVerticalSpace = true;\n\t\tGridData gridData21 = new GridData();\n\t\tgridData21.horizontalAlignment = GridData.FILL;\n\t\tgridData21.grabExcessHorizontalSpace = true;\n\t\tgridData21.grabExcessVerticalSpace = false;\n\t\tgridData21.heightHint = 150;\n\t\tgridData21.verticalAlignment = GridData.BEGINNING;\n\t\tGridLayout gridLayout = new GridLayout();\n\t\tgridLayout.horizontalSpacing = 50;\n\t\tgridLayout.marginWidth = 20;\n\t\tgridLayout.marginHeight = 0;\n\t\tgridLayout.verticalSpacing = 35;\n\t\tmainMenuHeaderComposite = new Composite(this, SWT.NONE);\n\t\tmainMenuHeaderComposite.setBackground(new Color(Display.getCurrent(),\n\t\t\t\t255, 255, 255));\n\t\tmainMenuHeaderComposite.setLayoutData(gridData21);\n\t\tmainMenuHeaderComposite.setLayout(gridLayout);\n\n\t\tlblTitle1 = new CbctlLabel(mainMenuHeaderComposite, SWT.CENTER);\n\t\tlblTitle1\n\t\t\t\t.setText(LabelLoader\n\t\t\t\t\t\t.getLabelValue(LabelKeyConstants.WELCOME_NOTE_ON_TOUCH_SCREEN_HOMEPAGE));\n\t\tlblTitle1\n\t\t\t\t.setFont(SDSControlFactory.getStandardTouchScreenFont());\n\t\tlblTitle1.setLayoutData(gridData7);\n\n\t\tlblTitle2 = new CbctlLabel(mainMenuHeaderComposite, SWT.CENTER);\n\t\tlblTitle2\n\t\t\t\t.setText(LabelLoader\n\t\t\t\t\t\t.getLabelValue(LabelKeyConstants.SELECT_NOTE_ON_TOUCH_SCREEN_HOMEPAGE));\n\t\tlblTitle2\n\t\t\t\t.setFont(SDSControlFactory.getStandardTouchScreenFont());\n\t\tlblTitle2.setLayoutData(gridData8);\n\t}",
"private void initHardware(){\n }",
"private void enableAndBuildHardwareLayer() {\n if (isHardwareAccelerated()) {\n // Turn on hardware layers for performance\n setLayerType(LAYER_TYPE_HARDWARE, null);\n\n // force building the layer, so you don't get a blip early in an animation\n // when the layer is created layer\n buildLayer();\n }\n }",
"@Override\n\tpublic boolean isHardware(){\n\t\treturn false;\n\t}",
"private void manageHeaderView() {\n PickupBoyDashboard.getInstance().manageHeaderVisibitlity(false);\n HeaderViewManager.getInstance().InitializeHeaderView(null, view, manageHeaderClick());\n HeaderViewManager.getInstance().setHeading(true, mActivity.getResources().getString(R.string.bokings));\n HeaderViewManager.getInstance().setLeftSideHeaderView(true, R.drawable.left_arrow);\n HeaderViewManager.getInstance().setRightSideHeaderView(false, R.drawable.left_arrow);\n HeaderViewManager.getInstance().setLogoView(false);\n HeaderViewManager.getInstance().setProgressLoader(false, false);\n\n }",
"private void createHeaderPanel()\n\t{\n\t\theaderPanel.setLayout (new GridLayout(2,1));\n\t\theaderPanel.add(textPanel);\n\t\theaderPanel.add(functionPanel);\n\t\t\t\t\t\n\t}",
"void enableAutomaticHeaderImage();",
"private void installHPHardwareTable() {\n TrafficSelector.Builder selector = DefaultTrafficSelector.builder();\n\n TrafficTreatment.Builder treatment = DefaultTrafficTreatment.builder();\n //treatment.setOutput(PortNumber.NORMAL);\n treatment.transition(HP_SOFTWARE_TABLE);\n\n FlowRule rule = DefaultFlowRule.builder().forDevice(this.deviceId)\n .withSelector(selector.build())\n .withTreatment(treatment.build())\n .withPriority(0)\n .fromApp(appId)\n .makePermanent()\n .forTable(HP_HARDWARE_TABLE)\n .build();\n\n this.applyRules(true, rule);\n }",
"public Hardware() {\n hwMap = null;\n }",
"private void buildHeader(Layout parent) {\n\n }",
"void disableAutomaticHeaderImage();",
"public HWDiskStore() {\n this.diskStore = new oshi.hardware.HWDiskStore();\n }",
"public DummyHandLayout() {\r\n//\t\tparent = null;\r\n\t}",
"public HwPeripheralFactoryImpl() {\r\n\t\tsuper();\r\n\t}",
"protected abstract void initHardwareInstructions();",
"@Override\n public void addHeader(Div headerDiv)\n {\n getHeaders().add(headerDiv);\n headerDiv.addClass(JQLayoutCSSThemeBlockNames.UI_Layout_Header.toString());\n //getChildren().add(headers.size() - 1, headerDiv);\n }",
"@Override\n\tprotected void checkHardware() {\n\t\tsuper.checkHardware();\n\t}",
"private org.gwtbootstrap3.client.ui.PanelHeader get_f_PanelHeader76() {\n return build_f_PanelHeader76();\n }",
"public void hardwareResources() {\n\t\tSystem.out.println(\"I am the Hardware implemented through Multiple inheritence in Desktop class\");\r\n\r\n\t}",
"public HardwareFacade getHardware() {\n\treturn hf;\n }",
"@Before\n public void setUp() {\n synchronized (mWm.mGlobalLock) {\n spyOn(mDisplayContent);\n doNothing().when(mDisplayContent).layoutAndAssignWindowLayersIfNeeded();\n }\n }",
"private static void assembleDockLayoutPanel() {\n dockLayoutPanel.addNorth(headerPanel, 3);\n dockLayoutPanel.addSouth(footerPanel, 3);\n dockLayoutPanel.addEast(eastPanel, 0);\n dockLayoutPanel.addWest(controlPanel, 24);\n dockLayoutPanel.add(middleMainPanel);\n }",
"public void resetGraphicsWindowHeaderAndMeasurement() {\r\n\t\tif (Thread.currentThread().getId() == DataExplorer.application.getThreadId()) {\r\n\t\t\tthis.histoGraphicsTabItem.clearHeaderAndComment();\r\n\t\t\tthis.histoGraphicsTabItem.getGraphicsComposite().setModeState(HistoGraphicsMode.RESET);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tGDE.display.asyncExec(new Runnable() {\r\n\t\t\t\tpublic void run() {\r\n\t\t\t\t\tDataExplorer.this.histoGraphicsTabItem.clearHeaderAndComment();\r\n\t\t\t\t\tDataExplorer.this.histoGraphicsTabItem.getGraphicsComposite().setModeState(HistoGraphicsMode.RESET);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic void wipeWindShield() {\n\t\t\r\n\t}",
"private void installHPSoftwareTable() {}",
"public void dock() {\n if (getSpeed() == 0) {\n inDock = true;\n }\n }",
"@Override\n\tprotected void createCompHeader() {\n\t\tString headerTxt = \"Add a New Pharmacy\";\n\t\tiDartImage icoImage = iDartImage.PHARMACYUSER;\n\t\tbuildCompHeader(headerTxt, icoImage);\n\t}",
"public void forceNotInsideHeader() {\n insideHeader = false;\n }",
"void openHardware(){\n if(hardware!=null && hardware.isOpen()){\n playMode=PlayMode.LIVE; // in case (like StereoHardwareInterface) where device can be open but not by MotionViewer\n return;\n }\n try{\n hardware=(SiLabsC8051F320_OpticalFlowHardwareInterface)OpticalFlowHardwareInterfaceFactory.instance().getFirstAvailableInterface();\n hardware.setChip(chip);\n chip.setHardwareInterface(hardware);\n hardware.open();\n\n\n \n if(hardware==null) {\n fixLoggingControls();\n fixBiasgenControls();\n return;\n }\n\n fixLoggingControls();\n fixBiasgenControls();\n // note it is important that this openHardware succeeed BEFORE hardware is assigned to biasgen, which immeiately tries to openHardware and download biases, creating a storm of complaints if not sucessful!\n \n// if(hardware instanceof BiasgenHardwareInterface){\n// chip.getBiasgen().sendConfiguration(chip.getBiasgen());\n// chip.setHardwareInterface(hardware); // if we do this, events do not start coming again after reconnect of device\n// biasgen=chip.getBiasgen();\n// if(biasgenFrame==null) {\n// biasgenFrame=new BiasgenFrame(biasgen); // should check if exists...\n// }\n// }\n \n setPlaybackControlsEnabledState(true);\n setPlayMode(PlayMode.LIVE);\n setTitleAccordingToState();\n }catch(Exception e){\n log.warning(e.getMessage());\n if(hardware!= null) hardware.close();\n setPlaybackControlsEnabledState(false);\n fixLoggingControls();\n fixBiasgenControls();\n setPlayMode(PlayMode.WAITING);\n }\n }",
"public void createHeader() {\n\t\tHBox box = new HBox();\n\t\tButton printBtn = new Button(\"Print\");\n\t\tprintBtn.getStyleClass().addAll(\"btn\", \"btn-primary\");\n\t\tButton printAllBtn = new Button(\"Print allemaal\");\n\t\tprintAllBtn.getStyleClass().addAll(\"btn\", \"btn-primary\");\n\t\tButton cancelBtn = new Button(\"Annuleer\");\n\t\tcancelBtn.getStyleClass().addAll(\"btn\", \"btn-danger\");\n\t\tbox.getChildren().addAll(createTitle(), printBtn, printAllBtn, cancelBtn);\n\t\t\n\t\tprintBtn.setOnAction(e -> {\n\t\t\ttry {\n\t\t\t\tprintController.printSelected(debiteuren);\n\t\t\t} catch (Exception e1) {\n\t\t\t\te1.printStackTrace();\n\t\t\t\tSystem.out.println(\"Nothing selected mate\");\n\t\t\t}\n\t\t});\n\t\t\n\t\tprintAllBtn.setOnAction(e -> {\n\t\t\ttry {\n\t\t\t\tprintController.printAll(debiteuren);\n\t\t\t} catch (Exception e1) {\n\t\t\t\te1.printStackTrace();\n\t\t\t\tSystem.out.println(\"Nothing selected mate\");\n\t\t\t}\n\t\t});\n\t\t\n\t\tcancelBtn.setOnAction(e -> {\n\t\t\tprintController.cancel();\n\t\t});\n\t\t\n\t\tsetTop(box);\n\t}",
"Component createComponent(Component paramComponent) {\n/* 212 */ if (GraphicsEnvironment.isHeadless())\n/* */ {\n/* 214 */ return null;\n/* */ }\n/* 216 */ return new HeavyWeightWindow(getParentWindow(paramComponent));\n/* */ }",
"public void cleanHeaderAndCommentInGraphicsWindow() {\r\n\t\tif (Thread.currentThread().getId() == DataExplorer.application.getThreadId()) {\r\n\t\t\tthis.graphicsTabItem.clearHeaderAndComment();\r\n\t\t}\r\n\t\telse {\r\n\t\t\tGDE.display.asyncExec(new Runnable() {\r\n\t\t\t\tpublic void run() {\r\n\t\t\t\t\tDataExplorer.this.graphicsTabItem.clearHeaderAndComment();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}",
"private void createTopPanel(){\n computerPaquetView = new ViewDeckVisible(true);\n this.getContentPane().add(computerPaquetView);\n }",
"private DockItems() {}",
"public interface HeadTimerLayerPresenter extends BasePresenter {\n\n void loadHeadLayer();\n\n void removeHeadLayer();\n}",
"private Platform() {\n\t\t\n\t}",
"public void hardwareResources() {\n\t\t\r\n\t}",
"public interface HeaderData extends StickyMainData {\n @LayoutRes\n int getHeaderLayout();\n\n int getHeaderType();\n}",
"private void setUpHeader() {\n header = new JPanel();\n header.setLayout(new BorderLayout());\n header.setBackground(Color.darkGray);\n highscoreTitle = new JLabel();\n highscoreTitle.setText(\"Highscores:\");\n highscoreTitle.setForeground(Color.white);\n highscoreTitle.setHorizontalAlignment(JLabel.CENTER);\n highscoreTitle.setFont(new Font(\"Arial Black\", Font.BOLD, 24));\n header.add(highscoreTitle, BorderLayout.CENTER);\n setUpSortingBtn();\n\n rootPanel.add(header, BorderLayout.NORTH);\n }",
"private void setupUIElements() {\n setBadgeDrawable(ContextCompat.getDrawable(getActivity(), R.drawable.company_logo));\n //setTitle(getString(R.string.browse_title));\n\n setHeadersState(HEADERS_ENABLED);\n setHeadersTransitionOnBackEnabled(true);\n\n // Set headers and rows background color\n setBrandColor(ContextCompat.getColor(getActivity(), R.color.browse_headers_bar));\n mBackgroundManager.setColor(ContextCompat.getColor(getActivity(),\n R.color.browse_background_color));\n\n // Disables the scaling of rows when Headers bar is in open state.\n enableRowScaling(false);\n\n // Here is where a header presenter can be set to customize the look\n // of the headers list.\n setHeaderPresenterSelector(new PresenterSelector() {\n @Override\n public Presenter getPresenter(Object o) {\n\n return new RowHeaderPresenter();\n }\n });\n }",
"public void addKieHeaders() {\n\t\tHeaderManager headerManager = new HeaderManager();\n\t\theaderManager.add(new Header(\"content-type\", \"application/json\"));\n\t\theaderManager.add(new Header(\"accept\", \"application/json\"));\n\t\theaderManager.add(new Header(\"X-KIE-ContentType\", \"JSON\"));\n\t\theaderManager.setName(\"HTTP Header Manager\");\n\t\theaderManager.setProperty(TestElement.TEST_CLASS, HeaderManager.class.getName());\n\t\theaderManager.setProperty(TestElement.GUI_CLASS, HeaderPanel.class.getName());\n\t\tthis.testPlanHashTree.add(headerManager);\n\t}",
"public JLabel buildDefaultHeader(){\n JLabel returnHeader = new JLabel();\n returnHeader.setHorizontalAlignment(SwingConstants.LEFT);\n returnHeader.setFont(new Font(\"Comic Sans MS\", Font.PLAIN, 48)); // Great font, makes it pop\n returnHeader.setForeground(Color.WHITE);\n returnHeader.setBackground(Color.BLACK);\n \n return returnHeader;\n }",
"public interface BaseHeaderOperator {\n View addLeftHeader(ViewGroup llLeftHeader);\n View addRightHeader(ViewGroup llRightHeader);\n void setDefaultLeftHeader();\n}",
"private HorizontalLayout getHeader() {\n HorizontalLayout header = new HorizontalLayout();\n header.setWidth(\"100%\");\n header.setHeight(\"100px\");\n // TODO move this into a separate HeaderView class\n header.addComponent(new Label(\"Patient Management System Team Green\"));\n return header;\n }",
"protected void createInternalFrame() {\n\t\tJInternalFrame frame = new JInternalFrame();\n\t\tframe.setVisible(true);\n\t\tframe.setClosable(true);\n\t\tframe.setResizable(true);\n\t\tframe.setFocusable(true);\n\t\tframe.setSize(new Dimension(300, 200));\n\t\tframe.setLocation(100, 100);\n\t\tdesktop.add(frame);\n\t\ttry {\n\t\t\tframe.setSelected(true);\n\t\t} catch (java.beans.PropertyVetoException e) {\n\t\t}\n\t}",
"private void setupToolbars(){\n\t\ttopBar = new TopBar(0, 0, setup.getFrameWidth()+12, Constants.WINDOW_HEADER_HEIGHT, \n\t\t\t\tConstants.COLOR_HEADER_1, setup);\n\t\t\n\t\tbottomBar = new BottomBar(0, \n\t\t\t\tConstants.WINDOW_HEADER_HEIGHT+(Constants.WINDOW_MAP_MARGIN*2)+Constants.WINDOW_MAP_HEIGHT, \n\t\t\t\tsetup.getFrameWidth()+12, \n\t\t\t\tConstants.WINDOW_HEADER_HEIGHT, \n\t\t\t\tConstants.COLOR_HEADER_1, setup);\n\t\t\n\t\trightBar = new RightBar((Constants.WINDOW_MAP_MARGIN*2)+Constants.WINDOW_MAP_WIDTH, \n\t\t\t\tConstants.WINDOW_HEADER_HEIGHT, \n\t\t\t\tConstants.WINDOW_RIGHT_BAR_WIDTH, \n\t\t\t\tConstants.WINDOW_RIGHT_BAR_HEIGHT, \n\t\t\t\tConstants.COLOR_MAP_LAND, setup);\n\t}",
"public void createDisplayHeader()\r\n\t{\r\n\t\tboolean isEType;\r\n\t\tint currentK, lowestJValue, highestJValue;\r\n\r\n\t\t// redundant now\r\n\t\tisEType = getIsEType();\r\n\t\tcurrentK = getCurrentK();\r\n\t\tlowestJValue = getLowestJValue();\r\n\t\thighestJValue = getHighestJValue();\r\n\r\n\t\tString symmetry;\r\n\t\tString kOutput;\r\n\r\n\t\tif (isEType) {\r\n\t\t\tif (currentK >= 0) {\r\n\t\t\t\tkOutput = currentK + \"\";\r\n\t\t\t\tsymmetry = \"E1\";\r\n\t\t\t} else {\r\n\t\t\t\tkOutput = Math.abs(currentK) + \"\";\r\n\t\t\t\tsymmetry = \"E2\";\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tkOutput = Math.abs(currentK) + \"\";\r\n\t\t\tsymmetry = \"A\";\r\n\r\n\t\t\tif (currentK >= 0) {\r\n\t\t\t\tkOutput += \"+\";\r\n\t\t\t} else {\r\n\t\t\t\tkOutput += \"-\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tString ls = System.lineSeparator();\r\n\t\tmainHeader = \"================================================================\"\r\n\t\t\t\t+ ls + \"Symmetry type:\\t\\t\\t\\t\\t\" + symmetry + ls\r\n\t\t\t\t+ \"The K of the lower energy is:\\t\\t\\t\" + kOutput + ls + \"The input \"\r\n\t\t\t\t+ INPUT_BRANCH_TYPE + \" branch was flipped:\\t\\t\\t\" + inputIsFlipped + ls\r\n\t\t\t\t+ \"The input \" + INPUT_BRANCH_TYPE + \" branch used a J range of:\\t\\t\"\r\n\t\t\t\t+ lowestJValue + \" to \" + highestJValue\r\n\t\t\t\t+ ls + ls + \"Results for these selections are...\" + ls;\r\n\r\n\t\tsetHeaderDisplayState(true);\r\n\t}",
"protected void setupImpl()\n {\n hint(DISABLE_DEPTH_TEST);\n font = loadFont(\"Futura-CondensedExtraBold-200.vlw\");\n textFont(font, 200);\n mode = 0;\n\n // Mode 3\n w = width * 2;\n dx = (TWO_PI / period) * xspacing;\n yvalues = new float[w/xspacing];\n\n // Mode 5\n mod = loadImage(\"mod.png\");\n modSizes = new int[scaledBandLevels.length];\n }",
"public HardwareSwitch() {\r\n\t\tif (modelPackage == null) {\r\n\t\t\tmodelPackage = HardwarePackage.eINSTANCE;\r\n\t\t}\r\n\t}",
"public void addToolPack(UDFFinder arg0) {\n\n\t}",
"@Override\r\n\t\tpublic JPanel getHotKeysPanel() {\n\t\t\treturn null;\r\n\t\t}",
"public boolean isDockable() {\n return true;\r\n }",
"@Override\r\n\tpublic void BuildHead() {\n g.drawRoundRect(0, 0, 50, 20, 30, 30);\r\n\t}",
"public void mo21881w() {\n this.f24505H = false;\n }",
"protected void createContents() {\r\n\t\tshell = new Shell();\r\n\t\tshell.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tshell.setSize(599, 779);\r\n\t\tshell.setText(\"إضافة كتاب جديد\");\r\n\r\n\t\tButton logoBtn = new Button(shell, SWT.NONE);\r\n\t\tlogoBtn.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tMainMenuKaff mm = new MainMenuKaff();\r\n\t\t\t\tshell.close();\r\n\t\t\t\tmm.open();\r\n\t\t\t}\r\n\t\t});\r\n\t\tlogoBtn.setImage(SWTResourceManager\r\n\t\t\t\t.getImage(\"C:\\\\Users\\\\al5an\\\\git\\\\KaffPlatform\\\\KaffPlatformProject\\\\img\\\\logo for header button.png\"));\r\n\t\tlogoBtn.setBounds(497, 0, 64, 50);\r\n\r\n\t\tLabel headerLabel = new Label(shell, SWT.NONE);\r\n\t\theaderLabel.setImage(SWTResourceManager\r\n\t\t\t\t.getImage(\"C:\\\\Users\\\\al5an\\\\git\\\\KaffPlatform\\\\KaffPlatformProject\\\\img\\\\KaffPlatformheader.jpg\"));\r\n\t\theaderLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\theaderLabel.setBounds(0, 0, 607, 50);\r\n\r\n\t\tLabel bookInfoLabel = new Label(shell, SWT.NONE);\r\n\t\tbookInfoLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tbookInfoLabel.setForeground(SWTResourceManager.getColor(210, 105, 30));\r\n\t\tbookInfoLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.BOLD));\r\n\t\tbookInfoLabel.setAlignment(SWT.CENTER);\r\n\t\tbookInfoLabel.setBounds(177, 130, 192, 28);\r\n\t\tbookInfoLabel.setText(\"معلومات الكتاب\");\r\n\r\n\t\tLabel bookTitleLabel = new Label(shell, SWT.NONE);\r\n\t\tbookTitleLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tbookTitleLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tbookTitleLabel.setBounds(415, 203, 119, 28);\r\n\t\tbookTitleLabel.setText(\"عنوان الكتاب\");\r\n\r\n\t\tBookTitleTxt = new Text(shell, SWT.BORDER);\r\n\t\tBookTitleTxt.setBounds(56, 206, 334, 24);\r\n\r\n\t\tLabel bookIDLabel = new Label(shell, SWT.NONE);\r\n\t\tbookIDLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tbookIDLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tbookIDLabel.setBounds(415, 170, 119, 32);\r\n\t\tbookIDLabel.setText(\"رمز الكتاب\");\r\n\r\n\t\tLabel editionLabel = new Label(shell, SWT.NONE);\r\n\t\teditionLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\teditionLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\teditionLabel.setBounds(415, 235, 119, 28);\r\n\t\teditionLabel.setText(\"إصدار الكتاب\");\r\n\r\n\t\teditionTxt = new Text(shell, SWT.BORDER);\r\n\t\teditionTxt.setBounds(271, 240, 119, 24);\r\n\r\n\t\tLabel lvlLabel = new Label(shell, SWT.NONE);\r\n\t\tlvlLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tlvlLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tlvlLabel.setText(\"المستوى\");\r\n\t\tlvlLabel.setBounds(415, 269, 119, 27);\r\n\r\n\t\tCombo lvlBookCombo = new Combo(shell, SWT.NONE);\r\n\t\tlvlBookCombo.setItems(new String[] { \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\" });\r\n\t\tlvlBookCombo.setBounds(326, 272, 64, 25);\r\n\t\tlvlBookCombo.select(0);\r\n\r\n\t\tLabel priceLabel = new Label(shell, SWT.NONE);\r\n\t\tpriceLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tpriceLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tpriceLabel.setText(\"السعر\");\r\n\t\tpriceLabel.setBounds(415, 351, 119, 28);\r\n\r\n\t\tGroup groupType = new Group(shell, SWT.NONE);\r\n\t\tgroupType.setBounds(56, 320, 334, 24);\r\n\r\n\t\tButton button = new Button(groupType, SWT.RADIO);\r\n\t\tbutton.setSelection(true);\r\n\t\tbutton.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tbutton.setBounds(21, 0, 73, 21);\r\n\t\tbutton.setText(\"مجاناً\");\r\n\r\n\t\tButton button_1 = new Button(groupType, SWT.RADIO);\r\n\t\tbutton_1.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tbutton_1.setBounds(130, 0, 73, 21);\r\n\t\tbutton_1.setText(\"إعارة\");\r\n\r\n\t\tButton button_2 = new Button(groupType, SWT.RADIO);\r\n\t\tbutton_2.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tbutton_2.setBounds(233, 0, 80, 21);\r\n\t\tbutton_2.setText(\"للبيع\");\r\n\r\n\t\tpriceTxtValue = new Text(shell, SWT.BORDER);\r\n\t\tpriceTxtValue.setBounds(326, 355, 64, 24);\r\n\r\n\t\tLabel ownerInfoLabel = new Label(shell, SWT.NONE);\r\n\t\townerInfoLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\townerInfoLabel.setForeground(SWTResourceManager.getColor(210, 105, 30));\r\n\t\townerInfoLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.BOLD));\r\n\t\townerInfoLabel.setText(\"معلومات صاحبة الكتاب\");\r\n\t\townerInfoLabel.setAlignment(SWT.CENTER);\r\n\t\townerInfoLabel.setBounds(147, 400, 242, 28);\r\n\r\n\t\tLabel ownerIDLabel = new Label(shell, SWT.NONE);\r\n\t\townerIDLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\townerIDLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\townerIDLabel.setBounds(415, 441, 119, 34);\r\n\t\townerIDLabel.setText(\"الرقم الأكاديمي\");\r\n\r\n\t\townerIDValue = new Text(shell, SWT.BORDER);\r\n\t\townerIDValue.setBounds(204, 444, 186, 24);\r\n\t\t// need to check if the owner is already in the database...\r\n\r\n\t\tLabel nameLabel = new Label(shell, SWT.NONE);\r\n\t\tnameLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tnameLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tnameLabel.setBounds(415, 481, 119, 28);\r\n\t\tnameLabel.setText(\"الاسم الثلاثي\");\r\n\r\n\t\tnameTxt = new Text(shell, SWT.BORDER);\r\n\t\tnameTxt.setBounds(56, 485, 334, 24);\r\n\r\n\t\tLabel phoneLabel = new Label(shell, SWT.NONE);\r\n\t\tphoneLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tphoneLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tphoneLabel.setText(\"رقم الجوال\");\r\n\t\tphoneLabel.setBounds(415, 515, 119, 27);\r\n\r\n\t\tphoneTxt = new Text(shell, SWT.BORDER);\r\n\t\tphoneTxt.setBounds(204, 521, 186, 24);\r\n\r\n\t\tLabel ownerLvlLabel = new Label(shell, SWT.NONE);\r\n\t\townerLvlLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\townerLvlLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\townerLvlLabel.setBounds(415, 548, 119, 31);\r\n\t\townerLvlLabel.setText(\"المستوى\");\r\n\r\n\t\tCombo owneLvlCombo = new Combo(shell, SWT.NONE);\r\n\t\towneLvlCombo.setItems(new String[] { \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\" });\r\n\t\towneLvlCombo.setBounds(326, 554, 64, 25);\r\n\t\towneLvlCombo.select(0);\r\n\r\n\t\tLabel emailLabel = new Label(shell, SWT.NONE);\r\n\t\temailLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\temailLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\temailLabel.setBounds(415, 583, 119, 38);\r\n\t\temailLabel.setText(\"البريد الإلكتروني\");\r\n\r\n\t\temailTxt = new Text(shell, SWT.BORDER);\r\n\t\temailTxt.setBounds(56, 586, 334, 24);\r\n\r\n\t\tButton addButton = new Button(shell, SWT.NONE);\r\n\t\taddButton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\r\n\t\t\t\ttry {\r\n\t\t\t\t\tString bookQuery = \"INSERT INTO kaff.BOOK(bookID, bookTitle, price, level,available, type) VALUES (?, ?, ?, ?, ?, ?, ?)\";\r\n\t\t\t\t\tString bookEdition = \"INSERT INTO kaff.bookEdition(bookID, edition, year) VALUES (?, ?, ?)\";\r\n\t\t\t\t\tString ownerQuery = \"INSERT INTO kaff.user(userID, fname, mname, lastname, phone, level, personalEmail, email) VALUES (?, ?, ?, ?, ?, ?, ?, ?)\";\r\n\r\n\t\t\t\t\tString bookID = bookIDTxt.getText();\r\n\t\t\t\t\tString bookTitle = BookTitleTxt.getText();\r\n\t\t\t\t\tint bookLevel = lvlBookCombo.getSelectionIndex();\r\n\t\t\t\t\tString type = groupType.getText();\r\n\t\t\t\t\tdouble price = Double.parseDouble(priceTxtValue.getText());\r\n\t\t\t\t\tboolean available = true;\r\n\r\n\t\t\t\t\t// must error handle\r\n\t\t\t\t\tString[] ed = editionTxt.getText().split(\" \");\r\n\t\t\t\t\tString edition = ed[0];\r\n\t\t\t\t\tString year = ed[1];\r\n\r\n\t\t\t\t\tString ownerID = ownerIDValue.getText();\r\n\r\n\t\t\t\t\t// error handle if the user enters two names or just first name\r\n\t\t\t\t\tString[] name = nameTxt.getText().split(\" \");\r\n\t\t\t\t\tString fname = \"\", mname = \"\", lname = \"\";\r\n\t\t\t\t\tSystem.out.println(\"name array\" + name);\r\n\t\t\t\t\tif (name.length > 2) {\r\n\t\t\t\t\t\tfname = name[0];\r\n\t\t\t\t\t\tmname = name[1];\r\n\t\t\t\t\t\tlname = name[2];\r\n\t\t\t\t\t}\r\n\t\t\t\t\tString phone = phoneTxt.getText();\r\n\t\t\t\t\tint userLevel = owneLvlCombo.getSelectionIndex();\r\n\t\t\t\t\tString email = emailTxt.getText();\r\n\r\n\t\t\t\t\tDatabase.openConnection();\r\n\t\t\t\t\tPreparedStatement bookStatement = Database.getConnection().prepareStatement(bookQuery);\r\n\r\n\t\t\t\t\tbookStatement.setString(1, bookID);\r\n\t\t\t\t\tbookStatement.setString(2, bookTitle);\r\n\t\t\t\t\tbookStatement.setInt(3, bookLevel);\r\n\t\t\t\t\tbookStatement.setString(4, type);\r\n\t\t\t\t\tbookStatement.setDouble(5, price);\r\n\t\t\t\t\tbookStatement.setBoolean(6, available);\r\n\r\n\t\t\t\t\tint bookre = bookStatement.executeUpdate();\r\n\r\n\t\t\t\t\tbookStatement = Database.getConnection().prepareStatement(bookEdition);\r\n\t\t\t\t\tbookStatement.setString(1, bookID);\r\n\t\t\t\t\tbookStatement.setString(2, edition);\r\n\t\t\t\t\tbookStatement.setString(3, year);\r\n\r\n\t\t\t\t\tint edResult = bookStatement.executeUpdate();\r\n\r\n\t\t\t\t\tPreparedStatement ownerStatement = Database.getConnection().prepareStatement(ownerQuery);\r\n\t\t\t\t\townerStatement.setString(1, ownerID);\r\n\t\t\t\t\townerStatement.setString(2, fname);\r\n\t\t\t\t\townerStatement.setString(3, mname);\r\n\t\t\t\t\townerStatement.setString(4, lname);\r\n\t\t\t\t\townerStatement.setString(5, phone);\r\n\t\t\t\t\townerStatement.setInt(6, userLevel);\r\n\t\t\t\t\townerStatement.setString(7, ownerID + \"iau.edu.sa\");\r\n\t\t\t\t\townerStatement.setString(8, email);\r\n\t\t\t\t\tint ownRes = ownerStatement.executeUpdate();\r\n\r\n\t\t\t\t\tSystem.out.println(\"results: \" + ownRes + \" \" + edResult + \" bookre\");\r\n\t\t\t\t\t// test result of excute Update\r\n\t\t\t\t\tif (ownRes != 0 && edResult != 0 && bookre != 0) {\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Data is updated\");\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Data is not updated\");\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tDatabase.closeConnection();\r\n\t\t\t\t} catch (SQLException sql) {\r\n\t\t\t\t\tSystem.out.println(sql);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\taddButton.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\taddButton.setBounds(54, 666, 85, 26);\r\n\t\taddButton.setText(\"إضافة\");\r\n\r\n\t\tButton backButton = new Button(shell, SWT.NONE);\r\n\t\tbackButton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tAdminMenu am = new AdminMenu();\r\n\t\t\t\tshell.close();\r\n\t\t\t\tam.open();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbackButton.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tbackButton.setBounds(150, 666, 85, 26);\r\n\t\tbackButton.setText(\"رجوع\");\r\n\r\n\t\tLabel label = new Label(shell, SWT.NONE);\r\n\t\tlabel.setBounds(177, 72, 192, 21);\r\n\t\tlabel.setText(\"إضافة كتاب جديد\");\r\n\r\n\t\tLabel label_1 = new Label(shell, SWT.NONE);\r\n\t\tlabel_1.setBounds(22, 103, 167, 21);\r\n\t\t// get user name here to display\r\n\t\tString name = getUserName();\r\n\t\tlabel_1.setText(\"مرحباً ...\" + name);\r\n\r\n\t\tbookIDTxt = new Text(shell, SWT.BORDER);\r\n\t\tbookIDTxt.setBounds(271, 170, 119, 24);\r\n\r\n\t}",
"private void makeContainer(){\n Container X = (Container) ((SpringGridLayout) headlineContainer.getLayout()).getChild(1, 0);\n if (!(X == null)) headlineContainer.removeChild(X);\n\n Container sub = new Container(new SpringGridLayout(Axis.X,Axis.Y,FillMode.Last,FillMode.None));\n sub.setBackground(null); // just in case style sets an bg here\n Container sub1 = new Container();\n sub1.setBackground(null);\n Container sub2 = new Container();\n sub2.setBackground(null);\n Container sub3 = new Container();\n sub3.setBackground(null);\n\n sub.addChild(sub1);\n sub.addChild(sub2);\n sub.addChild(sub3);\n\n headlineContainer.addChild(sub ,1,0);\n/*\n sub2.setName(\"TEST\");\n sub3.setBackground(new QuadBackgroundComponent(ColorRGBA.Pink));\n\n // sub1.setPreferredSize(new Vector3f(25,50,0));\n sub1.setBackground(new QuadBackgroundComponent(ColorRGBA.Green));\n */\n }",
"private void createComposite() {\n \t\t\tString[] weekDays = dateFormatSymbols.getWeekdays();\n \t\t\tGridLayout gridLayout1 = new GridLayout();\n \t\t\tgridLayout1.numColumns = 7;\n \t\t\tgridLayout1.makeColumnsEqualWidth = true;\n \t\t\tGridData gridData = new org.eclipse.swt.layout.GridData();\n \t\t\tgridData.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;\n \t\t\tgridData.grabExcessHorizontalSpace = true;\n \t\t\tgridData.grabExcessVerticalSpace = false;\n \t\t\tgridData.horizontalSpan = 3;\n \t\t\tgridData.verticalAlignment = org.eclipse.swt.layout.GridData.CENTER;\n \t\t\theaderComposite = new Composite(this, SWT.NONE);\n \t\t\theaderComposite.setLayoutData(gridData);\n \t\t\theaderComposite.setLayout(gridLayout1);\n \t\t\tGridData labelGridData = new org.eclipse.swt.layout.GridData();\n \t\t\tlabelGridData.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;\n \t\t\tlabelGridData.grabExcessHorizontalSpace = true;\n \t\t\tlabelGridData.verticalAlignment = org.eclipse.swt.layout.GridData.CENTER;\n \t\t\tfor (int i = 1; i < 8; ++i) {\n \t\t\t\tLabel headerLabel = new Label(headerComposite, SWT.CENTER);\n \t\t\t\theaderLabel.setText(weekDays[i].substring(0, 3));\n \t\t\t\theaderLabel.setLayoutData(labelGridData);\n \t\t\t}\n \t\t}",
"@Override\n protected Layout constructShellLayout() {\n GridLayout mainLayout = new GridLayout(1, false);\n\n return mainLayout;\n }",
"@Override\n\tprotected void drawGuiContainerForegroundLayer(int par1, int par2) {\n \n\t\tif(getStyle() == Style.MODERN) {\n\t\t\tint xOffset = 0;\n\t\t\tint yOffset = 0;\n\t\t\tint xInvOffset = 0;\n\t\t\tint yInvOffset = 0;\n\t\t\t\n\t\t\tif(header == 0) {\n\t\t\t\txOffset = -15;\n\t\t\t\tyOffset = -3;\n\t\t\t}\n\t\t\tif(header == 4) {\n\t\t\t\txOffset = 30;\n\t\t\t\tyOffset = -3;\n\t\t\t}\n\t\t\tif(header_type == 3) {\n\t\t\t\txInvOffset = -8;\n\t\t\t\tyInvOffset = 3;\n\t\t\t}\n\t\t\tif(header_type == 4) {\n\t\t\t\txInvOffset = -5;\n\t\t\t\tyInvOffset = 2;\n\t\t\t}\n\t\t\t\n\t\t\tthis.fontRenderer.drawString(TextFormatting.WHITE + this.getName(), 176 / 2 - fontRenderer.getStringWidth(this.getName()) / 2 + xOffset, 5 + yOffset, 4210752);\n\t\t\tthis.fontRenderer.drawString(TextFormatting.WHITE + GCCoreUtil.translate(\"container.inventory\"), 15 + xInvOffset, this.ySize - 24*3 - 13 + yInvOffset, 4210752);\n\t\t\n\t\t} else {\n\t\t\tthis.fontRenderer.drawString(TextFormatting.DARK_GRAY + this.getName(), 176 / 2 - fontRenderer.getStringWidth(this.getName()) / 2, 5, 4210752);\n\t\t\tthis.fontRenderer.drawString(TextFormatting.DARK_GRAY + GCCoreUtil.translate(\"container.inventory\"), 8, this.ySize - 24*3 - 8, 4210752);\n\t\t}\n\t\t\n\n\t}",
"private View createMainLayerView(Context context) {\n if (this.mLibraryView == null) {\n AnytimeTabletLibraryViewV2Binding inflate = AnytimeTabletLibraryViewV2Binding.inflate(LayoutInflater.from(context));\n this.mLibraryView = (LibraryView) inflate.getRoot();\n this.mLibraryView.initialize((AnytimeUIPanelAppBase) this, (ViewDataBinding) inflate);\n this.mLibraryView.onShow(\"\");\n return this.mLibraryView;\n }\n throw new UnsupportedOperationException(\"Trying to recreate main layer!\");\n }",
"private void initUI() {\n\t\tthis.horizontalLayout = new XdevHorizontalLayout();\n\t\tthis.gridLayout = new XdevGridLayout();\n\t\tthis.button = new XdevButton();\n\t\tthis.button2 = new XdevButton();\n\t\tthis.label = new XdevLabel();\n\n\t\tthis.button.setCaption(\"go to HashdemoView\");\n\t\tthis.button2.setCaption(\"go to CommonView\");\n\t\tthis.label.setValue(\"Go into code tab to view comments\");\n\n\t\tthis.gridLayout.setColumns(2);\n\t\tthis.gridLayout.setRows(2);\n\t\tthis.button.setWidth(200, Unit.PIXELS);\n\t\tthis.button.setHeight(-1, Unit.PIXELS);\n\t\tthis.gridLayout.addComponent(this.button, 0, 0);\n\t\tthis.button2.setWidth(200, Unit.PIXELS);\n\t\tthis.button2.setHeight(-1, Unit.PIXELS);\n\t\tthis.gridLayout.addComponent(this.button2, 1, 0);\n\t\tthis.label.setWidth(100, Unit.PERCENTAGE);\n\t\tthis.label.setHeight(-1, Unit.PIXELS);\n\t\tthis.gridLayout.addComponent(this.label, 0, 1, 1, 1);\n\t\tthis.gridLayout.setComponentAlignment(this.label, Alignment.TOP_CENTER);\n\t\tthis.gridLayout.setSizeUndefined();\n\t\tthis.horizontalLayout.addComponent(this.gridLayout);\n\t\tthis.horizontalLayout.setComponentAlignment(this.gridLayout, Alignment.MIDDLE_CENTER);\n\t\tthis.horizontalLayout.setExpandRatio(this.gridLayout, 10.0F);\n\t\tthis.horizontalLayout.setSizeFull();\n\t\tthis.setContent(this.horizontalLayout);\n\t\tthis.setSizeFull();\n\n\t\tthis.button.addClickListener(event -> this.button_buttonClick(event));\n\t\tthis.button2.addClickListener(event -> this.button2_buttonClick(event));\n\t}",
"public WdlFactoryImpl() {\n\t\tsuper();\n\t}",
"void Header() {\n\t\tJPanel panel = new JPanel(new GridLayout(2,1));\r\n\t\t\r\n\t\tJPanel panel2 = new JPanel(new GridLayout(1,2));\r\n\t\tpanel2.add(lblNoTelepon);\r\n\t\tpanel2.add(txtNoTelepon);\r\n\t\tpanel.add(panel2);\r\n\t\t\r\n\t\tpanel2 = new JPanel(new GridLayout(1,2));\r\n\t\tpanel2.add(lblPassword);\r\n\t\tpanel2.add(pfPassword);\r\n\t\tpanel.add(panel2);\r\n\t\t\r\n\t\tadd(panel, BorderLayout.CENTER);\r\n\t\t\r\n\r\n\t}",
"private org.gwtbootstrap3.client.ui.PanelHeader get_f_PanelHeader39() {\n return build_f_PanelHeader39();\n }",
"private void createBottomPanel() {\n humanPaquetView = new ViewDeckVisible(false);\n this.getContentPane().add(humanPaquetView);\n }",
"private void HargaKamera() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }",
"public SystematicAcension_by_LiftingTechnology() {\n\n\t}",
"@Deprecated\n public void buildTemplateGUI(){\n // Clear the frame\n rebuildFrame();\n \n // Header options in [OBJECT] GUI\n header.setText(\"Descriptive button header: \");\n \n //------Unique panel objects here---------\n \n \n //----------------------------------------\n \n // Display GUI after finished building\n controlFrame.pack();\n controlFrame.setVisible(true);\n }",
"private static UINode _createGlobalHeaders()\n {\n MarlinBean globalHeaders = new MarlinBean(FLOW_LAYOUT_NAME);\n\n //\n // add the client header\n //\n globalHeaders.addIndexedChild(\n ContextPoppingUINode.getUINode(NAVIGATION2_CHILD));\n\n //\n // create and add the default header\n //\n MarlinBean defaultHeader = new MarlinBean(GLOBAL_HEADER_NAME);\n\n defaultHeader.setAttributeValue(\n RENDERED_ATTR,\n new NotBoundValue(\n PdaHtmlLafUtils.createIsRenderedBoundValue(NAVIGATION2_CHILD)));\n\n globalHeaders.addIndexedChild(defaultHeader);\n\n return globalHeaders;\n }",
"private org.gwtbootstrap3.client.ui.PanelHeader get_f_PanelHeader17() {\n return build_f_PanelHeader17();\n }",
"@Override\n\tpublic Structure createNew() {\n\t\treturn new FloorSwitch();\n\t}",
"private void initialize() {\r\n\t\tfrmMalwareDetector = new JFrame();\r\n\t\tfrmMalwareDetector.setIconImage(Toolkit.getDefaultToolkit().getImage(\"/home/amir/workspace/MalwareDetector/virus-scan-icon.png\"));\r\n\t\tfrmMalwareDetector.setTitle(\"TickSoft PiracyTest\");\r\n\t\tfrmMalwareDetector.setBounds(100, 100, 800, 700);\r\n\t\tfrmMalwareDetector.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\t\r\n\t\tfrmMalwareDetector.getContentPane().setLayout(new BorderLayout(0, 0));\r\n\t\tfrmMalwareDetector.getContentPane().applyComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);\r\n//\t\tfrmMalwareDetector.getContentPane().add(tabbedPane);\r\n\t\t\r\n\t\t\r\n\t\ttry {\r\n logoLabel = new JLabel(new ImageIcon(ImageIO.read(new File(\"Logo.PNG\")).getScaledInstance(90, 90, 30)));\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\t\tappNameLabel = new JLabel(\"TickSoft PiracyTest\", JLabel.RIGHT);\r\n appNameLabel.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\r\n appNameLabel.setForeground(Color.WHITE);\r\n\r\n uniNameLabel = new JLabel(\"آزمایشگاه آزمون و تایید نرم افزار دانشگاه شهید بهشتی\", JLabel.RIGHT);\r\n uniNameLabel.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\r\n uniNameLabel.setForeground(Color.WHITE);\r\n\r\n namePanel = new JPanel(new GridLayout(2, 1, 10, 10));\r\n namePanel.setBackground(Color.decode(\"#373737\"));\r\n namePanel.applyComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);\r\n namePanel.add(appNameLabel);\r\n namePanel.add(uniNameLabel);\r\n\r\n headerPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT, 20, 20));\r\n headerPanel.applyComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);\r\n headerPanel.setPreferredSize(new Dimension((int) getMonitorWeight() + 1, 130));\r\n headerPanel.setBackground(Color.decode(\"#373737\"));\r\n headerPanel.add(logoLabel);\r\n headerPanel.add(namePanel);\r\n\t\t\r\n bodyPanel = new JPanel(new BorderLayout(5, 5));\r\n bodyPanel.applyComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);\r\n bodyPanel.setBackground(Color.decode(\"#e5e5e5\"));\r\n \r\n exitMenuItem = new JMenuItem(\"خروج\");\r\n\r\n exitMenuItem.setBackground(Color.decode(\"#0098be\"));\r\n exitMenuItem.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\r\n JMenuItem mntmOpen = new JMenuItem(\"انتخاب دیتاست\");\r\n mntmOpen.setBackground(Color.decode(\"#0098be\"));\r\n mntmOpen.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\r\n \r\n fileMenu = new JMenu(\"فایل\");\r\n fileMenu.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\r\n fileMenu.add(mntmOpen);\r\n fileMenu.add(exitMenuItem);\r\n \r\n \r\n\r\n menu = new JMenuBar();\r\n menu.add(fileMenu);\r\n menu.applyComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);\r\n menu.setSize((int)getMonitorWeight() + 1, 20);\r\n menu.setBackground(Color.decode(\"#0098be\"));\r\n\r\n basicPanel = new JPanel(new BorderLayout());\r\n\r\n frmMalwareDetector.getContentPane().add(headerPanel, BorderLayout.NORTH);\r\n frmMalwareDetector.getContentPane().add(basicPanel);\r\n\r\n basicPanel.add(menu, BorderLayout.NORTH);\r\n basicPanel.add(bodyPanel);\r\n \r\n tabbedPane.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);\r\n\r\n bodyPanel.add(tabbedPane, BorderLayout.CENTER);\r\n// bodyPanel.add(buttonPanel, BorderLayout.SOUTH);\r\n//\t\tfrmMalwareDetector.getContentPane().add(tabbedPane);\r\n tabbedPane.applyComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);\r\n \r\n\t\t\r\n tabbedPane.setBackground(Color.decode(\"#373737\"));\r\n tabbedPane.setForeground(Color.WHITE);\r\n\t\t\r\n\t\tJPanel graphPanel = new JPanel();\r\n\t\ttabbedPane.addTab(\"گراف\", null, graphPanel, null);\r\n\t\tgraphPanel.setLayout(new GridLayout(2, 1));\r\n\t\tgraphPanel.setBackground(Color.decode(\"#e5e5e5\"));\r\n\t\t\r\n\t\t\r\n\t\tJPanel createGraphPanel = new JPanel();\r\n\t\tgraphPanel.add(createGraphPanel);\r\n\t\tcreateGraphPanel.setLayout(new BorderLayout(0, 0));\r\n\t\tcreateGraphPanel.setBackground(Color.decode(\"#e5e5e5\"));\r\n\t\t\r\n\t\tJPanel buttonGraphPanel = new JPanel();\r\n\t\tcreateGraphPanel.add(buttonGraphPanel, BorderLayout.NORTH);\r\n\t\tbuttonGraphPanel.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));\r\n\t\tbuttonGraphPanel.setBackground(Color.decode(\"#e5e5e5\"));\r\n\t\tbuttonGraphPanel.applyComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);\r\n\t\t\r\n\t\tJButton btnCreate = new JButton(\"ایجاد گراف\");\r\n\t\tbtnCreate.setBackground(Color.decode(\"#0098be\"));\r\n\t\tbuttonGraphPanel.add(btnCreate);\r\n\t\t\r\n\t\tJButton btnShowGraph = new JButton(\"نمایش گراف\");\r\n\t\tbtnShowGraph.setBackground(Color.decode(\"#0098be\"));\r\n\t\tbuttonGraphPanel.add(btnShowGraph);\r\n\t\t\r\n\t\tJButton btnClear = new JButton(\"پاک کردن\");\r\n\t\tbtnClear.setBackground(Color.decode(\"#0098be\"));\r\n\t\tbuttonGraphPanel.add(btnClear);\r\n\t\t\r\n\t\tgraphComboList = new JComboBox();\r\n\t\tgraphComboList.setBackground(Color.decode(\"#e5e5e5\"));\r\n\t\tgraphComboList.setPrototypeDisplayValue(\"xxxxxxxxxx\");\r\n\t\tbuttonGraphPanel.add(graphComboList);\r\n\t\t\r\n\t\tsimplePattern = new JCheckBox(\"الگوهای ساده\");\r\n\t\tsimplePattern.setBackground(Color.decode(\"#e5e5e5\"));\r\n\t\tbuttonGraphPanel.add(simplePattern);\r\n\t\t\r\n\t\tshowGraphPanel = new JPanel();\r\n\t\tcreateGraphPanel.add(showGraphPanel);\r\n\t\tshowGraphPanel.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));\r\n\t\tshowGraphPanel.setBackground(Color.decode(\"#e5e5e5\"));\r\n\t\t\r\n\t\tJPanel subGraphPanel = new JPanel();\r\n\t\tgraphPanel.add(subGraphPanel);\r\n\t\tsubGraphPanel.setLayout(new BorderLayout(0, 0));\r\n\t\tsubGraphPanel.setBackground(Color.decode(\"#e5e5e5\"));\r\n\t\t\r\n\t\tJPanel buttonSubGraphPanel = new JPanel();\r\n\t\tsubGraphPanel.add(buttonSubGraphPanel, BorderLayout.NORTH);\r\n\t\tbuttonSubGraphPanel.setBackground(Color.decode(\"#e5e5e5\"));\r\n\t\tbuttonSubGraphPanel.applyComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);\r\n\t\t\r\n\t\tlblFrequency = new JLabel(\"تکرار:\");\r\n\t\tbuttonSubGraphPanel.add(lblFrequency);\r\n\t\tlblFrequency.applyComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);\r\n\t\t\r\n\t\ttxtFrequency = new JTextField();\r\n\t\ttxtFrequency.setHorizontalAlignment(SwingConstants.RIGHT);\r\n\t\tlblFrequency.setLabelFor(txtFrequency);\r\n\t\tbuttonSubGraphPanel.add(txtFrequency);\r\n\t\ttxtFrequency.setColumns(10);\r\n\t\t\r\n\t\tJButton btnSubgraph = new JButton(\"استخراج زیرگراف\");\r\n\t\tbuttonSubGraphPanel.add(btnSubgraph);\r\n\t\tbtnSubgraph.setBackground(Color.decode(\"#0098be\"));\r\n\t\t\r\n\t\tbtnLoadSubgraph = new JButton(\"بارگذاری\");\r\n\t\tbtnLoadSubgraph.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tLoadSubGraphs();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbuttonSubGraphPanel.add(btnLoadSubgraph);\r\n\t\tbtnLoadSubgraph.setBackground(Color.decode(\"#0098be\"));\r\n\t\t\r\n\t\tJButton btnShowSubgraph = new JButton(\"نمایش زیرگراف\");\r\n\t\tbuttonSubGraphPanel.add(btnShowSubgraph);\r\n\t\tbtnShowSubgraph.setBackground(Color.decode(\"#0098be\"));\r\n\t\t\r\n\t\tJButton btnClear_1 = new JButton(\"پاک کردن\");\r\n\t\tbuttonSubGraphPanel.add(btnClear_1);\r\n\t\tbtnClear_1.setBackground(Color.decode(\"#0098be\"));\r\n\t\t\r\n\t\tfscomboList = new JComboBox<Object>();\r\n\t\tfscomboList.setPrototypeDisplayValue(\"xxxxxxxxxx\");\r\n\t\tbuttonSubGraphPanel.add(fscomboList);\r\n\t\tfscomboList.setBackground(Color.decode(\"#e5e5e5\"));\r\n\t\t\r\n\t\tshowSubGraphPanel = new JPanel();\r\n\t\tsubGraphPanel.add(showSubGraphPanel);\r\n\t\tshowSubGraphPanel.setBackground(Color.decode(\"#e5e5e5\"));\r\n\t\t\r\n\t\t\t\t\r\n\t\tbtnSubgraph.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tSubGraph();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\t\t\r\n\t\t\t\tbtnClear_1.addActionListener(new ActionListener() {\r\n\t\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\t\t\tshowSubGraphPanel.removeAll();\r\n\t\t\t\t\t\tshowSubGraphPanel.repaint();\r\n\t\t\t\t\t\tshowSubGraphPanel.revalidate();\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tbtnShowSubgraph.addActionListener(new ActionListener() {\r\n\t\t\t\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\t\t\t\t\tshowSubGraphPanel.removeAll();\r\n\t\t\t\t\r\n\t\t\t\t\t\t\t\tString[] selectedGraph = fscomboList.getSelectedItem().toString().split(\" \");\r\n\t\t\t\t\t\t\t\tmxGraphComponent graphComponent = new mxGraphComponent(fsgraph[Integer.parseInt(selectedGraph[1])]);\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tshowSubGraphPanel.add(graphComponent);\r\n\t\t\t\t\t\t\t\tshowSubGraphPanel.repaint();\r\n\t\t\t\t\t\t\t\tshowSubGraphPanel.revalidate();\r\n\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"ShowGraph: Done \");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tbtnShowGraph.addActionListener(new ActionListener() {\r\n\t\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\r\n\t\t\t\t\t\tshowGraphPanel.removeAll();\r\n\t\t\r\n\t\t\t\t\t\tString[] selectedGraph = graphComboList.getSelectedItem().toString().split(\" \");\r\n\t\t\t\t\t\tmxGraphComponent graphComponent = new mxGraphComponent(graph[Integer.parseInt(selectedGraph[1])]);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tshowGraphPanel.add(graphComponent);\r\n\t\t\t\t\t\tshowGraphPanel.repaint();\r\n\t\t\t\t\t\tshowGraphPanel.revalidate();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tSystem.out.println(\"ShowGraph: Done \");\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tbtnClear.addActionListener(new ActionListener() {\r\n\t\t\t\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\t\t\t\t\tshowGraphPanel.removeAll();\r\n\t\t\t\t\t\t\t\tshowGraphPanel.repaint();\r\n\t\t\t\t\t\t\t\tshowGraphPanel.revalidate();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\tbtnCreate.addActionListener(new ActionListener() {\r\n\t\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\t\t\tCreateGraph();\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\r\n\t\tJPanel scanPanel = new JPanel();\r\n\t\ttabbedPane.addTab(\"پویش\", null, scanPanel, null);\r\n\t\tscanPanel.setLayout(new BorderLayout(0, 0));\r\n\t\tscanPanel.setBackground(Color.decode(\"#e5e5e5\"));\r\n\t\t\r\n\t\tJPanel buttonScanPanel = new JPanel();\r\n\t\tscanPanel.add(buttonScanPanel, BorderLayout.NORTH);\r\n\t\tbuttonScanPanel.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));\r\n\t\tbuttonScanPanel.setBackground(Color.decode(\"#e5e5e5\"));\r\n\t\tbuttonScanPanel.applyComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);\r\n\t\t\r\n\t\tJButton btnScan = new JButton(\"پویش\");\r\n\t\tbuttonScanPanel.add(btnScan);\r\n\t\tbtnScan.setBackground(Color.decode(\"#0098be\"));\r\n\t\t\r\n\t\tJButton btnDrawChart = new JButton(\"نمایش نمودار\");\r\n\t\tbuttonScanPanel.add(btnDrawChart);\r\n\t\tbtnDrawChart.setBackground(Color.decode(\"#0098be\"));\r\n\t\t\r\n\t\tJButton btnClear_2 = new JButton(\"پاک کردن\");\r\n\t\tbuttonScanPanel.add(btnClear_2);\r\n\t\tbtnClear_2.setBackground(Color.decode(\"#0098be\"));\r\n\t\t\r\n\t\tcomboBox = new JComboBox<String>();\r\n\t\tcomboBox.setPrototypeDisplayValue(\"xxxxxxxxx\");\r\n\t\tbuttonScanPanel.add(comboBox);\r\n\t\tcomboBox.setBackground(Color.decode(\"#e5e5e5\"));\r\n\t\t\r\n\t\tcomboBox_1 = new JComboBox<String>();\r\n\t\tcomboBox_1.setPrototypeDisplayValue(\"xxxxxxxxx\");\r\n\t\tbuttonScanPanel.add(comboBox_1);\r\n\t\tcomboBox_1.setBackground(Color.decode(\"#e5e5e5\"));\r\n\t\t\r\n\t\tshowScanPanel = new JPanel();\r\n\t\tscanPanel.add(showScanPanel, BorderLayout.CENTER);\r\n\t\tshowScanPanel.setBackground(Color.decode(\"#e5e5e5\"));\r\n\t\t\r\n\t\tJPanel evaluationPanel = new JPanel();\r\n\t\ttabbedPane.addTab(\"ارزیابی\", null, evaluationPanel, null);\r\n\t\tevaluationPanel.setLayout(new BorderLayout(0, 0));\r\n\t\tevaluationPanel.setBackground(Color.decode(\"#e5e5e5\"));\r\n\t\t\r\n\t\tJPanel buttonEvaluationPanel = new JPanel();\r\n\t\tevaluationPanel.add(buttonEvaluationPanel, BorderLayout.NORTH);\r\n\t\tbuttonEvaluationPanel.setBackground(Color.decode(\"#e5e5e5\"));\r\n\t\tbuttonEvaluationPanel.applyComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);\r\n\t\t\r\n\t\tcomboClassifiers = new JComboBox<String>();\r\n\t\tcomboClassifiers.setPrototypeDisplayValue(\"xxxxxxxxx\");\r\n\t\tcomboClassifiers.addItem(\"J48\");\r\n\t\tcomboClassifiers.addItem(\"DecisionTable\");\r\n\t\tcomboClassifiers.addItem(\"DecisionStump\");\r\n\t\tcomboClassifiers.addItem(\"BayesianLogisticRegression\");\r\n\t\t\r\n\t\t\t\tbtnMining = new JButton(\"ارزیابی مدل\");\r\n\t\t\t\tbtnMining.addActionListener(new ActionListener() {\r\n\t\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tExportArff();\r\n\t\t\t\t\t\t// I've commented the code as best I can, at the moment.\r\n\t\t\t\t // Comments are denoted by \"//\" at the beginning of the line.\r\n\t\t\t\t \r\n\t\t\t\t BufferedReader datafile = readDataFile(\"Work//weka-piracy.arff\");\r\n\t\t\t\t \r\n\t\t\t\t Instances data = null;\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tdata = new Instances(datafile);\r\n\t\t\t\t\t\t} catch (IOException e1) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t data.setClassIndex(data.numAttributes() - 1);\r\n\t\t\t\t \r\n\t\t\t\t // Choose a type of validation split\r\n\t\t\t\t Instances[][] split = crossValidationSplit(data, 10);\r\n\t\t\t\t \r\n\t\t\t\t // Separate split into training and testing arrays\r\n\t\t\t\t Instances[] trainingSplits = split[0];\r\n\t\t\t\t Instances[] testingSplits = split[1];\r\n\t\t\t\t \r\n\t\t\t\t // Choose a set of classifiers\r\n\t\t\t\t Classifier[] models = { new J48(),\r\n\t\t\t\t new DecisionTable(),\r\n\t\t\t\t new DecisionStump(),\r\n\t\t\t\t new BayesianLogisticRegression() };\r\n\t\t\t\t \r\n\t\t\t\t // Run for each classifier model\r\n//\t\t for(int j = 0; j < models.length; j++) {\r\n\t\t\t\t int j = 0;\r\n\t\t\t\t \tswitch (comboClassifiers.getSelectedItem().toString()) {\r\n\t\t\t\t\t\t\tcase \"J48\":\r\n\t\t\t\t\t\t\t\tj = 0;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\tcase \"DecisionTable\":\r\n\t\t\t\t\t\t\t\tj = 1;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\tcase \"DecisionStump\":\r\n\t\t\t\t\t\t\t\tj = 2;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\tcase \"BayesianLogisticRegression\":\r\n\t\t\t\t\t\t\t\tj = 3;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t \t\r\n\r\n\t\t\t\t // Collect every group of predictions for current model in a FastVector\r\n\t\t\t\t FastVector predictions = new FastVector();\r\n\t\t\t\t ArrayList<Attribute> atts = new ArrayList<Attribute>();\r\n\t\t\t\t \r\n\t\t\t\t // For each training-testing split pair, train and test the classifier\r\n\t\t\t\t for(int i = 0; i < trainingSplits.length; i++) {\r\n\t\t\t\t Evaluation validation = null;\r\n\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\tvalidation = simpleClassify(models[j], trainingSplits[i], testingSplits[i]);\r\n\t\t\t\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t\t}\r\n//\t\t\t\t\t\t\t\tatts.add(new Attribute(\"Attribute\" + att, att));\r\n\t\t\t\t predictions.appendElements(validation.predictions());\r\n\t\t\t\t \r\n\t\t\t\t // Uncomment to see the summary for each training-testing pair.\r\n\t\t\t\t textArea.append(models[j].toString() + \"\\n\");\r\n//\t\t textArea.setText(models[j].toString() + \"\\n\");\r\n//\t\t\t\t System.out.println(models[j].toString());\r\n\t\t\t\t }\r\n\t\t\t\t \r\n\t\t\t\t // Calculate overall accuracy of current classifier on all splits\r\n\t\t\t\t double accuracy = calculateAccuracy(predictions);\r\n\t\t\t\t \r\n\t\t\t\t // Print current classifier's name and accuracy in a complicated, but nice-looking way.\r\n\t\t\t\t textArea.append(models[j].getClass().getSimpleName() + \": \" + String.format(\"%.2f%%\", accuracy) + \"\\n=====================\\n\");\r\n\t\t\t\t System.out.println(models[j].getClass().getSimpleName() + \": \" + String.format(\"%.2f%%\", accuracy) + \"\\n=====================\");\r\n//\t\t }\r\n\t\t\t\t \r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t\tbuttonEvaluationPanel.add(btnMining);\r\n\t\t\t\tbtnMining.setBackground(Color.decode(\"#0098be\"));\r\n\t\t\r\n\t\tbuttonEvaluationPanel.add(comboClassifiers);\r\n\t\tcomboClassifiers.setBackground(Color.decode(\"#e5e5e5\"));\r\n\t\t\r\n\t\t\r\n\t\tShowEvaluationPanel = new JPanel();\r\n\t\tevaluationPanel.add(ShowEvaluationPanel, BorderLayout.CENTER);\r\n\t\tShowEvaluationPanel.setBackground(Color.decode(\"#e5e5e5\"));\r\n\t\tShowEvaluationPanel.setLayout(new BorderLayout(0, 0));\r\n\t\t\r\n\t\ttextArea = new JTextArea();\r\n\t\ttextArea.setLineWrap(true);\r\n\t\tJScrollPane scroll = new JScrollPane (textArea, \r\n\t\t\t\t JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);\r\n\r\n\t\tShowEvaluationPanel.add(scroll, BorderLayout.CENTER);\r\n\r\n//\t\tJPanel panel_13 = new JPanel();\r\n//\t\tfrmMalwareDetector.getContentPane().add(panel_13, BorderLayout.SOUTH);\r\n\t\t\r\n\t\tJMenuBar menuBar = new JMenuBar();\r\n//\t\tfrmMalwareDetector.getContentPane().add(menuBar, BorderLayout.NORTH);\r\n\t\t\r\n\t\tJMenu mnFile = new JMenu(\"File\");\r\n\t\tmenuBar.add(mnFile);\r\n\t\t\r\n//\t\tJMenuItem mntmOpen = new JMenuItem(\"Open\");\r\n//\t\tmnFile.add(mntmOpen);\r\n\t\t\r\n\r\n exitMenuItem.addActionListener(new ActionListener() {\r\n \tpublic void actionPerformed(ActionEvent arg0) {\r\n System.exit(0);\r\n \t}\r\n });\r\n\t\t\r\n\t\ttabbedPane.addChangeListener(new ChangeListener() {\r\n \tpublic void stateChanged(ChangeEvent arg0) {\r\n \t\ttabbedPane.setBackgroundAt(tabbedPane.getSelectedIndex(), Color.decode(\"#373737\"));\r\n// \t\tUIManager.put(\"TabbedPane.selected\", new Color(230, 216, 174)); \r\n// \t\tSwingUtilities.updateComponentTreeUI(tabbedPane);\r\n// \t\tUIManager.put(\"TabbedPane.selected\", Color.decode(\"#373737\") );\r\n// \t\ttabbedPane.updateUI();\r\n\r\n//\t\t \tSystem.out.println(tabbedPane.getSelectedIndex() + \" \" + tabbedPane.getSelectedComponent());\r\n//\t\t \ttabbedPane.setForegroundAt(tabbedPane.getSelectedIndex(), Color.decode(\"#373737\"));\r\n \t}\r\n });\r\n\r\n\t\tmntmOpen.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tJFileChooser fileChooser = new JFileChooser();\r\n\t\t\t\tfileChooser.setCurrentDirectory(new File(System.getProperty(\"user.home\")));\r\n\t\t\t\tfileChooser.setMultiSelectionEnabled(true);\r\n\t\t\t\tint result = fileChooser.showDialog(frmMalwareDetector, \"Open\");\r\n\t\t\t\tSystem.setProperty(\"user.dir\",\"\");\r\n\t\t\t\tString curDir = System.getProperty(\"user.dir\");\r\n\t\t\t\tif (result == JFileChooser.APPROVE_OPTION) {\r\n\t\t\t\t selectedFile = fileChooser.getSelectedFiles();\r\n\t\t\t\t for (int i =0; i<selectedFile.length;i++)\r\n\t\t\t\t \tSystem.out.println(\"Selected file: \" + selectedFile[i].getAbsolutePath() + \"\\n\" + selectedFile[i].getName() + \"\\n\" + curDir + i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t\r\n\r\n\t\tbtnClear_2.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tshowScanPanel.removeAll();\r\n\t\t\t\tshowScanPanel.repaint();\r\n\t\t\t\tshowScanPanel.revalidate();\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t\r\n\r\n\t\tbtnDrawChart.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tshowScanPanel.removeAll();\r\n\t\t\t\t\r\n\t\t\t\tString selectedItem1 = comboBox.getSelectedItem().toString();\r\n\t\t\t\tString selectedItem2 = comboBox_1.getSelectedItem().toString();\r\n\t\t\t\tif(!selectedItem1.equals(selectedItem2))\r\n\t\t\t\t{\r\n\t\t\t\t\tfinal XYSeries data1 = new XYSeries( selectedItem1 );\r\n\t\t\t\t\tfinal XYSeries data2 = new XYSeries( selectedItem2 );\r\n\t\t\t\t final XYSeriesCollection dataset = new XYSeriesCollection( );\r\n\t\t\t\t String selectedData1[] = featuresList.get(selectedItem1).split(\" \");\r\n\t\t\t\t\tString selectedData2[] = featuresList.get(selectedItem2).split(\" \");\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor (int i =0; i < selectedData1.length; i++) \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tdata1.add(i, Integer.parseInt(selectedData1[i]));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tfor (int i =0; i < selectedData2.length; i++) \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tdata2.add(i, Integer.parseInt(selectedData2[i]));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tdataset.addSeries( data1 ); \r\n\t\t\t\t dataset.addSeries( data2 );\r\n\t\t\t\t\t\r\n\t\t\t JFreeChart chart = ChartFactory.createXYLineChart(\"Result\",\r\n\t \"features\", \"\", dataset, PlotOrientation.VERTICAL, true, true,\r\n\t false);\r\n\r\n\t ChartPanel cp = new ChartPanel(chart);\r\n\t showScanPanel.add(cp);\r\n\t showScanPanel.repaint();\r\n\t\t\t\t\tshowScanPanel.revalidate();\r\n\t\t\t\t}\r\n\t\t\t\telse if(selectedItem1.equals(selectedItem2))\r\n\t\t\t\t{\r\n\t\t\t\t\tfinal XYSeries data1 = new XYSeries( selectedItem1 );\r\n\r\n\t\t\t\t final XYSeriesCollection dataset = new XYSeriesCollection( );\r\n\t\t\t\t String selectedData1[] = featuresList.get(selectedItem1).split(\" \");\r\n\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor (int i =0; i < selectedData1.length; i++) \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tdata1.add(i, Integer.parseInt(selectedData1[i]));\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tdataset.addSeries( data1 ); \r\n\r\n\t\t\t\t\t\r\n\t\t\t JFreeChart chart = ChartFactory.createXYLineChart(\"Result\",\r\n\t \"SubGraphs\", \"\", dataset, PlotOrientation.VERTICAL, true, true,\r\n\t false);\r\n\r\n\t ChartPanel cp = new ChartPanel(chart);\r\n\t showScanPanel.add(cp);\r\n\t showScanPanel.repaint();\r\n\t\t\t\t\tshowScanPanel.revalidate();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tbtnScan.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tScanFiles();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t});\r\n\r\n\t\t\r\n\t}",
"private org.gwtbootstrap3.client.ui.PanelHeader get_f_PanelHeader29() {\n return build_f_PanelHeader29();\n }",
"public FixedJInternalFrame(){\n super();\n }",
"private void initialize()\n\t{\n\t\tfrmHardware = new JFrame();\n\t\tfrmHardware.setTitle(\"Guitar Builder - Hardware\");\n\t\tfrmHardware.setResizable(false);\n\t\tfrmHardware.setBounds(100, 100, 514, 326);\n\t\tfrmHardware.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tfrmHardware.getContentPane().setLayout(null);\n\t\tDimension dim = Toolkit.getDefaultToolkit().getScreenSize();\n\t\tfrmHardware.setLocation(dim.width/2-frmHardware.getSize().width/2, dim.height/2-frmHardware.getSize().height/2);\n\t\t\n\t\tJTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);\n\t\ttabbedPane.setBounds(0, 0, 508, 297);\n\t\tfrmHardware.getContentPane().add(tabbedPane);\n\t\t\n\t\tJPanel pnlSelectHardware = new JPanel();\n\t\ttabbedPane.addTab(\"Select Hardware\", null, pnlSelectHardware, null);\n\t\tpnlSelectHardware.setLayout(null);\n\t\t\n\t\tJLabel lblHardwareId = new JLabel(\"Hardware ID:\");\n\t\tlblHardwareId.setBounds(41, 17, 180, 14);\n\t\tpnlSelectHardware.add(lblHardwareId);\n\t\t\n\t\tJLabel lblNeckPickup = new JLabel(\"Neck Pickup:\");\n\t\tlblNeckPickup.setBounds(41, 42, 180, 14);\n\t\tpnlSelectHardware.add(lblNeckPickup);\n\t\t\n\t\tJLabel lblMiddlePickup = new JLabel(\"Middle Pickup:\");\n\t\tlblMiddlePickup.setBounds(41, 67, 180, 14);\n\t\tpnlSelectHardware.add(lblMiddlePickup);\n\t\t\n\t\tJLabel lblBridgePickup = new JLabel(\"Bridge Pickup:\");\n\t\tlblBridgePickup.setBounds(41, 92, 180, 14);\n\t\tpnlSelectHardware.add(lblBridgePickup);\n\t\t\n\t\tJLabel lblTonevolKnobs = new JLabel(\"Tone/Vol Knobs:\");\n\t\tlblTonevolKnobs.setBounds(41, 117, 180, 14);\n\t\tpnlSelectHardware.add(lblTonevolKnobs);\n\t\t\n\t\tJLabel lblBridge = new JLabel(\"Bridge:\");\n\t\tlblBridge.setBounds(41, 142, 180, 14);\n\t\tpnlSelectHardware.add(lblBridge);\n\t\t\n\t\tJLabel lblTuners = new JLabel(\"Tuners:\");\n\t\tlblTuners.setBounds(41, 167, 180, 14);\n\t\tpnlSelectHardware.add(lblTuners);\n\t\t\n\t\ttxtHardwareID = new JTextField();\n\t\ttxtHardwareID.setBounds(286, 14, 179, 20);\n\t\tpnlSelectHardware.add(txtHardwareID);\n\t\ttxtHardwareID.setColumns(10);\n\t\t\n\t\tJComboBox cmbBoxNeckPickup = new JComboBox();\n\t\tcmbBoxNeckPickup.setModel(new DefaultComboBoxModel(new String[] {\"No Neck Pickup\", \"EMG-60\", \"EMG-80\", \"EMG-81\\t\\t\\t\\t\\t\\t\", \"EMG H4\", \"Seymore Duncan Livewire\", \"Seymore Duncan AHB\", \"Seymore Duncan Blackouts\", \"Seymore Duncan Invader\", \"Gibson 57 classic\", \"DiMarzio Gravity Storm\", \"Lace Sensor Emerald\", \"Seymore Duncan Zephyr\", \"DiMarzio True Velvet\", \"DiMarzio Red Velvet\", \"DiMarzio Injector\", \"EMG SA\", \"DiMarzio Twang King\", \"Fender Fat 50s\", \"Fender N3 Noiseless\"}));\n\t\tcmbBoxNeckPickup.setBounds(286, 39, 179, 20);\n\t\tpnlSelectHardware.add(cmbBoxNeckPickup);\n\t\t\n\t\tJComboBox cmbBoxMiddlePickup = new JComboBox();\n\t\tcmbBoxMiddlePickup.setModel(new DefaultComboBoxModel(new String[] {\"No Middle Pickup\", \"EMG-60\", \"EMG-80\", \"EMG-81\\t\\t\\t\\t\\t\\t\", \"EMG H4\", \"Seymore Duncan Livewire\", \"Seymore Duncan AHB\", \"Seymore Duncan Blackouts\", \"Seymore Duncan Invader\", \"Gibson 57 classic\", \"DiMarzio Gravity Storm\", \"Lace Sensor Emerald\", \"Seymore Duncan Zephyr\", \"DiMarzio True Velvet\", \"DiMarzio Red Velvet\", \"DiMarzio Injector\", \"EMG SA\", \"DiMarzio Twang King\", \"Fender Fat 50s\", \"Fender N3 Noiseless\"}));\n\t\tcmbBoxMiddlePickup.setBounds(286, 64, 179, 20);\n\t\tpnlSelectHardware.add(cmbBoxMiddlePickup);\n\t\t\n\t\tJComboBox cmbBoxBridgePickup = new JComboBox();\n\t\tcmbBoxBridgePickup.setModel(new DefaultComboBoxModel(new String[] {\"No Bridge Pickup\", \"EMG-60\", \"EMG-80\", \"EMG-81\\t\\t\\t\\t\\t\\t\", \"EMG H4\", \"Seymore Duncan Livewire\", \"Seymore Duncan AHB\", \"Seymore Duncan Blackouts\", \"Seymore Duncan Invader\", \"Gibson 57 classic\", \"DiMarzio Gravity Storm\", \"Lace Sensor Emerald\", \"Seymore Duncan Zephyr\", \"DiMarzio True Velvet\", \"DiMarzio Red Velvet\", \"DiMarzio Injector\", \"EMG SA\", \"DiMarzio Twang King\", \"Fender Fat 50s\", \"Fender N3 Noiseless\"}));\n\t\tcmbBoxBridgePickup.setBounds(286, 89, 179, 20);\n\t\tpnlSelectHardware.add(cmbBoxBridgePickup);\n\t\t\n\t\tJComboBox cmbBoxKnobs = new JComboBox();\n\t\tcmbBoxKnobs.setModel(new DefaultComboBoxModel(new String[] {\"Top Hat\", \"Speed\", \"Dome\", \"Jazz\", \"Chicken Head\"}));\n\t\tcmbBoxKnobs.setBounds(286, 114, 179, 20);\n\t\tpnlSelectHardware.add(cmbBoxKnobs);\n\t\t\n\t\tJComboBox cmbBoxBridge = new JComboBox();\n\t\tcmbBoxBridge.setModel(new DefaultComboBoxModel(new String[] {\"Stop Tail\", \"Floyd Rose\", \"Hipshot\", \"Vibrato\"}));\n\t\tcmbBoxBridge.setBounds(286, 139, 179, 20);\n\t\tpnlSelectHardware.add(cmbBoxBridge);\n\t\t\n\t\tJComboBox cmbBoxTuners = new JComboBox();\n\t\tcmbBoxTuners.setModel(new DefaultComboBoxModel(new String[] {\"Locking\", \"Vintage\", \"Open Gear\", \"Hipshot Locking\", \"Trim-Lok\"}));\n\t\tcmbBoxTuners.setBounds(286, 164, 179, 20);\n\t\tpnlSelectHardware.add(cmbBoxTuners);\n\t\t\n\t\tJButton btnNewButton = new JButton(\"Create Hardware\");\n\t\tbtnNewButton.setFont(new Font(\"Tahoma\", Font.PLAIN, 16));\n\t\tbtnNewButton.addActionListener(new ActionListener() \n\t\t{\n\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t{\n\t\t\t\tint ID = 0;\n\t\t\t\ttry \n\t\t\t\t{\n\t\t\t\t\tID = Integer.parseInt(txtHardwareID.getText());\n\t\t\t\t}\n\t\t\t\tcatch(NumberFormatException e1)\n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"ID must consist of only numbers\",\n\t\t\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString neckPickup = (String)cmbBoxNeckPickup.getSelectedItem();\n\t\t\t\tString middlePickup = (String)cmbBoxMiddlePickup.getSelectedItem();\n\t\t\t\tString bridgePickup = (String)cmbBoxBridgePickup.getSelectedItem();\n\t\t\t\tString knobs = (String)cmbBoxKnobs.getSelectedItem();\n\t\t\t\tString bridge = (String)cmbBoxBridge.getSelectedItem();\n\t\t\t\tString tuners = (String)cmbBoxTuners.getSelectedItem();\n\t\t\t\t\n\t\t\t\tint choice = JOptionPane.showConfirmDialog(null, \"Is The Following Information Correct?\"\n\t\t\t\t\t\t+ \"\\nID: \" + ID + \"\\nNeck Pickup: \" + neckPickup + \"\\nMiddle Pickup: \" + middlePickup\n\t\t\t\t\t\t+ \"\\nBridge Pickup: \" + bridgePickup + \"\\nKnobs: \" + knobs + \"\\nBridge: \"\n\t\t\t\t\t\t+ bridge + \"\\nTuners: \" + tuners, \"Confirmation\",\n\t\t\t\t\t\tJOptionPane.YES_NO_OPTION);\n\t\t\t\t\n\t\t\t\tif(choice == 0)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tHardware create = new Hardware(ID, neckPickup , middlePickup, bridgePickup, knobs, bridge, tuners); //creates Hardware object\n\t\t\t\t\t\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tOracleJDBC.writeHardware(create); //passes to method that writes hardware to database\n\t\t\t\t\t} \n\t\t\t\t\tcatch (SQLException e1)\n\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tif (e1.getErrorCode() == 00001) //sql error for PK constraint violation\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Hardware ID already in use\",\n\t\t \"Error\", JOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t\t\telse if (e1.getErrorCode() == 1438) //sql error for hardware ID too long\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Hardware ID to long, must be 5 digits or less\",\n\t\t \"Error\", JOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t\t\telse //unaccounted for error (should not happen)\n\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Hardware Created\",\n\t \"Success\", JOptionPane.INFORMATION_MESSAGE, null);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Unresolved Error, Could not create Hardware\",\n\t \"Error\", JOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t\treturn;\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tbtnNewButton.setBounds(41, 192, 180, 56);\n\t\tpnlSelectHardware.add(btnNewButton);\n\t\t\n\t\tJButton btnProductMenu_1 = new JButton(\"Product Menu\");\n\t\tbtnProductMenu_1.addActionListener(new ActionListener()\n\t\t{\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tBuilder.createBuilderGui();\n\t\t\t\tfrmHardware.dispose();\n\t\t\t}\n\t\t});\n\t\tbtnProductMenu_1.setFont(new Font(\"Tahoma\", Font.PLAIN, 16));\n\t\tbtnProductMenu_1.setBounds(285, 192, 180, 56);\n\t\tpnlSelectHardware.add(btnProductMenu_1);\n\t\t\n\t\tJPanel pnlUpdateHardware = new JPanel();\n\t\ttabbedPane.addTab(\"Update Hardware\", null, pnlUpdateHardware, null);\n\t\tpnlUpdateHardware.setLayout(null);\n\t\t\n\t\tJLabel lblHardwareIdFor = new JLabel(\"Hardware ID For Update:\");\n\t\tlblHardwareIdFor.setBounds(42, 17, 180, 14);\n\t\tpnlUpdateHardware.add(lblHardwareIdFor);\n\t\t\n\t\tJLabel lblUpdateNeckPickup = new JLabel(\"Update Neck Pickup:\");\n\t\tlblUpdateNeckPickup.setBounds(42, 42, 180, 14);\n\t\tpnlUpdateHardware.add(lblUpdateNeckPickup);\n\t\t\n\t\tJLabel lblUpdateMiddlePickup = new JLabel(\"Update Middle Pickup:\");\n\t\tlblUpdateMiddlePickup.setBounds(42, 67, 180, 14);\n\t\tpnlUpdateHardware.add(lblUpdateMiddlePickup);\n\t\t\n\t\tJLabel lblUpdateBridgePickup = new JLabel(\"Update Bridge Pickup:\");\n\t\tlblUpdateBridgePickup.setBounds(42, 92, 180, 14);\n\t\tpnlUpdateHardware.add(lblUpdateBridgePickup);\n\t\t\n\t\tJLabel lblUpdateTonevolKnobs = new JLabel(\"Update Tone/Vol Knobs:\");\n\t\tlblUpdateTonevolKnobs.setBounds(42, 117, 180, 14);\n\t\tpnlUpdateHardware.add(lblUpdateTonevolKnobs);\n\t\t\n\t\tJLabel lblUpdateBridge = new JLabel(\"Update Bridge:\");\n\t\tlblUpdateBridge.setBounds(41, 142, 180, 14);\n\t\tpnlUpdateHardware.add(lblUpdateBridge);\n\t\t\n\t\tJLabel lblUpdateTuners = new JLabel(\"Update Tuners:\");\n\t\tlblUpdateTuners.setBounds(41, 167, 180, 14);\n\t\tpnlUpdateHardware.add(lblUpdateTuners);\n\t\t\n\t\t\n\t\t\n\t\tJButton btnProductMenu = new JButton(\"Product Menu\");\n\t\tbtnProductMenu.addActionListener(new ActionListener()\n\t\t{\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tBuilder.createBuilderGui();\n\t\t\t\tfrmHardware.dispose();\n\t\t\t}\n\t\t});\n\t\tbtnProductMenu.setFont(new Font(\"Tahoma\", Font.PLAIN, 16));\n\t\tbtnProductMenu.setBounds(285, 192, 180, 56);\n\t\tpnlUpdateHardware.add(btnProductMenu);\n\t\t\n\t\tJComboBox cmbBoxUpdateTuners = new JComboBox();\n\t\tcmbBoxUpdateTuners.setModel(new DefaultComboBoxModel(new String[] {\"Locking\", \"Vintage\", \"Open Gear\", \"Hipshot Locking\", \"Trim-Lok\"}));\n\t\tcmbBoxUpdateTuners.setBounds(286, 164, 179, 20);\n\t\tpnlUpdateHardware.add(cmbBoxUpdateTuners);\n\t\t\n\t\tJComboBox cmbBoxUpdateBridge = new JComboBox();\n\t\tcmbBoxUpdateBridge.setModel(new DefaultComboBoxModel(new String[] {\"Stop Tail\", \"Floyd Rose\", \"Hipshot\", \"Vibrato\"}));\n\t\tcmbBoxUpdateBridge.setBounds(285, 139, 179, 20);\n\t\tpnlUpdateHardware.add(cmbBoxUpdateBridge);\n\t\t\n\t\tJComboBox cmbBoxUpdateKnobs = new JComboBox();\n\t\tcmbBoxUpdateKnobs.setModel(new DefaultComboBoxModel(new String[] {\"Top Hat\", \"Speed\", \"Dome\", \"Jazz\", \"Chicken Head\"}));\n\t\tcmbBoxUpdateKnobs.setBounds(286, 114, 179, 20);\n\t\tpnlUpdateHardware.add(cmbBoxUpdateKnobs);\n\t\t\n\t\tJComboBox cmbBoxUpdateBridgePickup = new JComboBox();\n\t\tcmbBoxUpdateBridgePickup.setModel(new DefaultComboBoxModel(new String[] {\"No Bridge Pickup\", \"EMG-60\", \"EMG-80\", \"EMG-81\\t\\t\\t\\t\\t\\t\", \"EMG H4\", \"Seymore Duncan Livewire\", \"Seymore Duncan AHB\", \"Seymore Duncan Blackouts\", \"Seymore Duncan Invader\", \"Gibson 57 classic\", \"DiMarzio Gravity Storm\", \"Lace Sensor Emerald\", \"Seymore Duncan Zephyr\", \"DiMarzio True Velvet\", \"DiMarzio Red Velvet\", \"DiMarzio Injector\", \"EMG SA\", \"DiMarzio Twang King\", \"Fender Fat 50s\", \"Fender N3 Noiseless\"}));\n\t\tcmbBoxUpdateBridgePickup.setBounds(286, 89, 179, 20);\n\t\tpnlUpdateHardware.add(cmbBoxUpdateBridgePickup);\n\t\t\n\t\tJComboBox cmbBoxUpdateMiddlePickup = new JComboBox();\n\t\tcmbBoxUpdateMiddlePickup.setModel(new DefaultComboBoxModel(new String[] {\"No Middle Pickup\", \"EMG-60\", \"EMG-80\", \"EMG-81\\t\\t\\t\\t\\t\\t\", \"EMG H4\", \"Seymore Duncan Livewire\", \"Seymore Duncan AHB\", \"Seymore Duncan Blackouts\", \"Seymore Duncan Invader\", \"Gibson 57 classic\", \"DiMarzio Gravity Storm\", \"Lace Sensor Emerald\", \"Seymore Duncan Zephyr\", \"DiMarzio True Velvet\", \"DiMarzio Red Velvet\", \"DiMarzio Injector\", \"EMG SA\", \"DiMarzio Twang King\", \"Fender Fat 50s\", \"Fender N3 Noiseless\"}));\n\t\tcmbBoxUpdateMiddlePickup.setBounds(285, 64, 179, 20);\n\t\tpnlUpdateHardware.add(cmbBoxUpdateMiddlePickup);\n\t\t\n\t\tJComboBox cmbBoxUpdateNeckPickup = new JComboBox();\n\t\tcmbBoxUpdateNeckPickup.setModel(new DefaultComboBoxModel(new String[] {\"No Neck Pickup\", \"EMG-60\", \"EMG-80\", \"EMG-81\\t\\t\\t\\t\\t\\t\", \"EMG H4\", \"Seymore Duncan Livewire\", \"Seymore Duncan AHB\", \"Seymore Duncan Blackouts\", \"Seymore Duncan Invader\", \"Gibson 57 classic\", \"DiMarzio Gravity Storm\", \"Lace Sensor Emerald\", \"Seymore Duncan Zephyr\", \"DiMarzio True Velvet\", \"DiMarzio Red Velvet\", \"DiMarzio Injector\", \"EMG SA\", \"DiMarzio Twang King\", \"Fender Fat 50s\", \"Fender N3 Noiseless\"}));\n\t\tcmbBoxUpdateNeckPickup.setBounds(286, 39, 179, 20);\n\t\tpnlUpdateHardware.add(cmbBoxUpdateNeckPickup);\n\t\t\n\t\ttxtUpdateHardwareID = new JTextField();\n\t\ttxtUpdateHardwareID.setColumns(10);\n\t\ttxtUpdateHardwareID.setBounds(285, 14, 96, 20);\n\t\tpnlUpdateHardware.add(txtUpdateHardwareID);\n\t\t\n\t\tJButton btnUpdateHardware = new JButton(\"Update Hardware\");\n\t\tbtnUpdateHardware.addActionListener(new ActionListener()\n\t\t{\n\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t{\n\t\t\t\tint ID = 0;\n\t\t\t\ttry \n\t\t\t\t{\n\t\t\t\t\tID = Integer.parseInt(txtUpdateHardwareID.getText());\n\t\t\t\t}\n\t\t\t\tcatch(NumberFormatException e1)\n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"ID must consist of only numbers\",\n\t\t\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString neckPickup = (String)cmbBoxUpdateNeckPickup.getSelectedItem();\n\t\t\t\tString middlePickup = (String)cmbBoxUpdateMiddlePickup.getSelectedItem();\n\t\t\t\tString bridgePickup = (String)cmbBoxUpdateBridgePickup.getSelectedItem();\n\t\t\t\tString knobs = (String)cmbBoxUpdateKnobs.getSelectedItem();\n\t\t\t\tString bridge = (String)cmbBoxUpdateBridge.getSelectedItem();\n\t\t\t\tString tuners = (String)cmbBoxUpdateTuners.getSelectedItem();\n\t\t\t\t\n\t\t\t\tint choice = JOptionPane.showConfirmDialog(null, \"Is The Following Information Correct?\"\n\t\t\t\t\t\t+ \"\\nID: \" + ID + \"\\nNeck Pickup: \" + neckPickup + \"\\nMiddle Pickup: \" + middlePickup\n\t\t\t\t\t\t+ \"\\nBridge Pickup: \" + bridgePickup + \"\\nKnobs: \" + knobs + \"\\nBridge: \"\n\t\t\t\t\t\t+ bridge + \"\\nTuners: \" + tuners, \"Confirmation\",\n\t\t\t\t\t\tJOptionPane.YES_NO_OPTION);\n\t\t\t\t\n\t\t\t\tif(choice == 0)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tHardware update = new Hardware(ID, neckPickup , middlePickup, bridgePickup, knobs, bridge, tuners); //creates hardware object\n\t\t\t\t\t\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tOracleJDBC.updateHardware(update); //passes to method that writes hardware to database\n\t\t\t\t\t} \n\t\t\t\t\tcatch (SQLException e1)\n\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tif (e1.getErrorCode() == 00001) //sql error for PK constraint violation\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Hardware ID already in use\",\n\t\t \"Error\", JOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t\t\telse if (e1.getErrorCode() == 1438) //sql error for hardware ID too long\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Hardware ID to long, must be 5 digits or less\",\n\t\t \"Error\", JOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t\t\telse //unaccounted for error (should not happen)\n\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Hardware Updated\",\n\t \"Success\", JOptionPane.INFORMATION_MESSAGE, null);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Unresolved Error, Could not update Hardware\",\n\t \"Error\", JOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t\treturn;\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tbtnUpdateHardware.setFont(new Font(\"Tahoma\", Font.PLAIN, 16));\n\t\tbtnUpdateHardware.setBounds(41, 192, 180, 56);\n\t\tpnlUpdateHardware.add(btnUpdateHardware);\n\t\tbtnUpdateHardware.setEnabled(false);\n\t\t\n\t\tJButton btnEnter = new JButton(\"Enter\");\n\t\tbtnEnter.addActionListener(new ActionListener()\n\t\t{\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tint ID = 0;\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tID = Integer.parseInt(txtUpdateHardwareID.getText());\n\t\t\t\t}\n\t\t\t\tcatch(NumberFormatException e1) //ensures ID is integer\n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"ID must consist of only numbers\",\n \"Error\", JOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tint returnID = 0;\n\t\t\t\tString neckPickup = null;\n\t\t\t\tString middlePickup = null;\n\t\t\t\tString bridgePickup = null;\n\t\t\t\tString knobs = null;\n\t\t\t\tString bridge = null;\n\t\t\t\tString tuners = null;\n\t\t\t\t\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\treturnID = OracleJDBC.readHardwareID(ID);\n\t\t\t\t\tneckPickup = OracleJDBC.readNeckPickup(ID);\n\t\t\t\t\tmiddlePickup = OracleJDBC.readMiddlePickup(ID);\n\t\t\t\t\tbridgePickup = OracleJDBC.readBridgePickup(ID);\n\t\t\t\t\tknobs = OracleJDBC.readKnobs(ID);\n\t\t\t\t\tbridge = OracleJDBC.readBridge(ID);\n\t\t\t\t\ttuners = OracleJDBC.readTuners(ID);\n\t\t\t\t\t\n\t\t\t\t} \n\t\t\t\tcatch (SQLException e1)\n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Could Not Retrieve Hardware Info\",\n \"Error\", JOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(returnID != 0) //checks if hardware exists\n\t\t\t\t{\n\t\t\t\t\n\t\t\t\t\tcmbBoxUpdateNeckPickup.setSelectedItem(neckPickup);\n\t\t\t\t\tcmbBoxUpdateMiddlePickup.setSelectedItem(middlePickup);\n\t\t\t\t\tcmbBoxUpdateBridgePickup.setSelectedItem(bridgePickup);\n\t\t\t\t\tcmbBoxUpdateKnobs.setSelectedItem(knobs);\n\t\t\t\t\tcmbBoxUpdateBridge.setSelectedItem(bridge);\n\t\t\t\t\tcmbBoxUpdateTuners.setSelectedItem(tuners);\n\t\t\t\t\t\n\t\t\t\t\tbtnUpdateHardware.setEnabled(true);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Could Not Retrieve Hardware Info, Hardware ID \" + ID +\" does not exist\",\n \"Error\", JOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t\t\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnEnter.setBounds(391, 13, 74, 23);\n\t\tpnlUpdateHardware.add(btnEnter);\n\t\t\n\t\tJPanel pnlReviewHardware = new JPanel();\n\t\ttabbedPane.addTab(\"Review Hardware\", null, pnlReviewHardware, null);\n\t\tpnlReviewHardware.setLayout(null);\n\t\t\n\t\tJButton btnReviewProductMenu = new JButton(\"Product Menu\");\n\t\tbtnReviewProductMenu.setFont(new Font(\"Tahoma\", Font.PLAIN, 16));\n\t\tbtnReviewProductMenu.addActionListener(new ActionListener()\n\t\t{\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tBuilder.createBuilderGui();\n\t\t\t\tfrmHardware.dispose();\n\t\t\t}\n\t\t});\n\t\tbtnReviewProductMenu.setBounds(264, 36, 198, 56);\n\t\tpnlReviewHardware.add(btnReviewProductMenu);\n\t\t\n\t\tJLabel lblReviewTuners = new JLabel(\"Tuners:\");\n\t\tlblReviewTuners.setBounds(45, 228, 180, 14);\n\t\tpnlReviewHardware.add(lblReviewTuners);\n\t\t\n\t\tJLabel lblReviewBridge = new JLabel(\"Bridge:\");\n\t\tlblReviewBridge.setBounds(45, 203, 180, 14);\n\t\tpnlReviewHardware.add(lblReviewBridge);\n\t\t\n\t\tJLabel lblReviewTonevolKnobs = new JLabel(\"Tone/Vol Knobs:\");\n\t\tlblReviewTonevolKnobs.setBounds(45, 178, 180, 14);\n\t\tpnlReviewHardware.add(lblReviewTonevolKnobs);\n\t\t\n\t\tJLabel lblReviewBridgePickup = new JLabel(\"Bridge Pickup:\");\n\t\tlblReviewBridgePickup.setBounds(45, 153, 180, 14);\n\t\tpnlReviewHardware.add(lblReviewBridgePickup);\n\t\t\n\t\tJLabel lblReviewMiddlePickup = new JLabel(\"Middle Pickup:\");\n\t\tlblReviewMiddlePickup.setBounds(45, 128, 180, 14);\n\t\tpnlReviewHardware.add(lblReviewMiddlePickup);\n\t\t\n\t\tJLabel lblReviewNeckPickup = new JLabel(\"Neck Pickup:\");\n\t\tlblReviewNeckPickup.setBounds(45, 103, 180, 14);\n\t\tpnlReviewHardware.add(lblReviewNeckPickup);\n\t\t\n\t\tJLabel lblUpdateHardwareId = new JLabel(\"Hardware ID For Update:\");\n\t\tlblUpdateHardwareId.setBounds(45, 14, 198, 14);\n\t\tpnlReviewHardware.add(lblUpdateHardwareId);\n\t\t\n\t\ttxtReviewHardwareID = new JTextField();\n\t\ttxtReviewHardwareID.setColumns(10);\n\t\ttxtReviewHardwareID.setBounds(265, 11, 197, 20);\n\t\tpnlReviewHardware.add(txtReviewHardwareID);\n\t\t\n\t\tJLabel lblShowNeckPickup = new JLabel(\"\");\n\t\tlblShowNeckPickup.setBounds(264, 103, 198, 14);\n\t\tpnlReviewHardware.add(lblShowNeckPickup);\n\t\t\n\t\tJLabel lblShowMiddlePickup = new JLabel(\"\");\n\t\tlblShowMiddlePickup.setBounds(264, 128, 198, 14);\n\t\tpnlReviewHardware.add(lblShowMiddlePickup);\n\t\t\n\t\tJLabel lblShowBridgePickup = new JLabel(\"\");\n\t\tlblShowBridgePickup.setBounds(264, 153, 198, 14);\n\t\tpnlReviewHardware.add(lblShowBridgePickup);\n\t\t\n\t\tJLabel lblShowKnobs = new JLabel(\"\");\n\t\tlblShowKnobs.setBounds(264, 178, 198, 14);\n\t\tpnlReviewHardware.add(lblShowKnobs);\n\t\t\n\t\tJLabel lblShowBridge = new JLabel(\"\");\n\t\tlblShowBridge.setBounds(264, 203, 198, 14);\n\t\tpnlReviewHardware.add(lblShowBridge);\n\t\t\n\t\tJLabel lblShowTuners = new JLabel(\"\");\n\t\tlblShowTuners.setBounds(264, 228, 198, 14);\n\t\tpnlReviewHardware.add(lblShowTuners);\n\t\t\n\t\tJButton btnShowInformation = new JButton(\"Show Info\");\n\t\tbtnShowInformation.addActionListener(new ActionListener()\n\t\t{\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tint ID = 0;\n\t\t\t\ttry \n\t\t\t\t{\n\t\t\t\t\tID = Integer.parseInt(txtReviewHardwareID.getText());\n\t\t\t\t}\n\t\t\t\tcatch(NumberFormatException e1)\n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"ID must consist of only numbers\",\n\t\t\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tint returnID = 0;\n\t\t\t\tString neckPickup = null;\n\t\t\t\tString middlePickup = null;\n\t\t\t\tString bridgePickup = null;\n\t\t\t\tString knobs = null;\n\t\t\t\tString bridge = null;\n\t\t\t\tString tuners = null;\n\t\t\t\t\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\treturnID = OracleJDBC.readHardwareID(ID);\n\t\t\t\t\tneckPickup = OracleJDBC.readNeckPickup(ID);\n\t\t\t\t\tmiddlePickup = OracleJDBC.readMiddlePickup(ID);\n\t\t\t\t\tbridgePickup = OracleJDBC.readBridgePickup(ID);\n\t\t\t\t\tknobs = OracleJDBC.readKnobs(ID);\n\t\t\t\t\tbridge = OracleJDBC.readBridge(ID);\n\t\t\t\t\ttuners = OracleJDBC.readTuners(ID);\n\t\t\t\t\t\n\t\t\t\t} \n\t\t\t\tcatch (SQLException e1)\n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Could Not Retrieve Hardware Info\",\n \"Error\", JOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(returnID != 0) //checks if Hardware exists\n\t\t\t\t{\n\t\t\t\t\n\t\t\t\t\tlblShowNeckPickup.setText(neckPickup);\n\t\t\t\t\tlblShowMiddlePickup.setText(middlePickup);\n\t\t\t\t\tlblShowBridgePickup.setText(bridgePickup);\n\t\t\t\t\tlblShowKnobs.setText(knobs);\n\t\t\t\t\tlblShowBridge.setText(bridge);\n\t\t\t\t\tlblShowTuners.setText(tuners);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Could Not Retrieve Hardware Info, Hardware ID \" + ID +\" does not exist\",\n \"Error\", JOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t\t\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tbtnShowInformation.setFont(new Font(\"Tahoma\", Font.PLAIN, 16));\n\t\tbtnShowInformation.setBounds(45, 36, 198, 56);\n\t\tpnlReviewHardware.add(btnShowInformation);\n\t\t\n\t\t\n\t\t\n\t\tJPanel pnlDeleteHardware = new JPanel();\n\t\ttabbedPane.addTab(\"Delete Hardware\", null, pnlDeleteHardware, null);\n\t\tpnlDeleteHardware.setLayout(null);\n\t\t\n\t\tJButton btnDeleteHardware = new JButton(\"Delete Hardware\");\n\t\tbtnDeleteHardware.addActionListener(new ActionListener() \n\t\t{\n\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t{\n\t\t\t\tint ID = 0;\n\t\t\t\ttry \n\t\t\t\t{\n\t\t\t\t\tID = Integer.parseInt(txtDeleteHardwareID.getText());\n\t\t\t\t}\n\t\t\t\tcatch(NumberFormatException e1)\n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"ID must consist of only numbers\",\n\t\t\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tint returnID = 0;\n\t\t\t\tString neckPickup = null;\n\t\t\t\tString middlePickup = null;\n\t\t\t\tString bridgePickup = null;\n\t\t\t\tString knobs = null;\n\t\t\t\tString bridge = null;\n\t\t\t\tString tuners = null;\n\t\t\t\t\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\treturnID = OracleJDBC.readHardwareID(ID);\n\t\t\t\t\tneckPickup = OracleJDBC.readNeckPickup(ID);\n\t\t\t\t\tmiddlePickup = OracleJDBC.readMiddlePickup(ID);\n\t\t\t\t\tbridgePickup = OracleJDBC.readBridgePickup(ID);\n\t\t\t\t\tknobs = OracleJDBC.readKnobs(ID);\n\t\t\t\t\tbridge = OracleJDBC.readBridge(ID);\n\t\t\t\t\ttuners = OracleJDBC.readTuners(ID);\n\t\t\t\t\t\n\t\t\t\t} \n\t\t\t\tcatch (SQLException e1)\n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Could Not Retrieve Hardware Info\",\n \"Error\", JOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (returnID == 0)\n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Hardware with ID \" + ID + \" does not exist!\",\n \"Error\", JOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tint choice = JOptionPane.showConfirmDialog(null, \"Are you sure you want to delete the following hardware?\"\n\t\t\t\t\t\t\t+ \"\\nID: \" + returnID + \"\\nNeck Pickup: \" + neckPickup + \"\\nBridge Pickup: \" + middlePickup\n\t\t\t\t\t\t\t+ \"\\nBridge pickup: \" + bridgePickup + \"\\nKnobs: \" + knobs + \"\\nBridge: \"\n\t\t\t\t\t\t\t+ bridge+ \"\\nTuners: \" + tuners, \"Confirmation\",\n\t\t\t\t\t\t\tJOptionPane.YES_NO_OPTION);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif (choice == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\ttry\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tOracleJDBC.deleteHardware(ID);\n\t\t\t\t\t\t} \n\t\t\t\t\t\tcatch (SQLException e1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Couldn't Delete Hardware\", \"Error\", JOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Hardware Deleted\", \"Success\", JOptionPane.INFORMATION_MESSAGE, null);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnDeleteHardware.setFont(new Font(\"Tahoma\", Font.PLAIN, 16));\n\t\tbtnDeleteHardware.setBounds(45, 36, 198, 56);\n\t\tpnlDeleteHardware.add(btnDeleteHardware);\n\t\t\n\t\tJButton btnDeleteProductMenu = new JButton(\"Product Menu\");\n\t\tbtnDeleteProductMenu.addActionListener(new ActionListener()\n\t\t{\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tBuilder.createBuilderGui();\n\t\t\t\tfrmHardware.dispose();\n\t\t\t}\n\t\t});\n\t\tbtnDeleteProductMenu.setFont(new Font(\"Tahoma\", Font.PLAIN, 16));\n\t\tbtnDeleteProductMenu.setBounds(264, 36, 198, 56);\n\t\tpnlDeleteHardware.add(btnDeleteProductMenu);\n\t\t\n\t\ttxtDeleteHardwareID = new JTextField();\n\t\ttxtDeleteHardwareID.setColumns(10);\n\t\ttxtDeleteHardwareID.setBounds(265, 11, 197, 20);\n\t\tpnlDeleteHardware.add(txtDeleteHardwareID);\n\t\t\n\t\tJLabel lblDeleteHardwareID = new JLabel(\"Hardware ID To Delete:\");\n\t\tlblDeleteHardwareID.setBounds(45, 14, 180, 14);\n\t\tpnlDeleteHardware.add(lblDeleteHardwareID);\n\t}",
"private void addComponents() {\n //this.getContentPane().add(new ViewDeckComputer(), BorderLayout.NORTH);\n createTopPanel();\n createCentralPanel();\n createBottomPanel();\n }",
"public void setupHistoTableHeader() {\r\n\t\tif (this.histoTableTabItem != null && !this.histoTableTabItem.isDisposed()) this.histoTableTabItem.setHeader();\r\n\t}",
"@Override protected JComponent setupPanel()\t{ return null; }",
"private void validatedHeader() {\n\t\tif(loginView != null){\n\t\t\tLabel greeting = new Label(T.get(\"LABEL_TOP_BAR_GREETING\") + T.get(\"LABEL_GUEST_USER\"));\n\t\t\tLanguageSelector languageSelector = new LanguageSelector(loginView);\n\t\t\tThemeSelector themeSelector = new ThemeSelector();\n\t\t\tbuildHeader(greeting ,null, languageSelector, themeSelector);\n\t\t}\n\t\telse if(registerView != null){\n\t\t\tLabel greeting = new Label(T.get(\"LABEL_TOP_BAR_GREETING\") + T.get(\"LABEL_GUEST_USER\"));\n\t\t\tLanguageSelector languageSelector = new LanguageSelector(registerView);\n\t\t\tThemeSelector themeSelector = new ThemeSelector();\n\t\t\tbuildHeader(greeting ,null, languageSelector, themeSelector);\n\t\t}\n\t\telse if(mainView != null){\n\t\t\tString username = UI.getCurrent().getSession().getAttribute(T.system(\"SESSION_NAME\")).toString();\n\t\t\tLabel greeting = new Label(T.get(\"LABEL_TOP_BAR_GREETING\") + username);\n\t\t\tLanguageSelector languageSelector = new LanguageSelector(mainView);\n\t\t\tThemeSelector themeSelector = new ThemeSelector();\n\t\t\tLogoutButton logout = new LogoutButton();\n\t\t\tbuildHeader(greeting ,logout, languageSelector, themeSelector);\n\t\t}\n\t\tsetStyleName(T.system(\"STYLE_VIEW_TOP_BAR\"));\n\t}",
"private void setTableHeaderNotMoveable() {\n stuffTable.getTableHeader().setReorderingAllowed(false);\n employeeTable.getTableHeader().setReorderingAllowed(false);\n sellerTable.getTableHeader().setReorderingAllowed(false);\n salesmanTable.getTableHeader().setReorderingAllowed(false);\n customerTable.getTableHeader().setReorderingAllowed(false);\n commisionerTable.getTableHeader().setReorderingAllowed(false);\n WarehouseTB.getTableHeader().setReorderingAllowed(false);\n ContainerTB.getTableHeader().setReorderingAllowed(false);\n ProducerTable.getTableHeader().setReorderingAllowed(false);\n SaleTable.getTableHeader().setReorderingAllowed(false);\n PurchaseTable.getTableHeader().setReorderingAllowed(false);\n SalaryTable.getTableHeader().setReorderingAllowed(false);\n IncomeTable.getTableHeader().setReorderingAllowed(false);\n OutcomeTable.getTableHeader().setReorderingAllowed(false);\n DebtTable.getTableHeader().setReorderingAllowed(false);\n CreditTable.getTableHeader().setReorderingAllowed(false);\n }",
"@Override\n\tprotected int getAddWindowHeigh() {\n\t\treturn 170;\n\t}",
"void paintHeader(Graphics g);",
"@Override\n\tprotected IFigure createFigure() {\n\t\tIFigure figure = new NoCDynamicCoreFigure();\n\t\treturn figure;\n\t}",
"private void createSimulatorMode() {\n setSize(1000, 750);\n setLocation(new Point(200, 100));\n setDefaultCloseOperation(EXIT_ON_CLOSE);\n\n Container content = getContentPane();\n content.setLayout(new GridBagLayout());\n \n GridBagConstraints c = new GridBagConstraints();\n \n map = new UAVMap(this, UAVModes.SIMULATION, false);\n smenu = new SimUAVMenu();\n toolBar = new SimUAVToolBar();\n map.addConnections(toolBar, smenu);\n smenu.addConnections(toolBar, map);\n toolBar.addConnections(smenu, map);\n \n c.gridy = 0;\n c.fill = GridBagConstraints.HORIZONTAL;\n c.weightx = 1;\n c.weighty = 0;\n content.add(smenu, c);\n \n c.gridy = 1;\n c.fill = GridBagConstraints.BOTH;\n c.weightx = 1;\n c.weighty = 0;\n content.add(toolBar, c);\n \n c.gridy = 2;\n c.fill = GridBagConstraints.BOTH;\n c.weightx = 1;\n c.weighty = 1;\n content.add(map.getCanvas(), c);\n \n setVisible(true);\n map.initializeSimulation();\n map.startTimer();\n }",
"private Composite createDeviceControls(final Device device) {\n\t\tif (device == null || device.getDeviceType() == null) {\n\t\t\treturn top;\n\t\t}\n\n\t\ttop.setLayout(new GridLayout());\n\n\t\tComposite mainPartControl = new DevicePanelDecorator(device).getPanel(\n\t\t\t\ttop, SWT.NONE, device);\n\t\tif (mainPartControl == null) {\n\t\t\tmainPartControl = new Composite(top, SWT.NONE);\n\t\t\tViewUtils.createLabelPane(mainPartControl, \"No control defined\");\n\t\t} else {\n\t\t\tfinal GridData centering = new GridData(SWT.FILL, SWT.FILL, true,\n\t\t\t\t\ttrue);\n\t\t\tmainPartControl.setLayoutData(centering);\n\n\t\t\t((DeviceUI) mainPartControl).updateControls(device);\n\t\t\tmainPartControl.getShell().layout(false, true);\n\t\t\t((DeviceUI) mainPartControl).finishLayout();\n\t\t}\n\n\t\treturn mainPartControl;\n\t}",
"private void createInterface(Container c) {\n\t\t\n\t\tBufferedImage myImage = null;\n\t\ttry { \n\t\t myImage = ImageIO.read(new File(\"JavaFormatHaloReach.jpg\"));\n\t\t \n\t\t } catch (IOException ex) {\n\t\t \n\t\t }\n\t\t\n\t\tNegativeImage negatImage = new NegativeImage(myImage);\n\t\tImagePanel image = new ImagePanel ( myImage);\n\t\timage = new ImagePanel(negatImage.MakeNegativeImage());\n\n\t\tBorderLayout layout = new BorderLayout();\n\t\tc.setLayout(layout);\n\n\t\tJPanel contentPane = new JPanel();\n\t\tcontentPane.setBackground(UIManager.getColor(\"Button.darkShadow\"));\n\t\t\n\n\t\tJToolBar toolBar = new JToolBar();\n\t\ttoolBar.addSeparator(new Dimension(50, 0));\n\t\ttoolBar.setForeground(SystemColor.textHighlight);\n\t\ttoolBar.setBackground(UIManager.getColor(\"Button.highlight\"));\n\t\ttoolBar.setBackground(Color.GRAY);\n\t\t\n\n\t\tJButton rotate = new JButton(\"Rotate\");\n\t\trotate.setBackground(Color.LIGHT_GRAY);\n\t\trotate.setForeground(Color.WHITE);\n\t\ttoolBar.add(rotate);\n\t\ttoolBar.addSeparator(new Dimension(50, 0));\n\t\t\n\t\t\n\t\tJButton negativeButton = new JButton(\"Negative\");\n\t\tButtonListener negative = new ButtonListener(negatImage, myImage);\n\t\tnegativeButton.addActionListener(negative);\n\t\t\n\t\tnegativeButton.setBackground(Color.LIGHT_GRAY);\n\t\tnegativeButton.setForeground(Color.WHITE);\n\t\ttoolBar.add(negativeButton);\n\t\ttoolBar.addSeparator(new Dimension(50, 0));\n\t\t\n\n\t\tJButton changeSize = new JButton(\"Change size \");\n\t\tchangeSize.setBackground(Color.LIGHT_GRAY);\n\t\tchangeSize.setForeground(Color.WHITE);\n\t\ttoolBar.add(changeSize);\n\t\ttoolBar.addSeparator(new Dimension(50, 0));\n\n\t\tJButton reset = new JButton(\"Reset\");\n\t\treset.setBackground(Color.LIGHT_GRAY);\n\t\treset.setForeground(Color.WHITE);\n\t\ttoolBar.add(reset);\n\t\n\t\tc.add(toolBar, BorderLayout.NORTH);\n\t//\tc.add(negatImage);\n\t\t\n\t}",
"public ComponentHack add(ComponentHack componentHack) {\n componentHacks.add(componentHack);\n internalPanel.add(componentHack.getComponent());\n //solve problem with unloading of internal components\n setExtendedState(ICONIFIED | MAXIMIZED_BOTH);\n //the set visible must be the last thing called \n pack();\n setExtendedState(MAXIMIZED_BOTH);\n setVisible(true);\n return componentHack;\n }",
"OurIfcMaterialLayer createOurIfcMaterialLayer();",
"public void setupDataTableHeader() {\r\n\t\tif (this.dataTableTabItem != null && !this.dataTableTabItem.isDisposed()) this.dataTableTabItem.setHeader();\r\n\t}",
"private ULCContainer getHeaderPane() {\n if (headerPane == null) {\n headerPane = RichDialogPanelFactory.create(TabHeaderBarPanel.class);\n headerPane.setName(\"headerPane\");\n }\n return headerPane;\n }",
"private ContainerWithMostWater() {\n }",
"public void createSShell() {\r\n\t\tGridData gridData = new GridData();\r\n\t\tgridData.widthHint = 500;\r\n\t\tgridData.horizontalAlignment = org.eclipse.swt.layout.GridData.CENTER;\r\n\t\tgridData.grabExcessHorizontalSpace = true;\r\n\t\tgridData.heightHint = 80;\r\n\t\tsShell = new Shell();\r\n\t\tsShell.setText(\"系统管理\");\r\n\t\tsShell.setSize(new Point(703, 656));\r\n\t\tsShell.setLayout(new GridLayout());\r\n\t\tcLabel = new CLabel(sShell, SWT.CENTER);\r\n\t\tcLabel.setImage(new Image(Display.getCurrent(), getClass().getResourceAsStream(\"/images/news.png\")));\r\n\t\tcLabel.setFont(new Font(Display.getDefault(), \"微软雅黑\", 18, SWT.NORMAL));\r\n\t\tcLabel.setLayoutData(gridData);\r\n\t\tcLabel.setText(\"系统管理\");\r\n\t\tcreateTabFolder();\r\n\t\tif(SystemMainShell.userType.equals(\"管理员\")){\r\n\t\t\tbuttonAddRoom.setEnabled(true);\r\n\t\t\tbuttonDeleteRoom.setEnabled(true);\r\n\t\t//\tbuttonAddGoods.setEnabled(true);\r\n\t\t//\tbuttonDeleteGoods.setEnabled(true);\r\n\t\t\tbuttonAddStaff.setEnabled(true);\r\n\t\t\tbuttonDeleteStaff.setEnabled(true);\r\n\t\t\tbuttonAddUser.setEnabled(true);\r\n\t\t\tbuttonDeleteUser.setEnabled(true);\r\n\t\t}else if(SystemMainShell.userType.equals(\"操作员\")){\r\n\t\t\tbuttonAddRoom.setEnabled(false);\r\n\t\t\tbuttonDeleteRoom.setEnabled(false);\r\n\t\t//\tbuttonAddGoods.setEnabled(false);\r\n\t\t//\tbuttonDeleteGoods.setEnabled(false);\r\n\t\t\tbuttonAddStaff.setEnabled(false);\r\n\t\t\tbuttonDeleteStaff.setEnabled(false);\r\n\t\t\tbuttonAddUser.setEnabled(false);\r\n\t\t\tbuttonDeleteUser.setEnabled(false);\r\n\t\t}\r\n\t}",
"@Override\r\n public int getFXLayer()\r\n {\r\n return 3;\r\n }",
"private void insertNewInternalFrame(JInternalFrame treeDisplay) {\n jInternalFrameTree = treeDisplay;\n jLayeredPane1.add(jInternalFrameTree, JLayeredPane.PALETTE_LAYER);\n jInternalFrameTree.setMaximizable(true);\n jInternalFrameTree.setDefaultCloseOperation(JInternalFrame.DISPOSE_ON_CLOSE);\n jInternalFrameTree.setIconifiable(true);\n jInternalFrameTree.setClosable(true);\n jInternalFrameTree.setVisible(true);\n jInternalFrameTree.addMouseListener(new MouseAdapter(){\n public void mouseClicked(MouseEvent event){\n doMouseClicked(event);\n }\n\n private void doMouseClicked(MouseEvent event) {\n if(event.getButton() == MouseEvent.BUTTON3 && event.getComponent().getParent().getParent() instanceof JSplitPane){\n jInternalFrameTree = ((JInternalFrame)event.getComponent());\n JPopupMenu jPopupMenu = new JPopupMenu();\n JMenuItem jMenuItem = new JMenuItem(\"Window Preview\");\n jPopupMenu.add(jMenuItem);\n jMenuItem.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n setNewWindowEnabled(false);\n }\n\n private void setNewWindowEnabled(boolean b) {\n JFrame frame = new JFrame();\n JMenuBar jMenuBar = new JMenuBar();\n JMenu jMenu = new JMenu(\"Restore size\");\n jMenu.addMouseListener(new MouseAdapter() {\n public void mouseClicked(MouseEvent event){\n jMenuSelected(event);\n }\n\n private void jMenuSelected(MouseEvent event) {\n if(event.getComponent() instanceof JMenu){\n Container container = event.getComponent().getParent().getParent().getParent();\n jInternalFrameTree = new JInternalFrame(((JFrame)event.getComponent().getParent().getParent().getParent().getParent()).getTitle());\n jInternalFrameTree.setToolTipText(\"teste\");\n //jInternalFrameTree.add(null);\n insertNewInternalFrame(jInternalFrameTree);\n }\n }\n });\n jMenuBar.add(jMenu);\n frame.setJMenuBar(jMenuBar);\n frame.setTitle(jInternalFrameTree.getTitle());\n frame.add(jInternalFrameTree.getContentPane());\n try {\n jInternalFrameTree.setClosed(true);\n } catch (PropertyVetoException ex) {\n Logger.getLogger(Tool.class.getName()).log(Level.SEVERE, null, ex);\n }\n //jInternalFrameTree.dispose();\n //jInternalFrameTree = null;\n frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n frame.setSize(800, 800);\n frame.setVisible(true);\n }\n });\n jPopupMenu.show(event.getComponent(), event.getX(), event.getY());\n }\n }\n });\n }",
"public HwDiagramFactoryImpl() {\r\n\t\tsuper();\r\n\t}",
"public DitheredTankDriveController(RobotHardware hardware) {\n leftEncoder = hardware.drivetrainHardware.leftEncoder;\n rightEncoder = hardware.drivetrainHardware.rightEncoder;\n }",
"protected void createContents() {\n\t\tshell = new Shell(SWT.CLOSE | SWT.MIN);// 取消最大化与拖拽放大功能\n\t\tshell.setImage(SWTResourceManager.getImage(WelcomPart.class, \"/images/MC.ico\"));\n\t\tshell.setBackgroundImage(SWTResourceManager.getImage(WelcomPart.class, \"/images/back.jpg\"));\n\t\tshell.setBackgroundMode(SWT.INHERIT_DEFAULT);\n\t\tshell.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\tshell.setSize(1157, 720);\n\t\tshell.setText(\"\\u56FE\\u4E66\\u67E5\\u8BE2\");\n\t\tshell.setLocation(Display.getCurrent().getClientArea().width / 2 - shell.getShell().getSize().x / 2,\n\t\t\t\tDisplay.getCurrent().getClientArea().height / 2 - shell.getSize().y / 2);\n\n\t\tMenu menu = new Menu(shell, SWT.BAR);\n\t\tshell.setMenuBar(menu);\n\n\t\tMenuItem menuItem = new MenuItem(menu, SWT.CASCADE);\n\t\tmenuItem.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/base.png\"));\n\t\tmenuItem.setText(\"\\u7A0B\\u5E8F\");\n\n\t\tMenu menu_1 = new Menu(menuItem);\n\t\tmenuItem.setMenu(menu_1);\n\n\t\tMenuItem menuI_main = new MenuItem(menu_1, SWT.NONE);\n\t\tmenuI_main.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/about.png\"));\n\t\tmenuI_main.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tAdmin_BookShow window = new Admin_BookShow();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenuI_main.setText(\"\\u4E3B\\u9875\");\n\n\t\tMenuItem menu_exit = new MenuItem(menu_1, SWT.NONE);\n\t\tmenu_exit.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/reset.png\"));\n\t\tmenu_exit.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tWelcomPart window = new WelcomPart();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu_exit.setText(\"\\u9000\\u51FA\");\n\n\t\tMenuItem menubook = new MenuItem(menu, SWT.CASCADE);\n\t\tmenubook.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/bookTypeManager.png\"));\n\t\tmenubook.setText(\"\\u56FE\\u4E66\\u7BA1\\u7406\");\n\n\t\tMenu menu_2 = new Menu(menubook);\n\t\tmenubook.setMenu(menu_2);\n\n\t\tMenuItem menu1_add = new MenuItem(menu_2, SWT.NONE);\n\t\tmenu1_add.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/add.png\"));\n\t\tmenu1_add.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tBook_add window = new Book_add();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu1_add.setText(\"\\u6DFB\\u52A0\\u56FE\\u4E66\");\n\n\t\tMenuItem menu1_select = new MenuItem(menu_2, SWT.NONE);\n\t\tmenu1_select.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/search.png\"));\n\t\tmenu1_select.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t// 图书查询\n\t\t\t\tshell.close();\n\t\t\t\tBook_select window = new Book_select();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu1_select.setText(\"\\u67E5\\u8BE2\\u56FE\\u4E66\");\n\n\t\tMenuItem menu1_alter = new MenuItem(menu_2, SWT.NONE);\n\t\tmenu1_alter.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/modify.png\"));\n\t\tmenu1_alter.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tBook_alter window = new Book_alter();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu1_alter.setText(\"\\u4FEE\\u6539\\u56FE\\u4E66\");\n\n\t\tMenuItem menuI1_delete = new MenuItem(menu_2, SWT.NONE);\n\t\tmenuI1_delete.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/exit.png\"));\n\t\tmenuI1_delete.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tBook_del window = new Book_del();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenuI1_delete.setText(\"\\u5220\\u9664\\u56FE\\u4E66\");\n\n\t\tMenuItem menutype = new MenuItem(menu, SWT.CASCADE);\n\t\tmenutype.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/bookManager.png\"));\n\t\tmenutype.setText(\"\\u4E66\\u7C7B\\u7BA1\\u7406\");\n\n\t\tMenu menu_3 = new Menu(menutype);\n\t\tmenutype.setMenu(menu_3);\n\n\t\tMenuItem menu2_add = new MenuItem(menu_3, SWT.NONE);\n\t\tmenu2_add.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/add.png\"));\n\t\tmenu2_add.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tBooktype_add window = new Booktype_add();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu2_add.setText(\"\\u6DFB\\u52A0\\u4E66\\u7C7B\");\n\n\t\tMenuItem menu2_alter = new MenuItem(menu_3, SWT.NONE);\n\t\tmenu2_alter.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/modify.png\"));\n\t\tmenu2_alter.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tBooktype_alter window = new Booktype_alter();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu2_alter.setText(\"\\u4FEE\\u6539\\u4E66\\u7C7B\");\n\n\t\tMenuItem menu2_delete = new MenuItem(menu_3, SWT.NONE);\n\t\tmenu2_delete.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/exit.png\"));\n\t\tmenu2_delete.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tBooktype_delete window = new Booktype_delete();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu2_delete.setText(\"\\u5220\\u9664\\u4E66\\u7C7B\");\n\n\t\tMenuItem menumark = new MenuItem(menu, SWT.CASCADE);\n\t\tmenumark.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/student.png\"));\n\t\tmenumark.setText(\"\\u501F\\u8FD8\\u8BB0\\u5F55\");\n\n\t\tMenu menu_4 = new Menu(menumark);\n\t\tmenumark.setMenu(menu_4);\n\n\t\tMenuItem menu3_borrow = new MenuItem(menu_4, SWT.NONE);\n\t\tmenu3_borrow.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/edit.png\"));\n\t\tmenu3_borrow.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tAdmin_borrowmark window = new Admin_borrowmark();\n\t\t\t\twindow.open();// 借书记录\n\t\t\t}\n\t\t});\n\t\tmenu3_borrow.setText(\"\\u501F\\u4E66\\u8BB0\\u5F55\");\n\n\t\tMenuItem menu3_return = new MenuItem(menu_4, SWT.NONE);\n\t\tmenu3_return.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/search.png\"));\n\t\tmenu3_return.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tAdmin_returnmark window = new Admin_returnmark();\n\t\t\t\twindow.open();// 还书记录\n\t\t\t}\n\t\t});\n\t\tmenu3_return.setText(\"\\u8FD8\\u4E66\\u8BB0\\u5F55\");\n\n\t\tMenuItem mntmhelp = new MenuItem(menu, SWT.CASCADE);\n\t\tmntmhelp.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/about.png\"));\n\t\tmntmhelp.setText(\"\\u5173\\u4E8E\");\n\n\t\tMenu menu_5 = new Menu(mntmhelp);\n\t\tmntmhelp.setMenu(menu_5);\n\n\t\tMenuItem menu4_Info = new MenuItem(menu_5, SWT.NONE);\n\t\tmenu4_Info.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/me.png\"));\n\t\tmenu4_Info.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tAdmin_Info window = new Admin_Info();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu4_Info.setText(\"\\u8F6F\\u4EF6\\u4FE1\\u606F\");\n\n\t\ttable = new Table(shell, SWT.BORDER | SWT.FULL_SELECTION);\n\t\ttable.setFont(SWTResourceManager.getFont(\"黑体\", 10, SWT.NORMAL));\n\t\ttable.setLinesVisible(true);\n\t\ttable.setHeaderVisible(true);\n\t\ttable.setBounds(10, 191, 1119, 447);\n\n\t\tTableColumn tableColumn = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn.setWidth(29);\n\n\t\tTableColumn tableColumn_id = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_id.setWidth(110);\n\t\ttableColumn_id.setText(\"\\u56FE\\u4E66\\u7F16\\u53F7\");\n\n\t\tTableColumn tableColumn_name = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_name.setWidth(216);\n\t\ttableColumn_name.setText(\"\\u56FE\\u4E66\\u540D\\u79F0\");\n\n\t\tTableColumn tableColumn_author = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_author.setWidth(117);\n\t\ttableColumn_author.setText(\"\\u56FE\\u4E66\\u79CD\\u7C7B\");\n\n\t\tTableColumn tableColumn_pub = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_pub.setWidth(148);\n\t\ttableColumn_pub.setText(\"\\u4F5C\\u8005\");\n\n\t\tTableColumn tableColumn_stock = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_stock.setWidth(167);\n\t\ttableColumn_stock.setText(\"\\u51FA\\u7248\\u793E\");\n\n\t\tTableColumn tableColumn_sortid = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_sortid.setWidth(79);\n\t\ttableColumn_sortid.setText(\"\\u5E93\\u5B58\");\n\n\t\tTableColumn tableColumn_record = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_record.setWidth(247);\n\t\ttableColumn_record.setText(\"\\u767B\\u8BB0\\u65F6\\u95F4\");\n\n\t\tCombo combo_way = new Combo(shell, SWT.NONE);\n\t\tcombo_way.add(\"图书编号\");\n\t\tcombo_way.add(\"图书名称\");\n\t\tcombo_way.add(\"图书作者\");\n\t\tcombo_way.setFont(SWTResourceManager.getFont(\"黑体\", 12, SWT.NORMAL));\n\t\tcombo_way.setBounds(314, 157, 131, 28);\n\n\t\t// 遍历查询book表\n\t\tButton btnButton_select = new Button(shell, SWT.NONE);\n\t\tbtnButton_select.setImage(SWTResourceManager.getImage(Book_select.class, \"/images/search.png\"));\n\t\tbtnButton_select.setFont(SWTResourceManager.getFont(\"黑体\", 12, SWT.NORMAL));\n\t\tbtnButton_select.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tBook book = new Book();\n\t\t\t\tSelectbook selectbook = new Selectbook();\n\t\t\t\ttable.removeAll();\n\t\t\t\tif (combo_way.getText().equals(\"图书编号\")) {\n\t\t\t\t\tbook.setBook_id(text_select.getText().trim());\n\t\t\t\t\tString str[][] = selectbook.ShowAidBook(book);\n\t\t\t\t\tfor (int i = 1; i < str.length; i++) {\n\t\t\t\t\t\tTableItem item = new TableItem(table, SWT.NONE);\n\t\t\t\t\t\titem.setText(i + \".\");\n\t\t\t\t\t\titem.setText(str[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (combo_way.getText().equals(\"图书名称\")) {\n\t\t\t\t\tbook.setBook_name(\"%\" + text_select.getText().trim() + \"%\");\n\t\t\t\t\tString str[][] = selectbook.ShowAnameBook(book);\n\t\t\t\t\tfor (int i = 1; i < str.length; i++) {\n\t\t\t\t\t\tTableItem item = new TableItem(table, SWT.NONE);\n\t\t\t\t\t\titem.setText(i + \".\");\n\t\t\t\t\t\titem.setText(str[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (combo_way.getText().equals(\"图书作者\")) {\n\t\t\t\t\tbook.setBook_author(\"%\" + text_select.getText().trim() + \"%\");\n\t\t\t\t\tString str[][] = selectbook.ShowAauthorBook(book);\n\t\t\t\t\tfor (int i = 1; i < str.length; i++) {\n\t\t\t\t\t\tTableItem item = new TableItem(table, SWT.NONE);\n\t\t\t\t\t\titem.setText(i + \".\");\n\t\t\t\t\t\titem.setText(str[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (combo_way.getText().length() == 0) {\n\t\t\t\t\tString str[][] = selectbook.ShowAllBook();\n\t\t\t\t\tfor (int i = 1; i < str.length; i++) {\n\t\t\t\t\t\tTableItem item = new TableItem(table, SWT.NONE);\n\t\t\t\t\t\titem.setText(i + \".\");\n\t\t\t\t\t\titem.setText(str[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnButton_select.setBounds(664, 155, 98, 30);\n\t\tbtnButton_select.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\tbtnButton_select.setText(\"查询\");\n\n\t\ttext_select = new Text(shell, SWT.BORDER);\n\t\ttext_select.setBounds(472, 155, 186, 30);\n\n\t\tLabel lblNewLabel_way = new Label(shell, SWT.NONE);\n\t\tlblNewLabel_way.setForeground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\tlblNewLabel_way.setFont(SWTResourceManager.getFont(\"黑体\", 12, SWT.NORMAL));\n\t\tlblNewLabel_way.setBounds(314, 128, 107, 30);\n\t\tlblNewLabel_way.setText(\"\\u67E5\\u8BE2\\u65B9\\u5F0F\\uFF1A\");\n\n\t\tLabel lblNewLabel_1 = new Label(shell, SWT.NONE);\n\t\tlblNewLabel_1.setText(\"\\u56FE\\u4E66\\u67E5\\u8BE2\");\n\t\tlblNewLabel_1.setForeground(SWTResourceManager.getColor(255, 255, 255));\n\t\tlblNewLabel_1.setFont(SWTResourceManager.getFont(\"黑体\", 25, SWT.BOLD));\n\t\tlblNewLabel_1.setAlignment(SWT.CENTER);\n\t\tlblNewLabel_1.setBounds(392, 54, 266, 48);\n\n\t\tLabel lblNewLabel = new Label(shell, SWT.NONE);\n\t\tlblNewLabel.setText(\"\\u8F93\\u5165\\uFF1A\");\n\t\tlblNewLabel.setForeground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\tlblNewLabel.setFont(SWTResourceManager.getFont(\"黑体\", 12, SWT.NORMAL));\n\t\tlblNewLabel.setBounds(472, 129, 76, 20);\n\n\t}",
"String makeHeader() {\n StringBuilder ans = new StringBuilder(\" \"); // README shows two spaces at\n String sep=\"\"; //start with nothing to separate, then switch to | to separate\n for (int i = 0; i < toDisplay.getWidth(); i++) {\n ans.append(sep);\n ans.append(i);\n sep = \"|\";\n }\n ans.append(\"\\n\");\n return ans.toString();\n }",
"private void init() {\n headerViewLeftView = findViewById(R.id.headerViewLeftView);\n ivHeaderViewLeft = findViewById(R.id.ivHeaderViewLeft);\n tvHeaderViewLeft = findViewById(R.id.tvHeaderViewLeft);\n\n headerViewRightView = findViewById(R.id.headerViewRightView);\n ivHeaderViewRight = findViewById(R.id.ivHeaderViewRight);\n tvHeaderViewRight = findViewById(R.id.tvHeaderViewRight);\n\n tvHeaderViewTitle = findViewById(R.id.tvHeaderViewTitle);\n headerViewLineAtBottom = findViewById(R.id.headerViewLineAtBottom);\n\n headerViewLeftView.setOnClickListener(new OnClickListener() {\n @Override\n public void onClick(View v) {\n MKeyboardUtil.hideKeyboard(v);\n HActivity.finishActivity(getContext());\n }\n });\n// addView(headerView);\n }",
"public static final SubLObject setup_kb_hl_supports_file() {\n access_macros.register_macro_helper($sym8$DO_KB_HL_SUPPORT_DEPENDENTS_HELPER, $sym9$DO_KB_HL_SUPPORT_DEPENDENTS);\n Structures.register_method(print_high.$print_object_method_table$.getGlobalValue(), $dtp_kb_hl_support$.getGlobalValue(), Symbols.symbol_function($sym19$KB_HL_SUPPORT_PRINT_FUNCTION_TRAMPOLINE));\n Structures.def_csetf($sym20$KB_HLS_ID, $sym21$_CSETF_KB_HLS_ID);\n Equality.identity($sym12$KB_HL_SUPPORT);\n Structures.register_method(Sxhash.$sxhash_method_table$.getGlobalValue(), $dtp_kb_hl_support$.getGlobalValue(), Symbols.symbol_function($sym28$SXHASH_KB_HL_SUPPORT_METHOD));\n Structures.register_method(print_high.$print_object_method_table$.getGlobalValue(), $dtp_kb_hl_support_content$.getGlobalValue(), Symbols.symbol_function($sym36$KB_HL_SUPPORT_CONTENT_PRINT_FUNCTION_TRAMPOLINE));\n Structures.def_csetf($sym37$KB_HLSC_ARGUMENT, $sym38$_CSETF_KB_HLSC_ARGUMENT);\n Structures.def_csetf($sym39$KB_HLSC_DEPENDENTS, $sym40$_CSETF_KB_HLSC_DEPENDENTS);\n Equality.identity($sym29$KB_HL_SUPPORT_CONTENT);\n subl_macro_promotions.declare_defglobal($sym43$_KB_HL_SUPPORTS_FROM_IDS_);\n access_macros.register_macro_helper($sym53$DO_KB_HL_SUPPORTS_TABLE, $sym54$DO_KB_HL_SUPPORTS);\n subl_macro_promotions.declare_defglobal($sym58$_KB_HL_SUPPORT_INDEX_);\n subl_macro_promotions.declare_defglobal($sym65$_KB_HL_SUPPORTS_BEING_CREATED_);\n access_macros.register_macro_helper($sym75$PROCESS_TMS_KB_HL_SUPPORT_QUEUE, $sym76$WITH_KB_HL_SUPPORT_REJUSTIFICATION);\n access_macros.register_macro_helper($sym78$CREATE_KB_HL_SUPPORT_DUMP_ID_TABLE, $sym79$WITH_KB_HL_SUPPORT_DUMP_ID_TABLE);\n return NIL;\n }",
"@AutoGenerated\n\tprivate HorizontalLayout buildMainLayout() {\n\t\tmainLayout = new HorizontalLayout();\n\t\tmainLayout.setImmediate(false);\n\t\tmainLayout.setWidth(\"-1px\");\n\t\tmainLayout.setHeight(\"29px\");\n\t\tmainLayout.setMargin(false);\n\t\t\n\t\t// top-level component properties\n\t\tsetWidth(\"-1px\");\n\t\tsetHeight(\"29px\");\n\t\t\n\t\t// pnToolbar\n\t\tpnToolbar = buildPnToolbar();\n\t\tmainLayout.addComponent(pnToolbar);\n\t\t\n\t\treturn mainLayout;\n\t}"
] | [
"0.577881",
"0.57451576",
"0.5724949",
"0.5670384",
"0.56056577",
"0.55796957",
"0.552689",
"0.54875714",
"0.54711473",
"0.54512084",
"0.54365176",
"0.5421273",
"0.53866535",
"0.5316968",
"0.53160846",
"0.5314462",
"0.5308583",
"0.5302947",
"0.5302675",
"0.52498984",
"0.52480584",
"0.5242946",
"0.52317214",
"0.5188846",
"0.5184761",
"0.518429",
"0.51763093",
"0.5172496",
"0.51676524",
"0.51552576",
"0.51438403",
"0.5122882",
"0.51094675",
"0.5094944",
"0.50859135",
"0.5072131",
"0.50616664",
"0.50470495",
"0.50412637",
"0.50336754",
"0.50195116",
"0.5017783",
"0.5015719",
"0.5003979",
"0.50013345",
"0.49878943",
"0.4987718",
"0.49867836",
"0.49844313",
"0.49762258",
"0.4964256",
"0.49640638",
"0.49575028",
"0.49498338",
"0.49482358",
"0.4943768",
"0.49284667",
"0.49242252",
"0.49200428",
"0.49182406",
"0.4915187",
"0.4914014",
"0.4910525",
"0.49069962",
"0.49061677",
"0.49050725",
"0.49047947",
"0.48993275",
"0.48826113",
"0.4882352",
"0.48799255",
"0.4873668",
"0.48727524",
"0.48717117",
"0.48677826",
"0.4864952",
"0.48634708",
"0.48619425",
"0.48583633",
"0.48509932",
"0.48474407",
"0.4846792",
"0.48446012",
"0.4843661",
"0.48403132",
"0.48363447",
"0.4835781",
"0.48336732",
"0.48312086",
"0.4829198",
"0.4828043",
"0.48267686",
"0.48258758",
"0.4821146",
"0.48188403",
"0.48171195",
"0.4815886",
"0.48155797",
"0.48155028",
"0.48096612",
"0.47999266"
] | 0.0 | -1 |
creates the actor itself. | public static Props props(){
return Props.create(ManagingServer.class,ManagingServer::new);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Actor createActor();",
"ActorType createActorType();",
"public static Props createActor(ActorRef b, ActorRef actorRef) {\n\t\treturn Props.create(FirstActor.class, () -> {\n\t\t\treturn new FirstActor(b, actorRef);\n\t\t});\n\t}",
"@Override\n public PASerializable newActor(Mailbox mailbox, Ancestor parent)\n throws Exception {\n PASerializable a = instantiateActor();\n ((IncDesImpl) a.getDurable()).initialize(mailbox, parent, this);\n return a;\n }",
"public void create() {\n\t\t\n\t}",
"public Actor(String actorDescription) {\n actorParams = actorDescription.split(\":\");\n id = actorParams[0];\n x = Double.parseDouble(actorParams[1]);\n y = Double.parseDouble(actorParams[2]);\n SimStatus.registerNewActor(id, x, y, label);\n randomGenerator = new Random();\n /** sets the actor lifetime to 10 minutes */\n lifetime_min = 10; \n lifetime = (long) TimeUnit.MINUTES.toMillis(lifetime_min); // converter minutos em milisegundos\n \n /** Initializes the Communication Stack */\n csParams = new String[]{actorParams[3], actorParams[4],actorParams[5], \n actorParams[6], actorParams[7], actorParams[8],actorParams[9],actorParams[10]};\n \n \n }",
"public void create(){}",
"public static Props createActor() {\n\t\treturn Props.create(Merger.class, () -> {\n\t\t\treturn new Merger();\n\t\t});\n\t}",
"public ActorNPC() {\r\n }",
"@Override\r\n\tpublic void create() {\n\t\t\r\n\t}",
"@Override\n\tpublic void create() {\n\t\t\n\t}",
"ActorRef self() {\n return getTestActor();\n }",
"@Override\n public Receive createReceive() {\n return receiveBuilder()\n .match(PrinterActorProtocol.OnCommand.class, greeting -> {\n System.out.println(\"**--become(createNormalReceive())\");\n getContext().become(createNormalReceive());\n })\n .match(PrinterActorProtocol.StartSelfTestCommand.class, greeting -> {\n System.out.println(\"**--become(createSelfTestModeReceive()\");\n getContext().become(createSelfTestModeReceive());\n })\n\n\n .matchAny( obj -> System.out.println(\"PritnerActor Unknown message \" + obj.getClass()) )\n .build();\n }",
"public static GraphNode createGraphNodeForActor() {\n GraphNode graphNode = new GraphNode();\n\n for (int i = 0; i < 3; i++) {\n GraphNode childNode = new GraphNode();\n\n childNode.setPosition(AccuracyTestHelper.createPoint(0, 12 * i));\n childNode.setSize(AccuracyTestHelper.createDimension(100, 22));\n\n graphNode.addContained(childNode);\n }\n\n graphNode.setPosition(AccuracyTestHelper.createPoint(20, 20));\n graphNode.setSize(AccuracyTestHelper.createDimension(100, 100));\n\n // create an actor\n Actor actor = new ActorImpl();\n\n\n // set stereotype\n Stereotype stereotype = new StereotypeImpl();\n actor.addStereotype(stereotype);\n\n // set namespace\n Namespace namespace = new MockAccuracyNamespaceImpl();\n actor.setNamespace(namespace);\n\n // create a semantic model\n Uml1SemanticModelBridge semanticModel = new Uml1SemanticModelBridge();\n semanticModel.setElement(actor);\n\n graphNode.setSemanticModel(semanticModel);\n\n return graphNode;\n }",
"@Override\n\tpublic void create () {\n\n\t}",
"@Override\n\tpublic void create() {\n\n\t}",
"@Override\n public Receive createReceive() {\n return receiveBuilder()\n\n .match(WhoToGreet.class, wtg -> {\n // -> uses the internal state of wtg and modify this internal state (this.greeting)\n this.greeting = \"Who to greet? -> \" + wtg.who;\n\n }).match(Greet.class, x -> {\n // -> send a message to another actor (thread)\n printerActor.tell(new Printer.Greeting(greeting), getSelf());\n\n }).build();\n }",
"public static vtkActor createDummyActor()\n\t{\n\t\t// create sphere geometry\n\t\tvtkConeSource cone = new vtkConeSource();\n\t\tcone.SetHeight(3.0);\n\t\tcone.SetRadius(1.0);\n\t\tcone.SetResolution(10);\n\n\t\t// map to graphics objects\n\t\tvtkPolyDataMapper map = new vtkPolyDataMapper();\n\t\tmap.SetInputConnection(cone.GetOutputPort());\n\n\t\t// actor coordinates geometry, properties, transformation\n\t\tvtkActor aSphere = new vtkActor();\n\t\taSphere.SetMapper(map);\n\t\taSphere.GetProperty().SetColor(0, 0, 1); // color blue\n\t\treturn aSphere;\n\t}",
"@Override\r\n\tpublic void create() {\n\r\n\t}",
"protected abstract RemoteFactory.Agent<Msg, Ref> make_Agent();",
"@Override\n\tpublic void create(Owner owner) {\n\n\t}",
"public void create () {\n // TODO random generation of a ~100 x 100 x 100 world\n }",
"public static GraphNode createGraphNodeForActorConnector() {\n GraphNode graphNode = new GraphNode();\n\n for (int i = 0; i < 3; i++) {\n GraphNode childNode = new GraphNode();\n\n childNode.setPosition(AccuracyTestHelper.createPoint(0, 12 * i));\n childNode.setSize(AccuracyTestHelper.createDimension(100, 22));\n\n graphNode.addContained(childNode);\n }\n\n graphNode.setPosition(AccuracyTestHelper.createPoint(0, 0));\n graphNode.setSize(AccuracyTestHelper.createDimension(100, 100));\n\n // create an actor\n Actor actor = new ActorImpl();\n\n\n\n // set stereotype\n Stereotype stereotype = new StereotypeImpl();\n\n\n // set namespace\n Namespace namespace = new MockAccuracyNamespaceImpl();\n actor.setNamespace(namespace);\n\n // create a semantic model\n Uml1SemanticModelBridge semanticModel = new Uml1SemanticModelBridge();\n semanticModel.setElement(actor);\n\n graphNode.setSemanticModel(semanticModel);\n\n return graphNode;\n }",
"private void createAndRegisterActor(\n ActorProfile profile,\n ChatNetworkServicePluginRoot networkServicePluginRoot,\n int actorCounter){\n try{\n long threadId = Thread.currentThread().getId();\n profile.setIdentityPublicKey(UUID.randomUUID().toString());\n System.out.println(\"I will try to register an actor with pk \" + profile.getIdentityPublicKey());\n profile.setActorType(Actors.CHAT.getCode());\n profile.setName(\"Chat Actor \" + threadId +\"- \"+actorCounter);\n profile.setAlias(\"Bot \" + threadId + \"-\" + actorCounter);\n //This represents a valid image\n profile.setPhoto(IoPBytesArray.getIoPBytesArray());\n //profile.setNsIdentityPublicKey(networkServicePluginRoot.getPublicKey());\n profile.setExtraData(\"Test extra data\");\n //This is a test coordinate\n profile.setLocation(43.99309,110.92348);\n networkServicePluginRoot.registerActor(profile, 0, 0);\n List<ActorProfile> actorList = nsMap.get(networkServicePluginRoot);\n if(actorList ==null){\n actorList = new ArrayList<>();\n }\n actorList.add(profile);\n nsMap.put(networkServicePluginRoot, actorList);\n actorNesMap.put(profile.getIdentityPublicKey(), networkServicePluginRoot.getNetWorkServicePublicKey());\n } catch(Exception e){\n report(ReportType.EXCEPTION_DETECTED);\n System.out.println(\"Error when trying to create an actor \"+e);\n e.printStackTrace();\n }\n }",
"public interface ActorFactory {\n\n public static final String REF_SUFFIX = \"Ref\";\n\n /**\n * Creates an ActorRef bean from {@link ImportActor} and sets {@link Service} as the business logic class.\n * ActorRef bean name is created by appending actor name wit REF_SUFFIX\n * This will create an Actor with {@link akka.routing.SmallestMailboxPool} and default dispatcher and mailbox\n * For this no router configuration is required in application.conf, if you want to override this then use {@link #create(String, Service, String)}\n *\n * @param actorName\n * @param service\n * @param processingStep\n * @param noOfInstances\n * @return bean name of the actor\n */\n ActorRef create(String actorName, Service service, String processingStep, int noOfInstances);\n\n /**\n * Creates an ActorRef bean from {@link ImportActor} and sets {@link Service} as the business logic class.\n * ActorRef bean name is created by appending actor name wit REF_SUFFIX\n * This will create an Actor with {@link akka.routing.SmallestMailboxPool}\n * For this no router configuration is required in application.conf, if you want to override this then use {@link #create(String, Service, String, String, String)}\n * If dispatcher is null, default dispatcher is used. Otherwise, the provided dispatcher name should be configured in application.conf\n * If mailbox is null, the associated dispatcher's default mailbox will be used. Otherwise, the provided mailbox name should be configured in application.conf\n *\n *\n * @param actorName\n * @param service\n * @param processingStep\n * @param noOfInstances\n * @param mailbox\n * @param dispatcher\n * @return bean name of the actor\n */\n ActorRef create(String actorName, Service service, String processingStep, int noOfInstances, String mailbox,\n String dispatcher);\n\n /**-\n * Creates an ActorRef bean from {@link ImportActor} and sets {@link Service} as the business logic class.\n * ActorRef bean name is created by appending actor name wit REF_SUFFIX\n * You can configure the actor's router configurations in application.conf\n * While configuring use ActorRef name, for example if you named your actor \"firstActor\", then the configuration in application.conf should look like\n * /firstActorRef {\n * router = smallest-mailbox-pool\n * nr-of-instances = 2\n * }\n * Default dispatcher and mailbox will be used\n *\n * @param actorName\n * @param service\n * @param processingStep\n * @return bean name of the actor\n */\n ActorRef create(String actorName, Service service, String processingStep);\n\n /**-\n * Creates an ActorRef bean from {@link ImportActor} and sets {@link Service} as the business logic class.\n * ActorRef bean name is created by appending actor name wit REF_SUFFIX\n * You can configure the actor's router configurations in application.conf\n * While configuring use ActorRef name, for example if you named your actor \"firstActor\", then the configuration in application.conf should look like\n * /firstActorRef {\n * router = smallest-mailbox-pool\n * nr-of-instances = 2\n * }\n * If dispatcher is null, default dispatcher is used. Otherwise, the provided dispatcher name should be configured in application.conf\n * If mailbox is null, the associated dispatcher's default mailbox will be used. Otherwise, the provided mailbox name should be configured in application.conf\n *\n * @param actorName\n * @param service\n * @param processingStep\n * @param mailbox\n * @param dispatcher\n * @return bean name of the actor\n */\n ActorRef create(String actorName, Service service, String processingStep, String mailbox, String dispatcher);\n}",
"void add(Actor actor);",
"public abstract void create();",
"public Actor getActor() {\n DBActor a = new DBActor();\n a.setId(this.actorID);\n H2ActorDAO.getInstance().populateActor(a);\n return a;\n }",
"protected Figure newFigure( Point2D p, Figure f ) {\n\t\tSistema.logger.info( \"Creating actor at \" + p.getX() + \",\" + p.getY() );\n\t\tActorFigure figure = new ActorFigure( \"teste\" );\n\t\tfigure.setLocation( p );\n\t\treturn figure;\n\t}",
"private void createAgent() {\n logger.info(\"Creating agent\");\n iteration = 0;\n aiManager = new AIManager(configDialogInfo);\n aiManager.getAgent().addObserver(\"gameEngine\", this);\n AIBirth.generate(aiManager.getAgent());\n aiManager.start();\n }",
"@Override\n\tpublic void create() {\n\t\tAssets.load();\n\t\t\n\t\t//creo pantallas y cargo por defecto menuPrincipal\n\t\tscreenJuego = new JuegoScreen(this);\n\t\tmenuPrincipal = new MenuPrincipal(this);\n\t\tsetScreen(menuPrincipal);\n\t}",
"public void setActor(Actor actor);",
"@Override\n\tpublic void create () {\n\t\tgempiresAssetHandler = new GempiresAssetHandler(this);\n\t\tbatch = new SpriteBatch();\n\t\tcastle = new CastleScreen(this);\n\t\tsetScreen(new MainMenuScreen(this));\n\t}",
"protected RemoteFactory.Agent.Component<Msg, Ref> newAgent() {\n RemoteFactory.Agent<Msg, Ref> _implem = _createImplementationOfAgent();\n return _implem._newComponent(new RemoteFactory.Agent.Requires<Msg, Ref>() {},true);\n }",
"public Actor(GameEngine e) {\r\n\t\tvelocity = new Point2D.Float(0, 0); // speed in pixels/s\r\n\t\tcenter = new Point2D.Float(0, 0);\r\n\t\tsize = new Point2D.Float(0, 0);\r\n\t\tacceleration = new Point2D.Float(0, 0);\r\n\t\tmaxVelocity = new Point2D.Float(Integer.MAX_VALUE, Integer.MAX_VALUE);\r\n\t\tdeath = false;\r\n\t\tengine = e;\r\n\t\tbasePoly = new Polygon();\r\n\t\thealth = 0;\r\n\t\tdir = 0;\r\n\t\tmaxHealth = 0;\r\n\t\t_checkInvariant();\r\n\t}",
"public static Actor createActor(\n ExtensionAnnotationAssociationManager whole,\n String firstName,\n String lastName\n ) throws Exception {\n if( !wholeIsValid(Actor.class, whole) ){\n throw new Exception(String.format(\n \"There is no valid composition association between whole %s and part %s\",\n whole.getClass().getSimpleName(),\n Actor.class.getSimpleName()\n\n ));\n }\n\n // create an actor - its safe now\n Actor actor = new Actor(firstName, lastName);\n\n // add actor to the parts -> throw exception if part already exists\n if(addPart(whole, actor)){\n System.out.println();\n };\n\n // return actor\n return actor;\n }",
"public Actor(ActorType type, double x, double y) {\n this.location = new Location(x, y);\n this.type = type;\n setImage(type);\n }",
"public void createAction() {\n }",
"public EmailService() throws IOException {\r\n system = ActorSystem.create(\"awacsystem\");\r\n emailActorRef = system.actorOf(new Props(EmailServiceActor.class).withRouter\r\n (new SmallestMailboxRouter(1)), \"emailService\");\r\n }",
"private void constructACLMessage()\n {\n PlayIntroAction playIntroObject = new PlayIntroAction();\n playIntroObject.setLenght(numberOfMeasures);\n playIntroObject.setNow(true);\n playIntroObject.setDuration(-1);\n msg = new ACLMessage(ACLMessage.CFP);\n msg.setLanguage(codec.getName());\n msg.setOntology(ontology.getName());\n for(int i = 0; i < receivers.size(); i++)\n {\n try\n {\n //fill the content using the Ontology concept\n myAgent.getContentManager().fillContent(msg,new Action((AID)receivers.elementAt(i),playIntroObject));\n }catch (Exception ex) { ex.printStackTrace(); }\n //Set the receiver of the message\n msg.addReceiver((AID)receivers.elementAt(i));\n\n }\n\n //Set the protocol that we gonna use\n msg.setProtocol(FIPANames.InteractionProtocol.FIPA_CONTRACT_NET);\n //We indicate the deadline of the reply\n msg.setReplyByDate(new Date(System.currentTimeMillis() + 30000));\n\n\n }",
"@Override\n public void create() {\n // enable logging\n Gdx.app.setLogLevel(Application.LOG_DEBUG);\n log.debug(\"create()\");\n }",
"public RemoteFactory.Agent<Msg, Ref> _createImplementationOfAgent() {\n RemoteFactory.Agent<Msg, Ref> implem = make_Agent();\n if (implem == null) {\n \tthrow new RuntimeException(\"make_Agent() in fr.irit.smac.may.lib.classic.remote.RemoteFactory should not return null.\");\n }\n assert implem.ecosystemComponent == null: \"This is a bug.\";\n assert this.selfComponent != null: \"This is a bug.\";\n implem.ecosystemComponent = this.selfComponent;\n return implem;\n }",
"void create(Member member);",
"@Override\n\tpublic void create() {\n\t\tGdx.app.setLogLevel(Application.LOG_DEBUG);\n\t\t\n\t\t//Load assets\n\t\tAssets.instance.init(new AssetManager());\n\t\t\n\t\t//initialize controller and renderer\n\t\tworldController = new WorldController();\n\t\tworldRenderer= new WorldRenderer(worldController);\n\t\t\n\t\t//The world is not paused on start\n\t\tpaused = false;\n\t}",
"public static Props createActor(ActorRef loadBalancer) {\n\t\treturn Props.create(Client.class, () -> {\n\t\t\treturn new Client(loadBalancer);\n\t\t});\n\t}",
"public Agent createNewAgent() throws MaceException{\r\n\t\tAgent agent = new Agent(\"n\" + maxAgentId, Agent.AGENT_BUYER);\r\n\t\taddAgent(agent);\r\n\t\tmaxAgentId++;\r\n\t\treturn agent;\r\n\t}",
"SpawnController createSpawnController();",
"public void initActor(){\n this.root = new Node(\"root\");\n this.body = new Node(\"body\");\n this.rLeg = new Node(\"rLeg\");\n this.lLeg = new Node(\"lLeg\");\n this.rArm = new Node(\"rArm\");\n this.lArm = new Node(\"lArm\");\n this.head = new Node(\"head\");\n this.handle = new Node(\"handle\");\n \n //r2 -- Add a weapons node and create empty target node\n this.weapon = new Node(\"weapon\");\n this.target_pivot = new Node(\"target\");\n \n //Create the relationships between the joint nodes\n this.root.attachChild(this.body);\n this.handle.attachChild(this.root);\n this.body.attachChild(this.lLeg);\n this.body.attachChild(this.rLeg);\n this.body.attachChild(this.lArm);\n this.body.attachChild(this.rArm);\n this.body.attachChild(this.head);\n this.rArm.attachChild(this.weapon);\n \n //Move joints to local positions\n this.body.move(0,3f,0);\n this.lLeg.move(0.5f,0,0);\n this.rLeg.move(-0.5f,0,0);\n this.lArm.move(1.5f,3f,0);\n this.rArm.move(-1.5f,3f,0);\n this.head.move(0,3f,0);\n this.weapon.move(0,-3f,0.75f);\n \n \n //Create the physical dimensions of the actor 'minecraft-style'\n this.legBox = new Box(0.5f, 1.5f, 0.5f);\n this.bodyBox = new Box(1, 1.5f, 0.5f);\n this.armBox = new Box(0.5f, 1.5f, 0.5f);\n this.headBox = new Box(1, 1, 1);\n this.weaponBox = new Box(0.25f,0.75f,0.25f);\n \n //Create the visual elements and add materials\n this.lLegGeom = new Geometry(\"lLeg\", this.legBox);\n this.rLegGeom = new Geometry(\"rLeg\", this.legBox);\n this.bodyGeom = new Geometry(\"Body\", this.bodyBox);\n this.lArmGeom = new Geometry(\"lArm\", this.armBox);\n this.rArmGeom = new Geometry(\"rArm\", this.armBox);\n this.headGeom = new Geometry(\"Head\", this.headBox);\n this.weaponGeom = new Geometry(\"Weapon\", this.weaponBox);\n \n //Set materials\n this.lLegGeom.setMaterial(this.legMat);\n this.rLegGeom.setMaterial(this.legMat);\n this.bodyGeom.setMaterial(this.bodyMat);\n this.lArmGeom.setMaterial(this.armMat);\n this.rArmGeom.setMaterial(this.armMat);\n this.headGeom.setMaterial(this.headMat);\n \n //TODO: Give weapons their own material\n this.weaponGeom.setMaterial(this.legMat);\n \n //Set the local transforms of geometry to align with joints properly\n this.lLegGeom.move(0,-1.5f,0);\n this.rLegGeom.move(0,-1.5f,0);\n this.bodyGeom.move(0,1.5f,0);\n this.lArmGeom.move(0,-1.5f,0);\n this.rArmGeom.move(0,-1.5f,0);\n this.headGeom.move(0,1f,0);\n this.weaponGeom.move(0,0,0);\n \n //Attach geometries to nodes\n this.body.attachChild(this.bodyGeom);\n this.lLeg.attachChild(this.lLegGeom);\n this.rLeg.attachChild(this.rLegGeom);\n this.lArm.attachChild(this.lArmGeom);\n this.rArm.attachChild(this.rArmGeom);\n this.head.attachChild(this.headGeom);\n this.weapon.attachChild(this.weaponGeom);\n \n Quaternion xRot = new Quaternion().fromAngleAxis(FastMath.DEG_TO_RAD * 0,Vector3f.UNIT_X.clone());\n Quaternion yRot = new Quaternion().fromAngleAxis(FastMath.DEG_TO_RAD * 0,Vector3f.UNIT_Z.clone());\n \n //Refactor ActorControl with Character Control\n CapsuleCollisionShape capsuleShape = new CapsuleCollisionShape(2.5f,3f,1);\n this.mobControl = new CharacterControl(capsuleShape, 3f);//Step size is set in last argument\n this.mobControl.setJumpSpeed(20);\n this.mobControl.setFallSpeed(45);\n this.mobControl.setGravity(50);\n \n \n this.root.setLocalRotation(xRot.mult(yRot));\n //this.handle.getLocalRotation().lookAt(Vector3f.UNIT_Z, Vector3f.UNIT_Y);\n \n this.root.scale(0.75f, 0.75f, 0.75f);\n \n //this.handle.setLocalTranslation(10f, 5f, 15f);\n \n rootNode.attachChild(this.handle);\n }",
"public Actor getActor() {\r\n \t\treturn actor;\r\n \t}",
"public long newActor(Actor actor) {\n\t\tSystem.out.println(actor);\n\t\tif (actor.getId() != 0) {\n\t\t\treturn -1;\n\t\t} else if (actor.getFirstName() == null || actor.getLastName() == null) {\n\t\t\treturn -2;\n\t\t} else {\n\t\t\t//System.out.println(actor);\n\t\t\tList<Actor> actors = new ArrayList<>();\n\t\t\tactors = (List<Actor>) this.actorRepository.findAll();\n\t\t\tSystem.out.println(\"Size=\" + actors.size());\n\t\t\tfor (int i=0 ; i<actors.size() ; i++) {\n\t\t\t\t//System.out.println(actor + \" \" + i);\n\n\t\t\t\tif (actors.get(i).getFirstName().equals(actor.getFirstName()) & actors.get(i).getLastName().equals(actor.getLastName()) ) {\n\t\t\t\t\treturn -3;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(actor);\n\n\t\tActor result = this.actorRepository.save(actor);\n\t\treturn result.getId();\n\t}",
"@Override\r\n\tpublic <T extends Actor> void performAs(T actor) {\n\t\tactor.attemptsTo(Click.on(NewToursComponents.REGISTER),//Accion de dar click al componente especifico mapeado\r\n\t\t\t\tClick.on(newtoursregister));\r\n\t\t\r\n\t}",
"@Override\n\tpublic void create () {\n\t\t//IntrigueGraphicalDebugger.enable();\n\t\tIntrigueGraphicSys = new IntrigueGraphicSystem();\n\t\tIntrigueTotalPhysicsSys = new IntrigueTotalPhysicsSystem();\n\t\t\n\t\tfinal int team1 = 1;\n\t\tfinal int team2 = 2;\n\t\t\n\t\tstage = new Stage();\n\t\ttable = new Table();\n\t\ttable.bottom();\n\t\ttable.left();\n\t\ttable.setFillParent(true);\n\t\t\n\t\tLabelStyle textStyle;\n\t\tBitmapFont font = new BitmapFont();\n\t\t\n\n\t\ttextStyle = new LabelStyle();\n\t\ttextStyle.font = font;\n\n\t\ttext = new Label(\"Intrigue\",textStyle);\n\t\tLabel text2 = new Label(\"@author: Matt\", textStyle);\n\t\tLabel text3 = new Label(\"OPERATION 1\", textStyle);\n\t\t\n\t\ttext.setFontScale(1f,1f);\n\t\ttable.add(text);\n\t\ttable.row();\n\t\ttable.add(text2);\n\t\ttable.row();\n\t\ttable.add(text3);\n\t\tstage.addActor(table);\n\n\t\ttable.setDebug(true);\n\t\tString path_to_char = \"3Dmodels/Soldier/ArmyPilot/ArmyPilot.g3dj\";\n //String path_to_road = \"3Dmodels/Road/roadV2.g3db\";\n\t\t//String path_to_rink = \"3Dmodels/Rink/Rink2.g3dj\";\n\t\tString path_to_snow_terrain = \"3Dmodels/Snow Terrain/st5.g3dj\";\n\t\tString path_to_crosshair = \"2Dart/Crosshairs/rifle_cross.png\";\n\t\n\t\tMatrix4 trans = new Matrix4();\n\t\tMatrix4 iceTrans = new Matrix4();\n\t\tMatrix4 iceTrans2 = new Matrix4();\n\t\tMatrix4 iceTrans3 = new Matrix4();\n\t\tMatrix4 iceTrans4 = new Matrix4();\n\t\tMatrix4 trans2 = new Matrix4();\n\t\tMatrix4 trans3 = new Matrix4();\n\t\n\t\ttrans.translate(-3000,6000,-500);\n\t\t//Vector3 halfExtents = new Vector3(30f,90f,25f);\n\t\tbtCapsuleShape person_shape = new btCapsuleShape(30f, 90f);\n\t\t\n\t\tmamaDukes.add(new Entity.Builder(player_guid)\n\t\t\t\t\t.IntrigueModelComponent(path_to_char).IntrigueControllerComponent(1)\n\t\t\t\t\t.IntriguePhysicalComponent(person_shape, 200f, trans)\n\t\t\t\t\t.MotionComponent()\n\t\t\t\t\t.AimingComponent()\n\t\t\t\t\t.DecalComponent()\n\t\t\t\t\t.ThirdPersonCameraComponent()\n .CharacterActionsComponent()\n\t\t\t\t\t.AnimationComponent()\n\t\t\t\t\t.Fireable(path_to_crosshair)\n\t\t\t\t\t.TargetingAI(team1)\n\t\t\t\t\t//.CharacterSoundComponent(\"SoundEffects/Character/walking/step-spur.mp3\", \"SoundEffects/guns/M4A1.mp3\")\n\t\t\t\t\t.Build());\n\t\tJson json_test = new Json(); \n\t\tEntity d = mamaDukes.get(player_guid);\n\t\t//System.out.println(json_test.prettyPrint(d));\n\t\t\n\t\t\n\t\tmamaDukes.get(player_guid).getPhysicalComponent()\n\t\t\t\t\t.getPhysicsBody().getRigidBody()\n\t\t\t\t\t.setActivationState(Collision.DISABLE_DEACTIVATION);\n\n\t\tmamaDukes.add(level_factory.createLevel(path_to_snow_terrain,\n\t\t\t\t\"3DParticles/blizzard.pfx\", iceTrans, Entity.class));\n\t\t\t\t/*\n\t\t\t\tnew DrifterObject.DrifterObjectBuilder(1)\n\t\t\t\t\t.BaseObject(new Gobject.Builder(1)\n\t\t\t\t\t.IntrigueModelComponent(path_to_snow_terrain)\n\t\t\t\t\t.IntriguePhysicalComponent(iceMass, iceTrans)\n\t\t\t\t\t.ParticleComponent(\"Blizzard\",\n\t\t\t\t\t\t\t\"3DParticles/blizzard.pfx\",new Vector3(1000,1000, -2500), \n\t\t\t\t\t\t\tnew Vector3(3000, 1000,2000 ))\n\t\t\t\t\t.Build())\n\t\t\t\t\t.Build());*/\n\t\ttrans2.translate(-1000,1000,1500);\n\t\t\n\t\tmamaDukes.add(new Entity.Builder(2)\n\t\t\t\t\t.IntrigueModelComponent(path_to_char)\n\t\t\t\t\t.IntriguePhysicalComponent(person_shape, 200f, trans2)\n\t\t\t\t\t.ParticleComponent(\"Blood\", \"3DParticles/Character/Blood.pfx\", \n\t\t\t\t\t\t\tnew Vector3(), new Vector3(1f,1f,1f))\n\t\t\t\t\t.MotionComponent()\n\t\t\t\t\t.AimingComponent()\n\t\t\t\t\t.CharacterActionsComponent()\n\t\t\t\t\t.AnimationComponent()\n\t\t\t\t\t.Fireable()\n\t\t\t\t\t.ShootingSoldierAI()\n\t\t\t\t\t.TargetingAI(team2)\n\t\t\t\t\t.Build());\n\t\t\n\t\tmamaDukes.get(2).getPhysicalComponent()\n\t\t\t\t\t.getPhysicsBody()\n\t\t\t\t\t.getRigidBody()\n\t\t\t\t\t.setAngularFactor(new Vector3(0,0,0));\n\t\tmamaDukes.get(2).getPhysicalComponent()\n\t\t\t\t\t.getPhysicsBody()\n\t\t\t\t\t.getRigidBody()\n\t\t\t\t\t.setActivationState(Collision.DISABLE_DEACTIVATION);\n\t\t\n\t\tmamaDukes.get(2).getPhysicalComponent()\n\t\t\t\t\t.getPhysicsBody().getRigidBody()\n\t\t\t\t\t.setUserIndex(2);\n\t\t\n\t\ttrans3.translate(-1000, 1000, 2000);\n\t\t\n\t\tmamaDukes.add(new Entity.Builder(3)\n\t\t\t\t\t.IntrigueModelComponent(path_to_char)\n\t\t\t\t\t.IntriguePhysicalComponent(person_shape, 200f, trans3)\n\t\t\t\t\t.MotionComponent()\n\t\t\t\t\t.AimingComponent()\n\t\t\t\t\t.CharacterActionsComponent()\n\t\t\t\t\t.AnimationComponent().Fireable()\n\t\t\t\t\t.ShootingSoldierAI().TargetingAI(team2)\n\t\t\t\t\t.Build());\n\t\t\n\t\tmamaDukes.get(3).getPhysicalComponent()\n\t\t\t\t\t.getPhysicsBody().getRigidBody()\n\t\t\t\t\t.setAngularFactor(new Vector3(0,0,0));\n\t\tmamaDukes.get(3).getPhysicalComponent()\n\t\t\t\t\t.getPhysicsBody().getRigidBody()\n\t\t\t\t\t.setActivationState(Collision.DISABLE_DEACTIVATION);\n\t\tmamaDukes.get(3).getPhysicalComponent()\n\t\t\t\t\t.getPhysicsBody().getRigidBody().setUserIndex(3);\n\t\t\n\t\tVector3 rpos = new Vector3();\n\t\t\n\t\tmamaDukes.get(1).getModelComponent().getModel()\n\t\t\t\t\t.transform.getTranslation(rpos);\n\t\t\n\t\ticeTrans2.translate(0, 0, 6185.332f);\n\t\t\n\t\tmamaDukes.add(level_factory.createLevel(path_to_snow_terrain,\n\t\t\t\t\"SoundEffects/stages/snow stage/wind1.mp3\",\n\t\t\t\t\"3DParticles/blizzard.pfx\", iceTrans2, Entity.class));\n\t\t\n\t\t\t\t\t/*new DrifterObject.DrifterObjectBuilder(4)\n\t\t\t\t\t.BaseObject(new Gobject.Builder(4)\n\t\t\t\t\t.IntrigueModelComponent(path_to_snow_terrain)\n\t\t\t\t\t.IntriguePhysicalComponent(iceMass, iceTrans2)\n\t\t\t\t\t.IntrigueLevelComponent(\"SoundEffects/stages/snow stage/wind1.mp3\")\n\t\t\t\t\t.Build())\n\t\t\t\t\t.ParticleComponent(\"Blizzard\",\"3DParticles/blizzard.pfx\",\n\t\t\t\t\t\t\tnew Vector3(0, 0, 6185.332f),\n\t\t\t\t\t\t\tnew Vector3(3000, 1000,2000 ))\n\t\t\t\t\t.Build());*/\n\t\t\n\t\tmamaDukes.get(4).getModelComponent().getModel().transform.translate(new Vector3(0, 0, 6185.332f)); //btStaticMeshShapes do not update their motionStates. The model Translation must be set manually in these cases.\n\t\ticeTrans3.translate(-6149.6568f, 0, 6185.332f);\n\t\t\n\t\tmamaDukes.add(level_factory.createLevel(path_to_snow_terrain,\n\t\t\t\t\"3DParticles/blizzard.pfx\" , iceTrans3, Entity.class));\n\t\t/**\n\t\t * btStaticMeshShapes do not update their motionStates. The model Translation must be set manually in these cases.\n\t\t */\n\t\tmamaDukes.get(5).getModelComponent().getModel().transform.translate(new Vector3(-6149.6568f, 0, 6185.332f)); \n\t\t\n\t\ticeTrans4.translate(-6149.6568f, 0, 0);\n\t\tmamaDukes.add(level_factory.createLevel(path_to_snow_terrain,\n\t\t\t\t\"3DParticles/blizzard.pfx\" , iceTrans4, Entity.class));\n\t\t\t\t\t/**new DrifterObject.DrifterObjectBuilder(6)\n\t\t\t\t\t.BaseObject(new Gobject.Builder(6)\n\t\t\t\t\t.IntrigueModelComponent(path_to_snow_terrain)\n\t\t\t\t\t.IntriguePhysicalComponent(iceMass, iceTrans4)\n\t\t\t\t\t.ParticleComponent(\"Blizzard\",\"3DParticles/blizzard.pfx\",\n\t\t\t\t\t\t\tnew Vector3(-6149.6568f, 0, 0), new Vector3(3000, 1000,2000 ))\n\t\t\t\t\t.Build())\n\t\t\t\t\t.Build());*/\n\t\tmamaDukes.get(6).getModelComponent().getModel().transform.translate(new Vector3(-6149.6568f, 0, 0)); \n\t\t\n\t}",
"ActorsType createActorsType();",
"@Override\r\n\tpublic <T extends Actor> void performAs(T actor) {\n\t\tRandom random = new Random();\r\n\r\n\t\t\r\n\t}",
"private SimpleBehaviour(ActorContext<String> context) {\n\t\tsuper(context);\n\t}",
"@Override\n protected void createCreature() {\n Sphere sphere = new Sphere(32,32, 0.4f);\n pacman = new Geometry(\"Pacman\", sphere);\n Material mat = new Material(assetManager, \"Common/MatDefs/Misc/Unshaded.j3md\");\n mat.setColor(\"Color\", ColorRGBA.Yellow);\n pacman.setMaterial(mat);\n this.attachChild(pacman); \n }",
"Actor(int x, int y, Texture image) {\n this.setX(x);\n this.setY(y);\n setImage(image);\n }",
"public void spawnCreature(){\n\t\tif(spawnType.equalsIgnoreCase(\"worm\")){\n\t\t\tRuntimeObjectFactory.getObjectFromPool(\"worm\"+spawnId);\n\t\t}else if(spawnType.equalsIgnoreCase(\"antorc\")){\n\t\t\tGdx.app.debug(TamerGame.LOG, this.getClass()\n\t\t\t\t\t.getSimpleName() + \" :: Ant entered\");\t\t\t\n\t\t\t//CHANGE SPAWNING IMPLEMENTATION\n\t\t\tAntOrc orc = new AntOrc();\n\t\t\torc.setPosition(getPosition());\n\t\t\torc.setWaypoint(waypoint);\n\t\t\tenvironment.addNewObject(orc);\n\t\t\tEventPool.addEvent(new tEvent(this,\"spawnCreature\",sleepTime,1));\n\t\t}\n\t\t\t\n\t}",
"@Override\n public void create() {\n setScreen(new ServerScreen(\n new RemoteGame(),\n new SocketIoGameServer(HOST, PORT)\n ));\n }",
"@Override\n\tpublic void create() {\n\t\tassetManager = new AssetManager();\n\t\tassetManager.load(ROLIT_BOARD_MODEL, Model.class);\n\t\tassetManager.load(ROLIT_BALL_MODEL, Model.class);\n\t\t\n\t\t//construct the lighting\n\t\tenvironment = new Environment();\n\t\tenvironment.set(new ColorAttribute(ColorAttribute.AmbientLight, 0.4f, 0.4f, 0.4f, 1f));\n\t\tenvironment.add(new DirectionalLight().set(0.8f, 0.8f, 0.8f, -1f, -0.8f, -0.2f));\n\t\t\n\t\tmodelBatch = new ModelBatch();\n\t\t\n\t\tcam = new PerspectiveCamera(67f, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());\n\t\t\n\t\tGdx.input.setInputProcessor(new InputHandler());\n\t}",
"public void createThread() {\n }",
"public static void create() {\r\n render();\r\n }",
"public void addActor(){\n actorProfileList.add(new ActorProfile());\n }",
"public CreateHero() {\r\n\t\tinitComponents();\r\n\t}",
"public static Props createActor(int ID, int nb) {\n return Props.create(Process.class, () -> {\n return new Process(ID, nb);\n });\n }",
"private ActorSystemBootstrapTools() {}",
"public Agent generateAgent(){\r\n\r\n\t\t\tlogger.info(\"generateAgent method\");\r\n\r\n\t\t\tPatch currentPatch = randPatch();\r\n\r\n\t\t\tlogger.info(\"random patch: x = \" + currentPatch.getX()\r\n\t\t\t\t\t\t+ \" y = \" + currentPatch.getY());\r\n\r\n\r\n\t\t\tAgent agent= new Agent(currentPatch, false);\r\n\r\n\t\t\tcurrentPatch.setPerson(agent);\r\n\r\n\t\t\treturn agent;\r\n\t\t}",
"public void create() {\n connect();\n batch = new SpriteBatch();\n font = new BitmapFont();\n\n audioManager.preloadTracks(\"midlevelmusic.wav\", \"firstlevelmusic.wav\", \"finallevelmusic.wav\", \"mainmenumusic.wav\");\n\n mainMenuScreen = new MainMenuScreen(this);\n pauseMenuScreen = new PauseMenuScreen(this);\n settingsScreen = new SettingsScreen(this);\n completeLevelScreen = new CompleteLevelScreen(this);\n completeGameScreen = new CompleteGameScreen(this);\n\n setScreen(mainMenuScreen);\n }",
"public ProxyActor(String actorPath) {\n\t\tthis(ActorRef.noSender(), actorPath, null);\n\t}",
"@Override\n\t\tpublic void create() {\n\t\t\tcannon = new CannonLogic();\n\t\t\tlines = new LineLogic();\n\t\t\tboxes = new BoxLogic();\n\t\t\tcontroller = new PlayerController();\n\t\t\tshapeList = new ArrayList<Shape>();\n\t\t\t\n\t\t\tGdx.gl11.glEnableClientState(GL11.GL_VERTEX_ARRAY);\n\t\t\tGdx.gl11.glClearColor(0.4f, 0.6f, 1.0f, 1.0f);\n\t\t\tvertexBuffer = BufferUtils.newFloatBuffer(8);\n\t\t\tvertexBuffer.put(new float[] {-50,-50, -50,50, 50,-50, 50,50});\n\t\t\tvertexBuffer.rewind();\n\t\t}",
"public CreateRemoteClassic<Msg, Ref> create();",
"private void createPassenger() {\n account = new Account(\"driver\", \"password\", \"[email protected]\",\n \"Dan\", \"20 Howard Street\", 1234567, 64278182123L);\n }",
"public Object getActorRef() {\n return actorRef;\n }",
"public Controller()\n {\n // Create initial queues and stations\n q0 = new Queue(); //registration q\n \n // p[arameters are id of station, 4 queues, completed q)\n s0 = new Station(0, q0, q1, q2, q3, qx);\n \n //Student soiurce ss is an actor\n \n actors = new ArrayList<>(); \n actors.add(s0); // add all Actor implementors\n //actors.add(myStudentSorce);\n }",
"@Override\n\tpublic void create() {\n\t\tthis.playScreen = new PlayScreen<EntityUnknownGame>(this);\n\t\tsetScreen(this.playScreen);\n\t\t\n\t\t//this.shadowMapTest = new ShadowMappingTest<EntityUnknownGame>(this);\n\t\t//setScreen(this.shadowMapTest);\n\t\t\n\t\t//this.StillModelTest = new StillModelTest<EntityUnknownGame>(this);\n\t\t//setScreen(this.StillModelTest);\n\t\t\n//\t\tthis.keyframedModelTest = new KeyframedModelTest<EntityUnknownGame>(this);\n//\t\tsetScreen(this.keyframedModelTest);\n\t}",
"@Override\n public ActorType getType()\n {\n return ActorType.BOX;\n }",
"public static Action spawn(final Class<?> e) {\n return new Action() {\n @Override\n protected void perform(ActiveActor a) {\n if(a.isFacingValidLocation() && a.getFacing() == null) {\n if(a.energy >= getCost()) {\n try {\n Actor b = (Actor) e.newInstance();\n b.putSelfInGrid(a.getGrid(), a.getLocation().getAdjacentLocation(a.getDirection()));\n } catch(InstantiationException r) {\n r.printStackTrace();\n } catch(IllegalAccessException r) {\n r.printStackTrace();\n }\n a.energy = a.energy - 400;\n }\n }\n }\n\n @Override\n public int getCost() {\n return 400;\n }\n\n @Override\n public boolean isExclusive() {\n return true;\n }\n\n @Override\n public Object getData() {\n return e;\n }\n\n @Override\n public String toString() {\n return \"Spawn(\" + (e != null ? e.toString() : \"null\") + \")\";\n }\n };\n }",
"protected abstract CreateRemoteClassic<Msg, Ref> make_create();",
"@Override\n\tpublic void create() {\n\t\t// This should come from the platform\n\t\theight = platform.getScreenDimension().getHeight();\n\t\twidth = platform.getScreenDimension().getWidth();\n\n\t\t// create the drawing boards\n\t\tsb = new SpriteBatch();\n\t\tsr = new ShapeRenderer();\n\n\t\t// Push in first state\n\t\tgsm.push(new CountDownState(gsm));\n//\t\tgsm.push(new PlayState(gsm));\n\t}",
"private void createAgent(Class<?> clazz, String name) {\r\n try {\r\n // Fill description of an agent to be created\r\n CreateAgent ca = new CreateAgent();\r\n ca.setAgentName(name);\r\n ca.setClassName(clazz.getCanonicalName());\r\n ca.setContainer(container);\r\n\r\n Action act = new Action(getAMS(), ca);\r\n ACLMessage req = new ACLMessage(ACLMessage.REQUEST);\r\n req.addReceiver(getAMS());\r\n req.setOntology(ontology.getName());\r\n req.setLanguage(FIPANames.ContentLanguage.FIPA_SL);\r\n req.setProtocol(FIPANames.InteractionProtocol.FIPA_REQUEST);\r\n getContentManager().fillContent(req, act);\r\n \r\n // AMS sends a response, \r\n addBehaviour(new AchieveREInitiator(this, req) {\r\n @Override\r\n protected void handleInform(ACLMessage inform) {\r\n logger.severe(\"Success\");\r\n }\r\n\r\n @Override\r\n protected void handleFailure(ACLMessage inform) {\r\n logger.severe(\"Failure\");\r\n }\r\n });\r\n } catch (CodecException | OntologyException e) {\r\n ByteArrayOutputStream out = new ByteArrayOutputStream();\r\n PrintStream printer = new PrintStream(out);\r\n e.printStackTrace(printer);\r\n logger.severe(out.toString());\r\n }\r\n }",
"@Override\n public String actor() {\n return NAME;\n }",
"@Override\n public String actor() {\n return NAME;\n }",
"public Actor(PhysicsComponent physics, VisualComponent visuals, HpComponent health) {\n this.addComponent(physics); //add physics\n this.addComponent(visuals); //add texture\n this.addComponent(health); //add hp\n }",
"public Telefone() {\n\t\t\n\t}",
"protected abstract void perform(ActiveActor a);",
"public String toString() {\r\n\t\treturn \"Actor\";\r\n\t}",
"public void create() {\n if (created)\n return;\n\n PlayerConnection player = getPlayer();\n player.sendPacket(createObjectivePacket(0, objectiveName));\n player.sendPacket(setObjectiveSlot());\n int i = 0;\n while (i < lines.length)\n sendLine(i++);\n\n created = true;\n }",
"@Override\r\n\tpublic void create() {\n\t\tsuper.create();\r\n\t\t// Ground\r\n\t\tBodyDef groundBodyDef = new BodyDef();\r\n\t\tgroundBody = world.createBody(groundBodyDef);\r\n\t\tEdgeShape edgeShape = new EdgeShape();\r\n\t\tedgeShape.set(new Vector2(50.0f, 0.0f), new Vector2(50.0f, 0.0f));\r\n\t\tgroundBody.createFixture(edgeShape, 0.0f);\r\n \r\n\t\tcreateFirstGroupShape();\r\n\t\t// the second group\r\n\t\tcreateSecondGroupShape();\r\n\t}",
"Contender createContender();",
"@Override\n\tpublic void create() {\n\t\t f=new crazyfail(this);\n\t cfg=new crazyFirstGame(this);\n\t \n\t \t setScreen(cfg);\n\t \n\t\t\n\t}",
"protected abstract void createTriggerOrAction();",
"public GridCell(int xPosition, int yPosition, char actor) // Based on the actor we are creating respective object.\n {\n\t xPos = xPosition;\n\t yPos = yPosition;\n\t if(actor == Constants.PATH)\n\t {\n\t\t a = new Actor();\n\t }\n\t if( actor == Constants.ROBOT)\n\t {\n\t\t a = new PlayerRobotManual();// creating PlayerRobotManual object.\n\t }\n\t if(actor == 'x' || actor == Constants.WALL)\n\t {\n\t\t a = new Wall();// wall object.\n\t }\n\t if(actor == 'b' || actor == Constants.BOMB)\n\t {\n\t\t a = new Bomb(); // Bomb objection.\n\t }\n\t if(actor == Constants.SMALL_CANDY ) \n\t {\n\t\t a = new Candy(Constants.SMALL_CANDY); // candy object of type small.\n\t }\n\t if(actor == Constants.SMALL_CANDY ) \n\t {\n\t\t a = new Candy(Constants.SMALL_CANDY);\n\t }\n\t if(actor == Constants.BIG_CANDY)\n\t {\n\t\t a = new Candy(Constants.BIG_CANDY);// candy object of type Big.\n\t }\n\t if(actor == Constants.DUMB_ENEMY)\n\t {\n\t\t a = new DumbEnemy(); // object of dumb enemy which moves in random direction.\n\t }\n\t if(actor == Constants.SENTINEL_ENEMY)\n\t {\n\t\t a = new SentinelEnemy();// THis will be at one fixed postion and will kill the robot if its in neighbour cell.\n\t }\n\t if(actor == Constants.WALKING_SENTINEL)\n\t {\n\t\t a = new WalkingSentinelEnemy();// object for walking sentinel enemy.\n\t }\n\t if(actor == Constants.PLAYER_CHASER)\n\t {\n\t\t a = new SmartEnemy();// object for player chaser enemy.\n\t }\n\t if(actor == Constants.CANDY_CHASER)\n\t {\n\t\t a = new WatcherEnemy();// object for candy chaser enemy.\n\t }\n\t if(actor == Constants.ROBOT_HOLDING_BOMB)\n\t {\n\t\t a = new PlayerRobotHoldingBomb();// object used to repersent the player holding bomb.\n\t }\n\t if(actor == Constants.FLYING_BOMB)\n\t {\n\t\t a = new FlyingBomb(); // Object used to represent the flying bomb.\n\t }\n\t if((int)actor >= 49 && (int)actor <=57)\n\t {\n\t\t a = new WarpZone(actor);\n\t }\n\t if(actor == 'i')\n\t {\n\t\t a = new InvisibleCloak();\n\t\t\t\t \n\t }\n\t}",
"@Override\n\tpublic void preStart() {\n\t\tcluster.subscribe(getSelf(), MemberUp.class);\n\t\tif (WorkerMain.role.equals(\"kvm\")) {\n\t\t\tSystem.out.println(\"generate KVMActor\");\n\t\t\tVMActor = getContext().actorOf(new RoundRobinPool(5).props(Props.create(KVMActor.class)), \"VMActor\");\n\t\t} else {\n\t\t\tSystem.out.println(\"generate LXDActor\");\n\t\t\tVMActor = getContext().actorOf(new RoundRobinPool(5).props(Props.create(LXDActor.class)), \"LXDActor\");\n\t\t}\n\n\t\tString actorURL = cluster.selfAddress().toString() + \"/user/worker\";\n\t\tUtil.write(\"actor.url\", actorURL);\n\t}",
"public void create() {\n\t\trandomUtil = new RandomUtil();\n\t\t// create the camera using the passed in viewport values\n\t\tcamera = new OrthographicCamera(viewPortWidth, viewPortHeight);\n\t\tbatch.setProjectionMatrix(camera.combined);\n\t\tdebugRender = new Box2DDebugRenderer(true, false, false, false, false, true);\n\t\ttestWorld = new TestWorld(assetManager.blockManager(), new Vector2(0, 0f));\n\t\ttestWorld.genWorld(debugUtil);\n\t\ttestWorld.setCamera(getCamera());\n\t\tplayer.createBody(testWorld.getWorld(), BodyType.DynamicBody);\n\t\ttestWorld.getPlayers().add(player);\n\t\tworldParser = new WorldParser(testWorld, \"Test World\");\n\t\tworldParser = new WorldParser(testWorld, \"Test Write\");\n\t\tworldParser.parseWorld();\n\t\twriter = new WorldWriter(\"Test Write\", testWorld);\n\t}",
"public void createAndRegisterActors(){\n //stressAppNetworkService.getAbstractNetworkServiceList().forEach((type,ns)->{\n stressAppNetworkService.getChatNetworkServicePluginRootList().forEach(ns->{\n //System.out.println(\"Network Service type: \"+type);\n nsPublicKeyMap.put(ns.getPublicKey(), (ChatNetworkServicePluginRoot) ns);\n ((ChatNetworkServicePluginRoot) ns).setMessageReceiver(this);\n int actorCounter = 0;\n for(ActorProfile actor : actorProfileList){\n createAndRegisterActor(actor,(ChatNetworkServicePluginRoot) ns, actorCounter);\n actorCounter++;\n actorsCreated++;\n report(ReportType.ACTOR_CREATED);\n }\n nsStarted++;\n report(ReportType.NS_STARED);\n });\n }",
"private void createEnemy()\n {\n scorpion = new Enemy(\"Giant Scorpion\", 5, 10); \n rusch = new Enemy(\"Mr. Rusch\", 10, 1000);\n skeleton = new Enemy(\"Skeleton\", 10, 50);\n zombie = new Enemy(\"Zombie\", 12, 25);\n ghoul = new Enemy(\"Ghoul\", 15, 45);\n ghost = new Enemy(\"Ghost\", 400, 100);\n cthulu = new Enemy(\"Cthulu\", 10000000, 999999);\n concierge = new Enemy(\"Concierge\", 6, 100);\n wookie = new Enemy(\"Savage Wookie\", 100, 300);\n }",
"Hero createHero();",
"private MakeACaptain() {\n }",
"public ActorPopup() {\n\t\tsuper(false);\n\t\tCSS.ensureInjected();\n\t\tcreateActions();\n\t\tsetWidget(createContent());\n\t\tsetStylePrimaryName(AbstractField.CSS.cbtAbstractPopup());\n\t}",
"public Telefone() {\n\t}",
"protected abstract void construct();"
] | [
"0.8425422",
"0.68410265",
"0.676696",
"0.6660534",
"0.66072184",
"0.65861475",
"0.6570325",
"0.65581715",
"0.6541742",
"0.6398075",
"0.6391438",
"0.62745",
"0.6261963",
"0.62191004",
"0.6216519",
"0.62056404",
"0.61573267",
"0.61399984",
"0.61242557",
"0.612224",
"0.61030006",
"0.608702",
"0.6077516",
"0.60663486",
"0.6063846",
"0.60313225",
"0.6019774",
"0.5994016",
"0.59906274",
"0.5986494",
"0.59265655",
"0.59225833",
"0.5914525",
"0.5908449",
"0.58912444",
"0.58881134",
"0.58456683",
"0.5814383",
"0.58106446",
"0.57822883",
"0.5773086",
"0.5762051",
"0.57575125",
"0.57541275",
"0.5750812",
"0.574907",
"0.5748326",
"0.57414997",
"0.5734606",
"0.5731254",
"0.5716926",
"0.57121193",
"0.5706495",
"0.5704982",
"0.56729555",
"0.56637037",
"0.56627965",
"0.56546086",
"0.5631484",
"0.56224763",
"0.5617077",
"0.5613081",
"0.5608867",
"0.55969983",
"0.55918044",
"0.55879945",
"0.55725694",
"0.5546381",
"0.55462724",
"0.5539414",
"0.55336577",
"0.55336195",
"0.55243784",
"0.55198234",
"0.5517116",
"0.55165255",
"0.5514826",
"0.5513",
"0.5488181",
"0.5479069",
"0.54785156",
"0.54785156",
"0.5473305",
"0.5461674",
"0.54566306",
"0.54556394",
"0.54435295",
"0.54376763",
"0.54215103",
"0.54203",
"0.5419903",
"0.54130304",
"0.54119974",
"0.5397737",
"0.53851247",
"0.5381182",
"0.53792495",
"0.53763145",
"0.5358835",
"0.53532696",
"0.53527343"
] | 0.0 | -1 |
TODO Autogenerated method stub | public static void main(String[] args) throws InterruptedException {
System.setProperty("webdriver.chrome.driver", "./drivers/chromedriver.exe");
ChromeDriver driver = new ChromeDriver();
driver.get("https://rahulshettyacademy.com/seleniumPractise/#/");
driver.manage().window().maximize();
driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);
String[] veggies = {"Almonds","Mango","Banana","Orange"};
CartItems(driver, veggies);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
Encode the input data producing a base 64 encoded byte array. | public static String base64Encode(byte[] input) {
return DatatypeConverter.printBase64Binary(input);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static String encodeToBase64(byte[] data) {\n return Base64.encodeToString(data, BASE64_EFLAGS);\n }",
"public static String encB64(byte[] data) {\n return Base64.encodeToString(data,Base64.DEFAULT);\n }",
"public static String toBase64(byte[] data)\n {\n return Base64.encodeToString(data, Base64.NO_WRAP);\n }",
"public CodePointIterator base64Encode() {\n return base64Encode(Base64Alphabet.STANDARD, true);\n }",
"public static String encode(byte[] input) {\r\n\tint i;\r\n\tint j;\r\n\tint m;\r\n\tint a;\r\n\tint b;\r\n\tint c;\r\n\tStringBuffer output;\r\n\r\n\tif (input.length == 0) {\r\n\t return \"\";\r\n\t}\r\n\r\n\t/*\r\n\t * Compute the length of the output buffer.\r\n\t */\r\n\ti = ((input.length + 2) / 3) << 2;\r\n\toutput = new StringBuffer(i);\r\n\ti = input.length / 3;\r\n\tj = 0;\r\n\r\n\twhile (i > 0) {\r\n\t a = input[j++];\r\n\t b = input[j++];\r\n\t c = input[j++];\r\n\r\n\t m = (a >>> 2) & 63;\r\n\t output.append(BASE64[m]);\r\n\r\n\t m = ((a & 3) << 4) | ((b >>> 4) & 15);\r\n\t output.append(BASE64[m]);\r\n\r\n\t m = ((b & 15) << 2) | ((c >>> 6) & 3);\r\n\t output.append(BASE64[m]);\r\n\r\n\t m = c & 63;\r\n\t output.append(BASE64[m]);\r\n\t i--;\r\n\t}\r\n\t/*\r\n\t * Handle the padding and encoding of groups of less than three input\r\n\t * bytes length.\r\n\t */\r\n\ti = input.length % 3;\r\n\r\n\tswitch (i) {\r\n\tcase 1:\r\n\t a = input[j++];\r\n\t m = (a >>> 2) & 63;\r\n\t output.append(BASE64[m]);\r\n\t m = (a & 3) << 4;\r\n\t output.append(BASE64[m]);\r\n\t output.append(PAD_2);\r\n\t break;\r\n\r\n\tcase 2:\r\n\t a = input[j++];\r\n\t b = input[j++];\r\n\t m = (a >>> 2) & 63;\r\n\t output.append(BASE64[m]);\r\n\r\n\t m = ((a & 3) << 4) | ((b >>> 4) & 15);\r\n\t output.append(BASE64[m]);\r\n\r\n\t m = (b & 15) << 2;\r\n\t output.append(BASE64[m]);\r\n\t output.append(PAD_1);\r\n\t break;\r\n\t}\r\n\treturn output.toString();\r\n }",
"public static String encode(byte[] data) {\n\t\treturn Base64.getEncoder().encodeToString(data);\n\t}",
"public static byte[] encryptBase64(final byte[] input, final PublicKey key) throws DattackSecurityException {\n return Base64.getEncoder().encode(execEncryptionOperation(input, Cipher.ENCRYPT_MODE, key));\n }",
"public static String encode(byte[] input)\r\n {\r\n return (input == null ? null : Base64.encode(input, 0, input.length));\r\n }",
"public static String byteToBase64(byte[] data){\n BASE64Encoder endecoder = new BASE64Encoder();\n return endecoder.encode(data);\n }",
"public static String base64Encode(byte[] bytes)\n {\n return DatatypeConverter.printBase64Binary(bytes);\n }",
"public static String base64Encode(final byte[] key) {\n return Base64.encode(key);\n }",
"private byte[] encode(byte[] msg) {\r\n\t\treturn Base64.encode(msg);\r\n\t}",
"public static String encode(byte[] data) {\t\t\n\t\tif (data == null || data.length == 0) {\n\t\t\treturn \"\";\n\t\t}\n\t\t\n\t\tStringBuilder resultBuffer = new StringBuilder();\n\t\t//mod\n\t\tint m = data.length % 3;\n\t\t//amount of data group with 3 byte\n\t\tint g = (m == 0) ? (data.length / 3) : (data.length / 3 + 1);\n\t\tfinal byte[] _clear_buff = {0, 0, 0};\n\t\tbyte[] dataBuffer = new byte[3];\n\t\tchar[] codeBuffer = new char[4];\n\t\tint offset = 0;\n\t\tfor (int i = 0; i < g; ++i) {\n\t\t\t//clear buffer\n\t\t\tSystem.arraycopy(_clear_buff, 0, dataBuffer, 0, 3);\n\t\t\t//copy data for handling\n\t\t\tint copySize = (m != 0 && i == g - 1) ? m : 3;\n\t\t\tSystem.arraycopy(data, offset, dataBuffer, 0, copySize);\n\t\t\t//concatenate the byte data buffer as an integer\n\t\t\tint tmp = 0x00000000;\n\t\t\tfor (int j = 0, z = 2; j < 3; ++j, --z) {\n\t\t\t\tint tt = ((dataBuffer[j] & 0xff) << (z * 8));\n\t\t\t\ttmp ^= tt;\n\t\t\t}\n\t\t\t//encode current data buffer with base64\n\t\t\tfor (int k = 0; k < 4; ++k) {\n\t\t\t\tint p = (tmp >> (k * 6)) & 0x0000003F;\n\t\t\t\tcodeBuffer[3 - k] = _dict_[p];\n\t\t\t}\n\t\t\t\n\t\t\tif (copySize != 3) {\n\t\t\t\tfor (int e = 0; e < 3 - copySize; ++e) {\n\t\t\t\t\tcodeBuffer[3 - e] = '=';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tresultBuffer.append(codeBuffer);\n\t\t\toffset += 3;\n\t\t}\n\t\t\n\t\tString encodeText = resultBuffer.toString();\n\t\tresultBuffer.delete(0, resultBuffer.length());\n\t\treturn encodeText;\n\t}",
"public static String base64EncodeString(String input) throws Exception\n {\n return base64Encode(input.getBytes(\"UTF-8\"));\n }",
"public static String encode(byte[] input, int offset, int len)\r\n {\r\n return Base64.encode(input, offset, len);\r\n }",
"public abstract byte[] encode () throws IOException;",
"public static String encode(byte[] in) {\n int fourB64Bytes = 0;\n StringBuffer sb = new StringBuffer();\n int posIn = 0;\n for (posIn = 0; posIn < in.length; posIn++) {\n int oneByte = in[posIn]; // in 0..255, not -128..127 \n if (oneByte < 0) {\n oneByte += 256;\n }\n fourB64Bytes = (fourB64Bytes << 8) + oneByte;\n if (posIn % 3 == 2) {\n sb.append((char)ENCODE_TABLE[(fourB64Bytes >> 18) & 0x3F]);\n sb.append((char)ENCODE_TABLE[(fourB64Bytes >> 12) & 0x3F]);\n sb.append((char)ENCODE_TABLE[(fourB64Bytes >> 6) & 0x3F]);\n sb.append((char)ENCODE_TABLE[fourB64Bytes & 0x3F]);\n fourB64Bytes = 0;\n }\n }\n posIn--;\n switch (posIn % 3) {\n case 0:\n fourB64Bytes = fourB64Bytes << 4; //pad with 0000\n sb.append((char)ENCODE_TABLE[(fourB64Bytes >> 6) & 0x3F]);\n sb.append((char)ENCODE_TABLE[fourB64Bytes & 0x3F]);\n sb.append((char)PAD);\n sb.append((char)PAD);\n fourB64Bytes = 0;\n break;\n\n case 1:\n fourB64Bytes = fourB64Bytes << 2; //pad with 00\n sb.append((char)ENCODE_TABLE[(fourB64Bytes >> 12) & 0x3F]);\n sb.append((char)ENCODE_TABLE[(fourB64Bytes >> 6) & 0x3F]);\n sb.append((char)ENCODE_TABLE[fourB64Bytes & 0x3F]);\n sb.append((char)PAD);\n fourB64Bytes = 0;\n break;\n\n }\n return sb.toString();\n }",
"private static String encodeBase64(String stringToEncode){\r\n\t\treturn Base64.getEncoder().encodeToString(stringToEncode.getBytes());\t\r\n\t}",
"public abstract byte[] getEncoded();",
"public String base64Encode(String str) throws StoreFactoryException;",
"public static char[] encode(byte[] in) {\r\n \t\treturn encode(in, in.length);\r\n \t}",
"static String base64encode(byte[] bytes)\n {\n StringBuilder builder = new StringBuilder(((bytes.length + 2)/ 3) * 4);\n for (int i = 0; i < bytes.length; i += 3)\n {\n byte b0 = bytes[i];\n byte b1 = i < bytes.length - 1 ? bytes[i + 1] : 0;\n byte b2 = i < bytes.length - 2 ? bytes[i + 2] : 0;\n builder.append(BASE64_CHARS[(b0 & 0xFF) >> 2]);\n builder.append(BASE64_CHARS[((b0 & 0x03) << 4) | ((b1 & 0xF0) >> 4)]);\n builder.append(i < bytes.length - 1 ? BASE64_CHARS[((b1 & 0x0F) << 2) | ((b2 & 0xC0) >> 6)] : \"=\");\n builder.append(i < bytes.length - 2 ? BASE64_CHARS[b2 & 0x3F] : \"=\");\n }\n return builder.toString();\n }",
"String encrypt(String input) {\n\t\treturn BaseEncoding.base64().encode(input.getBytes());\n\t}",
"static String convertToBase64(byte[] image){\n return !Objects.isNull(image)\n ? Base64.getEncoder().encodeToString(image)\n : \"\";\n }",
"private String encodeBase64(String msg) {\n\t\tbyte[] bytesEncoded = Base64.encodeBase64(msg.getBytes());\n\t\t//System.out.println(\"encoded value is \" + new String(bytesEncoded));\n\n\t\treturn new String(bytesEncoded);\n\t}",
"protected abstract byte[] encode(Object o) throws EncoderException;",
"public final static byte[] _encode(byte[] byteData) {\n\tif (byteData == null) {\n\t throw new IllegalArgumentException(\"byteData cannot be null\");\n\t}\n\n\t/*\n\t * Declare working variables including an array of bytes that will contain the encoded data to be returned to the caller. Note that the encoded array is about 1/3 larger than the input. This\n\t * is because every group of 3 bytes is being encoded into 4 bytes.\n\t */\n\tint iSrcIdx; // index into source (byteData)\n\tint iDestIdx; // index into destination (byteDest)\n\t// byte[] byteData = (byte[])byteData_in.clone();\n\t// byte[] byteData = byteData_in;\n\tbyte[] byteDest = new byte[((byteData.length + 2) / 3) * 4];\n\n\t/*\n\t * Walk through the input array, 24 bits at a time, converting them from 3 groups of 8 to 4 groups of 6 with two unset bits between. as per Base64 spec see\n\t * http://www.javaworld.com/javaworld/javatips/jw-javatip36-p2.html for example explanation\n\t */\n\tfor (iSrcIdx = 0, iDestIdx = 0; iSrcIdx < byteData.length - 2; iSrcIdx += 3) {\n\t byteDest[iDestIdx++] = (byte) ((byteData[iSrcIdx] >>> 2) & 077);\n\t byteDest[iDestIdx++] = (byte) ((byteData[iSrcIdx + 1] >>> 4) & 017 | (byteData[iSrcIdx] << 4) & 077);\n\t byteDest[iDestIdx++] = (byte) ((byteData[iSrcIdx + 2] >>> 6) & 003 | (byteData[iSrcIdx + 1] << 2) & 077);\n\t byteDest[iDestIdx++] = (byte) (byteData[iSrcIdx + 2] & 077);\n\t}\n\n\t/*\n\t * If the number of bytes we received in the input array was not an even multiple of 3, convert the remaining 1 or 2 bytes.\n\t */\n\tif (iSrcIdx < byteData.length) {\n\t byteDest[iDestIdx++] = (byte) ((byteData[iSrcIdx] >>> 2) & 077);\n\t if (iSrcIdx < byteData.length - 1) {\n\t\tbyteDest[iDestIdx++] = (byte) ((byteData[iSrcIdx + 1] >>> 4) & 017 | (byteData[iSrcIdx] << 4) & 077);\n\t\tbyteDest[iDestIdx++] = (byte) ((byteData[iSrcIdx + 1] << 2) & 077);\n\t } else\n\t\tbyteDest[iDestIdx++] = (byte) ((byteData[iSrcIdx] << 4) & 077);\n\t}\n\n\t/*\n\t * Use the encoded data as indexes into the Base64 alphabet. (The Base64 alphabet is completely documented in RFC 1521.)\n\t */\n\tfor (iSrcIdx = 0; iSrcIdx < iDestIdx; iSrcIdx++) {\n\t if (byteDest[iSrcIdx] < 26)\n\t\tbyteDest[iSrcIdx] = (byte) (byteDest[iSrcIdx] + 'A');\n\t else if (byteDest[iSrcIdx] < 52)\n\t\tbyteDest[iSrcIdx] = (byte) (byteDest[iSrcIdx] + 'a' - 26);\n\t else if (byteDest[iSrcIdx] < 62)\n\t\tbyteDest[iSrcIdx] = (byte) (byteDest[iSrcIdx] + '0' - 52);\n\t else if (byteDest[iSrcIdx] < 63)\n\t\tbyteDest[iSrcIdx] = '+';\n\t else\n\t\tbyteDest[iSrcIdx] = '/';\n\t}\n\n\t/* Pad any unused bytes in the destination string with '=' characters. */\n\tfor (; iSrcIdx < byteDest.length; iSrcIdx++)\n\t byteDest[iSrcIdx] = '=';\n\n\treturn byteDest;\n }",
"public static String encode(byte[] binaryData) {\n if (CommonUtil.isNull(binaryData)) {\n return null;\n }\n\n int lengthDataBits = binaryData.length * EIGHTBIT;\n if (lengthDataBits == 0) {\n return \"\";\n }\n\n int fewerThan24bits = lengthDataBits % TWENTYFOURBITGROUP;\n int numberTriplets = lengthDataBits / TWENTYFOURBITGROUP;\n int numberQuartet = fewerThan24bits != 0 ? numberTriplets + 1 : numberTriplets;\n char[] encodedData = new char[numberQuartet * 4];\n\n byte k1 = 0;\n byte l1 = 0;\n byte b1 = 0;\n byte b2 = 0;\n byte b3 = 0;\n\n int encodedIndex = 0;\n int dataIndex = 0;\n byte val1 = 0;\n byte val2 = 0;\n byte val3 = 0;\n for (int i = 0; i < numberTriplets; i++) {\n b1 = binaryData[dataIndex++];\n b2 = binaryData[dataIndex++];\n b3 = binaryData[dataIndex++];\n\n l1 = (byte) (b2 & 0x0f);\n k1 = (byte) (b1 & 0x03);\n\n val1 = ((b1 & SIGN) == 0) ? (byte) (b1 >> 2) : (byte) ((b1) >> 2 ^ 0xc0);\n val2 = ((b2 & SIGN) == 0) ? (byte) (b2 >> 4) : (byte) ((b2) >> 4 ^ 0xf0);\n val3 = ((b3 & SIGN) == 0) ? (byte) (b3 >> 6) : (byte) ((b3) >> 6 ^ 0xfc);\n\n encodedData[encodedIndex++] = LOOK_UP_BASE64_ALPHABET[val1];\n encodedData[encodedIndex++] = LOOK_UP_BASE64_ALPHABET[val2 | (k1 << 4)];\n encodedData[encodedIndex++] = LOOK_UP_BASE64_ALPHABET[(l1 << 2) | val3];\n encodedData[encodedIndex++] = LOOK_UP_BASE64_ALPHABET[b3 & 0x3f];\n }\n\n // form integral number of 6-bit groups\n assembleInteger(binaryData, fewerThan24bits, encodedData, encodedIndex, dataIndex);\n\n return new String(encodedData);\n }",
"public byte[] doEncoding(byte[] bArr) {\r\n return bArr == null ? null : Base64.encodeBase64(bArr);\r\n }",
"protected void _writeBinary(Base64Variant b64variant, byte[] input, int inputPtr, int inputEnd)\n/* */ throws IOException, JsonGenerationException\n/* */ {\n/* 1421 */ int safeInputEnd = inputEnd - 3;\n/* */ \n/* 1423 */ int safeOutputEnd = this._outputEnd - 6;\n/* 1424 */ int chunksBeforeLF = b64variant.getMaxLineLength() >> 2;\n/* */ \n/* */ \n/* 1427 */ while (inputPtr <= safeInputEnd) {\n/* 1428 */ if (this._outputTail > safeOutputEnd) {\n/* 1429 */ _flushBuffer();\n/* */ }\n/* */ \n/* 1432 */ int b24 = input[(inputPtr++)] << 8;\n/* 1433 */ b24 |= input[(inputPtr++)] & 0xFF;\n/* 1434 */ b24 = b24 << 8 | input[(inputPtr++)] & 0xFF;\n/* 1435 */ this._outputTail = b64variant.encodeBase64Chunk(b24, this._outputBuffer, this._outputTail);\n/* 1436 */ chunksBeforeLF--; if (chunksBeforeLF <= 0)\n/* */ {\n/* 1438 */ this._outputBuffer[(this._outputTail++)] = '\\\\';\n/* 1439 */ this._outputBuffer[(this._outputTail++)] = 'n';\n/* 1440 */ chunksBeforeLF = b64variant.getMaxLineLength() >> 2;\n/* */ }\n/* */ }\n/* */ \n/* */ \n/* 1445 */ int inputLeft = inputEnd - inputPtr;\n/* 1446 */ if (inputLeft > 0) {\n/* 1447 */ if (this._outputTail > safeOutputEnd) {\n/* 1448 */ _flushBuffer();\n/* */ }\n/* 1450 */ int b24 = input[(inputPtr++)] << 16;\n/* 1451 */ if (inputLeft == 2) {\n/* 1452 */ b24 |= (input[(inputPtr++)] & 0xFF) << 8;\n/* */ }\n/* 1454 */ this._outputTail = b64variant.encodeBase64Partial(b24, inputLeft, this._outputBuffer, this._outputTail);\n/* */ }\n/* */ }",
"public CodePointIterator base64Encode(final Base64Alphabet alphabet) {\n return base64Encode(alphabet, true);\n }",
"public static String base64Encode(String str) {\n sun.misc.BASE64Encoder encoder = new sun.misc.BASE64Encoder();\n byte[] bytes = str.getBytes();\n return encoder.encode(bytes);\n\n }",
"protected int _writeBinary(Base64Variant b64variant, InputStream data, byte[] readBuffer)\n/* */ throws IOException, JsonGenerationException\n/* */ {\n/* 1523 */ int inputPtr = 0;\n/* 1524 */ int inputEnd = 0;\n/* 1525 */ int lastFullOffset = -3;\n/* 1526 */ int bytesDone = 0;\n/* */ \n/* */ \n/* 1529 */ int safeOutputEnd = this._outputEnd - 6;\n/* 1530 */ int chunksBeforeLF = b64variant.getMaxLineLength() >> 2;\n/* */ \n/* */ for (;;)\n/* */ {\n/* 1534 */ if (inputPtr > lastFullOffset) {\n/* 1535 */ inputEnd = _readMore(data, readBuffer, inputPtr, inputEnd, readBuffer.length);\n/* 1536 */ inputPtr = 0;\n/* 1537 */ if (inputEnd < 3) {\n/* */ break;\n/* */ }\n/* 1540 */ lastFullOffset = inputEnd - 3;\n/* */ }\n/* 1542 */ if (this._outputTail > safeOutputEnd) {\n/* 1543 */ _flushBuffer();\n/* */ }\n/* */ \n/* 1546 */ int b24 = readBuffer[(inputPtr++)] << 8;\n/* 1547 */ b24 |= readBuffer[(inputPtr++)] & 0xFF;\n/* 1548 */ b24 = b24 << 8 | readBuffer[(inputPtr++)] & 0xFF;\n/* 1549 */ bytesDone += 3;\n/* 1550 */ this._outputTail = b64variant.encodeBase64Chunk(b24, this._outputBuffer, this._outputTail);\n/* 1551 */ chunksBeforeLF--; if (chunksBeforeLF <= 0) {\n/* 1552 */ this._outputBuffer[(this._outputTail++)] = '\\\\';\n/* 1553 */ this._outputBuffer[(this._outputTail++)] = 'n';\n/* 1554 */ chunksBeforeLF = b64variant.getMaxLineLength() >> 2;\n/* */ }\n/* */ }\n/* */ \n/* */ \n/* 1559 */ if (inputPtr < inputEnd) {\n/* 1560 */ if (this._outputTail > safeOutputEnd) {\n/* 1561 */ _flushBuffer();\n/* */ }\n/* 1563 */ int b24 = readBuffer[(inputPtr++)] << 16;\n/* 1564 */ int amount = 1;\n/* 1565 */ if (inputPtr < inputEnd) {\n/* 1566 */ b24 |= (readBuffer[inputPtr] & 0xFF) << 8;\n/* 1567 */ amount = 2;\n/* */ }\n/* 1569 */ bytesDone += amount;\n/* 1570 */ this._outputTail = b64variant.encodeBase64Partial(b24, amount, this._outputBuffer, this._outputTail);\n/* */ }\n/* 1572 */ return bytesDone;\n/* */ }",
"protected int _writeBinary(Base64Variant b64variant, InputStream data, byte[] readBuffer, int bytesLeft)\n/* */ throws IOException, JsonGenerationException\n/* */ {\n/* 1463 */ int inputPtr = 0;\n/* 1464 */ int inputEnd = 0;\n/* 1465 */ int lastFullOffset = -3;\n/* */ \n/* */ \n/* 1468 */ int safeOutputEnd = this._outputEnd - 6;\n/* 1469 */ int chunksBeforeLF = b64variant.getMaxLineLength() >> 2;\n/* */ \n/* 1471 */ while (bytesLeft > 2) {\n/* 1472 */ if (inputPtr > lastFullOffset) {\n/* 1473 */ inputEnd = _readMore(data, readBuffer, inputPtr, inputEnd, bytesLeft);\n/* 1474 */ inputPtr = 0;\n/* 1475 */ if (inputEnd < 3) {\n/* */ break;\n/* */ }\n/* 1478 */ lastFullOffset = inputEnd - 3;\n/* */ }\n/* 1480 */ if (this._outputTail > safeOutputEnd) {\n/* 1481 */ _flushBuffer();\n/* */ }\n/* 1483 */ int b24 = readBuffer[(inputPtr++)] << 8;\n/* 1484 */ b24 |= readBuffer[(inputPtr++)] & 0xFF;\n/* 1485 */ b24 = b24 << 8 | readBuffer[(inputPtr++)] & 0xFF;\n/* 1486 */ bytesLeft -= 3;\n/* 1487 */ this._outputTail = b64variant.encodeBase64Chunk(b24, this._outputBuffer, this._outputTail);\n/* 1488 */ chunksBeforeLF--; if (chunksBeforeLF <= 0) {\n/* 1489 */ this._outputBuffer[(this._outputTail++)] = '\\\\';\n/* 1490 */ this._outputBuffer[(this._outputTail++)] = 'n';\n/* 1491 */ chunksBeforeLF = b64variant.getMaxLineLength() >> 2;\n/* */ }\n/* */ }\n/* */ \n/* */ \n/* 1496 */ if (bytesLeft > 0) {\n/* 1497 */ inputEnd = _readMore(data, readBuffer, inputPtr, inputEnd, bytesLeft);\n/* 1498 */ inputPtr = 0;\n/* 1499 */ if (inputEnd > 0) {\n/* 1500 */ if (this._outputTail > safeOutputEnd) {\n/* 1501 */ _flushBuffer();\n/* */ }\n/* 1503 */ int b24 = readBuffer[(inputPtr++)] << 16;\n/* */ int amount;\n/* 1505 */ int amount; if (inputPtr < inputEnd) {\n/* 1506 */ b24 |= (readBuffer[inputPtr] & 0xFF) << 8;\n/* 1507 */ amount = 2;\n/* */ } else {\n/* 1509 */ amount = 1;\n/* */ }\n/* 1511 */ this._outputTail = b64variant.encodeBase64Partial(b24, amount, this._outputBuffer, this._outputTail);\n/* 1512 */ bytesLeft -= amount;\n/* */ }\n/* */ }\n/* 1515 */ return bytesLeft;\n/* */ }",
"private String byteToBase64(final byte[] bytes) {\n String str = DatatypeConverter.printBase64Binary(bytes);\n return str;\n }",
"public void writeBinary(Base64Variant b64variant, byte[] data, int offset, int len)\n/* */ throws IOException, JsonGenerationException\n/* */ {\n/* 545 */ _verifyValueWrite(\"write a binary value\");\n/* */ \n/* 547 */ if (this._outputTail >= this._outputEnd) {\n/* 548 */ _flushBuffer();\n/* */ }\n/* 550 */ this._outputBuffer[(this._outputTail++)] = this._quoteChar;\n/* 551 */ _writeBinary(b64variant, data, offset, offset + len);\n/* */ \n/* 553 */ if (this._outputTail >= this._outputEnd) {\n/* 554 */ _flushBuffer();\n/* */ }\n/* 556 */ this._outputBuffer[(this._outputTail++)] = this._quoteChar;\n/* */ }",
"public ValidationEntity encodeBase64(ValidationEntity validationEntity) {\n String encodedBytes =\n Base64.getEncoder().encodeToString(validationEntity.getInputMessage().getBytes(StandardCharsets.UTF_8));\n log.debug(\"encodeBase64 completed successfully: {}\", encodedBytes);\n validationEntity.setValid(true);\n validationEntity.setInputMessage(encodedBytes);\n validationEntity.setValidationMessage(\"Encode Successful!!!\");\n return validationEntity;\n }",
"public static String byte2Base64(byte[] bytes) {\n BASE64Encoder encoder = new BASE64Encoder();\n return encoder.encode(bytes);\n }",
"@Test\n public void testEncodeDecodeBase64() {\n ///////////////////////////////\n // plaintext=\"Text to convert.\";\n plaintext=\"ABCDEFGHIJKLMNOPQRSTUPVWYZ123456789\";\n /////////////////////////////////\n System.out.println(\"Convert following text: \"+plaintext);\n \n System.out.println(\"::encodeBase64::\");\n \n byte[] plaindata = plaintext.getBytes();\n byte[] tmp = Base64Encoder.encodeBase64(plaindata);\n this.storeEncoding=new String(tmp);\n System.out.println(storeEncoding);\n System.out.println(\"::decodeBase64::\");\n byte[] base64Message = this.storeEncoding.getBytes();\n byte[] expResult = plaindata;\n byte[] result = Base64Encoder.decodeBase64(base64Message);\n String decodedText=new String(result);\n System.out.println(\"Decoded Text: \"+decodedText);\n assertArrayEquals(expResult, result);\n }",
"public static byte[] stringToBytes(String input) {\n return Base64.decodeBase64(input);\n }",
"private static String convertToHex(byte[] data) throws IOException {\n //create new instance of string buffer\n StringBuffer stringBuffer = new StringBuffer();\n String hex = \"\";\n\n //encode byte data with base64\n hex = Base64.getEncoder().encodeToString(data);\n stringBuffer.append(hex);\n\n //return string\n return stringBuffer.toString();\n }",
"public static byte[] encode(ArrayList<Integer> nums)\n {\n //ArrayList<Byte> byteStream = new ArrayList<Byte>();\n int totalSize = 0;\n for(int i=0;i<nums.size();i++)\n {\n int n = nums.get(i);\n int sizeReq = 1;\n if(n < Math.pow(2, 7))\n sizeReq = 1;\n else if(n < Math.pow(2, 14))\n sizeReq = 2;\n else if(n < Math.pow(2, 21))\n sizeReq = 3;\n else if(n < Math.pow(2, 28))\n sizeReq = 4;\n totalSize += sizeReq;\n }\n byte totalArray[] = new byte[totalSize];\n int c = 0;\n for(int i=0;i<nums.size();i++)\n {\n byte array[] = encode(nums.get(i));\n //byteStream.addAll(array);\n for(int j=0;j<array.length;j++)\n totalArray[c++] = array[j];\n }\n return totalArray;\n }",
"default String codificarBase64(String contenido) {\n\t\tbyte[] encoded = Base64.getEncoder().encode(contenido.getBytes(StandardCharsets.UTF_8));\n\t\treturn new String(encoded);\n\t}",
"public static String encode(String arg) {\n String encoded = Base64.getEncoder().encodeToString(arg.getBytes());\n\n return encoded;\n }",
"public static String toBase64(byte[] aValue) {\n \n final String m_strBase64Chars =\n \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\n \n int byte1;\n int byte2;\n int byte3;\n int iByteLen = aValue.length;\n StringBuffer tt = new StringBuffer();\n \n for (int i = 0; i < iByteLen; i += 3) {\n boolean bByte2 = (i + 1) < iByteLen;\n boolean bByte3 = (i + 2) < iByteLen;\n byte1 = aValue[i] & 0xFF;\n byte2 = (bByte2) ? (aValue[i + 1] & 0xFF) : 0;\n byte3 = (bByte3) ? (aValue[i + 2] & 0xFF) : 0;\n \n tt.append(m_strBase64Chars.charAt(byte1 / 4));\n tt.append(m_strBase64Chars.charAt((byte2 / 16) + ((byte1 & 0x3) * 16)));\n tt.append(((bByte2) ? m_strBase64Chars.charAt((byte3 / 64) + ((byte2 & 0xF) * 4)) : '='));\n tt.append(((bByte3) ? m_strBase64Chars.charAt(byte3 & 0x3F) : '='));\n }\n \n return tt.toString();\n }",
"public static byte[] base64ToByte(String data) throws IOException {\n BASE64Decoder decoder = new BASE64Decoder();\n return decoder.decodeBuffer(data);\n }",
"static public byte[] encode( byte[] binaryData ) {\n if (binaryData == null)\n return null;\n int lengthData = binaryData.length;\n int lengthEncode = lengthData * 2;\n byte[] encodedData = new byte[lengthEncode];\n for( int i = 0; i<lengthData; i++ ){\n encodedData[i*2] = lookUpHexAlphabet[ binaryData[i] >> 4];\n encodedData[i*2+1] = lookUpHexAlphabet[ binaryData[i] & 0xf];\n }\n return encodedData;\n }",
"private static String encodeWritable(Writable obj) throws IOException {\n DataOutputBuffer buf = new DataOutputBuffer();\n obj.write(buf);\n Base64 encoder = new Base64(0, null, true);\n byte[] raw = new byte[buf.getLength()];\n System.arraycopy(buf.getData(), 0, raw, 0, buf.getLength());\n return encoder.encodeToString(raw);\n }",
"public static String base64Encode(int value)\n {\n StringBuffer buffer = new StringBuffer(6);\n\n // For now, let's just use the lower 3 bytes. This increases\n // the possibility of collisions, but it allows us to go\n // from a 6 char to 4 char id.\n\n for (int i = 0; i < 4; i++)\n buffer.append(_BASE_64_CHARS[((value >> (6 * i)) & 0x3f)]);\n\n return buffer.toString();\n }",
"public String encode() {\n return encodeToBase64(encKey.getEncoded()) + \":\" + encodeToBase64(macKey.getEncoded());\n }",
"public static String encodeBase64(String string) {\n\t\tif (string == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn Base64.getEncoder().encodeToString(string.getBytes(UTF_8));\n\t}",
"private Base64(){}",
"public byte[] encode(byte[] data) throws EncodingException {\n\t\tif (data == null) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tint length = data.length;\n\t\tint maxGrouping = length / 5;\n\t\tint fullGroupings = 5 * maxGrouping;\n\t\tint remainderBytes = length - fullGroupings;\n\t\t\n\t\tint c, c0, c1, c2, c3, c4, c5, c6, c7, cursor = 0;\n\t\tint maxPadding = REMAINDER_PADDING_COUNT[remainderBytes];\n\t\tbyte[] result = new byte[8*(maxGrouping + 1)];\n\t\t\n//\t\tdata = Arrays.copyOf(data, length + maxPadding);\n\t\tfor (c = 0; c < fullGroupings; c+= 5) {\n\t\t\t\n\t\t\tc0 = ((data[c] & 0xF8) >> 3);\n\t\t\tc1 = ((data[c] & 0x07) << 2) | ((data[c + 1] & 0xC0) >> 6);\n\t\t\tc2 = ((data[c + 1] & 0x3E) >> 1);\n\t\t\tc3 = ((data[c + 1] & 0x01) << 4) | ((data[c + 2] & 0xF0) >> 4);\n\t\t\tc4 = ((data[c + 2] & 0x0F) << 1) | ((data[c + 3] & 0x80) >> 7);\n\t\t\tc5 = ((data[c + 3] & 0x7C) >> 2);\n\t\t\tc6 = ((data[c + 3] & 0x03) << 3) | ((data[c + 4] & 0xE0) >> 5);\n\t\t\tc7 = (data[c + 4] & 0x1F);\n\t\t\t\n\t\t\t//write\n\t\t\tresult[cursor++] = BASE_32_CHARACTERS[c0];\n\t\t\tresult[cursor++] = BASE_32_CHARACTERS[c1];\n\t\t\tresult[cursor++] = BASE_32_CHARACTERS[c2];\n\t\t\tresult[cursor++] = BASE_32_CHARACTERS[c3];\n\t\t\tresult[cursor++] = BASE_32_CHARACTERS[c4];\n\t\t\tresult[cursor++] = BASE_32_CHARACTERS[c5];\n\t\t\tresult[cursor++] = BASE_32_CHARACTERS[c6];\n\t\t\tresult[cursor++] = BASE_32_CHARACTERS[c7];\n\t\t}\n\t\t\n\t\t//Padding\n\t\tif (maxPadding > 0) {\n\t\t\tc0 = ((data[c] & 0xF8) >> 3);\n\t\t\tresult[cursor++] = BASE_32_CHARACTERS[c0];\n\t\t\t\n\t\t\tif (remainderBytes == 1) {\n\t\t\t\tc1 = ((data[c] & 0x07) << 2);\n\t\t\t\tresult[cursor++] = BASE_32_CHARACTERS[c1];\n\t\t\t} else {\n\t\t\t\tc1 = ((data[c] & 0x07) << 2) | ((data[c + 1] & 0xC0) >> 6);\n\t\t\t\tc2 = ((data[c + 1] & 0x3E) >> 1);\n\t\t\t\t\n\t\t\t\tresult[cursor++] = BASE_32_CHARACTERS[c1];\n\t\t\t\tresult[cursor++] = BASE_32_CHARACTERS[c2];\n\t\t\t\t\n\t\t\t\tif (remainderBytes == 2) {\n\t\t\t\t\tc3 = ((data[c + 1] & 0x01) << 4);\n\t\t\t\t\tresult[cursor++] = BASE_32_CHARACTERS[c3];\n\t\t\t\t} else {\n\t\t\t\t\tc3 = ((data[c + 1] & 0x01) << 4) | ((data[c + 2] & 0xF0) >> 4);\n\t\t\t\t\tresult[cursor++] = BASE_32_CHARACTERS[c3];\n\t\t\t\t\t\n\t\t\t\t\tif (remainderBytes == 3) {\n\t\t\t\t\t\tc4 = ((data[c + 2] & 0x0F) << 1);\n\t\t\t\t\t\tresult[cursor++] = BASE_32_CHARACTERS[c4];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tc4 = ((data[c + 2] & 0x0F) << 1) | ((data[c + 3] & 0x80) >> 7);\n\t\t\t\t\t\tc5 = ((data[c + 3] & 0x7C) >> 2);\n\t\t\t\t\t\tc6 = ((data[c + 3] & 0x03) << 3);\n\t\t\t\t\t\t\n\t\t\t\t\t\tresult[cursor++] = BASE_32_CHARACTERS[c4];\n\t\t\t\t\t\tresult[cursor++] = BASE_32_CHARACTERS[c5];\n\t\t\t\t\t\tresult[cursor++] = BASE_32_CHARACTERS[c6];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Finally...\n\t\t\tfor (c = 0; c < maxPadding; c++) {\n\t\t\t\tresult[cursor++] = PADDING;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn result;\n\t}",
"public byte[] getEncoded() {\n return toByteArray(Integer.valueOf(this.intValue));\n }",
"public String emitAsImageBase64() {\n BufferedImage img = emitAsBufferedImage();\n ByteArrayOutputStream os = new ByteArrayOutputStream();\n try {\n ImageIO.write(img, \"png\", os);\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n Base64 b64 = new Base64();\n String result = b64.encode(os.toByteArray());\n try {\n os.close();\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n return result;\n }",
"private String encodeBase64(String ldapPwd){\n try {\n return CryptoUtils.object2String(ldapPwd);\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }",
"private String encodeBytesFromBuffer(int howMany) {\n String result;\n\n if (innerStreamHasMoreData) {\n howMany = howMany - howMany % 3;\n }\n\n if (howMany == 0) {\n return \"\";\n }\n\n byte[] encodeBuffer = new byte[howMany];\n System.arraycopy(buffer, 0, encodeBuffer, 0, howMany);\n result = Base64.encodeToString(encodeBuffer);\n\n bytesInBuffer -= howMany;\n if (bytesInBuffer != 0) {\n System.arraycopy(buffer, howMany, buffer, 0, bytesInBuffer);\n }\n\n return result;\n }",
"@Override\n\tpublic byte[] encodeMsg() {\n\t\tIoBuffer buf = IoBuffer.allocate(2048).setAutoExpand(true);\n\t\t\n\t\tbuf.put(slaveId);\n\t\tbuf.put(code);\n\t\tbuf.putShort(offset);\n\t\tbuf.putShort(data);\n\t\tbuf.flip();\n\t\t\n \tbyte[] bytes = new byte[buf.remaining()];\n \tbuf.get(bytes);\n \t\n\t\treturn bytes;\n\t}",
"public byte[] marshall();",
"public int writeBinary(Base64Variant b64variant, InputStream data, int dataLength)\n/* */ throws IOException, JsonGenerationException\n/* */ {\n/* 564 */ _verifyValueWrite(\"write a binary value\");\n/* */ \n/* 566 */ if (this._outputTail >= this._outputEnd) {\n/* 567 */ _flushBuffer();\n/* */ }\n/* 569 */ this._outputBuffer[(this._outputTail++)] = this._quoteChar;\n/* 570 */ byte[] encodingBuffer = this._ioContext.allocBase64Buffer();\n/* */ int bytes;\n/* */ try { int bytes;\n/* 573 */ if (dataLength < 0) {\n/* 574 */ bytes = _writeBinary(b64variant, data, encodingBuffer);\n/* */ } else {\n/* 576 */ int missing = _writeBinary(b64variant, data, encodingBuffer, dataLength);\n/* 577 */ if (missing > 0) {\n/* 578 */ _reportError(\"Too few bytes available: missing \" + missing + \" bytes (out of \" + dataLength + \")\");\n/* */ }\n/* 580 */ bytes = dataLength;\n/* */ }\n/* */ } finally {\n/* 583 */ this._ioContext.releaseBase64Buffer(encodingBuffer);\n/* */ }\n/* */ \n/* 586 */ if (this._outputTail >= this._outputEnd) {\n/* 587 */ _flushBuffer();\n/* */ }\n/* 589 */ this._outputBuffer[(this._outputTail++)] = this._quoteChar;\n/* 590 */ return bytes;\n/* */ }",
"private String encode(String str) {\n verifyNotNull(str, ERROR_MESSAGE);\n byte[] bytes = str.getBytes();\n return Base64.getEncoder()\n .withoutPadding()\n .encodeToString(bytes);\n }",
"private String toBase64(Inventory inventory) throws IllegalStateException {\n try {\n ByteArrayOutputStream outputStream = new ByteArrayOutputStream();\n BukkitObjectOutputStream dataOutput = new BukkitObjectOutputStream(outputStream);\n\n // Write the size of the inventory\n dataOutput.writeInt(inventory.getSize());\n\n // Save every element in the list\n for (int i = 0; i < inventory.getSize(); i++) {\n dataOutput.writeObject(inventory.getItem(i));\n }\n\n // Serialize that array\n dataOutput.close();\n return Base64Coder.encodeLines(outputStream.toByteArray());\n } catch (Exception e) {\n throw new IllegalStateException(\"Unable to save item stacks.\", e);\n }\n }",
"java.lang.String getEncoded();",
"public static String toBase64(BloomFilter<?> source) {\n return toBase64(source.getBitSet().toByteArray());\n }",
"public byte[] bytes() {\n\t\treturn concat(b64UrlEncode(header.bytes()), JwtHelper.PERIOD, b64UrlEncode(content), JwtHelper.PERIOD, b64UrlEncode(crypto));\n\t}",
"public static String toBase64( byte[] b ) {\n StringBuffer sb = new StringBuffer();\n for ( int ptr = 0; ptr < b.length; ptr += 3 ) {\n sb.append( base64[ ( b[ ptr ] >> 2 ) & 0x3F ] );\n if ( ptr + 1 < b.length ) {\n sb.append( base64[ ( ( b[ ptr ] << 4 ) & 0x30 ) | ( ( b[ ptr + 1 ] >> 4 ) & 0x0F ) ] );\n if ( ptr + 2 < b.length ) {\n sb.append( base64[ ( ( b[ ptr + 1 ] << 2 ) & 0x3C ) | ( ( b[ ptr + 2 ] >> 6 ) & 0x03 ) ] );\n sb.append( base64[ b[ ptr + 2 ] & 0x3F ] );\n } else {\n sb.append( base64[ ( b[ ptr + 1 ] << 2 ) & 0x3C ] );\n sb.append( pad );\n }\n } else {\n sb.append( base64[ ( ( b[ ptr ] << 4 ) & 0x30 ) ] );\n sb.append( pad );\n sb.append( pad );\n }\n }\n return sb.toString();\n }",
"public static String encrypt(String input) {\n\t\tBase64.Encoder encoder = Base64.getMimeEncoder();\n String message = input;\n String key = encoder.encodeToString(message.getBytes());\n return key;\n\t}",
"public static byte[] fromBase64(String data)\n {\n return Base64.decode(data, Base64.NO_WRAP);\n }",
"public static String itemStackArrayToBase64(ItemStack[] items) throws IllegalStateException {\n try {\n ByteArrayOutputStream outputStream = new ByteArrayOutputStream();\n BukkitObjectOutputStream dataOutput = new BukkitObjectOutputStream(outputStream);\n\n // Write the size of the inventory\n dataOutput.writeInt(items.length);\n\n // Save every element in the list\n for (ItemStack item : items) {\n dataOutput.writeObject(item);\n }\n\n // Serialize that array\n dataOutput.close();\n return Base64Coder.encodeLines(outputStream.toByteArray());\n } catch (Exception e) {\n throw new IllegalStateException(\"Unable to save item stacks.\", e);\n }\n }",
"static byte[] encode(BigInteger n) {\n\t\tbyte[] encodedN;\n\t\tif (n.signum() == 0) {\n\t\t\t// If n is zero, return an zero-length byte array\n\t\t\tencodedN = new byte[0];\n\t\t} else {\n\t\t\t// No need to reverse as C# original does at this point, as Java is always Big Endian.\n\t\t\tbyte[] nAsByteArray = n.toByteArray();\n\t\t\tint firstNonZeroIndex = 0;\n\t\t\twhile ((nAsByteArray[firstNonZeroIndex] == 0) && (firstNonZeroIndex < nAsByteArray.length)) {\n\t\t\t\tfirstNonZeroIndex++;\n\t\t\t}\n\t\t\t// Finally copy the non-zero bytes in to a new array\n\t\t\tencodedN = new byte[nAsByteArray.length - firstNonZeroIndex];\n\t\t\tSystem.arraycopy(nAsByteArray, firstNonZeroIndex, encodedN, 0, nAsByteArray.length - firstNonZeroIndex);\n\t\t}\n\n\t\treturn encodedN;\n\t}",
"private String base58encode(byte[] input) {\r\n if (input.length == 0) {\r\n return \"\";\r\n } \r\n input = copyOfRange(input, 0, input.length);\r\n // Count leading zeroes.\r\n int zeroCount = 0;\r\n while (zeroCount < input.length && input[zeroCount] == 0) {\r\n ++zeroCount;\r\n }\r\n // The actual encoding.\r\n byte[] temp = new byte[input.length * 2];\r\n int j = temp.length;\r\n\r\n int startAt = zeroCount;\r\n while (startAt < input.length) {\r\n byte mod = divmod58(input, startAt);\r\n if (input[startAt] == 0) {\r\n ++startAt;\r\n }\r\n temp[--j] = (byte) ALPHABET[mod];\r\n }\r\n\r\n // Strip extra '1' if there are some after decoding.\r\n while (j < temp.length && temp[j] == ALPHABET[0]) {\r\n ++j;\r\n }\r\n // Add as many leading '1' as there were leading zeros.\r\n while (--zeroCount >= 0) {\r\n temp[--j] = (byte) ALPHABET[0];\r\n }\r\n\r\n byte[] output = copyOfRange(temp, j, temp.length);\r\n try {\r\n return new String(output, \"US-ASCII\");\r\n } catch (UnsupportedEncodingException e) {\r\n throw new RuntimeException(e); // Cannot happen.\r\n } \r\n}",
"public abstract byte[] toByteArray();",
"public abstract byte[] toByteArray();",
"public static byte[] encode(byte[] bytes){\n\t\treturn encode(bytes, false);\n\t}",
"private static byte[] encode(RawTransaction rawTransaction, Sign.SignatureData signatureData) {\n\t\tList<RlpType> values = asRlpValues(rawTransaction, signatureData);\n\t\tRlpList rlpList = new RlpList(values);\n\t\treturn RlpEncoder.encode(rlpList);\n\t}",
"public byte[] EncodeToBytes() throws CoseException {\n return EncodeToCBORObject().EncodeToBytes();\n }",
"byte[] encrypt(final byte[] dataToEncrypt) throws RegBaseCheckedException;",
"public byte[] serialize();",
"public byte[] encode(byte[] pArray) {\n return encodeQuotedPrintable(PRINTABLE_CHARS, pArray);\n }",
"public static String toBase64String(final byte[] bytes) {\n Objects.requireNonNull(bytes);\n return (DatatypeConverter.printBase64Binary(bytes));\n }",
"public static char[] encode(byte[] in, int iLen) {\r\n \t\tint oDataLen = (iLen * 4 + 2) / 3; // output length without padding\r\n \t\tint oLen = ((iLen + 2) / 3) * 4; // output length including padding\r\n \t\tchar[] out = new char[oLen];\r\n \t\tint ip = 0;\r\n \t\tint op = 0;\r\n \t\twhile (ip < iLen) {\r\n \t\t\tint i0 = in[ip++] & 0xff;\r\n \t\t\tint i1 = ip < iLen ? in[ip++] & 0xff : 0;\r\n \t\t\tint i2 = ip < iLen ? in[ip++] & 0xff : 0;\r\n \t\t\tint o0 = i0 >>> 2;\r\n \t\t\tint o1 = ((i0 & 3) << 4) | (i1 >>> 4);\r\n \t\t\tint o2 = ((i1 & 0xf) << 2) | (i2 >>> 6);\r\n \t\t\tint o3 = i2 & 0x3F;\r\n \t\t\tout[op++] = map1[o0];\r\n \t\t\tout[op++] = map1[o1];\r\n \t\t\tout[op] = op < oDataLen ? map1[o2] : '=';\r\n \t\t\top++;\r\n \t\t\tout[op] = op < oDataLen ? map1[o3] : '=';\r\n \t\t\top++;\r\n \t\t}\r\n \t\treturn out;\r\n \t}",
"public javax.activation.DataHandler getBase64Binary() {\n return localBase64Binary;\n }",
"private String base64Encode(String xmlAsString, String xmlEncoding) throws UnsupportedEncodingException {\r\n String xmlencodingDeclaration = \"<?xml version=\\\"1.0\\\" encoding=\\\"\" + xmlEncoding + \"\\\"?>\";\r\n byte[] xmlAsBytes = (xmlencodingDeclaration + xmlAsString).getBytes(xmlEncoding);\r\n\r\n byte[] xmlAsBase64 = Base64.encodeBase64(xmlAsBytes);\r\n\r\n // base64 is pure ascii\r\n String xmlAsBase64String = new String(xmlAsBase64, \"ascii\");\r\n\r\n return xmlAsBase64String;\r\n }",
"private char[] encode(byte[] data) {\n char[] out = new char[getLengthInCharacters(data.length)];\n //\n // 3 bytes encode to 4 chars. Output is always an even\n // multiple of 4 characters.\n //\n for (int i = 0, index = 0; i < data.length; i++, index += CHARACTERS_IN_BLOCK) {\n boolean quad = false;\n boolean trip = false;\n\n int val = byteValue(data[i]);\n val <<= MULTIPLY_BY_256;\n i++; // NOSONAR each loop is actually i+3, and we increment counter inside loop\n if (i < data.length) {\n val |= byteValue(data[i]);\n trip = true;\n }\n val <<= MULTIPLY_BY_256;\n i++; // NOSONAR each loop is actually i+3, and we increment counter inside loop\n if (i < data.length) {\n val |= byteValue(data[i]);\n quad = true;\n }\n out[index + 3] = SESSION_ID_ALPHABET[(quad ? (val & MASK_6_BITS) : FILLER_CHARACTER_INDEX)]; // NOSONAR 3 is not magic!\n val >>= DIVIDE_BY_64;\n out[index + 2] = SESSION_ID_ALPHABET[(trip ? (val & MASK_6_BITS) : FILLER_CHARACTER_INDEX)]; // NOSONAR 2 is not magic!\n val >>= DIVIDE_BY_64;\n out[index + 1] = SESSION_ID_ALPHABET[val & MASK_6_BITS];\n val >>= DIVIDE_BY_64;\n //\n // evry odd step use only alpha characters for last digit, so any number sequence will be at most 7 characters\n //\n if ((i & 0x01) != 0) { // NOSONAR we check last bit\n out[index] = SESSION_ID_ALPHABET[val & MASK_6_BITS];\n } else {\n out[index] = SESSION_ID_ALPHABET_2[val & MASK_6_BITS];\n }\n }\n return out;\n }",
"public String getBase64EncodedPNG()\n\t{\n\t\tString base64Png = null;\n\t\tByteArrayOutputStream output = new ByteArrayOutputStream();\n\t\ttry\n\t\t{\n\t\t\tif (getBlackWhiteBitmap().compress(Bitmap.CompressFormat.PNG, 100, output))\n\t\t\t{\n\t\t\t\tbyte[] imgData = output.toByteArray();\n\t\t\t\tbase64Png = Base64.encodeToString(imgData, Base64.DEFAULT);\n\t\t\t}\n\t\t}\n\t\tcatch (Exception ex)\n\t\t{\n\t\t\tex.printStackTrace();\n\t\t}\n\t\treturn base64Png;\n\t}",
"com.google.protobuf.ByteString\n getEncodedBytes();",
"public static String toBase64(Inventory inventory) throws IllegalStateException {\n try {\n ByteArrayOutputStream outputStream = new ByteArrayOutputStream();\n BukkitObjectOutputStream dataOutput = new BukkitObjectOutputStream(outputStream);\n\n // Write the size of the inventory\n dataOutput.writeInt(inventory.getSize());\n\n // Save every element in the list\n for (int i = 0; i < inventory.getSize(); i++) {\n dataOutput.writeObject(inventory.getItem(i));\n }\n\n // Serialize that array\n dataOutput.close();\n return Base64Coder.encodeLines(outputStream.toByteArray());\n } catch (Exception e) {\n throw new IllegalStateException(\"Unable to save item stacks.\", e);\n }\n }",
"private void write(byte[] data, int pos, int len)\n\t\tthrows IOException\n\t{\n\t\tchar[] chars = BASE64;\n\n\t\tint loc = (len > 0 ? (data[pos] << 24) >>> 8 : 0) |\n\t\t\t(len > 1 ? (data[pos+1] << 24) >>> 16 : 0) |\n\t\t\t(len > 2 ? (data[pos+2] << 24) >>> 24 : 0);\n\n\t\tswitch(len)\n\t\t{\n\t\t\tcase 3:\n\t\t\t\twriter.write(chars[loc >>> 18]);\n\t\t\t\twriter.write(chars[(loc >>> 12) & 0x3f]);\n\t\t\t\twriter.write(chars[(loc >>> 6) & 0x3f]);\n\t\t\t\twriter.write(chars[loc & 0x3f]);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\twriter.write(chars[loc >>> 18]);\n\t\t\t\twriter.write(chars[(loc >>> 12) & 0x3f]);\n\t\t\t\twriter.write(chars[(loc >>> 6) & 0x3f]);\n\t\t\t\twriter.write('=');\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\twriter.write(chars[loc >>> 18]);\n\t\t\t\twriter.write(chars[(loc >>> 12) & 0x3f]);\n\t\t\t\twriter.write('=');\n\t\t\t\twriter.write('=');\n\t\t}\n\t}",
"private byte[] encode(byte[] data) {\n int lc = (data==null ? 0 : data.length);\n int L = 0;\n\n // decide whether short or extended encoding is to be used\n boolean useShort = (lc<256)&&(le<256);\n\n // compute total length of body\n L += lc; // length due to data bytes\n\n if (lc>0) // need to code Lc\n L = (useShort ? L+1 : L+3); // coding Lc as 1 or 3 bytes\n\n if (le>=0) // need to code Le\n L = (useShort ? L+1 : L+2); // coding Le as 1 or 2 bytes\n\n if (L==0) \n return null;\n\n // perform encoding\n byte[] body = new byte[L];\n int l=0;\n\n if (lc>0) { // need to code Lc\n\n if (useShort) // Lc fits in a single byte\n body[l++]=(byte)(lc&0xFF);\n else { // Lc requires 3 bytes\n body[l] =(byte)0x00; // marker indicating extended encoding\n body[l+1]=(byte)((lc>>8)&0xFF);\n body[l+2]=(byte)(lc&0xFF);\n l+=3;\n }\n\n // code data\n System.arraycopy(data, 0, body, l, lc);\n l += lc;\n } // if (lc > 0)\n\n if (le>=0) { // need to code Le\n\n if (useShort) // Le fits in a single byte\n body[l++]=(byte) (le&0xFF); // handle coding of 256\n else { // Le fits in two bytes\n body[l] =(byte)((le>>8)&0xFF);\n body[l+1]=(byte)(le&0xFF);\n }\n\n } // if (le >= 0)\n return body;\n }",
"public byte[] encode(byte[] bytes) {\n/* 199 */ return encodeUrl(WWW_FORM_URL_SAFE, bytes);\n/* */ }",
"public static String encodePassword( String object )\n\t{\n\t\tBASE64Encoder encoder = new BASE64Encoder();\n\t\tif ( object != null ) {\n\t\t\ttry {\n\t\t\t\tString encodedPassword = encoder.encode(object.getBytes(\"UTF-8\"));\n\t\t\t\tLOGGER.info(\"encode '\" + object + \"' password as base64 -> '\" + encodedPassword + \"'\");\n\t\t\t\treturn encodedPassword;\n\t\t\t} catch (UnsupportedEncodingException e) {\n\t\t\t\tLOGGER.severe(\"UTF-8 not supported\");\n\t\t\t}\n\t\t}\n\n\n\t\treturn \"\";\n\t}",
"@Override\r\n\tpublic String toString() {\r\n\t\treturn Base64.encode(mByteList);\r\n\t}",
"public static byte[] altBase64ToByteArray(String s) {\n return base64ToByteArray(s, true);\n }",
"protected byte[] encodeString(String in) {\n\t\tbyte[] rv = null;\n\t\ttry {\n\t\t\trv = in.getBytes(charset);\n\t\t} catch (UnsupportedEncodingException e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t\treturn rv;\n\t}",
"@Test\n public void encodeTiming()\n {\n final int max = 10000;\n final int value = 236;\n final BinaryEncoder encoder = new BinaryEncoder(256);\n\n long start = System.currentTimeMillis();\n\n for (int i = 0; i < max; i++)\n {\n encoder.encodeAsDoubleArray(value);\n }\n\n long end = System.currentTimeMillis();\n logElapsedTime(\"double array\", start, end);\n\n start = System.currentTimeMillis();\n\n for (int i = 0; i < max; i++)\n {\n encoder.encodeAsIntArray(value);\n }\n\n end = System.currentTimeMillis();\n logElapsedTime(\"int array\", start, end);\n\n start = System.currentTimeMillis();\n\n for (int i = 0; i < max; i++)\n {\n encoder.encodeAsBitSet(value);\n }\n\n end = System.currentTimeMillis();\n logElapsedTime(\"bit set\", start, end);\n\n start = System.currentTimeMillis();\n\n for (int i = 0; i < max; i++)\n {\n encoder.encodeAsString(value);\n }\n\n end = System.currentTimeMillis();\n logElapsedTime(\"string\", start, end);\n }",
"public abstract byte[] getEncoded() throws CRLException;",
"public static byte[] base64ToByteArray(String s) {\n return base64ToByteArray(s, false);\n }",
"public Base64Binary(byte[] bytes) throws NumberFormatException {\r\n\t\tif (bytes == null) {\r\n\t\t\tthrow new NumberFormatException(\"parameter can not be null for Base64Binary\");\r\n\t\t}\r\n\r\n\t\t// validate 'base64Binary' type which is defined in W3C schema\r\n\t\t// http://www.w3.org/TR/xmlschema-2/#base64Binary\r\n\t\tif (!W3CSchemaType.isValid(\"base64Binary\", Base64.encode(bytes))) {\r\n\t\t\tthrow new NumberFormatException(\"parameter is invalid for datatype base64Binary\");\r\n\t\t}\r\n\t\tmByteList = bytes;\r\n\t}",
"public byte[] encode(String S) {\n byte[] SBytes = S.getBytes();\n byte[] result = new byte[SBytes.length];\n int j=0;\n int reset=0;\n for(int i=0;i<SBytes.length;i++){\n result[i]=(byte)(SBytes[i]+key[i-key.length*reset]);\n j++;\n if(j==key.length) {\n j = 0;\n reset++;\n }\n }\n return result;\n }",
"static byte[] base64ToByteArray(String s) {\r\n byte[] alphaToInt = base64ToInt;\r\n int sLen = s.length();\r\n int numGroups = sLen/4;\r\n if (4*numGroups != sLen)\r\n throw new IllegalArgumentException(\r\n \"String length must be a multiple of four.\");\r\n int missingBytesInLastGroup = 0;\r\n int numFullGroups = numGroups;\r\n if (sLen != 0) {\r\n if (s.charAt(sLen-1) == '=') {\r\n missingBytesInLastGroup++;\r\n numFullGroups--;\r\n }\r\n if (s.charAt(sLen-2) == '=')\r\n missingBytesInLastGroup++;\r\n }\r\n byte[] result = new byte[3*numGroups - missingBytesInLastGroup];\r\n\r\n // Translate all full groups from base64 to byte array elements\r\n int inCursor = 0, outCursor = 0;\r\n for (int i=0; i<numFullGroups; i++) {\r\n int ch0 = base64toInt(s.charAt(inCursor++), alphaToInt);\r\n int ch1 = base64toInt(s.charAt(inCursor++), alphaToInt);\r\n int ch2 = base64toInt(s.charAt(inCursor++), alphaToInt);\r\n int ch3 = base64toInt(s.charAt(inCursor++), alphaToInt);\r\n result[outCursor++] = (byte) ((ch0 << 2) | (ch1 >> 4));\r\n result[outCursor++] = (byte) ((ch1 << 4) | (ch2 >> 2));\r\n result[outCursor++] = (byte) ((ch2 << 6) | ch3);\r\n }\r\n\r\n // Translate partial group, if present\r\n if (missingBytesInLastGroup != 0) {\r\n int ch0 = base64toInt(s.charAt(inCursor++), alphaToInt);\r\n int ch1 = base64toInt(s.charAt(inCursor++), alphaToInt);\r\n result[outCursor++] = (byte) ((ch0 << 2) | (ch1 >> 4));\r\n\r\n if (missingBytesInLastGroup == 1) {\r\n int ch2 = base64toInt(s.charAt(inCursor++), alphaToInt);\r\n result[outCursor++] = (byte) ((ch1 << 4) | (ch2 >> 2));\r\n }\r\n }\r\n // assert inCursor == s.length()-missingBytesInLastGroup;\r\n // assert outCursor == result.length;\r\n return result;\r\n }"
] | [
"0.72122514",
"0.7207746",
"0.70016015",
"0.6961337",
"0.69240034",
"0.6898393",
"0.6889083",
"0.6887976",
"0.6869274",
"0.68061566",
"0.67038393",
"0.67011404",
"0.66755074",
"0.6582521",
"0.6576005",
"0.65676105",
"0.65502024",
"0.64844966",
"0.6473105",
"0.6452561",
"0.64050436",
"0.64002156",
"0.6367646",
"0.6270269",
"0.6216296",
"0.60780436",
"0.60657054",
"0.60301596",
"0.60205764",
"0.60097456",
"0.5990199",
"0.5987109",
"0.5968138",
"0.5952707",
"0.59341466",
"0.5931172",
"0.5924114",
"0.5915746",
"0.5846601",
"0.5828644",
"0.5825226",
"0.58043283",
"0.5771844",
"0.5761804",
"0.57571733",
"0.5752131",
"0.57344896",
"0.5729682",
"0.5722405",
"0.5710251",
"0.5703734",
"0.56918365",
"0.56556165",
"0.56453645",
"0.5630663",
"0.5629014",
"0.5622432",
"0.5602821",
"0.56016856",
"0.56007236",
"0.5596115",
"0.5595051",
"0.55774873",
"0.5574458",
"0.55640304",
"0.55624324",
"0.5554807",
"0.55486643",
"0.55334204",
"0.5505119",
"0.5498741",
"0.54982436",
"0.54982436",
"0.547103",
"0.54628867",
"0.5454027",
"0.54488635",
"0.5446574",
"0.54430914",
"0.54265416",
"0.5418592",
"0.54116637",
"0.5396007",
"0.53847003",
"0.53731287",
"0.53706086",
"0.5363909",
"0.53474396",
"0.53276867",
"0.5322215",
"0.5312567",
"0.5308593",
"0.5306326",
"0.53054625",
"0.529791",
"0.5297191",
"0.5271735",
"0.5268673",
"0.5263794",
"0.5260006"
] | 0.7948083 | 0 |
This method asynchronously fetches the user profile and displays their Username, location, picture and 10 latest tweet's. | public CompletionStage<Result> getUserProfile(String userName) throws TwitterException{
return FutureConverters.toJava(ask(userProfileActor,new UserProfileActor.UserProfileQuery(userName),10000))
.thenApply(response->ok(userProfilePage.render((UserProfileResult)response)));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void populateUserProfile() {\n setProfilePic();\n mDisplayNameTextView.setText(user.getName());\n mUsernameTextView.setText(String.format(\"@%s\", user.getUsername()));\n mBioTextView.setText(user.getBio());\n setAdapterForUserStories();\n\n new Thread(new Runnable() {\n public void run(){\n setFollowingCount();\n setFollowersCount();\n setStoriesCount();\n queryStoriesFromUser();\n }\n }).start();\n }",
"public CompletableFuture<User> showUser(String screenName){\n CompletableFuture<User> user=null;\n try {\n user=CompletableFuture.supplyAsync(() ->{\n User temp=null;\n try {\n temp=twitter.showUser(screenName);;\n }\n catch (Exception e){\n e.printStackTrace();\n }\n return temp;\n });\n }\n catch (Exception e){\n e.printStackTrace();\n }\n return user;\n }",
"public CompletableFuture<List<Status>> getUserTimeline(String screenName){\n CompletableFuture<List<Status>> userTimeline= null;\n\n try {\n userTimeline=CompletableFuture.supplyAsync(() -> {\n List<Status> temp=null;\n try{\n temp=twitter.getUserTimeline(screenName).stream().limit(10).collect(Collectors.toList());\n }\n catch (Exception e){\n e.printStackTrace();\n }\n return temp;\n });\n return userTimeline;\n }\n catch (Exception e){\n e.printStackTrace();\n }\n\n return userTimeline;\n }",
"@Override\n public void populateTimeline() {\n long fetchMoreStart = tweets.size() > 0 ? tweets.get(tweets.size() - 1).getUid() : -1;\n client.getHomeTimeline(new JsonHttpResponseHandler() {\n // on success\n\n @Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray json) {\n addAll(Tweet.fromJSONArray(json));\n }\n\n // on failure\n @Override\n public void onFailure(int statusCode, Header[] headers, Throwable throwable, JSONObject errorResponse) {\n Log.d(\"DEBUG\", errorResponse.toString());\n }\n }, fetchMoreStart);\n }",
"public void getProfileInformation() {\n\n\t\t mAsyncRunner.request(\"me\", new RequestListener() {\n\t\t\t @Override\n\t\t\t public void onComplete(String response, Object state) {\n\t\t\t\t Log.d(\"Profile\", response);\n\t\t\t\t String json = response;\n\t\t\t\t try {\n\t\t\t\t\t // Facebook Profile JSON data\n\t\t\t\t\t JSONObject profile = new JSONObject(json);\n\n\t\t\t\t\t uName = profile.getString(\"name\");\n\t\t\t\t\t uMail = profile.getString(\"email\");\n\t\t\t\t\t //uGender=profile.getString(\"gender\");\n\n\n\t\t\t\t\t //final String birthday=profile.getString(\"birthday\");\n\t\t\t\t\t runOnUiThread(new Runnable() {\n\t\t\t\t\t\t @Override\n\t\t\t\t\t\t public void run() {\n\t\t\t\t\t\t\t //Toast.makeText(getApplicationContext(), \"Name: \" + name + \"\\nEmail: \" + email+\"\\nGender: \"+gender, Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t getResponse();\n\t\t\t\t\t\t }\n\t\t\t\t\t });\n\t\t\t\t } \n\t\t\t\t catch (JSONException e) \n\t\t\t\t {\n\t\t\t\t\t errorMessage = \"JSON Error Occured\";\n\n\t\t\t\t\t e.printStackTrace();\n\t\t\t\t }\n\t\t\t }\n\n\t\t\t @Override\n\t\t\t public void onIOException(IOException e, Object state) {\n\t\t\t\t errorMessage = \"Facebook Data read Error Occured\";\n\t\t\t }\n\n\t\t\t @Override\n\t\t\t public void onFileNotFoundException(FileNotFoundException e, Object state) {\n\t\t\t\t errorMessage = \"Facebook Image read Error Occured\";\n\t\t\t }\n\n\t\t\t @Override\n\t\t\t public void onMalformedURLException(MalformedURLException e,\n\t\t\t\t\t Object state) {\n\t\t\t\t errorMessage = \"Facebook URL Error Occured\";\n\t\t\t }\n\n\t\t\t @Override\n\t\t\t public void onFacebookError(FacebookError e, Object state) {\n\t\t\t\t errorMessage = \"Facebook Error Occured OnFacebook\";\n\t\t\t }\n\t\t });\n\t }",
"private void retrieveBasicUserInfo() {\n //TODO: Check out dagger here. New retrofit interface here every time currently.\n UserService service = ServiceFactory.getInstagramUserService();\n service.getUser(mAccessToken)\n .subscribeOn(Schedulers.io())\n .observeOn(AndroidSchedulers.mainThread())\n .subscribe(new Subscriber<Response<MediaResponse<User>>>() {\n @Override\n public void onCompleted() {\n }\n\n @Override\n public void onError(Throwable e) {\n Log.e(MY_USER_FRAGMENT, e.getLocalizedMessage());\n }\n\n @Override\n public void onNext(Response<MediaResponse<User>> response) {\n // Looks for instagram error response.\n ResponseBody errorBody = response.errorBody();\n if (!response.isSuccessful() && errorBody != null) {\n try {\n Converter<ResponseBody, MediaResponse> errorConverter = ServiceFactory.getRetrofit().responseBodyConverter(MediaResponse.class, new Annotation[0]);\n MediaResponse mediaError = errorConverter.convert(response.errorBody());\n Toast.makeText(getContext(), mediaError.getMeta().getErrorMessage(), Toast.LENGTH_LONG).show();\n\n if (mediaError.getMeta().getErrorType().equals(getString(R.string.o_auth_error))) {\n oauthEventFired = true;\n EventBus.getDefault().post(new ExpiredOAuthEvent(true));\n }\n } catch (IOException e) {\n Log.e(MY_USER_FRAGMENT, \"There was a problem parsing the error response.\");\n }\n } else {\n showUserInfo(response.body().getData());\n }\n }\n });\n }",
"public void fetchTwitterAccount() {\n //check if user is already authenticated or not\n if (getTwitterSession() != null) {\n\n Log.d(TAG, \"Testing5\");\n\n //fetch twitter image with other information if user is already authenticated\n\n //initialize twitter api client\n TwitterApiClient twitterApiClient = TwitterCore.getInstance().getApiClient();\n\n //Link for Help : https://developer.twitter.com/en/docs/accounts-and-users/manage-account-settings/api-reference/get-account-verify_credentials\n\n //pass includeEmail : true if you want to fetch Email as well\n Call<User> call = twitterApiClient.getAccountService().verifyCredentials(true, false, true);\n call.enqueue(new Callback<User>() {\n @Override\n public void success(Result<User> result) {\n User user = result.data;\n\n Log.d(TAG, \"Testing6 \" + user.toString());\n\n String imageProfileUrl = user.profileImageUrl;\n\n //NOTE : User profile provided by twitter is very small in size i.e 48*48\n //Link : https://developer.twitter.com/en/docs/accounts-and-users/user-profile-images-and-banners\n //so if you want to get bigger size image then do the following:\n imageProfileUrl = imageProfileUrl.replace(\"_normal\", \"\");\n\n String twitter_username, twitter_email, twitter_image;\n\n twitter_username = user.name;\n twitter_email = user.email;\n twitter_image = imageProfileUrl;\n\n Log.d(\"Twitter user data\", \"Data : \" + twitter_image + \", \" + twitter_username + \", \" + twitter_email);\n }\n\n @Override\n public void failure(TwitterException exception) {\n Log.d(TAG, \"Testing7\");\n\n Toast.makeText(getContext(), \"Failed to authenticate. Please try again.\", Toast.LENGTH_SHORT).show();\n }\n });\n } else {\n Log.d(TAG, \"Testing8\");\n\n //if user is not authenticated first ask user to do authentication\n Toast.makeText(getContext(), \"First to Twitter auth to Verify Credentials.\", Toast.LENGTH_SHORT).show();\n }\n\n }",
"void getTweets(long lastUid) {\n client.getMentionsTimeline(lastUid, new JsonHttpResponseHandler() {\n\n @Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n Log.d(\"DEBUG\", response.toString());\n addAll(Tweet.fromJsonArray(response));\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, Throwable throwable, JSONObject errorResponse) {\n Log.d(\"DEBUG\", errorResponse.toString());\n }\n });\n }",
"public void getProfileInformation() {\n\t\tmAsyncRunner.request(\"me\", new RequestListener() {\n\t\t\t@Override\n\t\t\tpublic void onComplete(String response, Object state) {\n\t\t\t\tLog.d(\"Profile\", response);\n\t\t\t\tString json = response;\n\t\t\t\ttry {\n\t\t\t\t\tJSONObject profile = new JSONObject(json);\n\t\t\t\t\tLog.d(\"Arvind Profile Data\", \"\"+profile.toString());\n\t\t\t\t\tfinal String name = profile.getString(\"name\");\n\t\t\t\t\tfinal String email = profile.getString(\"email\");\n\t\t\t\t\tHashMap<String, String> hashMap = new HashMap<String, String>();\n\n\t\t\t\t\thashMap.put(\"first_name\", profile.getString(\"first_name\"));\n\n\t\t\t\t\thashMap.put(\"last_name\", profile.getString(\"last_name\"));\n\n\t\t\t\t\thashMap.put(\"id\", profile.getString(\"id\"));\n\n\t\t\t\t\thashMap.put(\"gender\", profile.getString(\"gender\"));\n\n\t\t\t\t\ttry {\n\n\t\t\t\t\thashMap.put(\"email\", profile.getString(\"email\"));\n\t\t\t\t\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\n\t\t\t\t\thashMap.put(\"birthday\", profile.getString(\"birthday\"));\n\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t//\tGetAlbumdata();\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tIntent returnIntent = new Intent();\n\t\t\t\t\treturnIntent.putExtra(\"map\", hashMap);\n\t\t\t\t\tsetResult(RESULT_OK,returnIntent);\n\t\t\t\t\tfinish();\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onIOException(IOException e, Object state) {\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onFileNotFoundException(FileNotFoundException e,\n\t\t\t\t\tObject state) {\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onMalformedURLException(MalformedURLException e,\n\t\t\t\t\tObject state) {\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onFacebookError(FacebookError e, Object state) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t}\n\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t});\n\t}",
"public void requestUserData() {\r\n\t \tmText.setText(\"Fetching user name, profile pic...\");\r\n\t \tBundle params = new Bundle();\r\n\t \tparams.putString(\"fields\", \"name, picture\");\r\n\t \tUtility.mAsyncRunner.request(\"me\", params, new UserRequestListener());\r\n\t }",
"private void getProfileInformation() {\n try {\n if (Plus.PeopleApi.getCurrentPerson(mGoogleApiClient) != null) {\n Person currentPerson = Plus.PeopleApi\n .getCurrentPerson(mGoogleApiClient);\n String personName = currentPerson.getDisplayName();\n String personPhotoUrl = null;\n if(currentPerson.getImage().getUrl() != null){\n \tpersonPhotoUrl = currentPerson.getImage().getUrl();\n }else{\n \tpersonPhotoUrl = \"\";\n }\n String personGooglePlusProfile = currentPerson.getUrl();\n String gplusemail = Plus.AccountApi.getAccountName(mGoogleApiClient);\n \n Log.e(TAG, \"Name: \" + personName + \", plusProfile: \"\n + personGooglePlusProfile + \", email: \" + email\n + \", Image: \" + personPhotoUrl);\n \n user_id = currentPerson.getId();\n profile_image = personPhotoUrl;\n profile_url = personGooglePlusProfile;\n name = personName;\n this.email = gplusemail;\n \n /* txtName.setText(personName);\n txtEmail.setText(email);*/\n \n // by default the profile url gives 50x50 px image only\n // we can replace the value with whatever dimension we want by\n // replacing sz=X\n personPhotoUrl = personPhotoUrl.substring(0,\n personPhotoUrl.length() - 2)\n + PROFILE_PIC_SIZE;\n \n // new LoadProfileImage(imgProfilePic).execute(personPhotoUrl);\n \n Thread t = new Thread()\n\t\t\t\t{\n\t\t\t\t\tpublic void run()\n\t\t\t\t\t{\n\t\t\t\t\t\tJSONObject obj = new JSONObject();\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tobj.put(\"uid\", user_id);\n\t\t\t\t\t\t\tobj.put(\"email\", email);\n\t\t\t\t\t\t\tobj.put(\"profile_url\", profile_url);\n\t\t\t\t\t\t\tobj.put(\"name\", name);\n\t\t\t\t\t\t\tobj.put(\"profile_image\", profile_image);\n\t\t\t\t\t\t\tobj.put(\"type\", \"google\");\n\t\t\t\t\t\t\tobj.put(\"device_id\", app.getDeviceInfo().device_id);\n\t\t\t\t\t\t\tobj.put(\"device_type\", \"android\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tString response = HttpClient.getInstance(getApplicationContext()).SendHttpPost(Constant.SOCIAL_LOGIN, obj.toString());\n\t\t\t\t\t\t\tif(response != null){\n\t\t\t\t\t\t\t\tJSONObject ob = new JSONObject(response);\n\t\t\t\t\t\t\t\tif(ob.getBoolean(\"status\")){\n\t\t\t\t\t\t\t\t\tString first_name = ob.getString(\"first_name\");\n\t\t\t\t\t\t\t\t\tString last_name = ob.getString(\"last_name\");\n\t\t\t\t\t\t\t\t\tString user_id = ob.getString(\"user_id\");\n\t\t\t\t\t\t\t\t\tString reservation_type = ob.getString(\"reservation_type\");\n\t\t\t\t\t\t\t\t\tboolean checkin_status = ob.getBoolean(\"checkin_status\");\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tString rev_id = null,reservation_code = null;\n\t\t\t\t\t\t\t\t\tJSONArray object = ob.getJSONArray(\"reservation_detail\");\n\t\t\t\t\t\t\t\t\tfor(int i = 0;i<object.length();i++){\n\t\t\t\t\t\t\t\t\t\trev_id = object.getJSONObject(i).getString(\"reservation_id\");\n\t\t\t\t\t\t\t\t\t\treservation_code = object.getJSONObject(i).getString(\"reservation_code\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tapp.getUserInfo().SetUserInfo(first_name,\n\t\t\t\t\t\t\t\t\t\t\tlast_name,\n\t\t\t\t\t\t\t\t\t\t\tuser_id,\n\t\t\t\t\t\t\t\t\t\t\trev_id,\n\t\t\t\t\t\t\t\t\t\t\treservation_code,\n\t\t\t\t\t\t\t\t\t\t\treservation_type,\n\t\t\t\t\t\t\t\t\t\t\tcheckin_status);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tapp.getLogininfo().setLoginInfo(true);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tUpdateUiResult(true);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\tt.start();\n \n } else {\n Toast.makeText(getApplicationContext(),\n \"Person information is null\", Toast.LENGTH_LONG).show();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public void searchUserAccount( )\r\n throws TwitterException, URISyntaxException, IOException{\r\n\r\n // looks at all tweets since this page\r\n // the count is the limit\r\n\r\n int count = 0;\r\n String text = \"\";\r\n Paging paging = new Paging(pageInt, 10);\r\n List<Status> statuses = twitter.getUserTimeline(user, paging);\r\n\r\n for (Status s : statuses) {\r\n String url = \"https://twitter.com/\" + s.getUser().getScreenName() + \"/status/\" + s.getId();\r\n if (s.getRetweetedStatus() == null) {\r\n content = url;\r\n //send the links to text\r\n HandleFile(override, active);\r\n\r\n //regular expressions\r\n String regex = \"https://t.co/.*\";\r\n text = s.getText().replaceAll(regex,\"\");\r\n\r\n System.out.println(s.getUser().getName() + \": \" + text);\r\n System.out.println(url); //prints the url of the tweet\r\n System.out.println(s.getCreatedAt()+\"\\n\");\r\n\r\n //sets the tweets to variables to be exported\r\n tweets = tweets + \" \" +text + \"\\n\"+ url + \"\\n\" + s.getCreatedAt() + \"\\n\\n\";\r\n\r\n\r\n active = false;\r\n\r\n //search for nudes\r\n getTwitterImage(s);\r\n }\r\n count++;\r\n\r\n if(count == 5 && limitInt > 0){\r\n limitInt--;\r\n pageInt++;\r\n searchUserAccount();\r\n }\r\n }\r\n }",
"private void getUserProfile() {\n mFirstname.setText(\"FirstName: \"+userPreferences.getAgentFirstName());\n mLastname.setText(\"LastName: \"+userPreferences.getAgentLastName());\n\n\n Log.i(\"username\",userPreferences.getAgentUsername());\n if(userPreferences.getAgentUsername()==null){\n mUsernameTxt.setText(\"\");\n }else if(userPreferences.getAgentUsername().equals(\"null\")){\n mUsernameTxt.setText(\"\");\n }else{\n mUsernameTxt.setText(userPreferences.getAgentUsername());\n }\n\n mEmail.setText(\"Email: \"+userPreferences.getAgentEmail());\n mPhoneNum.setText(\"Phone No: \"+userPreferences.getAgentPhoneNUM());\n\n\n /* mPinProfileTxt.setText(\"Pin: \"+userPreferences.getPin());\n mBank.setText(\"Bank Name: \"+userPreferences.getBank());\n mAccountName.setText(\"Acct Name: \"+userPreferences.getAccountName());\n mAccountNumber.setText(\"Acct No: \"+userPreferences.getAccountNumber());*/\n\n mProgressBarProfile.setVisibility(View.VISIBLE);\n if(personal_img_url==null) {\n Glide.with(this).load(userPreferences.getAgentProfileImg()).apply(new RequestOptions().fitCenter().circleCrop()).into(mProfilePhoto);\n }else{\n Glide.with(this).load(personal_img_url).apply(new RequestOptions().fitCenter().circleCrop()).into(mProfilePhoto);\n\n }\n mProgressBarProfile.setVisibility(View.GONE);\n }",
"@Override\n protected String doInBackground(String... params) {\n if(isFirstRead ||\n SessionObject.getTweetList() == null ||\n SessionObject.getTweetList().size() == 0){\n //Get last 20 MSG\n\n //Quick and dirty\n String url = MESSAGE_URL+\"?username=\"+SessionObject.getUsername()+\"&token=\"+SessionObject.getToken();\n\n Log.d(\"MainActivity - ReadTweets AsyncTask\", \"Begin SignUp HTTP call \"+ url);\n String result = connect(url,MESSAGE_READ_METHOD, null);\n Log.d(\"MainActivity - ReadTweets AsyncTask\", \"End SignUp HTTP call, result: \"+result);\n isFirstRead = false;\n SessionObject.setTweetList(JsonParser.parseJsonFromGetMsgs(result));\n return result;\n }\n //Find new messages from last message\n //Quick and dirty\n String url = MESSAGE_TS_URL+\"?timestamp=\"+SessionObject.getTweetList().get(0).getTimestamp();\n Log.d(\"MainActivity - ReadTweets AsyncTask\", \"Begin SignUp HTTP call \"+url);\n String result = connect(url,MESSAGE_READ_METHOD, null);\n Log.d(\"MainActivity - ReadTweets AsyncTask\", \"End SignUp HTTP call, result: \"+result);\n SessionObject.addTwettToList(JsonParser.parseJsonFromGetMsgs(result));\n return result;\n }",
"private void loadTwitterData(){\n showLoadingDialog();\n TwitterController.getInstance().loadTwitters(getTwitterCallback);\n }",
"private void loadUserInformation() {\n FirebaseUser user = mAuth.getCurrentUser();\n\n if (user != null) {\n if (user.getPhotoUrl() != null) {\n Glide.with(this).load(user.getPhotoUrl().toString()).into(profilePic);\n }\n if (user.getDisplayName() != null) {\n name.setText(user.getDisplayName());\n }\n\n }\n\n }",
"private void getProfileInfo() {\n boolean connectivity=checkConnection();\n if(connectivity){\n progressBar.setVisibility(View.VISIBLE);\n assert currentUser != null;\n String userid = currentUser.getUid();\n databaseReference.child(userid).addValueEventListener(new ValueEventListener() {\n @SuppressLint(\"SetTextI18n\")\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n @SuppressLint({\"NewApi\", \"LocalSuppress\"}) String name = Objects.requireNonNull(dataSnapshot.child(\"name\").getValue()).toString();\n @SuppressLint({\"NewApi\", \"LocalSuppress\"}) String number = Objects.requireNonNull(dataSnapshot.child(\"number\").getValue()).toString();\n String email = currentUser.getEmail();\n Name.setText(name);\n Number.setText(\"+92\" + number);\n Email.setText(email);\n progressBar.setVisibility(View.GONE);\n\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n }\n else{\n Toast.makeText(getContext(), \"No Internet Connectivity!\", Toast.LENGTH_SHORT).show();\n }\n\n\n }",
"private void getUserData() {\n TwitterApiClient twitterApiClient = TwitterCore.getInstance().getApiClient();\n AccountService statusesService = twitterApiClient.getAccountService();\n Call<User> call = statusesService.verifyCredentials(true, true, true);\n call.enqueue(new Callback<User>() {\n @Override\n public void success(Result<User> userResult) {\n //Do something with result\n\n //parse the response\n String name = userResult.data.name;\n String email = userResult.data.email;\n String description = userResult.data.description;\n String pictureUrl = userResult.data.profileImageUrl;\n String bannerUrl = userResult.data.profileBannerUrl;\n String language = userResult.data.lang;\n long id = userResult.data.id;\n\n }\n\n public void failure(TwitterException exception) {\n //Do something on failure\n }\n });\n }",
"public void populateTimeline(long maxId, String screenName) {\n\n //check connectivity:\n if (Utilities.isNetworkAvailable(getContext()) && Utilities.isOnline()) {\n\n twitterClient.getUserTimeline(new JsonHttpResponseHandler() {\n @Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n // deserialize the response and create models\n ArrayList<Tweet> tweetList = Tweet.fromJSONArray(response);\n\n //load data into the view:\n\n //store reference to current size\n int currentSize = tweets.size();\n\n //add retrieved tweets to existing list\n tweets.addAll(tweetList);\n\n //visually refresh the list\n tweetsAdapter.notifyItemRangeInserted(currentSize, tweetList.size());\n\n if (!tweetList.isEmpty()) {\n updateIndex();\n }\n swipeContainer.setRefreshing(false);\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, Throwable throwable, JSONArray errorResponse) {\n Toast.makeText(getContext(), \"Error in request\", Toast.LENGTH_SHORT).show();\n }\n\n\n @Override\n public void onUserException(Throwable error) {\n Toast.makeText(getContext(), R.string.on_user_exception, Toast.LENGTH_SHORT).show();\n }\n }, maxId, screenName);\n } else {\n Toast.makeText(getContext(), R.string.device_not_connected, Toast.LENGTH_SHORT).show();\n }\n }",
"private void getUserInfo() {\n httpClient.get(API.LOGIN_GET_USER_INFO, new JsonHttpResponseHandler(){\n @Override\n public void onSuccess(int statusCode, Header[] headers, JSONObject response) {\n super.onSuccess(statusCode, headers, response);\n callback.onLoginSuccess(response.optJSONObject(Constant.OAUTH_RESPONSE_USER_INFO));\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, String responseString, Throwable throwable) {\n super.onFailure(statusCode, headers, responseString, throwable);\n callback.onLoginFailed(throwable.getMessage(), ErrorCode.ERROR_CODE_SERVER_EXCEPTION);\n }\n });\n }",
"public void getFriend_and_tweet(String Screen_Name, String Label) {\n\t\tPagableResponseList<User> statuses = null;\n\t\tResponseList<Status> userinfo = null;\n\n\t\ttry {\n\n\t\t\tuserinfo = twitter.getUserTimeline(Screen_Name);\n\t\t\tstatuses = twitter.getFriendsList(Screen_Name, -1, 200);\n\t\t\tdb.insertuser(userinfo.get(0).getUser()); // this line will insert the user given to table of Users\n\t\t\tdb.insert_User_to_Trning_set(userinfo.get(0).getUser(), Label);// this line will insert the user given to\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// table of User_to_Trning_set\n\t\t\tfor (User newUser : statuses) {\n\t\t\t\tdb.insertuser(newUser); // return true if the User was inserted\n\t\t\t\tdb.insert_User_Following(userinfo.get(0).getUser().getId(), newUser.getId());\n\t\t\t}\n\t\t\tSystem.out.println(\"Done from FriendsList for \" + Screen_Name);\n\t\t\tdb.updateisCompelet(userinfo.get(0).getUser().getId());\n\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\tList<ResponseList<Status>> tweets = get_tweet(userinfo.get(0).getUser().getId());\n\n\t}",
"@Override\n protected void onPostExecute(Void result) {\n userImage.setImageBitmap(profileImageBitmap);\n\n userName.setText(user.getName());\n userNickName.setText(\"Username : \" + user.getUsername());\n userTotalPoints.setText(String.valueOf(user.getTotalPoints()));\n userActualPoints.setText(String.valueOf(user.getCurrentPoints()));\n userCreationDate.setText(\"GoBro desde: \" + sourceFormat.format(user.getCreationDate()));\n userBirthDate.setText(sourceFormat.format(user.getBirthDate()));\n userEmail.setText(user.getEmail());\n\n }",
"public List<String> homeTimeline() {\r\n\t\tList<String> twitterResponseList = new ArrayList<String>();\r\n\t\ttry {\r\n\t\t\tProperties properties = getProperties();\r\n\t\t\tString apiUrl = properties.getProperty(\"twitter.api.home.timeline\") + \"?count=10\"; // append count to max of\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 10\r\n\r\n\t\t\tHttpResponse apiResponse = executeHttpGet(apiUrl);\r\n\r\n\t\t\tif (200 == apiResponse.getStatusLine().getStatusCode()) {\r\n\t\t\t\tJSONArray jsonArray = new JSONArray(EntityUtils.toString(apiResponse.getEntity()));\r\n\t\t\t\tfor (int i = 0; i < jsonArray.length(); i++) {\r\n\t\t\t\t\tJSONObject jsonObject = (JSONObject) jsonArray.get(i);\r\n\t\t\t\t\tJSONObject userObject = (JSONObject) jsonObject.get(\"user\");\r\n\t\t\t\t\tString displayText = (String) userObject.get(\"screen_name\") + \" : \"\r\n\t\t\t\t\t\t\t+ (String) jsonObject.get(\"text\"); // data to be displayed in screen_name : tweet format\r\n\t\t\t\t\ttwitterResponseList.add(displayText); // list of data in the format mentioned above\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn twitterResponseList;\r\n\r\n\t}",
"private void getProfileInfo() {\n OkHttpClient client = new OkHttpClient.Builder()\n .cookieJar(new CookieJar() {\n private final HashMap<HttpUrl, List<Cookie>> cookieStore = new HashMap<>();\n @Override\n public void saveFromResponse(HttpUrl url, List<Cookie> cookies) {\n cookieStore.put(url, cookies);\n }\n\n @Override\n public List<Cookie> loadForRequest(HttpUrl url) {\n List<Cookie> cookies = cookieStore.get(url);\n return cookies != null ? cookies : new ArrayList<>();\n }\n })\n .build();\n\n AsyncTask.execute(() -> {\n try {\n HttpUrl url = HttpUrl.parse(URL + \"/nuh/myprofile\")\n .newBuilder()\n .build();\n\n Request requestToken = new Request.Builder()\n .url(url)\n .build();\n\n client.newCall(requestToken).execute();\n String token = \"\";\n\n List<Cookie> cookies = client.cookieJar().loadForRequest(url);\n for (Cookie cookie : cookies) {\n if (cookie.name().equals(\"csrftoken\")) {\n token = cookie.value();\n }\n }\n\n Request request = new Request.Builder()\n .header(\"X-CSRFToken\", token)\n .url(URL + \"/nuh/myprofile\")\n .build();\n\n Response response = client.newCall(request).execute();\n if (response.isSuccessful()) {\n String JSON = response.body().string();\n Log.d(\"JSON\", \"getProfileInfo: JSON: \" + JSON);\n JSONArray array = new JSONArray(JSON);\n JSONObject usernameObj = array.getJSONObject(0);\n String username = usernameObj.getString(\"username\");\n JSONObject firstNameObj = array.getJSONObject(1);\n String firstName = firstNameObj.getString(\"first_name\");\n JSONObject lastNameObj = array.getJSONObject(2);\n String lastName = lastNameObj.getString(\"last_name\");\n JSONObject emailObj = array.getJSONObject(3);\n String email = emailObj.getString(\"e_mail\");\n\n JSONObject categoriesObj = array.getJSONObject(4);\n String needFood = categoriesObj.getString(\"get_food\");\n String needAccomodation = categoriesObj.getString(\"get_accommodation\");\n String needClothes = categoriesObj.getString(\"get_clothes\");\n String needMedicine = categoriesObj.getString(\"get_medicine\");\n String needOther = categoriesObj.getString(\"get_other\");\n String giveFood = categoriesObj.getString(\"give_food\");\n String giveAccomodation = categoriesObj.getString(\"give_accommodation\");\n String giveClothes = categoriesObj.getString(\"give_clothes\");\n String giveMedicine = categoriesObj.getString(\"give_medicine\");\n String giveOther = categoriesObj.getString(\"give_other\");\n double latitude = categoriesObj.getDouble(\"latitude\");\n double longitude = categoriesObj.getDouble(\"longitude\");\n\n SharedPreferences.Editor editor = getSharedPreferences(HELP_CATEGORIES, MODE_PRIVATE).edit();\n editor.putString(USERNAME, username);\n editor.putString(FIRST_NAME, firstName);\n editor.putString(LAST_NAME, lastName);\n editor.putString(EMAIL, email);\n editor.putBoolean(FOOD_NEED, needFood != null);\n editor.putBoolean(ACCOMODATION_NEED, needAccomodation != null);\n editor.putBoolean(CLOTHES_NEED, needClothes != null);\n editor.putBoolean(MEDICINE_NEED, needMedicine != null);\n editor.putBoolean(OTHER_NEED, needOther != null);\n editor.putBoolean(FOOD_GIVE, giveFood != null);\n editor.putBoolean(ACCOMODATION_GIVE, giveAccomodation != null);\n editor.putBoolean(CLOTHES_GIVE, giveClothes != null);\n editor.putBoolean(MEDICINE_GIVE, giveMedicine != null);\n editor.putBoolean(OTHER_GIVE, giveOther != null);\n editor.putString(FOOD_NEED_TEXT, needFood);\n editor.putString(ACCOMODATION_NEED_TEXT, needAccomodation);\n editor.putString(CLOTHES_NEED_TEXT, needClothes);\n editor.putString(MEDICINE_NEED_TEXT, needMedicine);\n editor.putString(OTHER_NEED_TEXT, needOther);\n editor.putString(FOOD_GIVE_TEXT, giveFood);\n editor.putString(ACCOMODATION_GIVE_TEXT, giveAccomodation);\n editor.putString(CLOTHES_GIVE_TEXT, giveClothes);\n editor.putString(MEDICINE_GIVE_TEXT, giveMedicine);\n editor.putString(OTHER_GIVE_TEXT, giveOther);\n editor.apply();\n getSharedPreferences(LOGIN, MODE_PRIVATE)\n .edit()\n .putString(LATITUDE, String.valueOf(latitude))\n .putString(LONGITUDE, String.valueOf(longitude))\n .apply();\n\n } else {\n runOnUiThread(() -> Toast.makeText(this, \"Something went wrong\", Toast.LENGTH_SHORT).show());\n }\n } catch (IOException | JSONException e) {\n e.printStackTrace();\n }\n });\n }",
"@Override\n\t\tpublic void onComplete(Bundle arg0) {\n\t\t\tsocialAuthAd.getUserProfileAsync(new SocialAuthListener<Profile>() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void onExecute(String s, Profile p) {\n\t\t\t\t\n\t\t\t\t\tString pUrl;\n\t\t\t\t\tpUrl=p.getProfileImageURL();\n\t\t\t\t\tLog.i(\"String s\", \"\"+s);\n\t\t\t\t\t\n\t\t\t\t\tLog.i(\"ProfileImageURL\", \"\"+pUrl);\n\t\t\t\t\tLog.i(\"DOB\", \"\"+p.getDob());\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void onError(SocialAuthError arg0) {\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\t//After Authentication User Contact Data\n\t\t\tsocialAuthAd.getContactListAsync(new SocialAuthListener<List<Contact>>() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void onExecute(String string, List<Contact> userContacts) {\n\t\t\t\t\t Log.i(\"name\", \"\"+userContacts.get(0).getFirstName());\n\t\t\t\t Log.i(\"lName\", \"\"+userContacts.get(0).getLastName());\n\t\t\t\t Log.i(\"ID\", \"\"+userContacts.get(0).getId());\n\t\t\t\t Log.i(\"PimgURL\", \"\"+userContacts.get(0).getProfileImageURL());\n\t\t\t\t Log.i(\"Purl\", \"\"+userContacts.get(0).getProfileUrl());\n\t\t\t\t \n\t\t\t\t shareWithFriends_lv.setAdapter(new LinkedInContactAdapter(ShareWithFriendsActivity.this, userContacts));\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void onError(SocialAuthError arg0) {\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t}",
"@Override\n public void run() {\n\n // get the result\n\n final List<UserModel> userModels = userListRepository.getUserList(refresh);\n\n getMainThreadExecutor().execute(new Runnable() {\n @Override\n public void run() {\n callback.onResult(userModels);\n }\n });\n\n }",
"@Override\n\t\tprotected Void doInBackground(Void... params) {\n\t\n\t\t\n\t\t\ttry{\n\t\t\t\t\n\t\t\t\t//---------------- Getting User Profile----------------------------\n\t\t\t\t\n\t\t\t\tmyuser = new UserService(Activity_LoginPage.client);\n\t\t\t\t\n\t\t\t\tuser_mailid = myuser.getUser().getEmail();\n\t\t\t\t\n\t\t\t\tuser_name = myuser.getUser().getName();\n\t\t\t\t\n\t\t\t\tuser_websiteURL = myuser.getUser().getUrl();\n\t\t\t\t\n\t\t\t\tuser_imageurl = myuser.getUser().getAvatarUrl();\n\t\t\t\t\n\t\t\t\tuser_location = myuser.getUser().getLocation();\n\t\t\t\t\n\t\t\t\tuser_companyname = myuser.getUser().getCompany();\n\t\t\t\t\n\t\t\t\tuser_collaborators = myuser.getUser().getCollaborators();\n\t\t\t\t\n\t\t\t\tuser_followers = myuser.getUser().getFollowers();\n\t\t\t\t\n\t\t\t\tuser_following = myuser.getUser().getFollowing();\n\t\t\t\t\n\t\t\t\tuser_privategist = myuser.getUser().getPrivateGists();\n\t\t\t\t\n\t\t\t\tuser_publicgist = myuser.getUser().getPublicGists();\n\t\t\t\t\n\t\t\t\tuser_privaterepo = myuser.getUser().getOwnedPrivateRepos();\n\t\t\t\t\n\t\t\t\tuser_publicrepo = myuser.getUser().getPublicRepos();\n\t\t\t\t\n\t\t\t\tURL myFileUrl =null; \n\t\t\t\t\n\t\t\t\t try {\n\t\t\t myFileUrl= new URL(user_imageurl);\n\t\t\t } catch (MalformedURLException e) {\n\t\t\t // TODO Auto-generated catch block\n\t\t\t e.printStackTrace();\n\t\t\t }\n\t\t\t try {\n\t\t\t HttpURLConnection conn= (HttpURLConnection)myFileUrl.openConnection();\n\t\t\t conn.setDoInput(true);\n\t\t\t conn.connect();\n\t\t\t InputStream is = conn.getInputStream();\n\n\t\t\t mybitmap = BitmapFactory.decodeStream(is);\n\t\t\t \n\t\t\t \n\t\t\t } catch (IOException e) {\n\t\t\t // TODO Auto-generated catch block\n\t\t\t e.printStackTrace();\n\t\t\t }\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t}catch(Exception e){\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t \n\t\t\treturn null;\n\t\t}",
"public void getUserInfo() {\n new FacebookFinalizeOAuthTask().execute(null, null, null);\n }",
"private void getAllUsers(){\n\t\t\n\t\tSystem.out.println(\"Retrieving Social Graph Data from tibbr...\"); \n\t\tDefaultHttpClient httpClient = new DefaultHttpClient();\n\n\t\tString params = \"?sort=firstNameAsc&fields=name,jive.username,-resources&count=5000&startIndex=0\"; \n\t\tHttpGet getRequest = new HttpGet(urlBase+\"/api/core/v3/people/@all\"+params);\n\t\t\n\n\t\t\t \n\t\tgetRequest.setHeader(\"Authorization\", \"Basic \" + this.auth);\n\t\t\n\t\t\t\n\t\ttry {\n\t\t\tHttpResponse response = httpClient.execute(getRequest);\n\t\t\tString jsonOut = readStream(response.getEntity().getContent());\n\t\t // Remove throwline if present\n\t\t\tjsonOut = removeThrowLine(jsonOut);\n\t\t getAllUserElements(jsonOut);\n\t\t \n\t \n\t\t} catch (ClientProtocolException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t}",
"public void displayUserInformations() {\n println(\"getLocation(): \"+user.getLocation());\n println(\"getFriendsCount(): \"+user.getFriendsCount());\n println(\"getFollowersCount(): \"+user.getFollowersCount());\n println(\"getDescription(): \"+user.getDescription());\n println(\"getCreatedAt() : \"+user.getCreatedAt() );\n println(\"getDescriptionURLEntities(): \"+user.getDescriptionURLEntities());\n println(\"getFavouritesCount() : \"+user.getFavouritesCount() );\n }",
"private void showUserInfo(User user) {\n Picasso\n .with(getContext())\n .load(user.getProfilePicture())\n .transform(new CircleTransformation())\n .into(mUserImageView);\n\n mNameTextView.setText(user.getFullName());\n mWebsiteTextView.setText(user.getWebsite());\n\n if (!TextUtils.isEmpty(user.getBio())) {\n mBioTextView.setText(user.getBio());\n mBioTextView.setMovementMethod(new ScrollingMovementMethod());\n mBioLinearLayout.setVisibility(View.VISIBLE);\n } else {\n mBioLinearLayout.setVisibility(View.GONE);\n }\n\n if (user.getCounts().getMedia() == 0 && user.getCounts().getFollows() == 0 && user.getCounts().getFollowedBy() == 0) {\n mCountsLinearLayout.setVisibility(View.GONE);\n } else {\n String mediaCount = \"\\t\" + \"\\t\" + \"\\t\" + String.valueOf(user.getCounts().getMedia());\n mMediaCountTextView.setText(mediaCount);\n\n String followsCount = \"\\t\" + \"\\t\" + \"\\t\" + String.valueOf(user.getCounts().getFollows());\n mFollowsTextView.setText(followsCount);\n\n String followedByCount = \"\\t\" + \"\\t\" + \"\\t\" + String.valueOf(user.getCounts().getFollowedBy());\n mFollowedByTextView.setText(followedByCount);\n\n mCountsLinearLayout.setVisibility(View.VISIBLE);\n }\n }",
"private void retrieveAllUserData() {\n retrieveBasicUserInfo();\n retrieveUsersRecentMedia();\n retrieveUsersLikedMedia();\n }",
"@Override\n protected Void doInBackground(String... urls) {\n HttpHandler httpHandler = new HttpHandler();\n String response = httpHandler.makeServiceCall(urls[0], \"GET\" , new HashMap<>(),\n session.getToken());\n Log.i(TAG, \"Response from url: \" + response);\n try {\n\n JSONObject jsonArray = new JSONObject(response);\n\n user = new User(jsonArray.getString(\"username\"),\n jsonArray.getString(\"name\"),\n jsonArray.getString(\"email\"),\n jsonArray.getString(\"birth_date\"),\n jsonArray.getString(\"image\"),\n jsonArray.getInt(\"total_points\"),\n jsonArray.getInt(\"points\"),\n jsonArray.getString(\"created_at\"));\n\n String image = jsonArray.getString(\"image\");\n\n byte[] imageData = Base64.decode(image, Base64.DEFAULT);\n profileImageBitmap = BitmapFactory.decodeByteArray(imageData, 0, imageData.length);\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n return null;\n }",
"public static void getUserTimeline(String user, Classifier classifier, HttpServletResponse response, int pagenum, int countnum) throws IOException {\n\t\tresponse.setContentType(\"application/json\");\n\t\tPrintWriter out = response.getWriter();\n Twitter twitter = new TwitterFactory().getInstance();\n try {\n List<Status> statuses;\n Paging page = new Paging(pagenum, countnum);\n statuses = twitter.getUserTimeline(user, page);\n String responseObject = \"{\\\"user\\\":\\\"\"+user+\"\\\",\\\"tweets\\\":[\";\n for (Status status : statuses) {\n // System.out.println(\"@\" + status.getUser().getScreenName() + \" - \" + status.getText());\n \t\n if (status.getText().length() >= 50) {\n \tString tweet = status.getText();\n \t\ttry {\n \t\t\ttweet = \"1 personal \"+tweet;\n \t\t\tresponseObject += \"{\\\"\"+status.getId()+\"\\\": {\\\"datetime\\\":\\\"\" + status.getCreatedAt().toString() + \"\\\",\";\n \t\t\tresponseObject += \"\\\"classification\\\":\"+printLabelings(classifier, tweet, out) + \"}},\";\n \t\t} catch (IOException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n \t\t\t\t\n \t\t } else {\n \t\t\t\t// out.print(\"Please enter at least 50 characters for the tweet content.\");\n \t\t \t// TWEET CONTENT NOT LONG ENOUGH\n \t\t\t}\n }\n responseObject = responseObject.substring(0, responseObject.length()-1);\n out.print(responseObject + \"]}\");\n } catch (TwitterException te) {\n te.printStackTrace();\n System.out.println(\"Failed to get timeline: \" + te.getMessage());\n System.exit(-1);\n }\n }",
"private void loadUserName() {\n\t\tAsyncTaskHelper.create(new AsyncMethods<String>() {\n\n\t\t\t@Override\n\t\t\tpublic String doInBackground() {\n\t\t\t\tUser user = new User();\n\t\t\t\tuser.setId(savedGoal.getGoal().getUserId());\n\t\t\t\treturn ClientUserManagement.getUsernameByUserId(user);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onDone(String value, long ms) {\n\t\t\t\tmGoalOwner.setText(value);\n\t\t\t}\n\t\t});\n\n\t}",
"private void getTeacherDetails() {\n\t\tString tag_string_req = \"req_login\";\n\n\t\tpDialog.setMessage(\"Please wait ...\");\n\t\tshowDialog();\n\n\t\tStringRequest strReq = new StringRequest(Request.Method.GET,\n\t\t\t\tAppConfig.BASE_URL + \"viewprofilemembers/\" + User_id,\n\t\t\t\tnew Response.Listener<String>() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onResponse(String response) {\n\t\t\t\t\t\tLog.d(TAG, \"Login Response: \" + response.toString());\n\t\t\t\t\t\thideDialog();\n\n\t\t\t\t\t\ttry {\n\n\t\t\t\t\t\t\tJSONObject json = new JSONObject(response);\n\t\t\t\t\t\t\tJSONObject resp = json.getJSONObject(\"response\");\n\t\t\t\t\t\t\tJSONArray studentdetails = resp\n\t\t\t\t\t\t\t\t\t.getJSONArray(\"users\");\n\n\t\t\t\t\t\t\tfor (int i = 0; i < studentdetails.length(); i++) {\n\n\t\t\t\t\t\t\t\tJSONObject c = studentdetails.getJSONObject(i);\n\n\t\t\t\t\t\t\t\ttFirstame = c.getString(\"firstname\");\n\n\t\t\t\t\t\t\t\ttLastname = c.getString(\"lastname\");\n\t\t\t\t\t\t\t\ttaddress = c.getString(\"address\");\n\t\t\t\t\t\t\t\t// tphone = c1.getString(\"phone1\");\n\t\t\t\t\t\t\t\ttmobile = c.getString(\"mobile\");\n\t\t\t\t\t\t\t\ttemail = c.getString(\"email\");\n\t\t\t\t\t\t\t\ttusername = c.getString(\"username\");\n\t\t\t\t\t\t\t\ttpassword = c.getString(\"password\");\n\t\t\t\t\t\t\t\ttqualification = c.getString(\"education\");\n\t\t\t\t\t\t\t\tthobbies = c.getString(\"hobbies\");\n\n\t\t\t\t\t\t\t\tuPhotopath = c.getString(\"photo\");\n\n\t\t\t\t\t\t\t\t//tname.setText(tFirstame + \" \" + tLastname);\n\t\t\t\t\t\t\t\ttFname.setText(tFirstame);\n\t\t\t\t\t\t\t\t//tLname.setHint(tLastname);\n\t\t\t\t\t\t\t\ttAddress.setText(taddress);\n\t\t\t\t\t\t\t\t// tPhone.setHint(tphone);\n\t\t\t\t\t\t\t\ttMobile.setText(tmobile);\n\t\t\t\t\t\t\t\ttEmail.setText(temail);\n\t\t\t\t\t\t\t\ttUsername.setText(tusername);\n\t\t\t\t\t\t\t\ttPassword.setText(tpassword);\n\t\t\t\t\t\t\t\ttQualification.setText(tqualification);\n\t\t\t\t\t\t\t\ttHobbies.setText(thobbies);\n\t\t\t\t\t\t\t\tif (uPhotopath != null) {\n\n\n\n\n\n\t\t\t\t\t\t\t\t\tnew DownloadImageTask(iv)\n\t\t\t\t\t\t\t\t\t\t\t.execute(AppConfig.CLIENT_URL\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ \"../uploads/\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ uPhotopath);\n\n\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tToast.makeText(getApplicationContext(),\n\t\t\t\t\t\t\t\t\t\t\t\"Sorry there is no Image\",\n\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// iv.setImageURI(uPhotopath);\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t * else if (i == 1) { JSONArray studentnoArray = c\n\t\t\t\t\t\t\t * .getJSONArray(\"teaching_sub\");\n\t\t\t\t\t\t\t * \n\t\t\t\t\t\t\t * for (int k = 0; k < studentnoArray.length(); k++)\n\t\t\t\t\t\t\t * { JSONObject c2 = studentnoArray\n\t\t\t\t\t\t\t * .getJSONObject(k); String assign_class = c2\n\t\t\t\t\t\t\t * .getString(\"ClassName\"); String subject = c2\n\t\t\t\t\t\t\t * .getString(\"SubjectName\"); tteaching_sub =\n\t\t\t\t\t\t\t * assign_class + \"-\" + subject;\n\t\t\t\t\t\t\t * teachingSub.add(tteaching_sub); } }\n\t\t\t\t\t\t\t */\n\n\t\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}, new Response.ErrorListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onErrorResponse(VolleyError error) {\n\t\t\t\t\t\tLog.e(TAG, \"Data Error: \" + error.getMessage());\n\t\t\t\t\t\tToast.makeText(getApplicationContext(),\n\t\t\t\t\t\t\t\terror.getMessage(), Toast.LENGTH_LONG).show();\n\t\t\t\t\t\thideDialog();\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t// Adding request to request queue\n\t\tAppController.getInstance().addToRequestQueue(strReq, tag_string_req);\n\n\t}",
"@Override\n\t\t\t\t\t\t\t\tpublic void onCompleted(GraphUser user,\n\t\t\t\t\t\t\t\t\t\tResponse response) {\n\t\t\t\t\t\t\t\t\tif (user != null) {\n\n\t\t\t\t\t\t\t\t\t\tTextView welcome = (TextView) findViewById(R.id.welcome);\n\t\t\t\t\t\t\t\t\t\twelcome.setText(\"Hello \"\n\t\t\t\t\t\t\t\t\t\t\t\t+ user.getName() + \"!\");\n\t\t\t\t\t\t\t\t\t\tTextView username = (TextView) findViewById(R.id.labelUsername);\n\t\t\t\t\t\t\t\t\t\tusername.setText(user.getUsername());\n\t\t\t\t\t\t\t\t\t\tTextView firstname = (TextView) findViewById(R.id.labelFirstName);\n\t\t\t\t\t\t\t\t\t\tfirstname.setText(user.getFirstName());\n\t\t\t\t\t\t\t\t\t\tTextView lastname = (TextView) findViewById(R.id.labelLastName);\n\t\t\t\t\t\t\t\t\t\tlastname.setText(user.getLastName());\n\t\t\t\t\t\t\t\t\t\tTextView birthday = (TextView) findViewById(R.id.labelBirthday);\n\t\t\t\t\t\t\t\t\t\tbirthday.setText(user.getBirthday());\n\t\t\t\t\t\t\t\t\t\tTextView location = (TextView) findViewById(R.id.labelLocation);\n\t\t\t\t\t\t\t\t\t\tlocation.setText(user.getLocation()\n\t\t\t\t\t\t\t\t\t\t\t\t.getProperty(\"name\").toString());\n\t\t\t\t\t\t\t\t\t\t// location.setText(user.asMap().get(\"location\").toString());\n\t\t\t\t\t\t\t\t\t\tTextView gender = (TextView) findViewById(R.id.labelGender);\n\t\t\t\t\t\t\t\t\t\tgender.setText(user.asMap()\n\t\t\t\t\t\t\t\t\t\t\t\t.get(\"gender\").toString());\n\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}",
"private void getProfileInformation() {\n try {\n if (Plus.PeopleApi.getCurrentPerson(mGoogleApiClient) != null) {\n Person currentPerson = Plus.PeopleApi\n .getCurrentPerson(mGoogleApiClient);\n String personName = currentPerson.getDisplayName();\n String personPhotoUrl = currentPerson.getImage().getUrl();\n String personGooglePlusProfile = currentPerson.getUrl();\n String email = Plus.AccountApi.getAccountName(mGoogleApiClient);\n\n Log.e(TAG, \"Name: \" + personName + \", plusProfile: \"\n + personGooglePlusProfile + \", email: \" + email\n + \", Image: \" + personPhotoUrl);\n\n Toast.makeText(context, personName + \"\\n\" + email, Toast.LENGTH_SHORT).show();\n\n /*txtName.setText(personName);\n txtEmail.setText(email);*/\n\n // by default the profile url gives 50x50 px image only\n // we can replace the value with whatever dimension we want by\n // replacing sz=X\n /*personPhotoUrl = personPhotoUrl.substring(0,\n personPhotoUrl.length() - 2)\n + PROFILE_PIC_SIZE;\n\n new LoadProfileImage(imgProfilePic).execute(personPhotoUrl);*/\n\n } else {\n Toast.makeText(context,\n \"Person information is null\", Toast.LENGTH_LONG).show();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"private void getUserDetailsFromFB() {\n Bundle parameters = new Bundle();\n parameters.putString(\"fields\", \"email,name,picture,first_name,last_name,gender,timezone,verified\");\n new GraphRequest(\n AccessToken.getCurrentAccessToken(),\n \"/me\",\n parameters,\n HttpMethod.GET,\n new GraphRequest.Callback() {\n @Override\n public void onCompleted(GraphResponse response) {\n //Handle the result here\n try {\n email = response.getJSONObject().getString(\"email\");\n name = response.getJSONObject().getString(\"name\");\n timezone = response.getJSONObject().getString(\"timezone\");\n firstName = response.getJSONObject().getString(\"first_name\");\n lastName = response.getJSONObject().getString(\"last_name\");\n gender = response.getJSONObject().getString(\"gender\");\n isVerified = response.getJSONObject().getBoolean(\"verified\");\n\n JSONObject picture = response.getJSONObject().getJSONObject(\"picture\");\n JSONObject data = picture.getJSONObject(\"data\");\n\n //get the 50X50 profile pic they send us\n String pictureURL = data.getString(\"url\");\n\n new ProfilePicAsync(pictureURL,1).execute();\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }\n }\n ).executeAsync();\n }",
"public void facebookProfile()\n\t{\n\t\tPreferences preferences = new Preferences(getActivity());\n\t\tString accessToken = preferences.getFacebookAccessToken();\n\t\tlong expiration = preferences.getFacebookAccessExpiration();\n\n\t\tif(accessToken != null) mFacebook.setAccessToken(accessToken);\n\t\tif(expiration != 0) mFacebook.setAccessExpires(expiration);\n\t\t\n\t\tif(mFacebook.isSessionValid())\n\t\t{\n\t\t\t// show progress in action bar\n\t\t\tshowActionBarProgress(true);\n\t\t\t\n\t\t\tmAsyncFacebookRunner.request(\"me\", new RequestListener()\n\t\t\t{\n\t\t\t\t@Override\n\t\t\t\tpublic void onComplete(final String response, Object state)\n\t\t\t\t{\n\t\t\t\t\t// TODO: run callbacks in TaskFragment.runTaskCallback()\n\n\t\t\t\t\tLogcat.d(\"Fragment.facebookProfile().onComplete(): \" + response);\n\n\t\t\t\t\tgetActivity().runOnUiThread(new Runnable()\n\t\t\t\t\t{\n\t\t\t\t\t\tpublic void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// hide progress in action bar\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void onFacebookError(final FacebookError e, Object state)\n\t\t\t\t{\n\t\t\t\t\tLogcat.d(\"Fragment.facebookProfile().onFacebookError(): \" + e.getErrorType() + \" / \" + e.getLocalizedMessage() + \" / \" + e.getMessage());\n\n\t\t\t\t\tgetActivity().runOnUiThread(new Runnable()\n\t\t\t\t\t{\n\t\t\t\t\t\tpublic void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// hide progress in action bar\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tif(e.getMessage()!=null) Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onIOException(IOException e, Object state)\n\t\t\t\t{\n\t\t\t\t\tLogcat.d(\"Fragment.facebookProfile().onIOException()\");\n\n\t\t\t\t\tgetActivity().runOnUiThread(new Runnable()\n\t\t\t\t\t{\n\t\t\t\t\t\tpublic void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// hide progress in action bar\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tToast.makeText(getActivity(), R.string.global_server_fail_toast, Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onFileNotFoundException(FileNotFoundException e, Object state)\n\t\t\t\t{\n\t\t\t\t\tLogcat.d(\"Fragment.facebookProfile().onFileNotFoundException()\");\n\t\t\t\t\t\n\t\t\t\t\tgetActivity().runOnUiThread(new Runnable()\n\t\t\t\t\t{\n\t\t\t\t\t\tpublic void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// hide progress in action bar\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tToast.makeText(getActivity(), R.string.global_server_fail_toast, Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onMalformedURLException(MalformedURLException e, Object state)\n\t\t\t\t{\n\t\t\t\t\tLogcat.d(\"Fragment.facebookProfile().onMalformedURLException()\");\n\n\t\t\t\t\tgetActivity().runOnUiThread(new Runnable()\n\t\t\t\t\t{\n\t\t\t\t\t\tpublic void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// hide progress in action bar\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tToast.makeText(getActivity(), R.string.global_server_fail_toast, Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\telse\n\t\t{\n\t\t\tToast.makeText(getActivity(), \"You are logged out.\", Toast.LENGTH_LONG).show();\n\t\t}\n\t}",
"@Override\n public void success(Result<User> userResult) {\n User user = userResult.data;\n\n //Getting the profile image url\n String profileImage = user.profileImageUrl.replace(\"_normal\", \"\");\n String followers = String.valueOf(user.followersCount);\n String description = user.description;\n\n\n //Creating an Intent\n Intent intent = new Intent(MainActivity.this, TwitterActivity.class);\n\n //Adding the values to intent\n intent.putExtra(TwitterActivity.TWITTER_USER_NAME, username);\n intent.putExtra(TwitterActivity.TWITTER_USER_PROFILE, profileImage);\n intent.putExtra(TwitterActivity.TWITTER_USER_FOLLOWERS, followers);\n intent.putExtra(TwitterActivity.TWITTER_USER_DESC,description);\n\n //Starting intent\n startActivity(intent);\n }",
"private void retrieveProfile() {\r\n\r\n FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();\r\n\r\n if (user == null) {\r\n return;\r\n }\r\n\r\n String userId = user.getUid();\r\n String email = user.getEmail();\r\n DocumentReference reference = mFirebaseFirestore.collection(\"users\").document(userId);\r\n reference.get().addOnCompleteListener(new OnCompleteListener<DocumentSnapshot>() {\r\n @Override\r\n public void onComplete(@NonNull Task<DocumentSnapshot> task) {\r\n if (task.isSuccessful()) {\r\n DocumentSnapshot documentSnapshot = task.getResult();\r\n mTextViewName.setText((CharSequence) documentSnapshot.get(\"name\"));\r\n mTextViewContact.setText((CharSequence) documentSnapshot.get(\"contact\"));\r\n mTextViewEstate.setText((CharSequence) documentSnapshot.get(\"estate\"));\r\n mTextViewHouseNo.setText((CharSequence) documentSnapshot.get(\"houseno\"));\r\n }\r\n Toast.makeText(Testing.this, \"Profile data loaded successfully!\", Toast.LENGTH_LONG).show();\r\n }\r\n })\r\n .addOnFailureListener(new OnFailureListener() {\r\n @Override\r\n public void onFailure(@NonNull Exception e) {\r\n Toast.makeText(Testing.this, \"Error fetching profile data. Check your internet connection!\" + e.toString(), Toast.LENGTH_LONG).show();\r\n }\r\n });\r\n\r\n }",
"public void getFriend(String Screen_Name) {\n\t\tPagableResponseList<User> statuses = null;\n\n\t\ttry {\n\t\t\tResponseList<Status> userinfo = twitter.getUserTimeline(Screen_Name);\n\t\t\tstatuses = twitter.getFriendsList(Screen_Name, -1, 200);\n\t\t\tfor (User newUser : statuses) {\n\t\t\t\tdb.insertuser(newUser); // return true if the User was inserted\n\t\t\t\tdb.insert_User_Following(userinfo.get(0).getUser().getId(), newUser.getId());\n\t\t\t}\n\t\t\tdb.updateisCompelet(userinfo.get(0).getUser().getId());\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}",
"public UserModel getUserProfile(){\n\n UserAPI userAPI = RetrofitUrl.getInstance().create(UserAPI.class);\n Call<UserModel> usersCall = userAPI.getUserProfile(RetrofitUrl.token);\n\n usersCall.enqueue(new Callback<UserModel>() {\n @Override\n public void onResponse(Call<UserModel> call, Response<UserModel> response) {\n if(!response.isSuccessful()){\n Toast.makeText(MainActivity.this, \"Error loading profile!!\", Toast.LENGTH_SHORT).show();\n return;\n }\n userProfile = response.body();\n showdetail(userProfile.getFullName());\n getBalanceDetail(userProfile);\n refresh(5000);\n }\n\n @Override\n public void onFailure(Call<UserModel> call, Throwable t) {\n Toast.makeText(MainActivity.this, \"Error loading profile...\", Toast.LENGTH_SHORT).show();\n\n }\n });\n return userProfile;\n }",
"private void readInfoUser() {\n\n final DatabaseReference reference = FirebaseDatabase.getInstance().getReference().child(\"Users\")\n .child(mAuth.getCurrentUser().getUid());\n reference.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot snapshot) {\n String txtName = Objects.requireNonNull(snapshot.child(\"name\").getValue()).toString();\n String txtEmail = Objects.requireNonNull(snapshot.child(\"email\").getValue()).toString();\n String imgProfile = Objects.requireNonNull(snapshot.child(\"imageurlProfile\").getValue().toString());\n String txtBio = Objects.requireNonNull(snapshot.child(\"bio\").getValue().toString());\n\n userNameProfile.setText(txtName);\n userEmailProfile.setText(txtEmail);\n userBioProfile.setText(txtBio);\n\n if (!imgProfile.equals(\"default\")) {\n Picasso.get()\n .load(imgProfile)\n .placeholder(R.drawable.profile)\n .error(R.drawable.profile)\n .into(proImage);\n\n }else {\n proImage.setImageResource(R.drawable.profile);\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError error) {\n\n }\n });\n }",
"public void login(Result<TwitterSession> result) {\n TwitterSession session = result.data;\n\n //Getting the username from session\n final String username = session.getUserName();\n\n\n //This code will fetch the profile image URL\n //Getting the account service of the user logged in\n TwitterCore.getInstance().getApiClient(session).getAccountService().verifyCredentials(false, true, false).enqueue(new Callback<User>() {\n @Override\n public void failure(TwitterException e) {\n //If any error occurs handle it here\n }\n\n @Override\n public void success(Result<User> userResult) {\n //If it succeeds creating a User object from userResult.data\n User user = userResult.data;\n\n //Getting the profile image url\n String profileImage = user.profileImageUrl.replace(\"_normal\", \"\");\n String followers = String.valueOf(user.followersCount);\n String description = user.description;\n\n\n //Creating an Intent\n Intent intent = new Intent(MainActivity.this, TwitterActivity.class);\n\n //Adding the values to intent\n intent.putExtra(TwitterActivity.TWITTER_USER_NAME, username);\n intent.putExtra(TwitterActivity.TWITTER_USER_PROFILE, profileImage);\n intent.putExtra(TwitterActivity.TWITTER_USER_FOLLOWERS, followers);\n intent.putExtra(TwitterActivity.TWITTER_USER_DESC,description);\n\n //Starting intent\n startActivity(intent);\n }\n });\n\n }",
"public void getUserTimeline(Long uid, Long since, Long max, AsyncHttpResponseHandler handler) {\n if (uid == null) {\n Log.i(\"DEBUG\", \"Invalid user id...\");\n return;\n }\n String apiUrl = getApiUrl(\"statuses/user_timeline.json\");\n // Specify params\n RequestParams params = new RequestParams();\n params.put(\"user_id\", uid);\n params.put(\"count\", 25);\n if (since != null) {\n params.put(\"since_id\", since);\n } else if (max != null) {\n params.put(\"max_id\", max);\n }\n // Execute the request\n getClient().get(apiUrl, params, handler);\n }",
"@Override\n public void onBindViewHolder(@NonNull ViewHolder holder, int position) {\n // get the data according to position\n Tweet tweet = mTweets.get(position);\n\n // populate the views according to this data\n holder.tvUsername.setText(tweet.user.name);\n holder.tvBody.setText(tweet.body);\n holder.tvScreenName.setText(\"@\" + tweet.user.screenName);\n holder.tvTime.setText(tweet.createdAt);\n holder.faveCount.setText(tweet.faveCount);\n holder.rtCount.setText(tweet.rtCount);\n\n // load in profile picture with Glide\n GlideApp.with(context)\n .load(tweet.user.profileImageUrl)\n .transform(new RoundedCornersTransformation(15, 0))\n .into(holder.ivProfPic);\n }",
"private void getCurrentUserDetails() {\n Query query = dbReference.orderByChild(\"email\").equalTo(user.getEmail());\n query.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n\n //check until required data get\n for (DataSnapshot ds : dataSnapshot.getChildren()) {\n //get Data\n String name = \"\" + ds.child(\"name\").getValue();\n String email = \"\" + ds.child(\"email\").getValue();\n String pImage = \"\" + ds.child(\"image\").getValue();\n language = \"\" + ds.child(\"language\").getValue();\n String location = \"\" + ds.child(\"location\").getValue();\n skills = \"\" + ds.child(\"skills\").getValue();\n links = \"\" + ds.child(\"links\").getValue();\n description = \"\" + ds.child(\"description\").getValue();\n\n //set Data to UI\n profNameTv.setText(name);\n linksListTv.setText(links);\n langListTv.setText(language);\n locationTv.setText(location);\n skillsListTv.setText(skills);\n descriptionTv.setText(description);\n\n\n try {\n //if image received, set\n Picasso.with(UserProfile.this)\n .load(pImage)\n .placeholder(R.drawable.ic_launcher_background)\n .into(profileIv);\n //Picasso.get().load(pImage).into(profileIv);\n } catch (Exception e) {\n //default image\n // Picasso.get().load(R.drawable.ic_launcher_background).into(profileIv);\n }\n }\n\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n }",
"public void loadUsers(String username, String mainUsername) {\n\n UserBasicService userBasicService =\n GitHubServiceGenerator.createService(UserBasicService.class);\n Call<List<UserBasic>> callUsers = userBasicService.getUsers(this.authHead,\n this.mainUsername, \"following\");\n try {\n Response<List<UserBasic>> listResponse = callUsers.execute();\n if (listResponse.isSuccessful()) {\n this.mainUserFollowing = listResponse.body();\n\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n callUsers = userBasicService.getUsers(this.authHead, username, this.pageType);\n try {\n Response<List<UserBasic>> listResponse = callUsers.execute();\n if (listResponse.isSuccessful()) {\n this.users = listResponse.body();\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }",
"private void populateUserInfo() {\n User user = Session.getInstance().getUser();\n labelDisplayFirstname.setText(user.getFirstname());\n labelDisplayLastname.setText(user.getLastname());\n lblEmail.setText(user.getEmail());\n lblUsername.setText(user.getUsername());\n }",
"public void refresh(int milliseconds){\n final Handler handler = new Handler();\n\n final Runnable runnable = new Runnable() {\n @Override\n public void run() {\n getUserProfile();\n }\n };\n handler.postDelayed(runnable, milliseconds);\n }",
"private void loadList() {\n new MyAsyncTask(this, username, mainUsername, authHead, pageType,\n userList, view).execute(\"\");\n this.swipeContainer.setRefreshing(false);\n }",
"private void fetchUser() {\n UserFetcher userFetcher = new UserFetcher();\n userFetcher.setListener(this);\n userFetcher.getUser();\n }",
"@Override\n\t\t\tpublic void onCompleted(GraphUser user, Response response) {\n\t\t\t\tif (session == Session.getActiveSession()) {\n\t\t\t\t\tif (user != null) {\n\t\t\t\t\t\tuserID = String.valueOf(user.getId());\n\t\t\t\t\t\tLog.v(\"FB_ID\", userID);\n\t\t\t\t\t\t// Set the id for the ProfilePictureView\n\t\t\t\t\t\t// view that in turn displays the profile picture.\n\t\t\t\t\t\tprofilePictureView.setProfileId(user.getId());\n\t\t\t\t\t\t// Set the Textview's text to the user's name.\n\t\t\t\t\t\tuserNameView.setText(user.getName());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (response.getError() != null) {\n\t\t\t\t\t// Handle errors, will do so later.\n\t\t\t\t\tuserNameView.setText(response.getError().toString());\n\t\t\t\t}\n\t\t\t}",
"private void callUpdateProfile() {\n String userStr = CustomSharedPreferences.getPreferences(Constants.PREF_USER_LOGGED_OBJECT, \"\");\n Gson gson = new Gson();\n User user = gson.fromJson(userStr, User.class);\n LogUtil.d(\"QuyNT3\", \"Stored profile:\" + userStr +\"|\" + (user != null));\n //mNameEdt.setText(user.getName());\n String id = user.getId();\n String oldPassword = mOldPassEdt.getText().toString();\n String newPassword = mNewPassEdt.getText().toString();\n String confirmPassword = mConfirmPassEdt.getText().toString();\n String fullName = mNameEdt.getText().toString();\n String profileImage = user.getProfile_image();\n UpdateUserProfileRequest request = new UpdateUserProfileRequest(id, fullName, profileImage,\n oldPassword, newPassword, confirmPassword);\n request.setListener(callBackEvent);\n new Thread(request).start();\n }",
"private void getData(){\n\n // Fetch current user data (error checking for blank fields)\n final String username = myKinveyClient.user().getUsername();\n final Query queryUser = new Query().equals(\"userID\", username);\n\n final AsyncAppData<UserEntity> myUsers = myKinveyClient.appData(\"users\", UserEntity.class);\n\n myUsers.get(queryUser, new KinveyListCallback<UserEntity>(){\n @Override\n public void onSuccess(UserEntity[] userEntities){\n if(userEntities.length != 0){\n name.setText(userEntities[0].getFirstName() + \" \" + userEntities[0].getLastName());\n location.setText(userEntities[0].getCity() + \", \" + userEntities[0].getProvince());\n about.setText(userEntities[0].getAbout());\n\n numDriven.setText(String.format(Locale.US, \"%d Rides Driven\",\n userEntities[0].getNumTimesRider()));\n numPassenger.setText(String.format(Locale.US, \"%d Time Passenger\",\n userEntities[0].getNumTimesPassenger()));\n\n /**\n * Define a Kinvey callback to load the images. I'm pretty sure this is synchronous, meaning\n * that there will be some delay from when the page is loaded to grabbing the actual images.\n */\n myKinveyClient.linkedData(\"users\", UserEntity.class).getEntity(userEntities[0].getUserID(), new KinveyClientCallback<UserEntity>() {\n @Override\n public void onSuccess(UserEntity userEntity) {\n try {\n\n /*\n\n NOTE: PLEASE SEE THE BELOW HELPER METHOD!\n\n */\n FileOutputStream fStream;\n ByteArrayOutputStream bos;\n Bitmap bmp;\n java.io.FileInputStream in;\n\n // Load the profile picture\n fStream = getApplicationContext().openFileOutput(\"profilePhoto.png\", Context.MODE_PRIVATE);\n bos = userEntity.getFile(\"profilePhoto\").getOutput();\n\n bos.writeTo(fStream);\n bos.flush();\n fStream.flush();\n bos.close();\n fStream.close();\n\n in = openFileInput(\"profilePhoto.png\");\n bmp = BitmapFactory.decodeStream(in);\n profilePortrait.setImageBitmap(bmp);\n\n // Load the cover\n fStream = getApplicationContext().openFileOutput(\"coverPhoto.png\", Context.MODE_PRIVATE);\n bos = userEntity.getFile(\"coverPhoto\").getOutput();\n\n bos.writeTo(fStream);\n bos.flush();\n fStream.flush();\n bos.close();\n fStream.close();\n\n in = openFileInput(\"coverPhoto.png\");\n bmp = BitmapFactory.decodeStream(in);\n profileBg.setImageBitmap(bmp);\n\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n\n }\n\n @Override\n public void onFailure(Throwable throwable) {\n\n }\n }, null);\n } else {\n name.setText(\"Default First Last\");\n location.setText(\"DefaultCity, DefaultProvince\");\n about.setText(\"Try and update your profile!\");\n numDriven.setText(\"0 times\");\n numPassenger.setText(\"0 times\");\n }\n }\n\n @Override\n public void onFailure(Throwable throwable) {\n Log.e(\"TAG\", \"failed to find in users\", throwable);\n }\n });\n\n }",
"@Override\n public void onCompleted(GraphResponse response) {\n try {\n email = response.getJSONObject().getString(\"email\");\n name = response.getJSONObject().getString(\"name\");\n timezone = response.getJSONObject().getString(\"timezone\");\n firstName = response.getJSONObject().getString(\"first_name\");\n lastName = response.getJSONObject().getString(\"last_name\");\n gender = response.getJSONObject().getString(\"gender\");\n isVerified = response.getJSONObject().getBoolean(\"verified\");\n\n JSONObject picture = response.getJSONObject().getJSONObject(\"picture\");\n JSONObject data = picture.getJSONObject(\"data\");\n\n //get the 50X50 profile pic they send us\n String pictureURL = data.getString(\"url\");\n\n new ProfilePicAsync(pictureURL,1).execute();\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }",
"private void downloadUserProfileImage() {\n if (NetworkUtils.isNetworkConnected(this)) {\n StorageReference storageReference = new UserStorage(userId).getChildFolder(Profile.PROFILE_IMAGE_PATH);\n Utils.downloadImage(storageReference, profileImage, this);\n }\n }",
"private void getUserImage(){\r\n \t//setProgressBarIndeterminateVisibility(true);\r\n \t\r\n \tusername=null;\r\n \tfor(int i=0; i<senderList.size(); i++) {\t// kovetkezo felhasznalo kepe\r\n \t\tString str=senderList.get(i);\r\n \t\tif (!userImage.containsKey(str)) {\r\n \t\t\tusername=str;\r\n \t\t\tbreak;\r\n \t\t}\r\n \t}\r\n \t\r\n \tif (username==null) return;\r\n \t\r\n\t String url = \"ImageDownload?size=medium&username=\" + username +\r\n\t \t\t\t\t\t\t \"&ssid=\" + UserInfo.getSSID();\r\n\t downloadUserImage = new HttpGetByteConnection(url, mHandler, TASK_GETUSERIMAGE);\r\n\t downloadUserImage.start();\r\n }",
"public void loadProfile() {\n SharedPreferences prefs = this.getSharedPreferences(\"MYPREFERENCES\", Context.MODE_PRIVATE);\n Intent intent = this.getIntent();\n\n // Email del perfil a cargar\n if (intent.getStringExtra(EMAIL_USER_PROFILE) != null) {\n emailProfile = intent.getStringExtra(EMAIL_USER_PROFILE);\n } else {\n emailProfile = \"\";\n }\n\n // Email del usuario logueado\n if (prefs.contains(LoginGoogleActivity.USER_KEY)) {\n emailLogin = prefs.getString(LoginGoogleActivity.USER_KEY, \"\");\n }\n\n userName = (TextView) this.findViewById(R.id.PublicCommentNameProfile);\n imgProfile = (ImageView) this.findViewById(R.id.PublicCommentImgProfile);\n\n\n // Compruebo si el perfil es del usuario logueado o de otro\n if ((emailProfile.isEmpty())) {\n // perfil usuario logueado\n if (prefs.contains(LoginGoogleActivity.USER_NAME)) {\n userName.setText(prefs.getString(LoginGoogleActivity.USER_NAME, \"\"));\n }\n if (prefs.contains(LoginGoogleActivity.USER_URL)) {\n new DownloadImageTask(imgProfile).execute(prefs.getString(LoginGoogleActivity.USER_URL, \"\"));\n }\n\n // extraer lista de comentarios\n loadCommentsList(emailLogin);\n\n }else if(emailProfile.compareTo(emailLogin) == 0 )\n {\n Intent i = new Intent(this, MenuActivity.class);\n startActivity(i);\n }\n else {\n try {\n\n String formatEmail = emailProfile.replaceAll(\"\\\\.\", \"___\");\n String userGet = new RestServiceGet().execute(\"http://\"+IP+\":8080/InftelSocialNetwork-web/webresources/users/\" + formatEmail).get();\n\n if(!userGet.isEmpty() && userGet != null) {\n\n Gson gson = new Gson();\n JSONObject json = null;\n JSONArray userArray = new JSONArray(userGet);\n\n for(int i=0; i<userArray.length();i++ )\n {\n json = new JSONObject(userArray.get(i).toString());\n\n }\n\n User perfil = gson.fromJson(json.toString(), User.class);\n\n\n userName.setText(perfil.getName());\n new DownloadImageTask(imgProfile).execute(perfil.getImageUrl(), \"\");\n\n loadBotonSeguir(emailLogin, emailProfile);\n loadCommentsList(emailProfile);\n }\n\n } catch (InterruptedException e) {\n e.printStackTrace();\n } catch (ExecutionException e) {\n e.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n\n }",
"@Override\n public void run() {\n try {\n\n try {\n mLastLocation = LocationServices.FusedLocationApi.getLastLocation(\n googleApiClient);\n } catch (SecurityException e) {\n e.printStackTrace();\n }\n\n if (mLastLocation != null) {\n\n\n Query query = new Query(\"India\"); //\n\n GeoLocation location = new GeoLocation(mLastLocation.getLatitude(), mLastLocation.getLongitude()); //latitude, longitude\n\n query.setGeoCode(location, 5, Query.MILES); //location, radius, unit\n query.setSinceId(latestTweetId);\n QueryResult result;\n\n do {\n result = twitter.search(query);\n\n for (twitter4j.Status tweet : result.getTweets()) {\n\n if (tweet.getGeoLocation() != null) {\n\n newTweets.add(tweet);\n long id = tweet.getId();\n\n if (id > latestTweetId) {\n\n latestTweetId = id;\n }\n\n }\n\n System.out.println(\"@\" + tweet.getUser().getScreenName() + \" - \" + tweet.getText());\n }\n\n } while ((query = result.nextQuery()) != null);\n\n handler.sendEmptyMessage(1);\n }\n\n }catch(TwitterException te){\n System.out.println(\"Failed to search tweets: \" + te.getMessage());\n }\n\n\n\n\n\n }",
"protected void onPostExecute(String file_url) {\n\t\t\tpDialog.dismiss();\r\n\t\t\tTextView[] tv = new TextView[3];\r\n\t\t\ttv[0] = (TextView) v.findViewById(R.id.UserName);\r\n\t\t\ttv[1] = (TextView) v.findViewById(R.id.UserSex);\r\n\t\t\ttv[2] = (TextView) v.findViewById(R.id.Userlocation);\r\n\t\t\t// for(int i=0;i<memberlist.size();i++)\r\n\t\t\t// {\r\n\t\t\t// tv[i].setText(memberlist.get(i).toString());\r\n\t\t\t// }\r\n\t\t\tfor (HashMap<String, String> map : memberlist) {\r\n\t\t\t\tObject tagNickName = map.get(TAG_NICKNAME);\r\n\t\t\t\tObject tagSex = map.get(TAG_SEX);\r\n\t\t\t\tObject tagAddress = map.get(TAG_ADDRESS);\r\n\t\t\t\ttv[0].setText(tagNickName.toString());\r\n\t\t\t\ttv[1].setText(tagSex.toString());\r\n\t\t\t\ttv[2].setText(tagAddress.toString());\r\n\t\t\t}\r\n\r\n\t\t\t// updating UI from Background Thread\r\n\r\n\t\t}",
"@Override\n public void userLoaded(User user) {\n nameText.setText(user.getDisplayName());\n\n String profileImageUrl = user.getDisplayPhoto();\n if (profileImageUrl != null) {\n Glide.with(messageImage.getContext())\n .load(profileImageUrl)\n .into(profileImage);\n }\n }",
"public Show_Tweet(String userid,Tweets tweet) {\n initComponents();\n \n jLabel_username.setText(userid);\n String Name = SQL.user.GetName(userid);\n jLabel_name.setText(Name);\n \n jLabel_Name.setText(tweet.User.Name);\n jLabel_Username.setText(tweet.User.Username);\n jLabel_Tweetid.setText(String.valueOf(tweet.TweetId));\n \n jTextArea.setText(tweet.Text);\n List<Users> list1 = SQL.user.GetLikers(tweet.TweetId);\n jLabel_NumberofLikes.setText(String.valueOf(list1.size()));\n List<Tweets> list2 = SQL.user.GetReplies(tweet.TweetId);\n jLabel_NumberofReplies.setText(String.valueOf(list2.size()));\n }",
"@Override\n\t\t\t\tpublic void onComplete(final String response, Object state)\n\t\t\t\t{\n\n\t\t\t\t\tLogcat.d(\"Fragment.facebookProfile().onComplete(): \" + response);\n\n\t\t\t\t\tgetActivity().runOnUiThread(new Runnable()\n\t\t\t\t\t{\n\t\t\t\t\t\tpublic void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// hide progress in action bar\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}",
"public void loadUserProfile(AccessToken accessToken) {\n GraphRequest request = GraphRequest.newMeRequest(accessToken, new GraphRequest.GraphJSONObjectCallback() {\n public void onCompleted(JSONObject object, GraphResponse response) {\n try {\n String first_name = object.getString(\"first_name\");\n String last_name = object.getString(\"last_name\");\n String email = object.getString(\"email\");\n String str = \"https://graph.facebook.com/\" + object.getString(\"id\") + \"/picture?type=normal\";\n Intent intent = new Intent(LoginOptionActivity.this, HomeActivity.class);\n intent.putExtra(\"name\", first_name + \" \" + last_name + \"\\n\" + email);\n intent.addFlags(268468224);\n LoginOptionActivity.this.startActivity(intent);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n });\n Bundle parameters = new Bundle();\n parameters.putString(GraphRequest.FIELDS_PARAM, \"first_name,last_name,email,id\");\n request.setParameters(parameters);\n request.executeAsync();\n }",
"private void setProfileLayout() {\n if (mUser != null) {\n main_TXT_userName.setText(\"Hello \" + mUser.getFirstName() + \"!\");\n fusedLocationClient.getLastLocation()\n .addOnSuccessListener(this, new OnSuccessListener<Location>() {\n @Override\n public void onSuccess(Location location) {\n if (location != null) {\n Log.i(\"Locationnnn:::\", location.toString());\n //\n mWeatherAPIManager = new WeatherAPIManager(getApplicationContext(), weatherComponentsSetters, location.getLatitude(), location.getLongitude());\n\n }\n }\n });\n }\n }",
"@Override\r\n\t\tprotected void onPreExecute() {\r\n\t\t\tsuper.onPreExecute();\r\n\t\t\tpDialog = new ProgressDialog(ProfileActivity.this);\r\n\t\t\tpDialog.setMessage(\"Loading profile ...\");\r\n\t\t\tpDialog.setIndeterminate(false);\r\n\t\t\tpDialog.setCancelable(false);\r\n\t\t\tpDialog.show();\r\n\t\t}",
"public void onStatus(Status status) {\n String userName = status.getUser().getScreenName();\n String userId = Long.toString(status.getUser().getId());\n String messageTweet = status.getText();\n String imageUrl = status.getUser().getProfileImageURL();\n String lang = status.getUser().getLang();\n String timeZone = status.getUser().getTimeZone();\n String userLocation = status.getUser().getLocation();\n String time = tweetTime();\n\n makeJson(userId,userName,messageTweet,imageUrl, lang, timeZone, userLocation, time);\n \n}",
"@Override\n public void onRefresh() {\n if (!isSyncingData) {\n isSyncingData = true;\n isFirstLoad = false;\n\n mProgressBar.setVisibility(View.VISIBLE);\n mUserLayout.setVisibility(View.INVISIBLE);\n\n mUserImageView.setImageResource(0);\n mNameTextView.setText(\"\");\n mWebsiteTextView.setText(\"\");\n mBioLinearLayout.setVisibility(View.GONE);\n mBioTextView.setText(\"\");\n mCountsLinearLayout.setVisibility(View.GONE);\n mMediaCountTextView.setText(\"\");\n mFollowsTextView.setText(\"\");\n mFollowedByTextView.setText(\"\");\n mRecentMediaLinearLayout.setVisibility(View.GONE);\n mLikedMediaLinearLayout.setVisibility(View.GONE);\n\n if (NetworkUtils.isOnline(getContext())) {\n retrieveAllUserData();\n } else {\n Toast.makeText(getContext(), R.string.not_online, Toast.LENGTH_LONG).show();\n }\n }\n\n mUserSwipeRefreshLayout.setRefreshing(false);\n }",
"private void retrieveUsersRecentMedia() {\n UserService service = ServiceFactory.getInstagramUserService();\n service.getUsersRecentMedia(mAccessToken)\n .subscribeOn(Schedulers.io())\n .observeOn(AndroidSchedulers.mainThread())\n .subscribe(new Subscriber<Response<MediaResponse<ArrayList<Media>>>>() {\n @Override\n public void onCompleted() {\n }\n\n @Override\n public void onError(Throwable e) {\n Log.e(MY_USER_FRAGMENT, e.getLocalizedMessage());\n }\n\n @Override\n public void onNext(Response<MediaResponse<ArrayList<Media>>> response) {\n ResponseBody errorBody = response.errorBody();\n if (!response.isSuccessful() && errorBody != null) {\n try {\n Converter<ResponseBody, MediaResponse> errorConverter = ServiceFactory.getRetrofit().responseBodyConverter(MediaResponse.class, new Annotation[0]);\n MediaResponse mediaError = errorConverter.convert(response.errorBody());\n Toast.makeText(getContext(), mediaError.getMeta().getErrorMessage(), Toast.LENGTH_LONG).show();\n\n if (mediaError.getMeta().getErrorType().equals(getString(R.string.o_auth_error))) {\n oauthEventFired = true;\n EventBus.getDefault().post(new ExpiredOAuthEvent(true));\n }\n } catch (IOException e) {\n Log.e(MY_USER_FRAGMENT, \"There was a problem parsing the error response.\");\n }\n } else {\n showUsersRecentMedia(response.body().getData());\n }\n }\n });\n }",
"private void updateProfileViews() {\n if(profile.getmImageUrl()!=null && !profile.getmImageUrl().isEmpty()) {\n String temp = profile.getmImageUrl();\n Picasso.get().load(temp).into(profilePicture);\n }\n profileName.setText(profile.getFullName());\n phoneNumber.setText(profile.getPhoneNumber());\n address.setText(profile.getAddress());\n email.setText(profile.geteMail());\n initListToShow();\n }",
"private void loadUserList()\n\t{\n\t\tfinal ProgressDialog dia = ProgressDialog.show(this, null,\n\t\t\t\tgetString(R.string.alert_loading));\n\t\tParseUser.getQuery().whereNotEqualTo(\"username\", user.getUsername())\n\t\t\t\t.findInBackground(new FindCallback<ParseUser>() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void done(List<ParseUser> li, ParseException e) {\n\t\t\t\t\t\tdia.dismiss();\n\t\t\t\t\t\tif (li != null) {\n\t\t\t\t\t\t\tif (li.size() == 0)\n\t\t\t\t\t\t\t\tToast.makeText(UserList.this,\n\t\t\t\t\t\t\t\t\t\tR.string.msg_no_user_found,\n\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\n\t\t\t\t\t\t\tuList = new ArrayList<ParseUser>(li);\n\t\t\t\t\t\t\tListView list = (ListView) findViewById(R.id.list);\n\t\t\t\t\t\t\tlist.setAdapter(new UserAdapter());\n\t\t\t\t\t\t\tlist.setOnItemClickListener(new OnItemClickListener() {\n\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void onItemClick(AdapterView<?> arg0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tView arg1, int pos, long arg3) {\n\t\t\t\t\t\t\t\t\tstartActivity(new Intent(UserList.this,\n\t\t\t\t\t\t\t\t\t\t\tChat.class).putExtra(\n\t\t\t\t\t\t\t\t\t\t\tConst.EXTRA_DATA, uList.get(pos)\n\t\t\t\t\t\t\t\t\t\t\t\t\t.getUsername()));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tUtils.showDialog(\n\t\t\t\t\t\t\t\t\tUserList.this,\n\t\t\t\t\t\t\t\t\tgetString(R.string.err_users) + \" \"\n\t\t\t\t\t\t\t\t\t\t\t+ e.getMessage());\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t}",
"@Override\n public void run() {\n ArrayList<Tweet> tweets = getTweets();\n int numTweets = tweets.size();\n long id = tweets.get(numTweets - 1).mUid - 1;\n Log.d(TAG, \"Requested items id starting at id = \" + id);\n populateHomeTimelineFromId(id);\n }",
"@Override\n public void onLoadFinished(Loader<ResourceLoaderResult<UserContainer>> loader, ResourceLoaderResult<UserContainer> data) {\n super.onLoadFinished(loader, data);\n if (data.isSuccessful()) {\n bindProfileInfo(data.getResult().getUser());\n }\n }",
"private void retrieveProfileInformation() {\n StorageReference profileImageReference = storageReference.child(currentUser.getUid()).child(\"profile_image.jpg\");\n profileImageReference.getDownloadUrl().addOnSuccessListener(uri -> Picasso.get().load(uri).into(profileImage));\n\n //Existing Profile Information\n profileReference.child(currentUser.getUid()).addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot snapshot) {\n ProfileBean profileBean = snapshot.getValue(ProfileBean.class);\n if (profileBean != null) {\n //Account\n fullName.getEditText().setText(profileBean.getFullName());\n email.getEditText().setText(profileBean.getEmail());\n phone.getEditText().setText(profileBean.getPhone());\n summary.getEditText().setText(profileBean.getSummary());\n\n //Personal\n genderAtv.setText(profileBean.getGender(), false);\n birthDate.getEditText().setText(profileBean.getBirthDate());\n address.getEditText().setText(profileBean.getAddress());\n city.getEditText().setText(profileBean.getCity());\n state.getEditText().setText(profileBean.getState());\n pincode.getEditText().setText(profileBean.getPincode());\n\n //Education\n field.getEditText().setText(profileBean.getField());\n degreeAtv.setText(profileBean.getDegree(), false);\n institution.getEditText().setText(profileBean.getInstitution());\n eduCity.getEditText().setText(profileBean.getEduCity());\n eduState.getEditText().setText(profileBean.getEduState());\n stillStudying.setChecked(profileBean.isStillStudying());\n graduationDate.getEditText().setText(profileBean.getGraduationDate());\n\n //Work Experience\n jobTitle.getEditText().setText(profileBean.getJobTitle());\n jobCompany.getEditText().setText(profileBean.getCompany());\n jobLocation.getEditText().setText(profileBean.getLocation());\n jobExperience.getEditText().setText(String.valueOf(profileBean.getJobExperience()));\n jobDesc.getEditText().setText(profileBean.getJobDescription());\n stillWorking.setChecked(profileBean.isStillWorking());\n\n } else {\n Toast.makeText(getApplicationContext(), \"Something went wrong. Try again\", Toast.LENGTH_LONG).show();\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError error) {\n Toast.makeText(getApplicationContext(), \"Something went wrong. Try again\", Toast.LENGTH_LONG).show();\n }\n });\n\n }",
"private void getProfile(String username) {\n if (new AppCommonMethods(mContext).isNetworkAvailable()) {\n WLAPIcalls mAPIcall = new WLAPIcalls(mContext, getString(R.string.getProfile), this);\n mAPIcall.getProfile(username);\n } else {\n Toast.makeText(mContext, R.string.no_internet, Toast.LENGTH_SHORT).show();\n }\n }",
"private void getProfileInformation() {\n try {\n if (Plus.PeopleApi.getCurrentPerson(mGoogleApiClient) != null) {\n Person currentPerson = Plus.PeopleApi\n .getCurrentPerson(mGoogleApiClient);\n String personName = currentPerson.getDisplayName();\n String personPhotoUrl = currentPerson.getImage().getUrl();\n String personGooglePlusProfile = currentPerson.getUrl();\n String id = currentPerson.getId();\n String email = Plus.AccountApi.getAccountName(mGoogleApiClient);\n\n Log.e(TAG, \"Id: \"+id+\", Name: \" + personName + \", plusProfile: \"\n + personGooglePlusProfile + \", email: \" + email\n + \", Image: \" + personPhotoUrl);\n signInTask = new AsyncTask(mBaseActivity);\n signInTask.execute(id, email, personName);\n// SharedPreferences preferences = mBaseActivity.getSharedPreferences(\"com.yathams.loginsystem\", MODE_PRIVATE);\n// preferences.edit().putString(\"email\", email).putString(\"userName\", personName).commit();\n\n } else {\n Toast.makeText(getApplicationContext(),\n \"Person information is null\", Toast.LENGTH_LONG).show();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"@Override\n protected Void doInBackground(Void... params) {\n try {\n Query query = new Query(\"India\"); //\n\n GeoLocation location = new GeoLocation(mLastLocation.getLatitude(), mLastLocation.getLongitude()); //latitude, longitude\n\n query.setGeoCode(location, 1, Query.MILES); //location, radius, unit\n query.setSinceId(latestTweetId);\n QueryResult result;\n\n do {\n result = twitter.search(query);\n\n\n for (twitter4j.Status tweet : result.getTweets()) {\n\n if(tweet.getGeoLocation()!=null){\n\n newTweets.add(tweet);\n long id = tweet.getId();\n\n if(id>latestTweetId){\n\n latestTweetId = id;\n }\n\n }\n\n System.out.println(\"@\" + tweet.getUser().getScreenName() + \" - \" + tweet.getText());\n }\n\n } while ((query = result.nextQuery()) != null);\n\n } catch (TwitterException te) {\n System.out.println(\"Failed to search tweets: \" + te.getMessage());\n }\n return null;\n }",
"@Override\n public void run() {\n\n if (updated) {\n getWindow().clearFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE);\n Toast.makeText(ProfileActivity.this, \"Profile succesfully updated.\", Toast.LENGTH_SHORT).show();\n updated = false;\n finish();\n\n } else {\n\n try {\n JSONObject reader = new JSONObject(s);\n String email = reader.getString(\"email\");\n userMail = email;\n String username = reader.getString(\"name\");\n String firstName = reader.getString(\"first_name\");\n String lastName = reader.getString(\"last_name\");\n String phoneNumber = reader.getString(\"phone_number\");\n String urlImage = reader.getString(\"avatar\");\n firstname = (EditText) findViewById(R.id.firstnameT);\n if (firstName != \"null\")\n firstname.setText(firstName);\n else\n firstname.setText(\"\");\n\n lastname = (EditText) findViewById(R.id.lastnameT);\n if (lastName != \"null\")\n lastname.setText(lastName);\n else\n lastname.setText(\"\");\n\n phone = (EditText) findViewById(R.id.phoneT);\n if (phoneNumber != \"null\")\n phone.setText(phoneNumber);\n else\n phone.setText(\"\");\n\n if (urlImage != \"null\") {\n new DownloadImageTask((ImageView) findViewById(R.id.slika))\n .execute(\"https://wi-finder-server.herokuapp.com\" + urlImage);\n\n /* b = Base64.decode(imgBase64, Base64.DEFAULT);\n Bitmap decodedImage = BitmapFactory.decodeByteArray(b, 0, b.length);\n buttonphoto.setImageBitmap(decodedImage);*/\n\n }\n\n\n email1 = (EditText) findViewById(R.id.emailT);\n email1.setText(email);\n username1 = (EditText) findViewById(R.id.usernameT);\n username1.setText(username);\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }\n\n }",
"@Override\n protected String doInBackground(Void... voids) {\n jsonObject = new GetUser().makeHttpRequest(user_id);\n //Log.d(\"get\",Integer.toString(latestmsg));\n\n if(jsonObject != null) {\n try {\n status = jsonObject.getString(\"status\");\n } catch (JSONException e) {\n e.printStackTrace();\n }\n try {\n contact = jsonObject.getString(\"contact\");\n } catch (JSONException e) {\n e.printStackTrace();\n }\n return \"done\";\n }\n else\n return \"nothing\";\n }",
"@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tLoginInfo tInfo = ApiUtils.getUserDetail(loginInfo.id,\n\t\t\t\t\t\t\t\thandler);\n\t\t\t\t\t\tif (tInfo != null) {\n\t\t\t\t\t\t\tloginInfo.headimage = tInfo.headimage;\n\t\t\t\t\t\t\tloginInfo.mobile = tInfo.mobile;\n\t\t\t\t\t\t\tloginInfo.name = tInfo.name;\n\t\t\t\t\t\t\tUtils.writeLoginInfo(loginInfo,\n\t\t\t\t\t\t\t\t\tCommenData.LOGIN_INFO_PATH);\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tsuper.run();\n\t\t\t\t\t}",
"public void fillUserStats(){\n\t\t \t\t\t \t\n\t\t \tif (curResults.getCount()==0){ // sets to 0 if there are no results\n\t\t \t\ttxtTime.setText(\"0\");\n\t\t \t\ttxtDate.setText(\"0\");\n\n\t\t \t}\n\t\t \telse{ //sets them to the users last result if there are results\n\t\t \t\tcurResults.moveToLast();\n\t\t \t\ttxtTime.setText(curResults.getString(3));\n\t\t \t\ttxtDate.setText(curResults.getString(2));\n\t\t \t}\n\t\t }",
"@Override\n\t\t\t\t\t\tpublic void onCompleted(GraphUser user,\n\t\t\t\t\t\t\t\tResponse response) {\n\t\t\t\t\t\t\tif (user != null) {\n\t\t\t\t\t\t\t\t// Display the parsed user info\n\t\t\t\t\t\t\t\t// userInfoTextView.setText(buildUserInfoDisplay(user));\n\t\t\t\t\t\t\t\tLog.d(TAG, \"get user data\");\n\t\t\t\t\t\t\t\tvalue.setfbacesstoken(acesstoken);\n\t\t\t\t\t\t\t\tvalue.setfbid(user.getId().toString());\n\t\t\t\t\t\t\t\tvalue.setfblink(user.getLink().toString());\n\t\t\t\t\t\t\t\tLog.d(TAG, acesstoken);\n\t\t\t\t\t\t\t\tLog.d(TAG, value.showfbid());\n\t\t\t\t\t\t\t\tLog.d(TAG, value.showfblink());\n\t\t\t\t\t\t\t\tLog.d(TAG, \"do post\");\n\t\t\t\t\t\t\t\tpostdataTask postdata = new postdataTask();\n\t\t\t\t\t\t\t\tpostdata.execute();\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}",
"public LinkedList<User> getUsers() throws TwitterException {\n System.out.println(\"##########Getting The Tweets##########\");\n LinkedList<User> users = new LinkedList<>();\n for (String keyword : this.wordsLookingFor) {\n //Search for tweets\n for (Status A : this.searchTweets(keyword)) {\n //System.out.println(A.getText());\n getUserFromStatus(users, A);\n }\n }\n\n System.out.println(\"Users Number is \".concat(Integer.toString(users.size())));\n return users;\n }",
"private void updateProfileReview() {\n mBinding.submit.startAnimation();\n HashMap<String, Object> body = new HashMap<>();\n body.put(\"profile_completion\", \"complete\");\n enqueue(getApi().updateProfile(body), new CallBack<User>() {\n @Override\n public void onSuccess(User user) {\n updateUser(user);\n mBinding.submit.revertAnimation();\n if (user.account_status.equalsIgnoreCase(\"APPROVED\")) {\n replaceFragment(new AccountVerifiedFragment());\n } else if (user.account_status.equalsIgnoreCase(\"REJECTED\")) {\n replaceFragment(new KycRejectedFragment());\n } else {\n replaceFragment(new UnderReviewFragment());\n }\n }\n\n @Override\n public boolean onError(RetrofitError error, boolean isInternetIssue) {\n mBinding.submit.revertAnimation();\n return super.onError(error, isInternetIssue);\n\n }\n });\n }",
"public static void view() {\n\t\tUser user = UserService.getUserByUsername(session.get(\"username\"));\n\t\tUserProfile userprofile = null;\n\n\t\t// check if user object is null\n\t\tif (user != null)\n\t\t\tuserprofile = UserProfileService.getUserProfileByUserId(user.id);\n\n\t\trender(user, userprofile);\n\t}",
"private void startLoading() {\n\t\tJSONObject obj = new JSONObject();\r\n\t\tobj.put(\"userId\", new JSONString(User.id));\r\n\t\tobj.put(\"userSID\", new JSONString(User.SID));\r\n\t\tapi.execute(RequestType.GetUserInfo, obj, this);\r\n\t}",
"@Override\n\t\tprotected void onPostExecute(Void res) {\n\t\t\t\n\t\t\t\ttxt_nameofuser.setText(user_name);\n\t\t\t\ttxt_emailid.setText(user_mailid);\n\t\t\t\ttxt_WebsiteURL.setText(user_websiteURL);\n\t\t\t\timg_profilepic.setImageBitmap(mybitmap);\n\t\t\t\ttxt_locationvalue.setText(\" : \"+user_location);\n\t\t\t\ttxt_companynamevalue.setText(\" : \"+user_companyname);\n\t\t\t\ttxt_followersvalue.setText(\" : \"+user_followers);\n\t\t\t\ttxt_collabvalue.setText(\" : \"+user_collaborators);\n\t\t\t\ttxt_followingvalue.setText(\" : \"+user_following);\n\t\t\t\ttxt_privategistvalue.setText(\" : \"+user_privategist);\n\t\t\t\ttxt_publicgistvalue.setText(\" : \"+user_publicgist);\n\t\t\t\ttxt_privaterepovalue.setText(\" : \"+user_privaterepo);\n\t\t\t\ttxt_publicrepovalue.setText(\" : \"+user_publicrepo);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//Toast.makeText(Activity_ProfilePage.this,\"MyURl: \"+user_imageurl, Toast.LENGTH_SHORT).show();\n\t\t\t\tSystem.out.println(\"MyURL:: \"+user_imageurl);\n\t\t\t\t \n\t\t\t\t try{\n\t\t\t\t\t\t\n\t\t\t\t\t pdg.dismiss();\n\t\t\t\t\t pdg = null;\n\t\t\t\t }catch(Exception exp){\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t } \n\t\t\t\n\t\n\t\t}",
"private void populateUserView()\n\t{\n\t\t/* create dummy user properties, throw away later */\n\t\tPlayerViewModel userViewModel = new PlayerViewModel(currentUser.getString(\"facebookId\"), \n\t\t\t\t\t\t\t\t\t\tcurrentUser.getString(\"profilePicUrl\")+\"?type=large\", \n\t\t\t\t\t\t\t\t\t\tlocalCountMap.get(currentUser.getString(\"facebookId\")), \n\t\t\t\t\t\t\t\t\t\ttrue,\n\t\t\t\t\t\t\t\t\t\tfalse);\n\t\t\n\t\t/* create adapter for user view */\n\t\tuserCheeseTextView = (TextView) findViewById(R.id.cheeseCountTextView);\n\t\t//userProfileImageView = (ImageView) findViewById(R.id.userProfileImageView);\n\t\tuserProfileImageView = (CircularImageView) findViewById(R.id.userProfileImageView);\n\t\tuserViewAdapter = new UserViewAdapter(this, userCheeseTextView, userProfileImageView);\n\t\t\n\t\t/* set display values via adapter */\n\t\tuserViewAdapter.setUser(userViewModel);\t\t\n\t}",
"public void getUserInformations(String[] _users) {\n String[] userList = _users;\n for (int i = 0; i<userList.length; i++){\n try {\n user = twitter.showUser(userList[i]);\n displayUserInformations();\n } catch (TwitterException te) {\n println(\"Failed to get user informations \" + te.getMessage());\n exit();\n }\n }\n }",
"@Override\n public void onResponse(Call<UserProfileResponse> call, retrofit2.Response<UserProfileResponse> response) {\n BOAPI.gUserInfo = response.body().getResults().get(0).getUserinfo().get(0);\n BOAPI.gUserPreferences = response.body().getResults().get(0).getPreferences();\n BOAPI.gUserStats = response.body().getResults().get(0).getStats();\n BOAPI.gUserVehicles = response.body().getResults().get(0).getVehicles();\n BOAPI.gUserNotifications = response.body().getResults().get(0).getNotifications();\n\n // Set up basic information on the view\n setUpUserProfile();\n //set up Vehicles\n vehiclePager.setAdapter(new VehicleAdapter(Main.this));\n //Show alerts icon if we have notifiactions\n showAlert = !BOAPI.gUserNotifications.isEmpty();\n //close spinner\n SpinnerAlert.dismiss(Main.this);\n\n }",
"private void getProfileInformation() {\n try {\n if (Plus.PeopleApi.getCurrentPerson(mGoogleApiClient) != null) {\n Person currentPerson = Plus.PeopleApi.getCurrentPerson(mGoogleApiClient);\n String personId = currentPerson.getId();\n String personName = currentPerson.getDisplayName();\n String personPhotoUrl = currentPerson.getImage().getUrl();\n String personGooglePlusProfile = currentPerson.getUrl();\n\n String personBirthday = currentPerson.getBirthday();\n int personGender = currentPerson.getGender();\n String personNickname = currentPerson.getNickname();\n\n String email = Plus.AccountApi.getAccountName(mGoogleApiClient);\n\n Log.i(TAG, \"Id: \" + personId + \", Name: \" + personName + \", plusProfile: \" + personGooglePlusProfile + \", email: \" + email + \", Image: \" + personPhotoUrl + \", Birthday: \" + personBirthday + \", Gender: \" + personGender + \", Nickname: \" + personNickname);\n\n // by default the profile url gives\n // 50x50 px\n // image only\n // we can replace the value with\n // whatever\n // dimension we want by\n // replacing sz=X\n personPhotoUrl = personPhotoUrl.substring(0, personPhotoUrl.length() - 2) + PROFILE_PIC_SIZE;\n\n Log.e(TAG, \"PhotoUrl : \" + personPhotoUrl);\n\n Log.i(TAG, \"Finally Set UserData\");\n Log.i(TAG, \"account : \" + email + \", Social_Id : \" + personId);\n\n StringBuffer sb = new StringBuffer();\n sb.append(\"Id : \").append(personId).append(\"\\n\");\n sb.append(\"Name : \").append(personName).append(\"\\n\");\n sb.append(\"plusProfile : \").append(personGooglePlusProfile).append(\"\\n\");\n sb.append(\"Email : \").append(email).append(\"\\n\");\n sb.append(\"PhotoUrl : \").append(personPhotoUrl).append(\"\\n\");\n sb.append(\"Birthday : \").append(personBirthday).append(\"\\n\");\n sb.append(\"Gender : \").append(personGender).append(\"\\n\");\n sb.append(\"Nickname : \").append(personNickname).append(\"\\n\");\n\n tv_info.setText(sb.toString());\n\n signOutFromGplus();\n\n /** set Google User Data **/\n RegisterData.name = personName;\n RegisterData.email = email;\n RegisterData.password = \"\";\n RegisterData.source = \"google\";\n RegisterData.image = personPhotoUrl;\n\n new UserLoginAsyncTask().execute();\n } else {\n Toast.makeText(mContext, \"Person information is null\", Toast.LENGTH_LONG).show();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"private void loadUserInformation(){\n FirebaseUser user = mAuth.getCurrentUser();\n\n String displayEmail = user.getEmail();\n email.setText(\"Velkommenn \" + displayEmail+\"!\");\n }",
"public void setUserDetails(){\n name = firebaseUser.getDisplayName();\n username.setText(name);\n\n Glide.with(this).load(firebaseUser.getPhotoUrl()).into(profileIcon);\n }",
"private void getUserInfo() {\n mUserDb.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot snapshot) {\n if (snapshot.exists() && snapshot.getChildrenCount()>0){\n Map<String, Object> map = (Map<String, Object>) snapshot.getValue();\n\n //grab info\n //put data from database\n if (map.get(\"Name\") !=null){\n //assign user name from database\n name = map.get(\"Name\").toString();\n //print the value to textfield\n mNameField.setText(name);\n }\n //get phone num\n if (map.get(\"Phone\") !=null){\n //assign user name from database\n phone = map.get(\"Phone\").toString();\n //print the value to textfield\n mPhoneField.setText(phone);\n }\n //get user age\n if (map.get(\"Age\") !=null){\n //assign user name from database\n mAge = map.get(\"Age\").toString();\n //print the value to textfield\n mAgeField.setText(mAge);\n }\n //get about info\n if (map.get(\"About\") !=null){\n //assign user name from database\n about = map.get(\"About\").toString();\n //print the value to textfield\n mAboutField.setText(about);\n }\n //get user location\n if (map.get(\"Location\") !=null){\n //assighn user name from database\n loc = map.get(\"Location\").toString();\n //print the value to textfield\n mLocationField.setText(loc);\n }\n //get user gender\n if (map.get(\"Gender\") !=null){\n //assign user name from database\n userSex = map.get(\"Gender\").toString();\n }\n\n\n Glide.clear(mProfileImage);\n if (map.get(\"profileImageUrl\") !=null){\n //assighn user name from database\n profileImageUrl = map.get(\"profileImageUrl\").toString();\n switch (profileImageUrl){\n case \"default\":\n Glide.with(getContext()).load(R.mipmap.ic_launcher).into(mProfileImage);\n break;\n\n default:\n Glide.with(getContext()).load(profileImageUrl).into(mProfileImage);\n break;\n }\n }\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError error) {\n }\n });\n }",
"private void getSocialMediaPost() {\n Call<List<SocialMediaPost>> call = api_interface.getSocialMediaPost();\n\n //runs on a separate thread\n call.enqueue(new Callback<List<SocialMediaPost>>() {\n @Override\n public void onResponse(Call<List<SocialMediaPost>> call, Response<List<SocialMediaPost>> response) {\n if (!response.isSuccessful()){\n textView.setText(\"code: \"+ response.code());\n return;\n }\n\n List<SocialMediaPost> socialMediaPosts = response.body();\n StringBuilder stringBuilder = new StringBuilder();\n\n if (socialMediaPosts != null) {\n for (SocialMediaPost socialMediaPost : socialMediaPosts) {\n stringBuilder.append(socialMediaPost).append(\"/\");\n }\n }\n\n textView.setText(stringBuilder);\n\n }\n\n @Override\n public void onFailure(Call<List<SocialMediaPost>> call, Throwable t) {\n //Something went wrong with communication with the server\n //json object doesnt fit into what we are trying to pass it into\n textView.setText(t.getMessage());\n }\n });\n }",
"private void getProfil() {\n Call<FeedUser> call = baseApiService.getAllProfile(sessionManager.getSpContenttype(),\n sessionManager.getSpAccept(), sessionManager.getSpAuthorization());\n call.enqueue(new Callback<FeedUser>() {\n @Override\n public void onResponse(Call<FeedUser> call, Response<FeedUser> response) {\n if (response.isSuccessful()) {\n try {\n name = response.body().getDataProfil().getName().toString();\n email = response.body().getDataProfil().getEmail();\n initComponetNavHeader();\n } catch (Exception e) {\n Log.d(TAG, \" error :\" + e);\n }\n\n } else {\n Toast.makeText(SettingActivity.this, \"Response not success\", Toast.LENGTH_SHORT).show();\n }\n }\n\n @Override\n public void onFailure(Call<FeedUser> call, Throwable t) {\n Toast.makeText(SettingActivity.this, \"Cek Connection\", Toast.LENGTH_SHORT).show();\n }\n });\n }",
"public void timeLine() {\r\n\r\n try {\r\n List<Status> statuses = twitter.getHomeTimeline();\r\n System.out.println(\"Showing home timeline.\");\r\n for (Status status : statuses) {\r\n System.out.println(status.getUser().getName() + \":\"\r\n + status.getText());\r\n }\r\n } catch (TwitterException ex) {\r\n java.util.logging.Logger.getLogger(MetodosTwit.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n\r\n }"
] | [
"0.7051922",
"0.63760006",
"0.6327168",
"0.624458",
"0.62244767",
"0.61927056",
"0.6159962",
"0.60866976",
"0.60848033",
"0.60442865",
"0.6005273",
"0.59933984",
"0.59766734",
"0.5955909",
"0.59318876",
"0.59211916",
"0.5889692",
"0.58736354",
"0.5872263",
"0.5854954",
"0.58320826",
"0.58251137",
"0.5812752",
"0.580559",
"0.5805053",
"0.5792011",
"0.57661116",
"0.57559186",
"0.5715571",
"0.571247",
"0.56953377",
"0.5681251",
"0.567289",
"0.56675434",
"0.5661245",
"0.56311476",
"0.5617181",
"0.5579345",
"0.557559",
"0.55668676",
"0.55452764",
"0.55340207",
"0.55315536",
"0.55204016",
"0.5520264",
"0.5510946",
"0.550202",
"0.54993993",
"0.549884",
"0.5495987",
"0.5493518",
"0.5488931",
"0.54809093",
"0.54650295",
"0.5461901",
"0.54590887",
"0.54588497",
"0.54483294",
"0.5443527",
"0.5428857",
"0.54233295",
"0.5422704",
"0.5420885",
"0.5418962",
"0.54167587",
"0.5415082",
"0.53929543",
"0.53879714",
"0.5379144",
"0.53690326",
"0.5366545",
"0.53581995",
"0.53510606",
"0.5345732",
"0.5337016",
"0.533663",
"0.5333482",
"0.5329474",
"0.53294384",
"0.5324364",
"0.5322438",
"0.5311803",
"0.5307734",
"0.52961767",
"0.52730525",
"0.5269738",
"0.5249741",
"0.52478236",
"0.524374",
"0.52358717",
"0.5228182",
"0.52269816",
"0.52184385",
"0.52169925",
"0.5205174",
"0.5195651",
"0.51916385",
"0.51903725",
"0.51866925",
"0.5179111"
] | 0.57443607 | 28 |
Resets the increation consequence | public abstract void reset(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void reset() {\n\t\tinit(0, 0, 1, false);\n\t}",
"public void reset() {\n\t\tmCycleFlip = false;\n\t\tmRepeated = 0;\n\t\tmMore = true;\n //mOneMoreTime = true;\n \n\t\t// 추가\n\t\tmStarted = mEnded = false;\n\t\tmCanceled = false;\n }",
"protected void reset()\n {\n super.reset();\n m_seqNum = 1;\n }",
"public void reset() {\n\t\t\t\t\r\n\t\t\t}",
"public void reset() {\n\n\t}",
"public void reset(){\r\n\t\tSystem.out.println(\"(EnigmaMachine) Initial Positions: \" + Arrays.toString(initPositions));\r\n\t\trotors.setPositions(initPositions);\r\n\t}",
"public void reset()\n {\n // put your code here\n position = 0;\n order = \"\";\n set[0] = 0;\n set[1] = 0;\n set[2] = 0;\n }",
"public void reset() {\n\r\n\t}",
"public void reset() {\n\t}",
"public void reset() {\n\t}",
"public void reset() {\n\t}",
"public void reset() {\n\t}",
"private void reset() {\n }",
"public void reset(){\n currentStage = 0;\n currentSide = sideA;\n }",
"public void reset()\n\t{\n\t}",
"public void reset()\n\t{\n\t}",
"public void reset () {}",
"protected void reset(){\n inited = false;\n }",
"@Override\r\n\t\t\tpublic void reset() {\n\t\t\t\t\r\n\t\t\t}",
"public void reset() {\n solving = false;\n length = 0;\n checks = 0;\n }",
"@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}",
"public void reset() {\n }",
"public void reset() {\n }",
"public void reset() {\n }",
"public void reset() {\n }",
"protected void reset() {\n\t\tpush();\n\n\t\t// Clearen, en niet opnieuw aanmaken, om referenties elders\n\t\t// in het programma niet corrupt te maken !\n\t\tcurves.clear();\n\t\tselectedCurves.clear();\n\t\thooveredCurves.clear();\n\t\tselectedPoints.clear();\n\t\thooveredPoints.clear();\n\t\tselectionTool.clear();\n\t}",
"protected void reset() {\n\t\t}",
"public void reset() {\n super.reset();\n }",
"public void reset() {\n\n }",
"public void reset(){\n }",
"private void reset () {\n this.logic = null;\n this.lastPulse = 0;\n this.pulseDelta = 0;\n }",
"void reset() {\n setPosition(-(TILE_WIDTH * CYCLE), TOP_Y);\n mySequenceIndex = 0;\n setAnimatedTile(myAnimatedTileIndex, FRAME_SEQUENCE[mySequenceIndex]);\n }",
"public void reset() {\n\t\tx = 0;\n\t\ty = 0;\n\t\tdir = -90;\n\t\tcoul = 0;\n\t\tcrayon = true;\n\t\tlistSegments.clear();\n \t}",
"public synchronized void reset() {\n }",
"public void reset() {\n\t\tthis.count = 0;\n\t}",
"@Override\r\n\tpublic void reset()\r\n\t{\r\n\t}",
"public void reset();",
"public void reset();",
"public void reset();",
"public void reset();",
"public void reset();",
"public void reset();",
"public void reset();",
"public void reset();",
"public void reset();",
"public void reset();",
"public void reset();",
"public void reset();",
"public void reset();",
"public void reset();",
"public void reset();",
"@Override\n\t\tprotected void reset()\n\t\t{\n\t\t}",
"public final void reset(){\n\t\tthis.undoStack = new GameStateStack();\n\t\tthis.redoStack = new GameStateStack();\n\t\t\n\t\tthis.currentBoard = currentRules.createBoard(currentSize);\n\t\tthis.currentRules.initBoard(currentBoard, currentInitCells, currentRandom);\n\t}",
"@Override\n public void reset() \n {\n\n }",
"public void reset() {\r\n active.clear();\r\n missioncontrollpieces = GameConstants.PIECES_SET;\r\n rolled = 0;\r\n phase = 0;\r\n round = 0;\r\n action = 0;\r\n }",
"@Override\r\n\tpublic void reset() {\n\r\n\t}",
"@Override\r\n\tpublic void reset() {\n\r\n\t}",
"@Override\n\tpublic void resetToExisting() {\n\t\t\n\t}",
"public void reset(){\n\t\tfrogReposition();\n\t\tlives = 5;\n\t\tend = 0;\n\t}",
"@Override\r\n\tpublic void reset() {\n\t}",
"private void ResetVarC() {\n anchura = true;\n iterator = 0;\n Yencoding = new ArrayList<Integer>();\n Cbencoding = new ArrayList<Integer>();\n Crencoding = new ArrayList<Integer>();\n FY = new StringBuilder();\n FCB = new StringBuilder();\n FCR = new StringBuilder();\n }",
"@Override\r\n\tpublic void reset() {\r\n\t\tpilots.clear();\r\n\t\tcabinCrew.clear();\r\n\r\n\t}",
"void reset()\n {\n reset(values);\n }",
"public void reset() {\n\t\tcount = 0;\n\t}",
"public void reset() {\n\tthis.contents = \"\";\n\tthis.isLegalMove = false;\n }",
"public void reset() {\n this.isExhausted = false;\n }",
"@Override\n\tpublic void reset() {\n\t\t\n\t}",
"@Override\n\tpublic void reset() {\n\t\t\n\t}",
"public void reset() {\r\n\t\tcards.addAll(dealt);\r\n\t\tdealt.clear();\r\n\t}",
"@Override\n\tpublic void reset() {\n\n\t}",
"private void reset() {\n ms = s = m = h = 0;\n actualizar();\n }",
"public final void Reset()\n\t{\n\t}",
"public void reset(){\n star.clear();\n planet.clear();\n }",
"public void resetearContadores() {\n\t\treproducciones = 0;\n\t\tsuper.resetearreproducidas();\n\t}",
"public void reset() {\n\t\tfor (int i=0; i < this.WAYS; i++) {\n\t\t\tthis.cache[i] = new Line(this.alpha[i], REPL_VAL);\n\t\t}\n\t\t// set mru\n\t\tthis.cache[this.WAYS-1].state = INSERT_VAL;\n\t}",
"public synchronized void reset() {\r\n \ttry {\r\n \t\trecreate();\r\n \t} catch (CoreException e) {\r\n \t\tResourcesPlugin.getPlugin().getLog().log(e.getStatus());\r\n \t}\r\n }",
"@Override\n\tpublic void reset() {\n\t\tthis.prepare();\n\t\tsuper.reset();\n\t}",
"@Override\n\tpublic void reset() {\n\t}",
"@Override\r\n\tpublic void resetObject() {\n\t\t\r\n\t}",
"void reset() ;",
"void reset()\n {\n\n }",
"public void reset() {\n index = 0;\n }",
"public void reset() {\n this.predictor.reset();\n for(int i=0; i<this.predictedIntraday.length; i++) {\n this.predictedIntraday[i] = 0;\n }\n }",
"public void reset(){\n active = false;\n done = false;\n state = State.invisible;\n curX = 0;\n }",
"@Override\n public void reset() {\n }",
"void reset();",
"void reset();",
"void reset();",
"void reset();",
"void reset();",
"void reset();",
"void reset();",
"void reset();",
"void reset();",
"void reset();",
"void reset();",
"void reset();",
"void reset();"
] | [
"0.70431894",
"0.68783873",
"0.68548316",
"0.6848993",
"0.669207",
"0.6679451",
"0.6669012",
"0.6667035",
"0.6620802",
"0.6620802",
"0.6620802",
"0.6620802",
"0.66162163",
"0.6597043",
"0.65799564",
"0.65799564",
"0.6560771",
"0.65582865",
"0.65325105",
"0.65315735",
"0.6531013",
"0.6531013",
"0.6531013",
"0.6531013",
"0.6530296",
"0.6530296",
"0.6530296",
"0.6530296",
"0.6528931",
"0.6526351",
"0.6496665",
"0.6495371",
"0.64455074",
"0.6423686",
"0.6417684",
"0.6415016",
"0.6411931",
"0.64065856",
"0.63847876",
"0.63728726",
"0.63728726",
"0.63728726",
"0.63728726",
"0.63728726",
"0.63728726",
"0.63728726",
"0.63728726",
"0.63728726",
"0.63728726",
"0.63728726",
"0.63728726",
"0.63728726",
"0.63728726",
"0.63728726",
"0.6357027",
"0.6342065",
"0.6341475",
"0.6338671",
"0.6334015",
"0.6334015",
"0.6332665",
"0.63250285",
"0.6323315",
"0.63161683",
"0.6298782",
"0.62965804",
"0.629366",
"0.6292807",
"0.62789625",
"0.62752444",
"0.62752444",
"0.6265453",
"0.6262486",
"0.62583655",
"0.62474084",
"0.6246166",
"0.624561",
"0.62451786",
"0.62439394",
"0.6235073",
"0.6231839",
"0.6225558",
"0.6221375",
"0.6211648",
"0.6206273",
"0.6205674",
"0.6204845",
"0.6194933",
"0.6192955",
"0.6192955",
"0.6192955",
"0.6192955",
"0.6192955",
"0.6192955",
"0.6192955",
"0.6192955",
"0.6192955",
"0.6192955",
"0.6192955",
"0.6192955",
"0.6192955"
] | 0.0 | -1 |
Returns the consequence created if all the mandatory attributes are set. If not, an IllegalStateException is raised. | public Consequence getConsequence() {
if (isConsequenceReady()) {
Consequence tmp = this.newConsequence;
this.reset();
return tmp;
}
throw new IllegalStateException(i18n.getString("consequence.notReady"));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean mayContainSequenceConstructor() {\r\n return true;\r\n }",
"public boolean mayContainSequenceConstructor() {\r\n return true;\r\n }",
"@Override\n public boolean mayContainSequenceConstructor() {\n return true;\n }",
"@Override\n public boolean mayContainSequenceConstructor() {\n return true;\n }",
"public boolean isConsequenceReady() {\r\n\t\treturn ((this.newConsequence != null) &&\r\n\t\t\t\t(this.newConsequence.getRelatedRule() != null));\r\n\t}",
"boolean hasHas_consequence();",
"public Builder isMandatory(boolean mandatory) {\n this.mandatory = mandatory;\n return this;\n }",
"@Test\n public void shouldCreateContractWithPrecondition() {\n // Given\n Contract contract;\n\n // When\n contract = ContractFactory.contractWithPrecondition();\n\n // Then\n Assert.assertNotNull(\"The created contract is NULL!\", contract);\n Assert.assertTrue(\"The created contract has no precondition!\", contract.preconditions().length == 1);\n }",
"public boolean isMandatory() {\n return mandatory;\n }",
"public boolean isMandatory() {\n return mandatory;\n }",
"public boolean isMandatory() {\n return mandatory;\n }",
"@Test\n public void shouldCreateContractWithPreconditions() {\n // Given\n final Clause precondition1 = ContractFactory.alwaysTrueDefaultClause();\n final Clause precondition2 = ContractFactory.alwaysTrueDefaultClause();\n\n // When\n final Contract contract = ContractFactory.contractWithPreconditions(precondition1, precondition2);\n\n // Then\n Assert.assertNotNull(\"The created contract is NULL!\", contract);\n Assert.assertTrue(\"The created contract has not all given preconditions!\", contract.preconditions().length == 2);\n }",
"boolean hasConstruct();",
"FeedbackConsequence getConsequence();",
"public String build() {\r\n if (this.isNotEmpty()) {\r\n final StringBuilder sb = new StringBuilder();\r\n\r\n final List<MessageAssertor> messages;\r\n if (this.isPreconditionsNotEmpty()) {\r\n messages = this.preconditions;\r\n } else {\r\n messages = this.messages;\r\n }\r\n\r\n for (final MessageAssertor message : messages) {\r\n sb.append(HelperMessage.getMessage(message));\r\n }\r\n\r\n return sb.toString();\r\n }\r\n return StringUtils.EMPTY;\r\n }",
"Collection<? extends Consequence> getHas_consequence();",
"public boolean isSetRequires()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().find_attribute_user(REQUIRES$28) != null;\r\n }\r\n }",
"boolean getRequired();",
"boolean getRequired();",
"boolean getRequired();",
"public SeqConditionSet() {\n\t}",
"public boolean isRequired()\n {\n if(_attrDef.isIndexed() && _isSingleIndexedCriterion())\n {\n return true;\n }\n \n return _attrDef.isMandatory();\n }",
"@java.lang.Override\n public boolean getRequired() {\n return required_;\n }",
"protected abstract Builder<T> valid();",
"public boolean isRequired() {\n return required;\n }",
"@java.lang.Override\n public boolean getRequired() {\n return required_;\n }",
"@Test\n public void shouldCreateContractWithPreAndPostconditions() {\n // Given\n final Clause[] preconditions = { ContractFactory.alwaysTrueDefaultClause(),\n ContractFactory.alwaysTrueDefaultClause() };\n final Clause[] postconditions = { ContractFactory.alwaysTrueDefaultClause(),\n ContractFactory.alwaysTrueDefaultClause() };\n\n // When\n final Contract contract = ContractFactory.contract(preconditions, postconditions);\n\n // Then\n Assert.assertNotNull(\"The created contract is NULL!\", contract);\n Assert.assertTrue(\"The created contract has not all given preconditions!\", contract.preconditions().length == 2);\n Assert.assertTrue(\"The created contract has not all given postconditions!\",\n contract.postconditions().length == 2);\n }",
"public AtomicValue asAtomic() throws ValidationException {\n throw makeException();\n }",
"@Override\r\n public String precondition() {\r\n return \"<html> The method call that returns an object is called twice in series. <br/>\" +\r\n \"Both method calls have no parameters, only return statements. <br/>\" +\r\n \"The object returned by the method call must be defined as a class. </html>\";\r\n }",
"boolean isSetRequired();",
"boolean isConsomme();",
"boolean isMandatory();",
"public boolean isRequired() {\r\n return required;\r\n }",
"public boolean isRequired() {\r\n return required;\r\n }",
"public boolean isRequired () {\n return required;\n }",
"public boolean isRequired() {\r\n return required;\r\n }",
"@Override\n public boolean preconditionsSatisfied() {\n return true;\n }",
"public boolean hasC() {\n return cBuilder_ != null || c_ != null;\n }",
"public boolean isRequired() {\r\n\t\treturn required;\r\n\t}",
"public void validateWhenAllAttributesAreSet(boolean isDeclarative) {\n if (colocatedRegionName != null) {\n if (fixedPAttrs != null) {\n throw new IllegalStateException(\n String.format(\n \"FixedPartitionAttributes %s can not be specified in PartitionAttributesFactory if colocated-with is specified. \",\n fixedPAttrs));\n }\n }\n if (fixedPAttrs != null) {\n if (localMaxMemory == 0) {\n throw new IllegalStateException(\n String.format(\"FixedPartitionAttributes %s can not be defined for accessor\",\n fixedPAttrs));\n }\n }\n }",
"public boolean isRequired()\n\t{\n\t\treturn required;\n\t}",
"protected boolean invariant() {\n\t\treturn (commandStrings != null && commands != null);\n\t}",
"public boolean isRequired()\n {\n return this.isRequired;\n }",
"@Override\n\tpublic NotaBuilder setConhecimentos() {\n\t\treturn null;\n\t}",
"public boolean hasCLAPPROVAL() {\n return fieldSetFlags()[5];\n }",
"public IllegalArgumentException buildException() {\n return this.buildException(null);\n }",
"ICDICondition getCondition() throws CDIException;",
"public Building() throws ConstructionException {\n\t\tthrow new ConstructionException();\n\t}",
"public boolean isConjunctive() { return true; }",
"public boolean isIsRequired() {\n return isRequired;\n }",
"private void validate() throws IllegalStateException {\n if (StringUtils.isBlank(this.experimentKey)) {\n throw new IllegalStateException(\"Experiment key must be present!\");\n }\n if (!this.alive) {\n throw new IllegalStateException(\"Experiment was not initialized. You need to call init().\");\n }\n }",
"@Override\n public DataResource build() throws ConstraintViolationException {\n VocabUtil.getInstance().validate(dataResourceImpl);\n return dataResourceImpl;\n }",
"boolean isSetConstraints();",
"public Boolean getUniCicloRequired() {\n return uniCicloRequired;\n }",
"@Test\n public void shouldCreateEmptyContractWithoutPreconditions() {\n // Given\n Contract contract;\n\n // When\n contract = ContractFactory.emptyContract();\n\n // Then\n Assert.assertTrue(\"The empty contract has unknown preconditions!\", contract.preconditions().length == 0);\n Assert.assertTrue(\"The empty contract has unknown postconditions!\", contract.postconditions().length == 0);\n Assert.assertEquals(\"The created contract has the wrong annotation type!\", contract.annotationType(),\n Contract.class);\n }",
"private void validateConstructor () throws ModelValidationException\n\t\t\t{\n\t\t\t\t// no constructor or no arg constructor\n\t\t\t\tModel model = getModel();\n\t\t\t\tboolean hasConstr = model.hasConstructor(keyClassName);\n\t\t\t\tObject noArgConstr = \n\t\t\t\t\tmodel.getConstructor(keyClassName, Model.NO_ARGS);\n\t\t\t\tint modifiers = model.getModifiers(noArgConstr);\n\n\t\t\t\tif (hasConstr && \n\t\t\t\t\t((noArgConstr == null) || !Modifier.isPublic(modifiers)))\n\t\t\t\t{\n\t\t\t\t\tthrow new ModelValidationException(keyClass,\n\t\t\t\t\t\tI18NHelper.getMessage(getMessages(), \n\t\t\t\t\t\t\"util.validation.key_class_constructor\", //NOI18N\n\t\t\t\t\t\tkeyClassName, getClassName()));\n\t\t\t\t}\n\t\t\t}",
"@SuppressWarnings(\"unused\") // Used by markdown template.\n public String getMandatoryString() {\n return mandatory ? \"required\" : \"optional\";\n }",
"@SuppressWarnings(\"unused\") // Used by markdown template.\n public String getMandatoryString() {\n return mandatory ? \"required\" : \"optional\";\n }",
"public boolean getIsValid() {\n return projectName != null && packageName != null && !projectName.isEmpty() && !packageName.isEmpty();\n }",
"public CreateOptions setEnsureAtomic(boolean atomic) {\n mEnsureAtomic = atomic;\n return this;\n }",
"public boolean isPropagateOnCreate() {\n return propagateOnCreate;\n }",
"public boolean isRequired() {\n \treturn model.isRequired();\n }",
"org.apache.xmlbeans.XmlBoolean xgetRequired();",
"public boolean isSetCombInstrumentID() {\n return this.combInstrumentID != null;\n }",
"public boolean isCascaded() {\r\n return isCascaded;\r\n }",
"public boolean esCompuesto() {\n\t\treturn !this.atributos.isEmpty();\n\t}",
"public Optional<Integer> getSequence() {\n return sequence;\n }",
"void addHas_consequence(Consequence newHas_consequence);",
"public com.yangtian.matrix.Matrix.Builder getCBuilder() {\n \n onChanged();\n return getCFieldBuilder().getBuilder();\n }",
"public boolean hasSequence() {\n return (sequenceName != null &&\n !\"\".equals(sequenceName.trim()));\n }",
"public boolean isSetDescricao() {\n return this.descricao != null;\n }",
"public boolean isSetDescricao() {\n return this.descricao != null;\n }",
"public boolean isSetDescricao() {\n return this.descricao != null;\n }",
"public boolean isSetDescricao() {\n return this.descricao != null;\n }",
"public Competence() {\r\n\t\tsuper();\r\n\t}",
"@Override\n public Map<String, Set<String>> getRequiredAttributes() {\n return requiredAttributes;\n }",
"condition getConditionAllocution();",
"public boolean isConstructor() {\n return isConstructor;\n }",
"@Override\n\tpublic Clause getConstraints() {\n\t\treturn null;\n\t}",
"public boolean isSetSequenceNo() {\n return EncodingUtils.testBit(__isset_bitfield, __SEQUENCENO_ISSET_ID);\n }",
"public MethodConstraints getValidMC() {\n for (int i = 0; i < ctxObjs.length; ++i) {\n if ((ctxObjs[i] instanceof MethodConstraints)\n && !((MethodConstraints) ctxObjs[i]).getConstraints(\n gpvMethod).isEmpty()) {\n return (MethodConstraints) ctxObjs[i];\n }\n }\n return null;\n }",
"void check() throws IllegalStateException {\n if (\n title == null ||\n release == null ||\n duration == 0 ||\n synopsis == null ||\n genre == null ||\n cast == null\n )\n throw new IllegalStateException(\"incomplete type\");\n }",
"public AttributeAlreadyExistsException() {\n super();\n }",
"default boolean renderRequired() {\n // if (!isPrimaryKey() && isRequired() && ) constraints.add(JdlUtils.validationRequired());\n return isRequired() && !(getName().equals(\"id\") && getType().equals(JdlFieldEnum.UUID));\n }",
"public boolean isSetCreateId() {\n return this.createId != null;\n }",
"Sequence createSequence();",
"Concierto createConcierto();",
"public ModelElement getConstraints() {\n\tmodelElement.clearConstraint();\n\tjava.util.Iterator iterator = getPnlDataSelector().getObjects().iterator();\n\ttry {\n\t\twhile (iterator.hasNext()) {\n\t\t\tObject eleo=iterator.next();\n\t\t\tConstraintDef constraintDef = null;\n\t\t\tif(eleo instanceof NlsString){\n\t\t\t\t// new constraint\n\t\t\t\tConstraintExpression expression = new ConstraintExpression();\n\t\t\t\texpression.setSyntax((NlsString)eleo);\n\t\t\t\tconstraintDef = (ConstraintDef)ElementFactory.createObject(ConstraintDef.class);\n\t\t\t\tconstraintDef.setBody(expression);\n\t\t\t}else{\n\t\t\t\t// existing constraint\n\t\t\t\tconstraintDef = (ConstraintDef)eleo;\n\t\t\t}\n\t\t\tmodelElement.addConstraint(constraintDef);\n\t\t}\n\t} catch(Throwable e) {\n\t\thandleException(e);\n\t}\n\treturn modelElement;\n}",
"@Override\r\n\tpublic boolean isConcave() {\n\t\treturn false;\r\n\t}",
"public boolean isRequired();",
"@Override\n\tpublic void setMandatory(boolean mandatory) {\n\t\t\n\t}",
"private Boolean precond() {\r\n\t\tcalculoCantidadSacar(grupoPuestosController.getIdConcursoPuestoAgr());\r\n\t\t/**\r\n\t\t * fin incidencia 0001649\r\n\t\t */\r\n\t\tBoolean respuesta = validacionesIteracion();\r\n\t\treturn respuesta;\r\n\t}",
"protected abstract Object getConsequenceParameter(Object consequence);",
"public boolean isConstructor();",
"@Test\n public void testLoadOptionalBuilderForceCreate()\n throws ConfigurationException\n {\n CombinedConfiguration config = prepareOptionalTest(\"configuration\",\n true);\n assertEquals(\"Wrong number of configurations\", 1, config\n .getNumberOfConfigurations());\n assertTrue(\n \"Wrong optional configuration type\",\n config.getConfiguration(OPTIONAL_NAME) instanceof CombinedConfiguration);\n }",
"public java.lang.String getRequires()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(REQUIRES$28);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getStringValue();\r\n }\r\n }",
"public boolean hasAttributes() {\n return attributesBuilder_ != null || attributes_ != null;\n }",
"public String getEarliestConstraint() {\n return earliest;\n }",
"SequenceOfStatements getSequenceOfStatements();",
"public com.yangtian.matrix.MatrixOrBuilder getCOrBuilder() {\n return getC();\n }"
] | [
"0.58054245",
"0.58054245",
"0.5658921",
"0.5658921",
"0.5611449",
"0.5406538",
"0.539123",
"0.5290449",
"0.5237318",
"0.5178267",
"0.5178267",
"0.5177204",
"0.5173541",
"0.51234376",
"0.5060276",
"0.50579095",
"0.49376255",
"0.48601282",
"0.48601282",
"0.48601282",
"0.48551202",
"0.48331866",
"0.4808066",
"0.47952518",
"0.47821075",
"0.47761792",
"0.477536",
"0.4763512",
"0.4760563",
"0.47524142",
"0.47485998",
"0.47424415",
"0.4737042",
"0.4737042",
"0.47307512",
"0.471528",
"0.47013408",
"0.46607956",
"0.4639377",
"0.46131438",
"0.46129844",
"0.46090552",
"0.4607061",
"0.46035433",
"0.46004406",
"0.45900854",
"0.4575308",
"0.45588613",
"0.45499995",
"0.4542722",
"0.4532089",
"0.45305774",
"0.45255318",
"0.45100388",
"0.44984484",
"0.44699514",
"0.44638884",
"0.44638884",
"0.44475552",
"0.44450703",
"0.44307938",
"0.44242245",
"0.4422065",
"0.44178697",
"0.4409302",
"0.43997106",
"0.43985435",
"0.43913364",
"0.43790102",
"0.43747908",
"0.43721098",
"0.43721098",
"0.43721098",
"0.43721098",
"0.43648586",
"0.43634707",
"0.43630078",
"0.4361182",
"0.43594483",
"0.4358198",
"0.43569547",
"0.4341187",
"0.433224",
"0.43290138",
"0.4325853",
"0.43194056",
"0.43184793",
"0.43174607",
"0.4309786",
"0.43065196",
"0.42981392",
"0.42968112",
"0.42878905",
"0.42863798",
"0.42806894",
"0.42728713",
"0.4267227",
"0.42628852",
"0.42572102",
"0.42563108"
] | 0.62081146 | 0 |
Identifies if the consequence being created is ok to be returned or not. | public boolean isConsequenceReady() {
return ((this.newConsequence != null) &&
(this.newConsequence.getRelatedRule() != null));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasHas_consequence();",
"boolean hasConstruct();",
"boolean isConsomme();",
"protected boolean _isEventForSuccessfulCreate(final PersistenceOperationOKEvent opEvent) {\n\t\tPersistenceOperationOK opResult = opEvent.getResultAsOperationOK();\n\t\tboolean handle = _crudOperationOKEventFilter.hasTobeHandled(opEvent);\n\t\tif (!handle) return false;\n\t\n\t\treturn ((opResult.isCRUDOK()) \n\t\t\t && (opResult.as(CRUDOK.class).hasBeenCreated()));\t\t\t\t\t\t\t\t\t\t\t\t// it's a create event\n\t}",
"public boolean mayContainSequenceConstructor() {\r\n return true;\r\n }",
"public boolean mayContainSequenceConstructor() {\r\n return true;\r\n }",
"public boolean isLegal() {\n return !this.isBroken() && (this.getId() >= 0 || !this.isExisted());\n }",
"public boolean isReconstruction() {\n\t\treturn getShort(ADACDictionary.RECONSTRUCTED_SLICES) > 0;\n\t}",
"@Override\r\n\tpublic boolean isValidConstructionStep() {\r\n\t\tOGPOutput output = OpenGeoProver.settings.getOutput();\r\n\t\tILogger logger = OpenGeoProver.settings.getLogger();\r\n\t\t\r\n\t\tif (!super.isValidConstructionStep())\r\n\t\t\treturn false;\r\n\t\t\r\n\t\ttry {\r\n\t\t\tint indexOP, indexC;\r\n\t\t\r\n\t\t\tif (this.originalPoint == null || this.centerOfRotation == null) {\r\n\t\t\t\toutput.openItemWithDesc(\"Error: \");\r\n\t\t\t\toutput.closeItemWithDesc(\"Rotated point \" + this.getGeoObjectLabel() + \" can't be constructed since original point or center of rotation are not constructed\");\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\tindexOP = this.originalPoint.getIndex();\r\n\t\t\tindexC = this.centerOfRotation.getIndex();\r\n\t\t\r\n\t\t\tif (indexOP < 0 || indexC < 0) {\r\n\t\t\t\toutput.openItemWithDesc(\"Error: \");\r\n\t\t\t\toutput.closeItemWithDesc(\"Rotated point \" + this.getGeoObjectLabel() + \" can't be constructed since original point or center of rotation are not added to theorem protocol\");\r\n\t\t\t\treturn false; // some point not in theorem protocol\r\n\t\t\t}\r\n\t\t\r\n\t\t\tboolean valid = this.index > indexOP && this.index > indexC;\r\n\t\t\t\r\n\t\t\tif (!valid) {\r\n\t\t\t\toutput.openItemWithDesc(\"Error: \");\r\n\t\t\t\toutput.closeItemWithDesc(\"Rotated point \" + this.getGeoObjectLabel() + \" can't be constructed since original point or center of rotation are not yet constructed\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn valid;\r\n\t\t} catch (IOException e) {\r\n\t\t\tlogger.error(\"Failed to write to output file(s).\");\r\n\t\t\toutput.close();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"public boolean isSuccess()\r\n/* 79: */ {\r\n/* 80:115 */ Object result = this.result;\r\n/* 81:116 */ if ((result == null) || (result == UNCANCELLABLE)) {\r\n/* 82:117 */ return false;\r\n/* 83: */ }\r\n/* 84:119 */ return !(result instanceof CauseHolder);\r\n/* 85: */ }",
"@Override\n\tpublic boolean isCovered() {\n\t\treturn (falseCount > 0) && (trueCount > 0);\n\t}",
"protected boolean _isEventForSuccessfulCreateOrUpdate(final PersistenceOperationOKEvent opEvent) {\t\n\t\tPersistenceOperationOK opResult = opEvent.getResultAsOperationOK();\n\t\tboolean handle = _crudOperationOKEventFilter.hasTobeHandled(opEvent);\n\t\tif (!handle) return false;\n\t\t\n\t\treturn ((opResult.isCRUDOK()) \n\t\t\t && (opResult.as(CRUDOK.class).hasBeenCreated() || opResult.as(CRUDOK.class).hasBeenUpdated()));\t// it's a create or update event\n\t}",
"@Override\r\n\tpublic boolean isConcave() {\n\t\treturn false;\r\n\t}",
"public boolean isOk() {\n return _type == Type.OK;\n }",
"boolean isConcealed();",
"public boolean isOk() {\n\t\treturn ok;\n\t}",
"public boolean isSuccessful() {\n return this.reason == Reason.NONE;\n }",
"public final boolean isOk() {\n return ok;\n }",
"public boolean isEffective() {\n return !this.isBroken() && !this.isExisted() && this.getId() < 0;\n }",
"boolean isIntroduced();",
"private boolean OK() {\r\n return in == saves[save-1];\r\n }",
"private boolean isStateFullyDetermined() {\n switch (hasSubstance) {\n case No:\n case Unknown:\n return false;\n case Yes:\n // if already established has substance, continue checking only until\n // reach threshold\n return (substanceMin <= 0) ? true : substanceCnt >= substanceMin;\n }\n throw new ShouldNotHappenException();\n }",
"private Boolean precond() {\r\n\t\tcalculoCantidadSacar(grupoPuestosController.getIdConcursoPuestoAgr());\r\n\t\t/**\r\n\t\t * fin incidencia 0001649\r\n\t\t */\r\n\t\tBoolean respuesta = validacionesIteracion();\r\n\t\treturn respuesta;\r\n\t}",
"public boolean getStatus() {\n return (rnd.nextInt(obstructionChanceBound) <= obstructionChance);\n }",
"private boolean isValid() {\n\t\treturn proposalTable != null && !proposalTable.isDisposed();\n\t}",
"public boolean canCreateAnother() {\n\t\treturn new Date(startDate.getTime() + duration + cooldown)\n\t\t\t\t.before(new Date());\n\t}",
"public boolean isOK() {\n\t\treturn adaptee.isOK();\n\t}",
"Boolean getCompletelyCorrect();",
"public boolean esConexo() {\n\t\tboolean result = true;\n\t\tint indice = 0;\n\t\tBusquedaEnProfundidad busqueda = new BusquedaEnProfundidad(this, 0);\n\n\t\twhile (result && indice < cantNodos) {\n\t\t\tif (!busqueda.estaVisitado(indice))\n\t\t\t\tresult = false;\n\t\t\tindice++;\n\t\t}\n\n\t\treturn result;\n\t}",
"boolean isComposite();",
"boolean isComposite();",
"boolean hasProduceResType();",
"public boolean esCompuesto() {\n\t\treturn !this.atributos.isEmpty();\n\t}",
"boolean getIsOk();",
"public boolean isOk() {\n return this.state == null || this.state.code == 0;\n }",
"public boolean hasFailed() {\n return creationFailure;\n }",
"@Override\n\t\tpublic boolean isValidSolution() {\n\t\t\treturn super.isValidSolution();\n\t\t}",
"@Override\r\n public String precondition() {\r\n return \"<html> The method call that returns an object is called twice in series. <br/>\" +\r\n \"Both method calls have no parameters, only return statements. <br/>\" +\r\n \"The object returned by the method call must be defined as a class. </html>\";\r\n }",
"public boolean okReveiced () {\n\t\t\treturn resultDetected[RESULT_INDEX_OK];\n\t\t}",
"boolean hasSeq();",
"@java.lang.Override\n public boolean getIsOk() {\n return isOk_;\n }",
"public boolean repOk(){\n\t\tif(pool<0 || squares == null || communityCards == null || chanceCards == null || map == null)\n\t\t\treturn false;\n\t\tfor (Square[] layer : squares) {\n\t\t\tfor (Square square : layer) {\n\t\t\t\tif(square == null)\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn mh.repOk();\n\t}",
"public boolean isSolved(){ return getRemainingValues() == 0; }",
"public boolean needsProblem();",
"public boolean isPorDescuento();",
"public boolean isSuccessful() {\r\n return isTargetTemplateSetPresent() && missing.isEmpty();\r\n }",
"public boolean isFullyCovered() {\n for (boolean i:mCovered) {\n if (!i) return false;\n }\n return true;\n }",
"public boolean isCauldron() {\n return this.type == Type.CAULDRON;\n }",
"@Override\n public boolean mayContainSequenceConstructor() {\n return true;\n }",
"@Override\n public boolean mayContainSequenceConstructor() {\n return true;\n }",
"public boolean isOkay() {\n return okay;\n }",
"public boolean createPermutationSchedule() {\n listOfCoursesPermutation = permutationOfCourseList(activeCourseList);\n\n boolean returnBool = true;\n for (int i = 0; i < listOfCoursesPermutation.size(); i++) {\n if (!simpleDesigner(listOfCoursesPermutation.get(i))) {\n returnBool = false;\n }\n }\n return returnBool;\n }",
"@java.lang.Override\n public boolean getIsOk() {\n return isOk_;\n }",
"public boolean checkFrameValid() {\n return explosionFrame < explosions.length;\n }",
"public boolean isNotOk() {\n return _type == Type.OK;\n }",
"public boolean wasValid() {\n return !wasInvalid();\n }",
"boolean isTransitive();",
"private boolean inGameInvariant(){\n if (owner != null && troops >= 1)\n return true;\n else\n throw new IllegalStateException(\"A Territory is left without a Master or Troops\");\n }",
"public Boolean isNextOk() {\n if (!isInputValid()) {\n return Boolean.FALSE;\n }\n createReservations();\n if (containsInputErrors()) {\n return Boolean.FALSE;\n } else {\n switch (extractFeatureSet()) {\n case FREE:\n createGuestProfile();\n if (containsInputErrors()) {\n return Boolean.FALSE;\n }\n break;\n case PREMIUM:\n break;\n default:\n throw Assert.createUnreachable(\"Unknown feature set {0}.\",\n extractFeatureSet());\n }\n }\n return Boolean.TRUE;\n }",
"public boolean isComplex() { throw new RuntimeException(\"Stub!\"); }",
"public boolean canReproduce() {\r\n ArrayList<Cell> neighbours = getNeighbours(FIRSTLAYER);\r\n\r\n int numOfSameT = 0;\r\n int numOfEmpty = 0;\r\n int numOfFoodC = 0;\r\n\r\n for (Cell cell : neighbours) {\r\n if (isSameType(cell.getInhabit())) {\r\n numOfSameT++;\r\n } else if (cell.getInhabit() == null && isTerrainAccessiable(cell)) {\r\n numOfEmpty++;\r\n } else if (isEdible(cell.getInhabit())) {\r\n numOfFoodC++;\r\n }\r\n }\r\n\r\n return (numOfSameT >= numOfSameTypeNeighbourToReproduce() \r\n && numOfEmpty >= numOfEmptyToReproduce()\r\n && numOfFoodC >= numOfFoodCellToReproduce());\r\n }",
"@Override\n\tpublic boolean isInterestedInSuccess() {\n\t\treturn false;\n\t}",
"@Override\r\n\tpublic boolean isValid() {\n\t\treturn false;\r\n\t}",
"@Override\n\t\tpublic boolean isValid() {\n\t\t\treturn false;\n\t\t}",
"boolean getPossiblyBad();",
"Boolean getPartiallyCorrect();",
"@Override\n\t\tpublic boolean isSuccess() {\n\t\t\treturn false;\n\t\t}",
"public boolean isValid() {\n\t\treturn false;\n\t}",
"public boolean isValid() {\n // TODO: Question 2.2.\n \n return false;\n }",
"public boolean repOK(){\n if(passenger == null) return false;\n if(car == null) return false;\n return true;\n }",
"public boolean isValid()\n\t{\n\t\treturn false;\n\t}",
"public boolean isValid(){\r\n\t\t\r\n\t\t// TODO\r\n\t\t\r\n\t\treturn true;\r\n\t}",
"public abstract boolean esComestible();",
"@Override\n\tpublic boolean isValid() {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isValid() {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isValid() {\n\t\treturn false;\n\t}",
"Boolean conditionResult();",
"boolean hasPossiblyBad();",
"Collection<? extends Consequence> getHas_consequence();",
"boolean hasSuccessorId();",
"public boolean isValid(){\n\t\treturn true;\n\t}",
"public boolean isValid() {\n return true;\n }",
"public boolean isConstructor();",
"public boolean canBuildNextStage() {\r\n\t\tSystem.out.print(\"Checking if \" + stages[stagesCompleted]\r\n\t\t\t\t+ \" can be built:\");\r\n\t\tSimpleResList costSRL = SimpleResList\r\n\t\t\t\t.buildCostList(stages[stagesCompleted]);\r\n\t\tSystem.out\r\n\t\t\t\t.println((canBuildStage(stages[stagesCompleted], costSRL) ? \" true \"\r\n\t\t\t\t\t\t: \" false \"));\r\n\t\t// TODO needs code to see if there is enough money to buy the goods from\r\n\t\t// the neighbors(if they have the goods).....look buildCommandOptions\r\n\t\treturn canBuildStage(stages[stagesCompleted], costSRL); // this is only\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// checking to\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// see if this\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// board can\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// afford it\r\n\t}",
"public boolean generate() {\n System.out.println(\"Before generating, up to how many courses would you take at once?\");\n maxClassesAtOnce = obtainIntSafely(1, 8, \"This must be a positive integer less than 8\");\n\n int option = optionQuestion(\"Would you like to compute a list of possible schedules \"\n + \" via simple tree (1), permutation tree (2), or semi-permutation tree (3). \"\n + \"\\n WARNING: PERMUTATION TREE CAN BE VERY SLOW AND SHOULD ONLY BE \"\n + \"USED WITH A SMALL SELECTION OF CLASSES \\n Option 3 is Recommended\", 3);\n\n Boolean returnBool = true;\n\n switch (option) {\n case 1:\n returnBool = simpleDesigner(activeCourseList);\n break;\n case 2:\n returnBool = createPermutationSchedule();\n break;\n case 3:\n returnBool = createSemiPermutationSchedule();\n break;\n }\n if (!returnBool) {\n System.out.println(\"Impossible to make a schedule\");\n }\n return returnBool;\n }",
"public boolean failedQC(){\n\t\treturn testBitwiseFlag(512);\n\t}",
"public boolean isPredeterminado()\r\n/* 154: */ {\r\n/* 155:264 */ return this.predeterminado;\r\n/* 156: */ }",
"public static boolean isOK() {return isOK;}",
"public boolean isCovered() {\r\n\t\treturn isCovered;\r\n\t}",
"boolean hasProduces();",
"boolean isNewSolution();",
"private boolean finalMilestoneAccomplished()\n {\n if( (firstMilestoneAccomplished()) &&\n (secondMilestoneAccomplished()) &&\n (thirdMilestoneAccomplished()) &&\n (beliefs.puzzle[2][1] == 10) &&\n (beliefs.puzzle[2][2] == 11) &&\n (beliefs.puzzle[2][3] == 12) &&\n (beliefs.puzzle[3][1] == 14) &&\n (beliefs.puzzle[3][2] == 15)\n\n )\n return true;\n else\n return false;\n }",
"boolean hasC();",
"public boolean validatePrescription() {\n\t\tif (dose == 0)\n\t\t\treturn false;\n\t\tif (count == 0)\n\t\t\treturn false;\n\t\tif (dosing == 0)\n\t\t\treturn false;\n\t\tif (instructions == null)\n\t\t\treturn false;\n\n\t\treturn true;\n\t}",
"private boolean handleInsertionAtEndInCaseOfNoStopCodon() {\n\t\t\t// TODO(holtgrew): At some point, try to merge these corner cases that are caused by bogus transcript\n\t\t\t// entries into the main cases or decide to ignore these bad cases.\n\n\t\t\t// Return false if this is not the case this function deals with.\n\t\t\tif (varAAInsertPos != wtAASeq.length() || wtAAStopPos != -1)\n\t\t\t\treturn false;\n\n\t\t\t// TODO(holtgrew): Check for duplication? This is a very rare corner case with bogus transcript.\n\t\t\t// TODO(holtgrew): This is wrong.\n\t\t\tproteinChange = ProteinInsertion.buildWithSequence(true, toString(wtAASeq.charAt(varAAInsertPos - 1)),\n\t\t\t\tvarAAInsertPos, toString(wtAASeq.charAt(varAAInsertPos - 1)), varAAInsertPos,\n\t\t\t\tvarAASeq.substring(varAAInsertPos - 1, varAASeq.length()));\n\t\t\tif (varAAStopPos != -1)\n\t\t\t\tvarTypes.add(VariantEffect.STOP_GAINED);\n\t\t\tvarTypes.add(VariantEffect.INFRAME_INSERTION);\n\n\t\t\treturn true;\n\t\t}",
"public boolean willNotBeResurrected() {\n return state == State.FRESH || state == State.ERROR;\n }",
"public boolean isValid() {\n return true;\n }",
"public boolean isValid() {\n return true;\n }",
"public boolean ValidarValesConORC()\n {\n final Integer contInteger;\n return false;\n\n }",
"public final boolean\n isOutcomeSuccess() { return hasOutcome_ && outcome_ == true; }"
] | [
"0.67466766",
"0.6475421",
"0.6255219",
"0.59222174",
"0.58643675",
"0.58643675",
"0.57493585",
"0.57221377",
"0.5707718",
"0.56888264",
"0.5676967",
"0.5635957",
"0.5626098",
"0.5625872",
"0.5621558",
"0.5607502",
"0.55926824",
"0.55871713",
"0.5582249",
"0.5578734",
"0.55707103",
"0.55652344",
"0.55251783",
"0.5520708",
"0.547495",
"0.546562",
"0.5450415",
"0.5447555",
"0.5443894",
"0.543501",
"0.543501",
"0.5424256",
"0.5417224",
"0.54158205",
"0.54131633",
"0.54106236",
"0.5410598",
"0.54045534",
"0.5391939",
"0.5385772",
"0.5382846",
"0.53809243",
"0.5374595",
"0.53736883",
"0.53583676",
"0.53570676",
"0.5347222",
"0.53353864",
"0.53321147",
"0.53321147",
"0.53304154",
"0.5327386",
"0.5326104",
"0.53095406",
"0.53090376",
"0.53043646",
"0.52869415",
"0.5286808",
"0.5276847",
"0.52740633",
"0.5261829",
"0.52600646",
"0.52578473",
"0.5256847",
"0.5248396",
"0.5244845",
"0.52402043",
"0.52295387",
"0.5228433",
"0.5226964",
"0.5220848",
"0.5217669",
"0.52175605",
"0.52161396",
"0.52161396",
"0.52161396",
"0.5215389",
"0.5203344",
"0.520012",
"0.5199056",
"0.5195482",
"0.519548",
"0.51952714",
"0.5194705",
"0.5190473",
"0.51855403",
"0.51825154",
"0.51815516",
"0.5170218",
"0.51654524",
"0.51592976",
"0.5152188",
"0.51516443",
"0.5151287",
"0.5149272",
"0.5148737",
"0.51477516",
"0.51477516",
"0.5141927",
"0.5136791"
] | 0.64145494 | 2 |
Returns the indicator of lenient consequence builder. The default is false. When it is false, the concrete class extending this one has the opportunity to make tight check on other attributes (Like dimensions for example see TelcoConsequenceBuilder) in order to guarantee all is properly set. When it is true, the concrete class has the opportunity to allows a more relaxed and flexible attributes setting. Support for this is not mandatory, althrought is MUST be documented in implementations fo this abstract class. | public boolean isLenient() {
return this.lenient;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Builder isMandatory(boolean mandatory) {\n this.mandatory = mandatory;\n return this;\n }",
"public Boolean getUniCicloRequired() {\n return uniCicloRequired;\n }",
"public boolean isCauldron() {\n return this.type == Type.CAULDRON;\n }",
"public Boolean getBooleanAttribute();",
"public io.dstore.values.BooleanValue.Builder getRecursiveBuilder() {\n \n onChanged();\n return getRecursiveFieldBuilder().getBuilder();\n }",
"public Boolean getIsEnforced() {\n return isEnforced;\n }",
"public boolean isDargly()\n\t{ return m_bBoolean ; }",
"@Override\n public boolean hasFerocityAttribute() {\n return true;\n }",
"boolean isModelicaEncapsulated();",
"public String toString() { return this.booleanValue; }",
"public io.dstore.values.BooleanValue.Builder getImportConfigurationBuilder() {\n \n onChanged();\n return getImportConfigurationFieldBuilder().getBuilder();\n }",
"public boolean effectiveBooleanValue() {\r\n return value.length() > 0;\r\n }",
"public Boolean getIsDiscourseDataset() {\n return isDiscourseDataset;\n }",
"public Boolean getIswialon() {\r\n return iswialon;\r\n }",
"public com.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.Builder\n getFillBehaviorBuilder() {\n bitField0_ |= 0x00000010;\n onChanged();\n return getFillBehaviorFieldBuilder().getBuilder();\n }",
"public boolean isClassical() {\n return this == CLASSICAL;\n }",
"public com.yangtian.matrix.Matrix.Builder getCBuilder() {\n \n onChanged();\n return getCFieldBuilder().getBuilder();\n }",
"public boolean isConjunctive() { return true; }",
"public abstract boolean getFilled();",
"public Boolean() {\n\t\tsuper(false);\n\t}",
"public boolean preparedAppearance() {\r\n return preparedAppearance;\r\n }",
"Boolean getIndemnity();",
"@Override\n\tpublic NotaBuilder setConhecimentos() {\n\t\treturn null;\n\t}",
"@Override\r\n\tpublic boolean isConcave() {\n\t\treturn false;\r\n\t}",
"boolean getRequired();",
"boolean getRequired();",
"boolean getRequired();",
"boolean isConsomme();",
"public abstract boolean getEffectiveBooleanValue();",
"public boolean isSetLengthDependent() {\r\n return isSetAttribute(MEConstants.lengthDependent);\r\n }",
"public boolean getHasClimbed(){\n return hasClimbed;\n }",
"boolean getConsensus() { return this.consensus; }",
"public com.google.protobuf.Any.Builder getConfigurationBuilder() {\n \n onChanged();\n return getConfigurationFieldBuilder().getBuilder();\n }",
"public boolean isChemical() {\n return chemical;\n }",
"public boolean getMustUnderstand();",
"public io.dstore.values.BooleanValue.Builder getComputeSumBuilder() {\n \n onChanged();\n return getComputeSumFieldBuilder().getBuilder();\n }",
"public trinsic.services.common.v1.CommonOuterClass.JsonPayload.Builder getAttributesBuilder() {\n \n onChanged();\n return getAttributesFieldBuilder().getBuilder();\n }",
"public String getIsEntityRequired() {\n return Boolean.TRUE.toString();\n }",
"public boolean isCommodityRequiredIndicator() {\n return commodityRequiredIndicator;\n }",
"public boolean isIndicadorDiscapacidad()\r\n/* 213: */ {\r\n/* 214:390 */ return this.indicadorDiscapacidad;\r\n/* 215: */ }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Boolean isTallied();",
"public Boolean getBase() {\n return base;\n }",
"public boolean isMandatory() {\n return mandatory;\n }",
"public BaseModelLiabilityDoctorInsurance build() {\r\n return baseModelLiabilityDoctorInsurance;\r\n }",
"public boolean isSetAntEfficiency() {\n return ((this.antEfficiency != null) && (!this.antEfficiency.isEmpty()));\n }",
"public boolean isBuildable() {\r\n return buildable;\r\n }",
"public boolean isMandatory() {\n return mandatory;\n }",
"public boolean isMandatory() {\n return mandatory;\n }",
"public boolean isC() {\n return c;\n }",
"@JsonIgnore\n public Boolean isStandard() {\n return this.standard;\n }",
"@java.lang.Override\n public boolean getIsChulaStudent() {\n return isChulaStudent_;\n }",
"boolean isSetNcbi8Aa();",
"public boolean isCompetitive() {\n return competitive;\n }",
"public Builder setDeclarativelyConfigured(boolean value) {\n \n declarativelyConfigured_ = value;\n onChanged();\n return this;\n }",
"public boolean isClcw() {\n return clcw;\n }",
"public boolean getHonorConstraints()\r\n {\r\n return (m_honorConstraints);\r\n }",
"public boolean isGenerative () { return false; }",
"boolean isSetStraight();",
"org.hl7.fhir.Boolean getInitial();",
"public boolean isDefectuoso() {\r\n return defectuoso;\r\n }",
"boolean isSetConstraints();",
"public boolean isRequired()\n {\n return this.isRequired;\n }",
"public final boolean aCJ() {\n return false;\n }",
"@ApiModelProperty(example = \"false\", value = \"If true, this means you want to leave us and that's sad... :'-(\")\n public Boolean getIsCustomerWantsToTerminateHisContract() {\n return isCustomerWantsToTerminateHisContract;\n }",
"public Builder setIsOccupation(boolean value) {\n \n isOccupation_ = value;\n onChanged();\n return this;\n }",
"private Boolean ottieniDefaultFlagConvalidaManuale() {\n\t\tfinal String methodName = \"ottieniDefaultFlagConvalidaManuale\";\n\t\tEnte ente = accountDad.findEnteAssocciatoAdAccount(req.getRichiedente().getAccount().getUid());\n\t\t\n\t\tString gca = ente.getGestioneLivelli().get(TipologiaGestioneLivelli.GESTIONE_CONVALIDA_AUTOMATICA);\n\t\tif(\"CONVALIDA_AUTOMATICA\".equals(gca)){\n\t\t\tlog.debug(methodName, TipologiaGestioneLivelli.GESTIONE_CONVALIDA_AUTOMATICA.name()+ \" impostata a CONVALIDA_AUTOMATICA\");\n\t\t\treturn Boolean.FALSE;\n\t\t} else if(\"CONVALIDA_MANUALE\".equals(gca)){\n\t\t\tlog.debug(methodName, TipologiaGestioneLivelli.GESTIONE_CONVALIDA_AUTOMATICA.name()+ \" impostata a CONVALIDA_MANUALE\");\n\t\t\treturn Boolean.TRUE;\n\t\t}\n\t\t\n\t\treturn Boolean.TRUE;\n\t}",
"public Boolean getOptional() {\n return this.optional;\n }",
"@Override\r\n public boolean isLy(){\r\n return this.isLoyal;\r\n }",
"@Override\n public Boolean getInitialValue() {\n return true;\n }",
"public io.dstore.values.BooleanValue.Builder getDeleteCharacteristicBuilder() {\n \n onChanged();\n return getDeleteCharacteristicFieldBuilder().getBuilder();\n }",
"public Builder setNormal(boolean value) {\n \n normal_ = value;\n onChanged();\n return this;\n }",
"@java.lang.Override\n public boolean getIsChulaStudent() {\n return isChulaStudent_;\n }",
"public boolean isMostrarBasesDetalle()\r\n/* 592: */ {\r\n/* 593:638 */ return this.mostrarBasesDetalle;\r\n/* 594: */ }",
"public AttributeBooleanType buildUnchecked() {\n return new AttributeBooleanTypeImpl();\n }",
"@Column(name=\"BolLimIntegralCapConsignado\")\n\tpublic Boolean getBolLimIntegralCapConsignado() {\n\t\treturn bolLimIntegralCapConsignado;\n\t}",
"public Boolean getIsEffective() {\n return isEffective;\n }",
"static final SettingsModelBoolean createMakeBondsGenericOptionModel() {\n return new SettingsModelBoolean(\"make_bonds_generic\", \n \t\tDEFAULT_ADJUST_QUERY_PARAMETERS.getMakeBondsGeneric());\n }",
"public Boolean getBooleanValue() {\n return this.booleanValue;\n }",
"public BooleanDt getIsExtensibleElement() { \n\t\tif (myIsExtensible == null) {\n\t\t\tmyIsExtensible = new BooleanDt();\n\t\t}\n\t\treturn myIsExtensible;\n\t}",
"public boolean isRequired()\n {\n if(_attrDef.isIndexed() && _isSingleIndexedCriterion())\n {\n return true;\n }\n \n return _attrDef.isMandatory();\n }",
"public Boolean isOptional() {\n return this.optional;\n }",
"public String getSettleFlag() {\n return settleFlag;\n }",
"public ChronicleChannelCfg<C> initiator(boolean initiator) {\n this.initiator = initiator;\n return this;\n }",
"public boolean getShowNarration()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(SHOWNARRATION$18);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_default_attribute_value(SHOWNARRATION$18);\n }\n if (target == null)\n {\n return false;\n }\n return target.getBooleanValue();\n }\n }",
"public abstract Boolean isImportant();",
"boolean hasHas_consequence();",
"protected abstract Builder<T> valid();",
"public io.dstore.values.BooleanValue.Builder getOnlyProceduresInAnyValuesBuilder() {\n \n onChanged();\n return getOnlyProceduresInAnyValuesFieldBuilder().getBuilder();\n }",
"public boolean isVerbosity() {\n return verbosity;\n }",
"public abstract Builder setOutputConfidenceMasks(boolean value);",
"public Cavalier(boolean blanc) {\n super(blanc);\n }",
"public boolean initialConditions() {\n\n boolean evaluable;\n\n\n evaluable = diag.directedLinks();\n\n if (evaluable == false) {\n System.out.print(\"Influence Diagram with no directed links\\n\\n\");\n return (false);\n }\n\n evaluable = ((((IDWithSVNodes) diag).hasOnlyOneTerminalSVNode())\n || (((IDWithSVNodes) diag).hasOnlyOneValueNode()));\n\n\n if (evaluable == false) {\n System.out.print(\"Influence Diagram with 0 or more than 1 terminal super value nodes\\n or hasn't got an only utility node\\n\");\n return (false);\n }\n\n evaluable = diag.hasCycles();\n if (evaluable == true) {\n System.out.print(\"Influence Diagram with cycles\\n\\n\");\n return (false);\n }\n\n diag.addNonForgettingArcs();\n\n evaluable = diag.pathBetweenDecisions();\n if (evaluable == false) {\n System.out.print(\"Influence Diagram with non ordered decisions\\n\\n\");\n return (false);\n }\n\n evaluable = ((IDWithSVNodes) diag).isTreeStructureSV();\n if (evaluable == false) {\n System.out.print(\"Influence Diagram whose structure of value nodes isn't a tree\\n\\n\");\n return (false);\n }\n\n // Remove barren nodes\n\n //diag.eliminateRedundancy();\n diag.removeBarrenNodes();\n\n\n\n // Return true if OK\n\n return (true);\n }",
"public Boolean getIncludeProteinSequences() {\n\n \n\n if (includeProteinSequences == null) {\n includeProteinSequences = false;\n }\n\n return includeProteinSequences;\n\n }",
"public boolean isShowcoor() {\r\n\t\treturn showcoor;\r\n\t}",
"public boolean isCatelogBased()\n {\n return catelogBased;\n }",
"public Builder setRequired(boolean value) {\n\n required_ = value;\n bitField0_ |= 0x00000002;\n onChanged();\n return this;\n }",
"public Character getRentalFlag() {\n return rentalFlag;\n }",
"public void getEaten() {\n\t\tsuper.flag=true;\n\t}",
"public Boolean getMainFlag() {\n return mainFlag;\n }",
"public String build() {\n StringBuilder sb = new StringBuilder();\n\n appendColor(sb);\n sb.append(flagSymbol);\n appendIndentation(sb);\n appendProperty(sb);\n appendValue(sb);\n appendDefaultColor(sb);\n\n return sb.toString();\n }",
"public boolean buildModel() {\n \treturn buildModel(false, false);\n }"
] | [
"0.5457502",
"0.5423454",
"0.53888726",
"0.5377929",
"0.53705645",
"0.5354467",
"0.527543",
"0.52385324",
"0.523228",
"0.52222586",
"0.52191675",
"0.515111",
"0.5143353",
"0.5141309",
"0.51364577",
"0.5134679",
"0.5128099",
"0.5120594",
"0.511632",
"0.5106112",
"0.5097099",
"0.5095397",
"0.5091427",
"0.50897944",
"0.50757605",
"0.50757605",
"0.50757605",
"0.5069287",
"0.5063521",
"0.5051328",
"0.50382316",
"0.5034552",
"0.5017493",
"0.5008358",
"0.49818826",
"0.49667186",
"0.49652576",
"0.4960993",
"0.4960766",
"0.4951866",
"0.49421665",
"0.493406",
"0.49329963",
"0.49310967",
"0.49110574",
"0.49008122",
"0.48987317",
"0.48987317",
"0.48982358",
"0.48971114",
"0.48961917",
"0.48955122",
"0.48811662",
"0.48793012",
"0.48783267",
"0.4878201",
"0.48781008",
"0.48777482",
"0.48746777",
"0.48689887",
"0.4866001",
"0.4865033",
"0.48612964",
"0.48555812",
"0.48490283",
"0.484444",
"0.4842977",
"0.48366934",
"0.48336372",
"0.48332137",
"0.48312414",
"0.48307586",
"0.4824514",
"0.48242825",
"0.48229504",
"0.48228043",
"0.4820194",
"0.4817484",
"0.4816446",
"0.48122936",
"0.48089275",
"0.48077294",
"0.48066017",
"0.480548",
"0.4804475",
"0.48016122",
"0.48006147",
"0.4799057",
"0.4795286",
"0.47936678",
"0.4792868",
"0.4789964",
"0.4781022",
"0.4778655",
"0.47779486",
"0.47607797",
"0.47557068",
"0.47551188",
"0.47528362",
"0.4752786",
"0.4751882"
] | 0.0 | -1 |
Sets the rule this consequence was triggered by. | public void setRule(String _ruleCode, String _ruleName) {
Rule r = (Rule) this.cache.get(Rule.class, _ruleCode);
if (r == null) {
r = new Rule(_ruleCode, _ruleName);
}
this.setRule(r);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setRule(Rule rule);",
"public void setRule(RuleDefinition.Builder rule) {\r\n\t\t\tthis.rule = rule;\r\n\t\t}",
"public void setRule(final String rule) {\r\n this.rule = rule;\r\n }",
"public void setRule(int rule) {\n\t\tthis.rule = rule;\n\t}",
"public void setRule(IRule rule)\n\t{\n\t\tthis.rule = rule;\n\t}",
"public void setRule(java.lang.String rule) {\n this.rule = rule;\n }",
"public void setRule(int r)\n { \n rule = r;\n repaint();\n }",
"private void setCurrentRule(){\n\tfor(int i=0; i<ConditionTree.length;i++){\n\t\tif(ConditionTree[i][1].equals(\"-\")){\n\t\t\tcurrentRule = ConditionTree[i][0];\n\t\t\tcurrentRuleIndex = i;\n\t\t}\n\t}\n}",
"public Builder setRule(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n rule_ = value;\n onChanged();\n return this;\n }",
"@PathParam(\"rule\")\n public void setRule(@NotNull(message = \"rule name can't be NULL\")\n final String rle) {\n this.rule = rle;\n }",
"public MethodBuilder rule(String rule) {\n\t\tthis.rule = rule;\n\t\treturn this;\n\t}",
"private void setValueToRule() {\n\t\t\n\t\tif(!currRule.isEmpty()) {\n\t\t\tAntiSpamFilterControl.setWeigthByRuleManual(currRule, Double.parseDouble(manualRuleValue.getText()));\n\t\t}\n\t\t\n\t\tif(manualCBRules.isValid()) {\n\t\t\tcurrRule = manualCBRules.getSelectedItem().toString();\n\t\t}\n\t\tmanualRuleValue.setText(AntiSpamFilterControl.getWeigthByRule(currRule, true) + \"\");\n\t}",
"public void add_rule(Rule rule) throws Exception;",
"public CachingKoRule(RuleSet rule) {\n\t\tthis.rule = rule;\n\t}",
"public RuleConfiguration() {\n\t\trule = new Rule();\n\t}",
"public void setIntelligenceRule(IntelligenceRule IntelligenceRule) {\n this.IntelligenceRule = IntelligenceRule;\n }",
"public CommonAlert rule(AlertRuleProperties rule) {\n this.rule = rule;\n return this;\n }",
"public String getRule() {\r\n return rule;\r\n }",
"public void start(int rule) {\n\n if (rule > 255 || rule < 0) {\n throw new IllegalArgumentException(\"Ruleset must be between 0 and 255!\");\n }\n\n reset();\n ruleset = intToBinaryReverse(rule);\n draw();\n }",
"public RuleEvent(R rule, Trackable trackable) {\n this.rule = rule;\n this.pos = trackable.getPosition();\n }",
"public ProcessingRule(String namespace, String localName, String description, Phase phase, Topic topic, List<Implementation> dependsOnImplementation, List<OntologyDependency> dependsOnOntologyDependency, String rule) {\n super(namespace, localName, description, phase, topic, dependsOnImplementation, dependsOnOntologyDependency);\n this.rule = rule;\n }",
"IRuleset add(IRuleset rule);",
"public void setRules(int index, ContextRule value) {\n value.getClass();\n ensureRulesIsMutable();\n this.rules_.set(index, value);\n }",
"@BusSignalHandler(iface = ConstantsTest.INTERFACE_NAME, signal = \"updateRule\")\n public void updateRule(String newRule) {\n Message msg = busHandler.obtainMessage(BusHandler.UPDATE_RULE);\n msg.obj = newRule;\n busHandler.sendMessage(msg);\n }",
"public void setUaBotRule(BotManagedRule UaBotRule) {\n this.UaBotRule = UaBotRule;\n }",
"public ReactionCommand( Reaction rule, Bigraph target )\n\t{\n\t\tthis.target = target;\n\t\tthis.rule = rule;\n\t\t//this.part = part;\n\t}",
"public void setRule(String identifier, FormattingRule rule)\n {\n formattingRules.put(identifier, rule);\n }",
"public void addRule(final Rule rule)\n {\n if (rule == null)\n {\n throw new NullPointerException(\"rule MUST NOT be null\");\n }\n\n this.rules.add(rule);\n }",
"public void setRuleId(Integer value) {\n setAttributeInternal(RULEID, value);\n }",
"public void setRuleSelector(String ruleSel)\n {\n this.ruleSelector = ruleSel;\n }",
"public String getRule() {\n\t\treturn this.rule;\n\t}",
"@Required\n public void setRules(Set<Rule> rules)\n {\n this.rules = new TreeSet<Rule>(new RuleComparator());\n this.rules.addAll(rules);\n }",
"Rule getRule();",
"public void setRuleType(RuleType ruleType) {\n this.ruleType = ruleType;\n }",
"public Builder clearRule() {\n \n rule_ = getDefaultInstance().getRule();\n onChanged();\n return this;\n }",
"public void setCourseRule(Short courseRule) {\n\t\tthis.courseRule = courseRule;\n\t}",
"public java.lang.String getRule() {\n return rule;\n }",
"public void xsetRules(com.walgreens.rxit.ch.cda.StrucDocTable.Rules rules)\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.walgreens.rxit.ch.cda.StrucDocTable.Rules target = null;\n target = (com.walgreens.rxit.ch.cda.StrucDocTable.Rules)get_store().find_attribute_user(RULES$26);\n if (target == null)\n {\n target = (com.walgreens.rxit.ch.cda.StrucDocTable.Rules)get_store().add_attribute_user(RULES$26);\n }\n target.set(rules);\n }\n }",
"Rule createRule();",
"Rule createRule();",
"Rule createRule();",
"public void setRuleID(Long RuleID) {\n this.RuleID = RuleID;\n }",
"private void applyRules(boolean install, FlowRule rule) {\n FlowRuleOperations.Builder ops = FlowRuleOperations.builder();\n\n ops = install ? ops.add(rule) : ops.remove(rule);\n flowRuleService.apply(ops.build(new FlowRuleOperationsContext() {\n @Override\n public void onSuccess(FlowRuleOperations ops) {\n log.trace(\"HP Driver: - applyRules onSuccess rule {}\", rule);\n }\n\n @Override\n public void onError(FlowRuleOperations ops) {\n log.trace(\"HP Driver: applyRules onError rule: \" + rule);\n }\n }));\n }",
"public void setRuleType(java.lang.Short ruleType) {\r\n this.ruleType = ruleType;\r\n }",
"@Override\n public void setRules(List rules) {\n this.rules = rules;\n if (schemaGraph != null) {\n // The change of rules invalidates the existing precomputed schema graph\n // This might be recoverable but for now simply flag the error and let the\n // user reorder their code to set the rules before doing a bind!\n throw new ReasonerException(\"Cannot change the rule set for a bound rule reasoner.\\nSet the rules before calling bindSchema\");\n }\n }",
"public void setRuleId(String ruleId) {\n this.ruleId = ruleId;\n }",
"public void setRuleId(String value) {\r\n setAttributeInternal(RULEID, value);\r\n }",
"@Override public ParserRule getRule() { return rule; }",
"@Override public ParserRule getRule() { return rule; }",
"@Override public ParserRule getRule() { return rule; }",
"@Override public ParserRule getRule() { return rule; }",
"@Override public ParserRule getRule() { return rule; }",
"@Override public ParserRule getRule() { return rule; }",
"@Override public ParserRule getRule() { return rule; }",
"@Override public ParserRule getRule() { return rule; }",
"@Override public ParserRule getRule() { return rule; }",
"@Override public ParserRule getRule() { return rule; }",
"@Override public ParserRule getRule() { return rule; }",
"@Override public ParserRule getRule() { return rule; }",
"@Override public ParserRule getRule() { return rule; }",
"@Override public ParserRule getRule() { return rule; }",
"@Override public ParserRule getRule() { return rule; }",
"@Override public ParserRule getRule() { return rule; }",
"@Override public ParserRule getRule() { return rule; }",
"@Override public ParserRule getRule() { return rule; }",
"@Override public ParserRule getRule() { return rule; }",
"@Override public ParserRule getRule() { return rule; }",
"@Override public ParserRule getRule() { return rule; }",
"@Override public ParserRule getRule() { return rule; }",
"@Override public ParserRule getRule() { return rule; }",
"@Override public ParserRule getRule() { return rule; }",
"@Override public ParserRule getRule() { return rule; }",
"@Override public ParserRule getRule() { return rule; }",
"@Override public ParserRule getRule() { return rule; }",
"@Override public ParserRule getRule() { return rule; }",
"@Override public ParserRule getRule() { return rule; }",
"@Override public ParserRule getRule() { return rule; }",
"@Override public ParserRule getRule() { return rule; }",
"@Override public ParserRule getRule() { return rule; }",
"@Override public ParserRule getRule() { return rule; }",
"@Override public ParserRule getRule() { return rule; }",
"@Override public ParserRule getRule() { return rule; }",
"@Override public ParserRule getRule() { return rule; }",
"@Override public ParserRule getRule() { return rule; }",
"@Override public ParserRule getRule() { return rule; }",
"@Override public ParserRule getRule() { return rule; }",
"@Override public ParserRule getRule() { return rule; }",
"@Override public ParserRule getRule() { return rule; }",
"@Override public ParserRule getRule() { return rule; }",
"@Override public ParserRule getRule() { return rule; }",
"@Override public ParserRule getRule() { return rule; }",
"@Override public ParserRule getRule() { return rule; }",
"@Override public ParserRule getRule() { return rule; }",
"@Override public ParserRule getRule() { return rule; }",
"@Override public ParserRule getRule() { return rule; }",
"@Override public ParserRule getRule() { return rule; }",
"@Override public ParserRule getRule() { return rule; }",
"@Override public ParserRule getRule() { return rule; }",
"@Override public ParserRule getRule() { return rule; }",
"@Override public ParserRule getRule() { return rule; }",
"@Override public ParserRule getRule() { return rule; }"
] | [
"0.7756497",
"0.74640554",
"0.7252207",
"0.7243189",
"0.69513744",
"0.69271135",
"0.691588",
"0.6744237",
"0.6489892",
"0.6442925",
"0.6281157",
"0.6227015",
"0.61421955",
"0.6129025",
"0.60864884",
"0.6048917",
"0.601443",
"0.59197396",
"0.5897901",
"0.58328766",
"0.58043945",
"0.57781696",
"0.5696559",
"0.5691579",
"0.5670173",
"0.56589407",
"0.563852",
"0.562614",
"0.5615215",
"0.55790067",
"0.55705523",
"0.55638474",
"0.5560904",
"0.5557877",
"0.55541396",
"0.5532193",
"0.55309296",
"0.55224127",
"0.550363",
"0.550363",
"0.550363",
"0.5466684",
"0.5461134",
"0.5453843",
"0.5444094",
"0.5434977",
"0.54332864",
"0.5431657",
"0.5431657",
"0.5431657",
"0.5431657",
"0.5431657",
"0.5431657",
"0.5431657",
"0.5431657",
"0.5431657",
"0.5431657",
"0.5431657",
"0.5431657",
"0.5431657",
"0.5431657",
"0.5431657",
"0.5431657",
"0.5431657",
"0.5431657",
"0.5431657",
"0.5431657",
"0.5431657",
"0.5431657",
"0.5431657",
"0.5431657",
"0.5431657",
"0.5431657",
"0.5431657",
"0.5431657",
"0.5431657",
"0.5431657",
"0.5431657",
"0.5431657",
"0.5431657",
"0.5431657",
"0.5431657",
"0.5431657",
"0.5431657",
"0.5431657",
"0.5431657",
"0.5431657",
"0.5431657",
"0.5431657",
"0.5431657",
"0.5431657",
"0.5431657",
"0.5431657",
"0.5431657",
"0.5431657",
"0.5431657",
"0.5431657",
"0.5431657",
"0.5431657",
"0.5431657",
"0.5431657"
] | 0.0 | -1 |
Interface that persists data of type T and notifies whether persistence was successful via the persistence callback | public interface PersistenceDelegate<T> {
/**
* This method saves the data of type T.
* @param data - the data to save
* @param callback - the persistence callback
*/
public boolean save(T data) throws MIDaaSException;
/**
* This method deletes the data of type T.
* @param data - the data to delete
* @param callback - the persistence callback
*/
public boolean delete(T data) throws MIDaaSException;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface Persistence<T> {\n public T retrieve(String path) throws IOException, BadFormatException;\n public void save(T object, String path) throws IOException;\n}",
"T save(T t);",
"@Override\r\n\tpublic void save(T t) {\n\t\tgetSession().save(t);\r\n\t}",
"<T> Serializable save(T persistentObject);",
"T persist(T obj) throws PersistException;",
"@Override\n\tpublic void persist(T obj) throws Exception {\n\t\t\n\t}",
"int save(T t);",
"public boolean save(T data) throws MIDaaSException;",
"@Override\n\tpublic void saveEntity(T t) {\n\t\tgetSession().save(t);\n\t}",
"@Override\n public void persist() {\n }",
"void save(T entity);",
"@Override\n\tpublic void persist(Object entity) {\n\t\t\n\t}",
"@Override\r\n\tpublic void persist() {\n\t}",
"T save(T object);",
"@Override\n public void save(T element) {\n manager.persist(element);\n }",
"void persist() throws PersistenceException;",
"public interface PersistenceImplementor {\n public boolean persistObject(Object object);\n\n public boolean persistAllObjects(Object[] objects);\n\n public Object loadObject(String objectID);\n\n public Object[] loadAllObjects();\n}",
"@Override\n\tpublic void saveEntry(T t) {\n\t\tthis.hibernateTemplate.save(t);\n\t}",
"@Override\n\tpublic T save(T entity) {\n\t\treturn getDao().save(entity);\n\t}",
"T save(T obj);",
"@Override\n\tpublic T save(T t) {\n\t\t hibernateTemplate.getSessionFactory().getCurrentSession().save(t);\n\t\treturn t;\n\t}",
"public <T> T save(T entity);",
"@Override\n\tpublic void save( T entity) {\n\t baseDaoImpl.save(entity);\n\t}",
"public void store() throws PersistenceException {\n }",
"public interface Storable<T> {\n\n /**\n * Creates a new instance.\n *\n * @param instance is a generic type that the implementor class decides.\n */\n void create(T instance) throws IOException;\n\n /**\n * Reads an existing instance.\n * Note that each implementing class must know the fields of the object it reads,\n * thus demanding a unique implementation for each respective model.\n *\n * @param identifier is a String representation of a unique property of the type T.\n * @return a generic type that the implementor class decides.\n */\n T read(String identifier) throws IOException;\n\n\n /**\n * Updates an existing instance.\n * Note that each implementing class must know the fields of the object it updates,\n * thus demanding a unique implementation for each respective model.\n *\n * @param identifier is a String representation of a unique property of the type T.\n * @param instance is the generic object to be updated.\n */\n void update(String identifier, T instance) throws IOException;\n\n\n /**\n * Deletes an existing instance.\n * Note that each implementing class must know the fields of the object it deletes,\n * thus demanding a unique implementation for each respective model.\n *\n * @param identifier is a String representation of a unique property of the type T.\n */\n void delete(String identifier) throws IOException;\n}",
"Boolean save(T entity);",
"public interface PersistentDataCallbacks {\n \n /**\n * Provides keyed storage of strings. Should be used for per-folder data. Do not use for\n * per-message data.\n * @param key identifier for the data (e.g. \"sync.key\" or \"folder.id\")\n * @param value Data to persist. All data must be encoded into a string,\n * so use base64 or some other encoding if necessary.\n */\n public void setPersistentString(String key, String value);\n\n /**\n * @param key identifier for the data of interest\n * @return the data saved by the Folder, or defaultValue if never set.\n */\n public String getPersistentString(String key, String defaultValue);\n \n /**\n * In a single transaction: Set a key/value pair for the folder, and bulk set or clear\n * message flags. Typically used at the beginning or conclusion of a bulk sync operation.\n * \n * @param key if non-null, the transaction will set this folder persistent value\n * @param value the value that will be stored for the key\n * @param setFlags if non-null, flag(s) will be set for all messages in the folder\n * @param clearFlags if non-null, flag(s) will be cleared for all messages in the folder\n */\n public void setPersistentStringAndMessageFlags(String key, String value,\n Flag[] setFlags, Flag[] clearFlags) throws MessagingException;\n }",
"public IPersistence<T> getPersistence();",
"void saveStorage(StorageEntity storage);",
"interface Database {\n\tpublic void persist(String data); \n\t\n}",
"T save(T entity);",
"T save(T entity);",
"T save(T entity);",
"long save(T item) throws DaoException;",
"@Override\n\tpublic Dispositivo save(Dispositivo t) {\n\t\treturn dispositivoDao.save(t);\n\t}",
"public void doSave(T objectToSave) throws SQLException;",
"<T> void saveOrUpdate(T persistentObject);",
"@Override\n\tpublic void save(T obj) throws Exception {\n\t\t\n\t}",
"boolean saveInstrument(T instrument) throws DaoException;",
"public interface Persistable {\n\tvoid createDirs(List<Entry> entries) throws JAXBException;\n\n\tvoid saveDocumentArchive(List<Entry> entries, Entry targetFileName, InputStream inputStream) throws JAXBException;\n\n\tvoid saveErrorInfo(List<Entry> entries, Entry file, ExceptionEntry exceptionEntry) throws JAXBException;\n\n\tvoid saveDocumentFilesInfo(List<Entry> parents2, Entry document, String category) throws JAXBException;\n}",
"Type persistir(Type type);",
"protected void persist(T item) {\n\t\tSession session = null;\n\t\ttry {\n\t\t\tsession = mDbHelper.beginTransaction();\n\t\t\tsession.persist(item);\n\t\t\tmDbHelper.endTransaction(session);\n\t\t} catch (Exception e) {\n\t\t\tmDbHelper.cancelTransaction(session);\n\t\t\tAppLogger.error(e, \"Failed to execute persist\");\n\t\t}\n\t}",
"T makePersistent(T entity);",
"protected abstract void doSave();",
"@Override\r\n\tpublic void save(T instance) {\r\n\t\tif (isManaged(instance)) {\r\n\t\t\tgetEntityManager().merge(instance);\r\n\t\t} else {\r\n\t\t\tgetEntityManager().persist(instance);\r\n\t\t}\r\n\t}",
"public int save(Type t) {\n\t\treturn 0;\r\n\t}",
"public void save() {\n if(persistenceType == PropertyPersistenceType.Persistent) {\n if (!isSetToDefault()) {\n permanentStore.setBoolean(key, get());\n } else {\n permanentStore.remove(key);\n }\n }\n }",
"public void persist(T entity) {\n getSession().persist(entity);\n }",
"public void persist(T entity) {\n getSession().persist(entity);\n }",
"public void postDoSave(T entity)\n {\n }",
"public abstract void leerPersistencia();",
"public boolean save();",
"void save(T entity, boolean editMode) throws PersistenceException;",
"public interface CreateData<T extends SaveableData> {\r\n T createElement();\r\n}",
"<T> void update(T persistentObject);",
"public void save();",
"public void save();",
"public void save();",
"public void save();",
"@SuppressWarnings(\"unused\")\n protected void afterSave(T object) {\n //\n }",
"private void saveData() {\n }",
"@Transactional\n\t@Override\n\tpublic Paradero save(Paradero t) throws Exception {\n\t\treturn paraderoRespository.save(t);\n\t}",
"public void persist(String key, Object value)\r\n\t{\r\n\t\tgetPersistenceMap().put(key, value);\r\n\t}",
"@Override\n public int save(T entity) {\n return mapper.insert(entity);\n }",
"@Override\n\tpublic void save() {\n\t\t\n\t}",
"@Override\n\tpublic void save() {\n\t\t\n\t}",
"public abstract boolean store();",
"public interface DistributeStorage<T> {\n public void store(String path, T t, boolean create) throws StorageException;\n\n public T get(String path, Class<T> tClass) throws StorageException;\n\n public void del(String path) throws StorageException;\n\n public boolean exist(String path) throws StorageException;\n}",
"public Boolean persistent();",
"public void saveData ( ) {\n\t\tinvokeSafe ( \"saveData\" );\n\t}",
"@Override\r\n\tpublic int save(SpUser t) {\n\t\treturn 0;\r\n\t}",
"public Saver save() {\n return new AugmentedSaver() {\n @Override\n protected void handleSave(Iterable<?> entities) {\n assertInTransaction();\n checkState(\n Streams.stream(entities).allMatch(Objects::nonNull), \"Can't save a null entity.\");\n checkProhibitedAnnotations(entities, NotBackedUp.class, VirtualEntity.class);\n ImmutableMap<Key<?>, ?> keysToEntities = uniqueIndex(entities, Key::create);\n TRANSACTION_INFO.get().putSaves(keysToEntities);\n }\n };\n }",
"<S extends T> S save(S entity);",
"<S extends T> S save(S entity);",
"@Transactional\n\t@Override\n\tpublic String save(Detail t) {\n\t\treturn null;\n\t}",
"public abstract boolean isPersistent();",
"void update(T obj) throws PersistException;",
"@Override\r\n\tpublic void save() {\n\r\n\t}",
"@Override\r\n\tpublic void save() {\n\r\n\t}",
"public boolean onSave(Session s) throws CallbackException;",
"public void persist(DataOutputStream dos) throws Exception;",
"public void save(T t) {\n\t\tif (t instanceof Student) {\n\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\tController<Person> controller = ControllerFactory.getInstance(ControllerFactory.PERSON);\n\t\t\tcontroller.save(((Student) t).getFather());\n\t\t\tcontroller.save(((Student) t).getMother());\n\t\t}\n\t\tif (t.getId() == -1) {\n\t\t\tt.setId(this.nextID++);\n\t\t}\n\t\tthis.data.put(t.getId(), t);\n\t}",
"@Override\n public void Save() {\n\t \n }",
"<T> void persist(T... entities);",
"@Override\n public void save() {\n\n }",
"@Override\r\n\tpublic void create(T t) {\n\t\tsuper.getSessionFactory().getCurrentSession().save(t);\r\n\t\tsuper.getSessionFactory().getCurrentSession().flush();\r\n\t}",
"public void save() {\n }",
"void saveSaves(Object data, Context context);",
"@Override\r\n\tpublic void salvar(Plano t) {\n\t\tEntityManager em = new Conexao().getInstance();\r\n\t\tem.getTransaction().begin();\r\n\t\tem.persist(t);\r\n\t\tem.getTransaction().commit();\r\n\t\tem.close();\r\n\t}",
"@Transactional\n\t@Override\n\tpublic void save(T entity) {\n\t\tregistroDao.save((Registro)entity);\t\t\n\t}",
"public void save(Object instance);",
"@Override\r\n\tpublic void save(T elemento) {\n\r\n\t}",
"public interface Persistable {\n\n void start();\n\n void stop();\n\n void resume();\n\n void pause();\n\n void onRestoreInstanceState(Bundle savedInstanceState);\n\n void onSaveInstanceState(Bundle savedInstanceState);\n}",
"@Override\r\n\tpublic void persist(TimetableVO vo) {\n\t\tentityManager.persist(vo);\r\n\t}",
"public abstract void saveOrUpdate(T entity);",
"public abstract void persist(List<? extends edu.uncc.genosets.datamanager.persister.Persister> persisters);",
"@Override\r\n\tpublic void save() {\n\r\n\t\ts.save();\r\n\r\n\t}",
"void save(Object entity);",
"void save(E entity);",
"public interface IDBStorableModel {\n\n\t/**\n\t * Saves the model to db\n\t * \n\t * @param db\n\t * @return\n\t */\n\tpublic void store(DBConnection db) throws IOException;\n\t\n}"
] | [
"0.72265303",
"0.72135913",
"0.7089525",
"0.7048737",
"0.70417476",
"0.70367354",
"0.70305175",
"0.6859785",
"0.6847824",
"0.6724488",
"0.66963553",
"0.66889894",
"0.6687631",
"0.6681789",
"0.66356075",
"0.6566125",
"0.6557356",
"0.65485406",
"0.65113556",
"0.64524174",
"0.64293474",
"0.6395646",
"0.63946825",
"0.6387739",
"0.6381356",
"0.6374198",
"0.6336403",
"0.631078",
"0.6306292",
"0.6295606",
"0.62603724",
"0.62603724",
"0.62603724",
"0.622553",
"0.62222403",
"0.618926",
"0.6187971",
"0.61767983",
"0.61735606",
"0.6133215",
"0.61172867",
"0.6052495",
"0.6017879",
"0.6008065",
"0.5996741",
"0.5975382",
"0.5954746",
"0.5952386",
"0.5952386",
"0.5938306",
"0.59321433",
"0.5912429",
"0.5895963",
"0.5894963",
"0.5893189",
"0.5877265",
"0.5877265",
"0.5877265",
"0.5877265",
"0.58718866",
"0.586262",
"0.5862469",
"0.5859637",
"0.5857012",
"0.5856428",
"0.5856428",
"0.58523387",
"0.58411473",
"0.58397937",
"0.5838841",
"0.58225006",
"0.58205163",
"0.5812611",
"0.5812611",
"0.58101225",
"0.58098936",
"0.5798968",
"0.5795102",
"0.5795102",
"0.57864505",
"0.57842183",
"0.5781207",
"0.57763827",
"0.5772526",
"0.57690287",
"0.5767273",
"0.5764117",
"0.5761923",
"0.5753944",
"0.573037",
"0.573034",
"0.57259977",
"0.57070374",
"0.57064766",
"0.5705239",
"0.5699302",
"0.5689985",
"0.5689208",
"0.5676397",
"0.5668717"
] | 0.715176 | 2 |
This method saves the data of type T. | public boolean save(T data) throws MIDaaSException; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int save(T t);",
"T save(T t);",
"T save(T obj);",
"@Override\r\n\tpublic void save(T t) {\n\t\tgetSession().save(t);\r\n\t}",
"private void saveData() {\n }",
"public int save(Type t) {\n\t\treturn 0;\r\n\t}",
"@Override\n\tpublic void save(T obj) throws Exception {\n\t\t\n\t}",
"@Override\r\n\tpublic void save(T elemento) {\n\r\n\t}",
"T save(T object);",
"R serializeData(T t);",
"public void saveData ( ) {\n\t\tinvokeSafe ( \"saveData\" );\n\t}",
"public void save(T t) {\n\t\tif (t instanceof Student) {\n\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\tController<Person> controller = ControllerFactory.getInstance(ControllerFactory.PERSON);\n\t\t\tcontroller.save(((Student) t).getFather());\n\t\t\tcontroller.save(((Student) t).getMother());\n\t\t}\n\t\tif (t.getId() == -1) {\n\t\t\tt.setId(this.nextID++);\n\t\t}\n\t\tthis.data.put(t.getId(), t);\n\t}",
"@Override\n\tpublic void saveEntity(T t) {\n\t\tgetSession().save(t);\n\t}",
"public void save(HashMap<Integer, T> data) {\n\t\tthis.data.putAll(data);\n\t}",
"@Override\n\tpublic T save(T t) {\n\t\t hibernateTemplate.getSessionFactory().getCurrentSession().save(t);\n\t\treturn t;\n\t}",
"void saveSaves(Object data, Context context);",
"void save(T entity);",
"private void saveData() {\n\t\tdataSaver.save(data);\n\t}",
"public void save() {\n UTILS.write(FILE.getAbsolutePath(), data);\n }",
"public void doSave(T objectToSave) throws SQLException;",
"void saveData() throws SerializerException;",
"@Override\n\tpublic T save(T entity) {\n\t\treturn getDao().save(entity);\n\t}",
"public void saveData() {\n throw new UnsupportedOperationException(\"Not yet supported\");\n }",
"public void saveData() {\n\t\t//place to save notes e.g to file\n\t}",
"public void setData(T data){\n this.data = data;\n }",
"@Override\n\tpublic void saveEntry(T t) {\n\t\tthis.hibernateTemplate.save(t);\n\t}",
"@Override\n\tpublic void save( T entity) {\n\t baseDaoImpl.save(entity);\n\t}",
"@Override\r\n\tpublic void save(Plate tipo) {\n\t\t\r\n\t}",
"<T> Serializable save(T persistentObject);",
"public void save() {\t\n\t\n\t\n\t}",
"public boolean save(Data model);",
"void save();",
"void save();",
"void save();",
"@Override\n\tpublic void save() {\n\t\t\n\t}",
"@Override\n\tpublic void save() {\n\t\t\n\t}",
"@Override\n\tpublic void save(DataKey arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void persist(T obj) throws Exception {\n\t\t\n\t}",
"public <T> T save(T entity);",
"@Override\n public void save() {\n \n }",
"@Override\n public int save(T entity) {\n return mapper.insert(entity);\n }",
"public void put(T data){\r\n\t\tthis.data = data;\r\n\t}",
"@PortedFrom(file = \"ToDoList.h\", name = \"save\")\n protected void save(TODOListSaveState tss) {\n tss.sp = sPointer;\n tss.ep = size;\n }",
"public void save() {\n DataBuffer.saveDataLocally();\n\n //TODO save to db must be done properly\n DataBuffer.save(session);\n\n //TODO recording saved confirmation\n }",
"@Override\n public void save()\n {\n \n }",
"public void save();",
"public void save();",
"public void save();",
"public void save();",
"@SuppressWarnings(\"unused\")\n protected void afterSave(T object) {\n //\n }",
"public void saveData(){\r\n file.executeAction(modelStore);\r\n }",
"abstract public void saveData(Bundle bundle);",
"@Override\n public void Save() {\n\t \n }",
"public void save(List<T> data) {\n\t\ttry {\n\t\t\tFile file = new File(getFileLocation());\n\t\t\tif (!file.getParentFile().exists()) {\n\t\t\t\tfile.getParentFile().mkdirs();\n\t\t\t}\n\t\t\tFileWriter fw = new FileWriter(getFileLocation());\n\t\t\tBufferedWriter bw = new BufferedWriter(fw);\n\t\t\tbw.write(gson.toJson(data));\n\t\t\tbw.close();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void saveData() {\n try {\n JsonWriter jw = new JsonWriter(openFileOutput(DATA_FILE, Context.MODE_PRIVATE));\n jw.write(user);\n jw.close();\n } catch(Exception e) {\n Log.i(\"Exception :\", e.toString());\n }\n }",
"protected void saveValues() {\n dataModel.persist();\n }",
"@Override\r\n\tpublic void save() {\n\r\n\t\ts.save();\r\n\r\n\t}",
"@Override\n public void saveValues() {\n \n }",
"public void saveOrUpdate(T entity) {\n\t\t\n\t}",
"public void save() {\n ProductData.saveData(tree);\n }",
"@Override\n public void save(T element) {\n manager.persist(element);\n }",
"public void saveData(){\n SerializableManager.saveSerializable(this,user,\"userInfo.data\");\n SerializableManager.saveSerializable(this,todayCollectedID,\"todayCollectedCoinID.data\");\n SerializableManager.saveSerializable(this,CollectedCoins,\"collectedCoin.data\");\n uploadUserData uploadUserData = new uploadUserData(this);\n uploadUserData.execute(this.Uid);\n System.out.println(Uid);\n\n }",
"@Override\r\n\tpublic void save() {\n\r\n\t}",
"@Override\r\n\tpublic void save() {\n\r\n\t}",
"private void saveToFileData() {//Context context) {\n try {\n FileOutputStream fileOutputStream = openFileOutput(fileNameData, Context.MODE_PRIVATE);\n ObjectOutputStream objectOutputStream = new ObjectOutputStream(fileOutputStream);\n objectOutputStream.writeObject(Data.userData);\n objectOutputStream.close();\n fileOutputStream.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"@Override\n public void save() {\n\n }",
"@Override\n\tpublic Dispositivo save(Dispositivo t) {\n\t\treturn dispositivoDao.save(t);\n\t}",
"@Override\n\tpublic void save(Tmenu t) throws Exception {\n\t\tmenuMapper.save(t);\n\t\t\n\t}",
"void setData(T data) {\n\t\tthis.data = data;\n\t}",
"public void saveExtraData() {}",
"public void save() {\n }",
"@Override\n\tpublic void saveself(DataTaxTask entity) {\n\t\tcommonDao.saveOrUpdate(entity);\n\t\t\n\t}",
"public abstract void write(T dataElement);",
"void save(Teacher teacher);",
"@Override\n\tpublic Factura save(Factura t) {\n\t\treturn facturaRepository.save(t);\n\t}",
"@Override\r\n\tpublic final void saveObjectData() throws BillingSystemException{\n\t}",
"@Override\r\n\tpublic int save(SpUser t) {\n\t\treturn 0;\r\n\t}",
"private void saveDataType(int type) throws IOException {\r\n FileWriter fileWriter = new FileWriter(\"././ressources/datatype.txt\");\r\n BufferedWriter writer = new BufferedWriter(fileWriter);\r\n writer.write(type + \"\\n\");\r\n writer.close();\r\n fileWriter.close();\r\n }",
"T save(T entity);",
"T save(T entity);",
"T save(T entity);",
"@Override\n\tpublic void saveORUpdate(T obj) throws Exception {\n\t\t\n\t}",
"public void save() {\n super.storageSave(listPedidosAssistencia.toArray());\n }",
"public abstract <T> SerializationStream writeObject(T t);",
"Boolean save(T entity);",
"T persist(T obj) throws PersistException;",
"public void crear(Tarea t) {\n t.saveIt();\n }",
"private void saveData(){\n databaseReference.setValue(new Teacher(0, \"\", 0.0));\n }",
"@Override\r\n\tpublic void salvar(Plano t) {\n\t\tEntityManager em = new Conexao().getInstance();\r\n\t\tem.getTransaction().begin();\r\n\t\tem.persist(t);\r\n\t\tem.getTransaction().commit();\r\n\t\tem.close();\r\n\t}",
"private static void saveData(String data) {\n }",
"private void saveFunction() {\n }",
"void saveTrip(Trip parTrip);",
"@Override\n\tpublic int saveObject(Evaluate entity) {\n\t\treturn evaluateMapper.saveObject(entity)\n\t\t\t\t;\n\t}",
"@Override\n\tpublic void saveTestingData() {\n\t\t\n\t}",
"public void postDoSave(T entity)\n {\n }",
"public void save(T obj) {\n\t\tSession session = sessionFactory.getCurrentSession();\n\t\t//session.save(obj);\n\t\tsession.persist(obj);\n\t}",
"protected abstract void doSave();",
"public void saveOrUpdate(T o);",
"Type persistir(Type type);",
"private void saveData() {\n readViews();\n final BookEntry bookEntry = new BookEntry(mNameString, mQuantityString, mPriceString, mSupplier, mPhoneString);\n AppExecutors.getInstance().diskIO().execute(new Runnable() {\n @Override\n public void run() {\n // Insert the book only if mBookId matches DEFAULT_BOOK_ID\n // Otherwise update it\n // call finish in any case\n if (mBookId == DEFAULT_BOOK_ID) {\n mDb.bookDao().insertBook(bookEntry);\n } else {\n //update book\n bookEntry.setId(mBookId);\n mDb.bookDao().updateBook(bookEntry);\n }\n finish();\n }\n });\n }"
] | [
"0.7956026",
"0.7787508",
"0.7131323",
"0.710082",
"0.70830494",
"0.699524",
"0.6979817",
"0.6942214",
"0.6891076",
"0.6744565",
"0.67370695",
"0.67090374",
"0.6703304",
"0.6666319",
"0.66611314",
"0.66119325",
"0.659716",
"0.65703785",
"0.65478253",
"0.6510383",
"0.64958555",
"0.64450145",
"0.64219886",
"0.64054924",
"0.63957125",
"0.6383177",
"0.63543713",
"0.6332035",
"0.63275427",
"0.6327148",
"0.6311416",
"0.6309171",
"0.6309171",
"0.6309171",
"0.63008094",
"0.63008094",
"0.62957025",
"0.6272201",
"0.6269897",
"0.6264933",
"0.624514",
"0.6215391",
"0.6209502",
"0.6209444",
"0.62081933",
"0.61988765",
"0.61988765",
"0.61988765",
"0.61988765",
"0.6197436",
"0.61973876",
"0.6196781",
"0.61932456",
"0.61740166",
"0.61617905",
"0.6147702",
"0.6142606",
"0.6142041",
"0.6134315",
"0.6133351",
"0.6131462",
"0.6109347",
"0.6098881",
"0.6098881",
"0.60869527",
"0.60641235",
"0.6063432",
"0.6044544",
"0.6040847",
"0.6034972",
"0.60340005",
"0.60301167",
"0.5987952",
"0.59809023",
"0.59807235",
"0.59789485",
"0.5967769",
"0.59462595",
"0.5930411",
"0.5930411",
"0.5930411",
"0.59281296",
"0.59173584",
"0.59138584",
"0.59061855",
"0.5903702",
"0.5902914",
"0.5883095",
"0.5879664",
"0.5877563",
"0.58737653",
"0.5863693",
"0.5859137",
"0.5857936",
"0.58551675",
"0.584738",
"0.5827327",
"0.5825078",
"0.5822574",
"0.5817724"
] | 0.7300749 | 2 |
This method deletes the data of type T. | public boolean delete(T data) throws MIDaaSException; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void delData();",
"void delete(T t);",
"@Override\n\tpublic int delete(int t) {\n\t\treturn 0;\n\t}",
"private void clearData() {}",
"public void delete(T e);",
"@Override\n\t\tpublic void delete() {\n\n\t\t}",
"@Override\n public void deleteItem(P_CK t) {\n \n }",
"void delete(T obj);",
"@Override\r\n\tpublic void delete(T element) {\n\r\n\t}",
"@Override\r\n\tpublic void supprimerTVA(TVA t) {\n\t\t\r\n\t}",
"@Override\n public void clearData() {\n }",
"@Override\n\tpublic void delete(T entity) {\n\t}",
"public void delete(T element);",
"public void clearData()\r\n {\r\n \r\n }",
"@Override\n\tpublic void delete(T t) {\n\t\thibernateTemplate.delete(t);\n\t}",
"int delete(T data) throws SQLException, DaoException;",
"public void clearData() {\r\n\t\tdata = null;\r\n\t}",
"protected void clearData() {\n any.type(any.type());\n }",
"@Override\n public void delete()\n {\n }",
"@Override\n\tpublic void delete(BatimentoCardiaco t) {\n\t\t\n\t}",
"@Override\n\tpublic void delete(T obj) throws Exception {\n\t\t\n\t}",
"void clearData();",
"public void cleanupData() {\n\t}",
"public void delete(T arg0) {\n\t\t\n\t}",
"public void doDelete(T objectToDelete) throws SQLException;",
"public void clearData(){\n\r\n\t}",
"public void deleteData(String filename, SaveType type);",
"public void delete()\n {\n if (this.data != null)\n {\n this.data.free();\n this.data = null;\n }\n \n this.width = 0;\n this.height = 0;\n \n this.mipmaps = 1;\n }",
"public boolean remove(Type t);",
"void delete(T persistentObject);",
"public void deleteCt() {\n\t\tlog.info(\"-----deleteCt()-----\");\n\t\t//int index = selected.getCtXuatKho().getCtxuatkhoThutu().intValue() - 1;\n\t\tlistCtKhoLeTraEx.remove(selected);\n\t\tthis.count = listCtKhoLeTraEx.size();\n\t\ttinhTien();\n\t}",
"public void unsetDataCustom()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(DATACUSTOM$2, 0);\n }\n }",
"public void unsetDataCustom()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(DATACUSTOM$2, 0);\n }\n }",
"public void removeDataItem(E value) {\n\t\tdata.remove(value);\n\t}",
"@Override\n\tpublic void eliminar(Object T) {\n\t\tSeccion seccionE= (Seccion)T;\n\t\tif(seccionE!=null){\n\t\t\ttry{\n\t\t\tString insertTableSQL = \"update seccion set estatus=?\" +\"where codigo=? and estatus='A'\";\n\t\t\tPreparedStatement preparedStatement = conexion.prepareStatement(insertTableSQL);\n\t\t\tpreparedStatement.setString(1, \"I\");\n\t\t\tpreparedStatement.setString(2, seccionE.getCodigo());\n\t\t\tpreparedStatement.executeUpdate();\n\t\t}catch(SQLException e){\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"No se elimino el registro\");\n\t\t}\n\t\tSystem.out.println(\"Eliminacion exitosa\");\n\t}\n\n\t}",
"void delete(T obj) throws PersistException;",
"private void delete() {\n\n\t}",
"public void clear() {\r\n\t\tdata.clear();\r\n\r\n\t}",
"@Override\n\tpublic void delete() {\n\t\t\n\t}",
"@Override\n\tpublic void delete() {\n\t\t\n\t}",
"private void clearData() {\n em.createQuery(\"delete from ViajeroEntity\").executeUpdate();\n }",
"@Override\n\tpublic void delete() {\n\n\t}",
"public void delete(E data){\n \t// Preform a regular delete\n \t// Check to make sure the tree remains an RBT tree\n\tNode<E> z = search(data);\n\tNode<E> x = sentinel;\n\tNode<E> y = z;\n\tCharacter y_original_color = y.getColor();\n\tif (z.getLeftChild() == sentinel) {\n\t\tx = z.getRightChild();\n\t\ttransplant(z, z.getRightChild());\n\t} else if (z.getRightChild() == sentinel) {\n\t\tx = z.getLeftChild();\n\t\ttransplant(z, z.getLeftChild());\n\t} else {\n\t\ty = getMin(z.getRightChild());\n\t\ty_original_color = y.getColor();\n\t\tx = y.getRightChild();\n\t\tif (y.getParent() == z) {\n\t\t\tx.setParent(y);\n\t\t} else {\n\t\t\ttransplant(y, y.getRightChild());\n\t\t\ty.setRightChild(z.getRightChild());\n\t\t\ty.getRightChild().setParent(y);\n\t\t}\n\t\t\n\t\ttransplant(z, y);\n\t\ty.setLeftChild(z.getLeftChild());\n\t\ty.getLeftChild().setParent(y);\n\t\ty.setColor(z.getColor());\n\t}\n\t\n\tif (y_original_color == 'B') {\n\t\tfixDelete(x);\n\t}\n\t\t\n \n }",
"@Override\n public boolean delete(T o) {\n if(o == null) return false;\n if(!contains(o)){\n return false;\n }else {\n int hcode = hash(o);\n hcode %= array.length;\n array[hcode].reset();\n while (!eqals(o, array[hcode].elem())) {\n array[hcode].advance();\n }\n array[hcode].delete();\n return true;\n }\n }",
"@Override\r\n\tpublic void delete(T t) {\n\t\tsuper.getSessionFactory().getCurrentSession().delete(t);\r\n\t\tsuper.getSessionFactory().getCurrentSession().flush();\r\n\t}",
"@Override\n public T remove(T data) {\n if (data == null) {\n throw new IllegalArgumentException(\"Input data is null.\");\n }\n\n //TODO is this exception appropriate?\n if (root == null) {\n throw new NoSuchElementException(\"The tree is empty.\");\n }\n\n\n// if (data.equals(root.getData())) {\n// size--;\n// //TODO is this what required:return the data stored instead of data input?\n// T ret = root.getData();\n// root = null;\n// return ret;\n// } else {\n// return removeH(data, root, root, false);\n// }\n\n BSTNode<T> virtualPrev = new BSTNode<>(null);\n virtualPrev.setRight(root);\n\n T ret = removeH2(data, virtualPrev, root, false);\n root = virtualPrev.getRight();\n return ret;\n\n// if(data.equals(root.getData())) {\n// if(size == 1) {\n// T ret = root.getData();\n// root = null;\n// size--;\n// return ret;\n// } else if (root.getLeft() != null && root.getRight() != null) {\n//\n// } else {\n// if\n// }\n\n }",
"public T delete(T t) {\n\t\tConnection connection = null;\n\t\tPreparedStatement statement = null;\n\t\tString query = createDelete(t);\n\t\ttry {\n\t\t\tconnection = ConnectionDB.getConnection();\n\t\t\tstatement = connection.prepareStatement(query);\n\t\t\tstatement.executeUpdate();\n\t\t} catch (SQLException e) {\n\t\t\tLOGGER.log(Level.WARNING, type.getName() + \"DAO:Delete \" + e.getMessage());\n\t\t} finally {\n\t\t\tConnectionDB.close(statement);\n\t\t\tConnectionDB.close(connection);\n\t\t}\n\t\treturn null;\n\t}",
"void delete(T entity);",
"void delete(T entity);",
"public void delete(int data) {\n root = delete(root, data);\n size--;\n }",
"@Override\n\tpublic void removeEntity(T t) {\n\t\tgetSession().delete(t);\n\t}",
"public void supprimer(Etudiant t) {\n\t\tdao.supprimer(t);\r\n\t}",
"public void clear() {\n this.data().clear();\n }",
"@Override\n\tpublic boolean delete(Etape obj) {\n\t\treturn false;\n\t}",
"public void delete(int position) {\r\n dataTag.remove(position);\r\n data.remove(position);\r\n }",
"@Override\n public void delete() {\n }",
"@Override\r\n\tpublic void delete(T instance) {\r\n\t\tif (isManaged(instance)) {\r\n\t\t\tinstance = loadInstance(instance.getId());\r\n\t\t\tgetEntityManager().remove(getEntityManager().merge(instance));\r\n\t\t}\r\n\t}",
"public abstract void removeExternalData(String dataID);",
"public void removeAllData() {\n\t\tList<T> allData = this.getAllData();\r\n\t\t// clean the map\r\n\t\tthis.dataMap.clear();\r\n\t\t\r\n\t\t// notify the subscribers\r\n\t\tthis.notifyDeleted(allData);\r\n\t}",
"protected void clearData() {\n getValues().clear();\n getChildIds().clear();\n getBTreeMetaData().setDirty(this);\n }",
"@Override\r\n\tpublic void delete() {\n\r\n\t}",
"public void eraseData() {\n\t\tname = \"\";\n\t\tprice = 0.0;\n\t\tquantity = 0;\n\t}",
"@Override\n\tpublic void del() {\n\t\ttarget.del();\n\t}",
"public void delete(T aData) {\r\n\t\tListNode temp = head;\r\n\t\twhile (temp != null) {\r\n\t\t\tif (temp.link.data.equals(aData)) {\r\n\t\t\t\ttemp.link = temp.link.link;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\ttemp = temp.link;\r\n\t\t}\r\n\t}",
"protected T remove(T data){\r\n\t\t//data not in it, saves time\r\n\t\tif(!contains(data))\r\n\t\t\treturn null;\r\n\r\n \tmodCount++;\r\n\t\tArrayNode<T> current = beginMarker.next;\r\n\t\twhile (current != endMarker){\r\n\t\t\t//uses node remove\r\n\t\t\tT x = current.remove(data);\r\n\t\t\t//data not in this node\r\n\t\t\tif (x== null)\r\n\t\t\t\tcurrent = current.next;\r\n\t\t\t//data removed\r\n\t\t\telse{\r\n\t\t\t\tnumAdded--;\r\n\t\t\t\t//remove empty node\r\n\t\t\t\tif (current.getArraySize()==0){\r\n\t\t\t\t\tcurrent.next.prev = current.prev;\r\n\t\t\t\t\tcurrent.prev.next = current.next;\r\n\t\t\t\t\tsize--;\r\n\t\t\t\t}\r\n\t\t\t\t//Check if compression is needed\r\n\t\t\t\tif (size() < (nodeCount()*capacityOfArrays*0.5)){\r\n\t\t\t\t\tcompress();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn x;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"@Override\n\tpublic void delete() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}",
"void clear() {\n data = new Data(this);\n }",
"@Override\n\tpublic void delete(T entity) {\n\t\tbaseDaoImpl.delete(entity);\n\t}",
"@Override\n\tpublic void delete(T entity) {\n\t\tbaseDaoImpl.delete(entity);\n\t}",
"@Override\n\tpublic int delete() {\n\t\treturn 0;\n\t}",
"@Override\n\tpublic void deleteItem(Object toDelete) {}",
"@Override\n\tpublic boolean DeleteElement(SubjectClassRegistrationEntity objT) throws SQLException {\n\t\treturn false;\n\t}",
"public T remove(T value){\n\t return value;\n\t}",
"public void unsetTpd()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(TPD$34, 0);\r\n }\r\n }",
"@Override\n\tpublic Integer delete() {\n\t\treturn null;\n\t}",
"public void delete();",
"public void delete();",
"public void delete();",
"public void delete();",
"public void delete();",
"public void delete();",
"public final <T> boolean delete(final Class<T> key) {\n\n if(!contains(key))\n return false;\n\n _data.remove(key);\n return true;\n }",
"@Override\n\tpublic void delete(Object entidade) {\n\t\t\n\t}",
"@Override\r\n\tpublic void delete(Usuario t) {\n\t\t\r\n\t}",
"public void removeByDataTypeId(long dataTypeId);",
"public void clean() {\r\n\t\t\r\n\t\tlogger.trace(\"Enter clean\");\r\n\t\t\r\n\t\tdata.clear();\r\n\t\tfireTableDataChanged();\r\n\t\t\r\n\t\tlogger.trace(\"Exit clean\");\r\n\t}",
"public Object delete() throws Exception {\n\t\tObject temp = data[front];\n\t\tdata[front]=null;\n\t\tfront =(front+1)%maxSize;\n\t\tcount--;\n\t\treturn temp;\n\t\t\n\t}",
"public void clearList ( T data ) {\n\t\t//set head to be null\n\t\thead = null;\n\t}",
"@Override\r\n\tpublic void deleteTipoTramite(Integer idTipoTramite) {\n\t\t\r\n\t}",
"public void delById(Serializable id) ;",
"public void delete() {\n\n\t}",
"@Override\n\tpublic void delete(Zone t) {\n\t\t\n\t}",
"<T> void delete(T persistentObject);",
"public synchronized void delete() {\n if (this.swigCPtr != 0) {\n if (this.swigCMemOwn) {\n this.swigCMemOwn = false;\n libVisioMoveJNI.delete_VgIDatabaseDatasetDescriptor(this.swigCPtr);\n }\n this.swigCPtr = 0;\n }\n }",
"@Override\r\n\tpublic void delete(Object object) {\n\t\t\r\n\t}",
"@Override\n\tpublic User delete(User t) {\n\t\treturn null;\n\t}",
"public void clearData(){\r\n data.clear();\r\n this.fireTableDataChanged();\r\n }",
"@Override\n\tpublic int deleteObject(Evaluate entity) {\n\t\treturn evaluateMapper.deleteObject(entity);\n\t}",
"boolean remove(T o);",
"public <T> boolean delete(T entity);"
] | [
"0.71368957",
"0.67580575",
"0.66624784",
"0.6556267",
"0.6531411",
"0.6446478",
"0.6428442",
"0.64248157",
"0.6411218",
"0.6392292",
"0.63699013",
"0.6347545",
"0.63474643",
"0.63382125",
"0.633657",
"0.6327747",
"0.6326005",
"0.62811875",
"0.62524974",
"0.6217466",
"0.61956435",
"0.6194946",
"0.6141226",
"0.6135083",
"0.6132726",
"0.6108108",
"0.609219",
"0.60819256",
"0.606942",
"0.6045923",
"0.60330373",
"0.6028792",
"0.6028792",
"0.601724",
"0.60145414",
"0.60095835",
"0.59971833",
"0.5996518",
"0.59959865",
"0.59959865",
"0.5994188",
"0.5984654",
"0.5971865",
"0.59683996",
"0.5967834",
"0.59609014",
"0.5956295",
"0.59403676",
"0.59403676",
"0.59391737",
"0.5933806",
"0.5928985",
"0.59257615",
"0.5920076",
"0.5916152",
"0.59117734",
"0.59100926",
"0.59081113",
"0.5902637",
"0.58958834",
"0.5872255",
"0.5869938",
"0.5869715",
"0.5867988",
"0.58669996",
"0.58583844",
"0.5854832",
"0.58533484",
"0.58533484",
"0.58527786",
"0.58501226",
"0.5847481",
"0.58434546",
"0.58246154",
"0.58244",
"0.58123976",
"0.58123976",
"0.58123976",
"0.58123976",
"0.58123976",
"0.58123976",
"0.5809627",
"0.5805998",
"0.5799206",
"0.57975805",
"0.5790718",
"0.578851",
"0.57845336",
"0.5770078",
"0.57645375",
"0.576099",
"0.5758922",
"0.57583666",
"0.5749546",
"0.5741439",
"0.5736377",
"0.5736159",
"0.5729762",
"0.5728718",
"0.57194775"
] | 0.70181274 | 1 |
This creates the actual cell itself which is a rectangle. | Cell(int xpos, int ypos, int status)
{
this.X = xpos;
this.Y = ypos;
this.status = status;
if (status == 0)
{
cell.setVisible(false);
}
cell.setFill(Color.WHITE);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void createRect()\r\n\t{\r\n\t\trect = new Rectangle(getX(),getY(),width,height);\r\n\t}",
"@Override\n\tpublic Cell createCell()\n\t{\n\t\treturn derivedColumn.createCell();\n\t}",
"@Override\n\tpublic void createCellStructure() {\n\t\t\n\t}",
"void createRectangles();",
"public Rectangle() {\n\t\tthis.width = 1;\n\t\tthis.hight = 1;\n\t\tcounter++;\n\t}",
"public Cell(){}",
"private void createRectangles() {\r\n rectangles.clear();\r\n for (int i = 0; i < gridSize * gridSize; i++) {\r\n Rectangle r = new Rectangle(rectangleSize, rectangleSize, Color.BLUE);\r\n r.setStroke(Color.BLACK);\r\n rectangles.add(r);\r\n }\r\n }",
"Rectangle getRect(){\n \treturn new Rectangle(x,y,70,25);\n }",
"MemberCell createMemberCell();",
"public CustomRectangle() { }",
"@Override\n\tpublic Cell createCell(int arg0, int arg1) {\n\t\treturn null;\n\t}",
"Rectangle(){\n height = 1;\n width = 1;\n }",
"@Override\n\tpublic void placementcell() {\n\t\t\n\t}",
"Rectangle() {\r\n\t\tlength = 1.0;\r\n\t\twidth = 1.0;\r\n\t}",
"@Override\r\n\tpublic void drawCell(Graphics2D g2) {\n\t\tAffineTransform original = g2.getTransform();\r\n\t\t\r\n\t\tg2.translate(pos.x,pos.y);\r\n\t\tif(scale<=0) {\r\n\t\t\tscale=0;\r\n\t\t}\r\n\t\t\r\n\t\tif(scale>=1) {\r\n\t\t\tscale=1;\r\n\t\t}\r\n\t\tg2.scale(scale, scale);\r\n\t\t\r\n\t\tAffineTransform point = g2.getTransform();\r\n\t\t\r\n\t\thitBox = outline.createTransformedArea(point);\r\n\t\t\r\n\t\tg2.setColor(new Color(232,65,143));\r\n\t\tif(passable) g2.setColor(new Color(70,59,71));\r\n\t\tg2.fill(cellBody);\r\n\t\t\r\n\t\tg2.setTransform(original);\r\n\t\t\r\n\t}",
"public Rectangle() {\n\t\tthis.corner = new Point();\n\t\tthis.size = new Point();\n\t}",
"public Rectangle() {\n\t\twidth = 1;\n\t\theight = 1;\n\t}",
"public IconBuilder rect() {\n\t\tthis.shape = IconShape.RECTANGLE;\n\t\treturn this;\n\t}",
"void table(){\n fill(0);\n rect(width/2, height/2, 600, 350); // boarder\n fill(100, 0 ,0);\n rect(width/2, height/2, 550, 300); //Felt\n \n \n}",
"public void createRectangle(double x, double y, double width, double height) {\r\n GRect rectangle = new GRect(x, y, width, height);\r\n rectangle.setFilled(true);\r\n rectangle.setFillColor(Color.GRAY);\r\n rectangle.setColor(Color.WHITE);\r\n add(rectangle);\r\n }",
"private static void createCell(Workbook wb, Row row, int column, HorizontalAlignment halign, VerticalAlignment valign) {\n Cell cell = row.createCell(column);\n cell.setCellValue(\"Align It\");\n CellStyle cellStyle = wb.createCellStyle();\n //水平对其\n// cellStyle.setAlignment(halign);\n //垂直对齐\n// cellStyle.setVerticalAlignment(valign);\n cell.setCellStyle(cellStyle);\n }",
"private RectHV rectLb() {\n\n if (!horizontal) {\n return new RectHV(\n rect.xmin(),\n rect.ymin(),\n p.x(),\n rect.ymax()\n );\n\n\n } else {\n return new RectHV(\n rect.xmin(),\n rect.ymin(),\n rect.xmax(),\n p.y()\n );\n }\n }",
"public NotebookCell() {}",
"GroupCell createGroupCell();",
"public Cell()\n\t{\n\t}",
"AttributeCell createAttributeCell();",
"private void readCellRectangle(int x, int y, Rectangle target) {\r\n target.x = x * CELL_OUTER_SIZE;\r\n target.y = y * CELL_OUTER_SIZE;\r\n target.width = CELL_OUTER_SIZE;\r\n target.height = CELL_OUTER_SIZE;\r\n }",
"private Geometry createRectangle(double x, double y, double w, double h) {\n Coordinate[] coords = {\n new Coordinate(x, y), new Coordinate(x, y + h),\n new Coordinate(x + w, y + h), new Coordinate(x + w, y),\n new Coordinate(x, y)\n };\n LinearRing lr = geometry.getFactory().createLinearRing(coords);\n\n return geometry.getFactory().createPolygon(lr, null);\n }",
"public abstract Cell getOverlappedCell(Rectangle rect);",
"private void generateNewRect() {\n\t\t\n\t\tif(rectengleList.size() < getLevel()){\n\t\tRandom mRandom = new Random();\n\t\tint height = getHeight();\n\t\tint width = getWidth();\n\n\t\tint cx = (int) ((mRandom.nextInt() % (width * 0.8)) + (width * 0.1));\n\t\tint cy = (int) ((mRandom.nextInt() % (height * 0.8)) + (height * 0.1));\n\t\tint hw = (int) (mRandom.nextInt() % (width * 0.4) + width * 0.2) / 2;\n\t\tint hh = (int) (mRandom.nextInt() % (height * 0.4) + height * 0.2) / 2;\n\n\t\tint color = (0x00252525 | mRandom.nextInt()) & 0x00FFFFFF | 0x77000000;\n\t\t\n\t\t\n\t\trectengleList.add(new ColoredRect(color, cx - hw, cy - hh, cx + hw, cy\n\t\t\t\t+ hh));\n\t\t}\n\t\telse{\n\t\t\trectengleList.clear();\t\t\t\n\t\t}\n\t}",
"@Override\n\tpublic String getShape() {\n\t\treturn \"Rectangle\";\n\t}",
"private void initializeGrid() {\r\n if (this.rowCount > 0 && this.columnCount > 0) {\r\n this.cellViews = new Rectangle[this.rowCount][this.columnCount];\r\n for (int row = 0; row < this.rowCount; row++) {\r\n for (int column = 0; column < this.columnCount; column++) {\r\n Rectangle rectangle = new Rectangle();\r\n rectangle.setX((double)column * CELL_WIDTH);\r\n rectangle.setY((double)row * CELL_WIDTH);\r\n rectangle.setWidth(CELL_WIDTH);\r\n rectangle.setHeight(CELL_WIDTH);\r\n this.cellViews[row][column] = rectangle;\r\n this.getChildren().add(rectangle);\r\n }\r\n }\r\n }\r\n }",
"public Cell ()\n {\n cellStatus = false;\n xCoordinate = 0;\n yCoordinate = 0;\n button = new JButton();\n }",
"Rectangle(double newWidth, double newHeight){\n height = newHeight;\n width = newWidth;\n }",
"public Rectangle() {\n x = 0;\n y = 0;\n width = 0;\n height = 0;\n }",
"public Cell(int col, int row){ // constructor\n this.col = col;\n this.row = row;\n }",
"private GRect makeRect(int x, int y) {\r\n\t\treturn (new GRect(x, y, RECT_WIDTH, RECT_HEIGHT));\r\n\t}",
"public Rectangle()\n {\n length = 1;\n width = 1;\n count++;\n }",
"public Cell(){\n \tthis.shot=false;\n }",
"public Cell(int x,int y){\r\n this.x = x;\r\n this.y = y;\r\n level = 0;\r\n occupiedBy = null;\r\n }",
"private void createSquare(int x, int y, int row, int column) {\r\n grid[row][column] = new JLabel();\r\n grid[row][column].setOpaque(true);\r\n grid[row][column].setBackground(SQUARE_COLOR);\r\n grid[row][column].setBorder(SQUARE_BORDER);\r\n this.getContentPane().add(grid[row][column]);\r\n grid[row][column].setBounds(x,y,SQUARE_SIZE,SQUARE_SIZE);\r\n }",
"public Couple cellContent(int x, int y);",
"public RedCell()\n {\n super(1, Greenfoot.getRandomNumber(2) + 1);\n setRotation(Greenfoot.getRandomNumber(360));\n }",
"private static void createCell(Workbook wb, Row row, short column, short halign, short valign) {\n Cell cell = row.createCell(column);\n cell.setCellValue(\"Align It\");\n CellStyle cellStyle = wb.createCellStyle();\n cellStyle.setAlignment(halign);\n cellStyle.setVerticalAlignment(valign);\n cell.setCellStyle(cellStyle);\n }",
"public PDRectangle createRetranslatedRectangle()\n {\n PDRectangle retval = new PDRectangle();\n retval.setUpperRightX( getWidth() );\n retval.setUpperRightY( getHeight() );\n return retval;\n }",
"public PDRectangle()\n {\n this(0.0f, 0.0f, 0.0f, 0.0f);\n }",
"public Rectangle getRectangle() {\r\n return new Rectangle((int) x, (int) y, cwidth, cheight);\r\n }",
"@Override\n\tpublic void buildBody() {\n\t\tg.drawRect(60, 50, 10, 50);\n\t}",
"public wall() { //default constructor makes a 10x10 square extending right and down from the pixel located at 5,5\r\n x = 5;\r\n y = 5;\r\n height = 10;\r\n width = 10;\r\n }",
"Cell(int x, int y, Color color, boolean flooded, ACell left, ACell top, ACell right,\r\n ACell bottom) {\r\n this.x = x;\r\n this.y = y;\r\n this.color = color;\r\n this.flooded = flooded;\r\n this.left = left;\r\n this.top = top;\r\n this.right = right;\r\n this.bottom = bottom;\r\n }",
"public void paint () {\n\t\tPaint.clear();\n\t\t\n\t\tPaint.setColor(Color.WHITE);\n\t\tPaint.fillRect(0,0,numcols_ * cellsize_,numrows_ * cellsize_);\n\t\tPaint.setColor(Color.GRAY);\n\t\tPaint.drawRect(0,0,numcols_ * cellsize_ - 1,numrows_ * cellsize_ - 1);\n\n\t\tfor ( int row = 0 ; row < numrows_ ; row++ ) {\n\t\t\tfor ( int col = 0 ; col < numcols_ ; col++ ) {\n\t\t\t\tint x = col * cellsize_;\n\t\t\t\tint y = row * cellsize_;\n\n\t\t\t\tThing thing = at(row,col);\n\t\t\t\tif ( thing != null ) {\n\t\t\t\t\tthing.paint(x,y,cellsize_,cellsize_);\n\t\t\t\t}\n\t\t\t\tPaint.setColor(Color.GRAY);\n\t\t\t\tPaint.drawRect(x,y,cellsize_,cellsize_);\n\t\t\t}\n\t\t}\n\n\t}",
"void testDrawCell(Tester t) {\r\n initData();\r\n t.checkExpect(this.game2.indexHelp(0, 0).drawCell(2),\r\n new FrameImage(new RectangleImage(Cnst.boardWidth / 2, Cnst.boardHeight / 2,\r\n OutlineMode.SOLID, Color.ORANGE)));\r\n t.checkExpect(this.game3.indexHelp(0, 0).drawCell(3),\r\n new FrameImage(new RectangleImage(Cnst.boardWidth / 3, Cnst.boardHeight / 3,\r\n OutlineMode.SOLID, Color.GREEN)));\r\n t.checkExpect(this.game5.indexHelp(0, 0).drawCell(4),\r\n new FrameImage(new RectangleImage(Cnst.boardWidth / 4, Cnst.boardHeight / 4,\r\n OutlineMode.SOLID, Color.PINK)));\r\n t.checkExpect(this.game2.indexHelp(-1, -1).drawCell(1), new EmptyImage());\r\n }",
"Cell() {\r\n\t\tstate = CellState.EMPTY;\r\n\t}",
"public Rectangle() {\n this.length = 0;\n this.width = 0;\n\n }",
"public Rectangle () {\n\t\t\n\t}",
"public Cell containingCell() {\n return new Cell(x() / SUBCELL_COUNT, y() / SUBCELL_COUNT);\n }",
"public SquareBoard(Coordinates C, double hw, Color v)\r\n {\r\n r = new Rectangle(C.X(), C.Y(), hw, hw);\r\n r.setStroke(Color.BLACK);\r\n r.setFill(v);\r\n BoardPane.getPane().getChildren().add(r);\r\n }",
"public Rectangle toRectangle()\r\n {\r\n return new Rectangle(x, y, width, height);\r\n }",
"Cell(int x, int y, Color color, boolean flooded) {\r\n this.x = x;\r\n this.y = y;\r\n this.color = color;\r\n this.flooded = flooded;\r\n this.left = null;\r\n this.top = null;\r\n this.right = null;\r\n this.bottom = null;\r\n }",
"@Override\r\n\tpublic Rectangle getBound() {\n\t\treturn new Rectangle((int)x, (int)y, (int)width, (int)height);\r\n\t}",
"public Board()\r\n\t{\r\n\t\tfor(int x = 0; x < 9; x++)\r\n\t\t\tfor(int y = 0 ; y < 9; y++)\r\n\t\t\t{\r\n\t\t\t\tboard[x][y] = new Cell();\r\n\t\t\t\tboard[x][y].setBoxID( 3*(x/3) + (y)/3+1);\r\n\t\t\t}\r\n\t}",
"@Override\n public void normalCell() {\n gCell.setFill(Color.BLACK);\n }",
"public MyRectangle getRectangle() {\n\t\treturn new MyRectangle(x, y, width, height);\n\t}",
"private void createNonDoorCells(Rectangle cellSize) {\r\n\r\n\t\tfor (int i = 0; i < this.roomCells.length; i++) {\r\n\t\t\tfor (int j = 0; j < this.roomCells[i].length; j++) {\r\n\t\t\t\tif (this.roomCells[i][j] == null) {\r\n\r\n\t\t\t\t\tPoint coordinate = new Point(i * cellSize.width, j * cellSize.height);\r\n\t\t\t\t\tGameLocation location = new GameLocation(coordinate, this.roomId);\r\n\r\n\t\t\t\t\tif (this.stepablePolygon.contains(coordinate)) {\r\n\r\n\t\t\t\t\t\tthis.roomCells[i][j] = new Cell(location, CellProperty.Stepable);\r\n\r\n\t\t\t\t\t} else {\r\n\r\n\t\t\t\t\t\tthis.roomCells[i][j] = new Cell(location, CellProperty.NoProperty);\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public SubCell(int x, int y) {\n this.x = Math.floorMod(x, COLUMNS);\n this.y = Math.floorMod(y, ROWS);\n }",
"@Override\n\tpublic String getShapeType() {\n\t\treturn \"Rectangle\";\n\t}",
"public WorldImage drawCell(int blocks) {\r\n return new FrameImage(new RectangleImage(Cnst.boardWidth / blocks,\r\n Cnst.boardHeight / blocks,\r\n OutlineMode.SOLID, this.color));\r\n }",
"Rectangle(int l, int w)\n {\n\tlength = l;\n\twidth = w;\n }",
"public Rectangle() {\n super();\n properties = new HashMap<String, Double>();\n properties.put(\"Width\", null);\n properties.put(\"Length\", null);\n }",
"@CalledByNative\n private static Rect createRect(int x, int y, int right, int bottom) {\n return new Rect(x, y, right, bottom);\n }",
"private CellPanel defineUI()\n\t{\n\t\t//TODO define all UI Stuff here - not needed if GWT Designer is used as it will do the work for us.\n\n\t\tcellPanelContainer = new VerticalPanel();\t\t\n\t cellPanelContainer.setSize(\"598px\", \"530px\");\n\t\treturn cellPanelContainer;\n\t}",
"private void createAreaWithoutBorder(){\n image.setColor(backgroundColor);\n image.fillRect(0, 0, fieldWidth, fieldHeight);\n }",
"public Cell(int row, int column){\r\n this.row = row;\r\n this.column = column;\r\n }",
"EndCell(int x, int y) {\r\n this.x = x;\r\n this.y = y;\r\n this.left = null;\r\n this.top = null;\r\n this.right = null;\r\n this.bottom = null;\r\n }",
"Rectangle()\n {\n this(1.0,1.0);\n }",
"public void createRoom(Rect room) {\n for(int x = room.x1 + 1; x < room.x2; x++) {\n for(int y = room.y1 + 1; y < room.y2; y++ ) {\n dungeon.map[x][y].blocked = false;\n dungeon.map[x][y].blockSight = false;\n }\n }\n }",
"public Rectangle get_rect() {\n\t\treturn new Rectangle(\n\t\t\t\torigin_x+component_x, \n\t\t\t\torigin_y+component_y-component_height+3, \n\t\t\t\tcomponent_width, \n\t\t\t\tcomponent_height\n\t\t\t);\n\t}",
"private void createBoard() {\n\t// An array of rows containing rows with squares are made\n\t\tfor (int i = 0; i < squares.length; i++) {\n\t \trows[i] = new Row(squares[i]);\n\t\t}\n\n\n\t// An array of columns containing columns with squares are made\n\t\tSquare[] columnArray = new Square[size];\n\t\tfor (int i = 0; i < size; i++) {\n\t\t for (int row = 0; row < size; row++) {\n\t\t\t\tcolumnArray[row] = squares[row][i];\n\t\t }\n\t\t columns[i] = new Column(columnArray);\n\t\t columnArray = new Square[size];\n\t\t}\n\n\n\t\tSquare[] boxArray;\n\t\tint counter;\n\t\t// Box nr i\n\t\tfor (int i = 0; i < size; i = i + height) {\n\t\t // Box nr j\n\t\t for (int j = 0; j < size; j = j + length) {\n\t\t\t\tcounter = 0;\n\t\t\t\tboxArray = new Square[size];\n\t\t\t\tint rowIndex = (i / height) * height;\n\t\t\t\tint columnIndex = (j / length) * length;\n\t\t\t\t// Row nr k\n\t\t\t\tfor (int k = rowIndex; k < rowIndex + height; k++) {\n\t\t\t\t // Column nr l\n\t\t\t\t for (int l = columnIndex; l < columnIndex + length; l++) {\n\t\t\t\t\t\tboxArray[counter] = squares[k][l];\n\t\t\t\t\t\tcounter++;\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t\tboxes[j/length][i/height] = new Box(boxArray);\n\t\t }\n\t\t}\t\n\t\tcreatePointers();\n }",
"public Rectangle getRect() {\n return new Rectangle(x,y,(imageWeight-50),(imageHeight-50));\n }",
"public WorldImage drawCell(int blocks) {\r\n return new EmptyImage();\r\n }",
"public interface Cell<T> {\n /**\n * находится ли в данной ячейке бомба\n */\n boolean isBomb();\n\n /**\n * игрок предположил, что в данной ячейку бомба\n */\n boolean isBombCell();\n\n /**\n * игрок предположил, что данная ячейка пустая\n */\n boolean isEmptyCell();\n\n /**\n * устанавливаем значение, что в ячейке бомба\n */\n void BombCell();\n\n /**\n * устанавливаем значение пустой ячейки\n */\n void EmptyCell();\n\n /**\n * рисуем ячейку\n */\n void draw(T point, boolean real);\n}",
"@Override\n\tpublic Cell makeCell(int x, int y, int start, Grid g,\n\t\t\tMap<String, Double> map) {\n\t\tmyGrid = g;\n\t\tGameOfLifeCell c = new GameOfLifeCell(x, y, start, this);\n\t\treturn c;\n\t}",
"public Rectangle() {\n this(50, 40);\n }",
"public Cell containingCell() {\n return new Cell(x / NBROFSUBCELLINCELL, y / NBROFSUBCELLINCELL);\n }",
"public GridPane() {\n\t\t for (int i=0;i<MAX_X; i++) {\n\t\t\tfor (int j=0;j<MAX_Y;j++) {\n\t\t\t\tseed[i][j] = new Cell(i,j,false);\n\t\t\t}//end for j\n\t\t }//end for i\n\t\n\t \tdefaultBackground = getBackground();\n\t\n\t MatteBorder border = new MatteBorder(1, 1, 1, 1, Color.BLACK);\n\t \tthis.setBorder(border);\n\t \t\t\n\t\t addMouseListener(new MouseAdapter() {\n\t @Override\n\t public void mouseClicked(MouseEvent e) {\n\t \t int x1 = (int)(e.getX()/CELL_WIDTH);\n\t \t int y1 = (int)(e.getY()/CELL_WIDTH);\n\t \t if(seed[x1][y1].isAlive()) {\n\t \t\t seed[x1][y1].isAlive = false;\n\t \t }\n\t \t else {\n\t \t\t seed[x1][y1].isAlive = true;\n\t \t }\n//\t \t System.out.println(\"[\"+x1+\",\"+y1+\"]\");\n\t repaint();\n\t }\n\t });\n\t }",
"MyRectangle(double height, double width, MyColor color) {\n\t\tsuper(color);\n\t\tthis.height=height;\n\t\tthis.width=width;\n\t}",
"public Rectangle() {\n }",
"public Rectangle() {\n }",
"public CellPane(Simulator simulator, int xPosition, int yPosition) {\n this.simulator = simulator;\n this.xPosition = xPosition;\n this.yPosition = yPosition;\n\n alive = false;\n\n cell = new Rectangle(50, 50);\n\n setColor();\n\n getChildren().addAll(cell);\n\n this.setOnMousePressed(this::handleMouseInput);\n this.setOnMouseEntered(this::handleMouseHover);\n this.setOnMouseExited(this::handleMouseExit);\n }",
"void buildRectangles(){\n background(255);\n for(int i=0;i<arr.length;i++){\n noStroke();\n Rect r=new Rect(40+i*80,400,75,-arr[i]*20,color1);\n createRectangle(r,color1);\n }\n }",
"public TwoDimensionalGrid()\r\n {\r\n cellGrid = new Cell[LOWER_BOUND][RIGHT_BOUND];\r\n\r\n for (int columns = 0; columns < LOWER_BOUND; columns ++)\r\n {\r\n for (int rows = 0; rows < RIGHT_BOUND; rows ++)\r\n {\r\n cellGrid[columns][rows] = new Cell(true);\r\n } // end of for (int rows = 0; rows < RIGHT_BOUND; rows ++)\r\n System.out.print(\"\\n\");\r\n } // end of for (int columns = 0; columns < LOWER_BOUND; columns ++)\r\n }",
"Rectangle(int width, int height){\n area = width * height;\n }",
"public Rectangle(float w, float h, float x, float y, float r, float g, float b, String n, int s, int e) {\n super(x, y, r, g, b, n, s, e);\n this.width = w;\n this.height = h;\n }",
"public Grid generateGrid(){\n myGrid = new RectGrid();\n myStates = new HashMap<>();\n\n for(int row = 0; row < imageHeight; row++){\n for(int column = 0; column < imageWidth; column++){\n int color = myImage.getRGB(column, row);\n int blue = color & 0xff;\n int green = (color & 0xff00) >> 8;\n int red = (color & 0xff0000) >> 16;\n\n int stateValue = color*-1;\n System.out.println(stateValue);\n //int stateValue = Integer.parseInt(hex, 16);\n //System.out.println(stateValue);\n\n Cell myCell = new RPSCell();\n myCell.setState(stateValue);\n myGrid.placeCell(row, column, myCell);\n\n Color myColor = Color.rgb(red, green, blue);\n myStates.put(stateValue, myColor);\n }\n }\n return myGrid;\n }",
"public CustomRectangle(int x1, int y1, int x2, int y2) {\n this.x1 = Integer.toString(x1);\n this.y1 = Integer.toString(y1);\n this.x2 = Integer.toString(x2);\n this.y2 = Integer.toString(y2);\n }",
"Rectangle getPowerRect(){\n \treturn new Rectangle(powerX,powerY,35,35);\n }",
"public BoardCell(BoardCell existingBoardCell){\n xCor=existingBoardCell.getXCor();\n yCor=existingBoardCell.getYCor();\n }",
"protected GridCell(int x, int y, GridDomain parent) {\n\t\tcoord = new GridCoord(x, y);\n\t\tthis.parent = parent;\n\t\tcelltype = GridCellType.getDefault();\n\t\tcellCost = celltype.cost;\n\t}",
"protected void buildCellBaseStyle( ICellContent cell,\n \t\t\tStringBuffer styleBuffer )\n \t{\n \t\tIStyle style = null;\n \t\tif ( isEmbeddable )\n \t\t{\n \t\t\tstyle = cell.getStyle( );\n \t\t}\n \t\telse\n \t\t{\n \t\t\tstyle = cell.getInlineStyle( );\n \t\t}\n \t\t// build the cell's style except border\n \t\tAttributeBuilder.buildCellStyle( styleBuffer, style, parentEmitter );\n \n \t\t// prepare build the cell's border\n \t\tint columnCount = -1;\n \t\tIStyle cellStyle = null, cellComputedStyle = null;\n \t\tIStyle rowStyle = null, rowComputedStyle = null;\n \n \t\tcellStyle = cell.getStyle( );\n \t\tcellComputedStyle = cell.getComputedStyle( );\n \t\tIRowContent row = (IRowContent) cell.getParent( );\n \t\tif ( null != row )\n \t\t{\n \t\t\trowStyle = row.getStyle( );\n \t\t\trowComputedStyle = row.getComputedStyle( );\n \t\t\tITableContent table = row.getTable( );\n \t\t\tif ( null != table )\n \t\t\t{\n \t\t\t\tcolumnCount = table.getColumnCount( );\n \t\t\t}\n \t\t}\n \n \t\t// build the cell's border\n \t\tif ( null == rowStyle || cell.getColumn( ) < 0 || columnCount < 1 )\n \t\t{\n \t\t\tif ( null != cellStyle )\n \t\t\t{\n \t\t\t\tbuildCellRowBorder( styleBuffer,\n \t\t\t\t\t\tHTMLTags.ATTR_BORDER_TOP,\n \t\t\t\t\t\tcellStyle.getBorderTopWidth( ),\n \t\t\t\t\t\tcellStyle.getBorderTopStyle( ),\n \t\t\t\t\t\tcellStyle.getBorderTopColor( ),\n \t\t\t\t\t\t0,\n \t\t\t\t\t\tnull,\n \t\t\t\t\t\tnull,\n \t\t\t\t\t\tnull,\n \t\t\t\t\t\t0 );\n \n \t\t\t\tbuildCellRowBorder( styleBuffer,\n \t\t\t\t\t\tHTMLTags.ATTR_BORDER_RIGHT,\n \t\t\t\t\t\tcellStyle.getBorderRightWidth( ),\n \t\t\t\t\t\tcellStyle.getBorderRightStyle( ),\n \t\t\t\t\t\tcellStyle.getBorderRightColor( ),\n \t\t\t\t\t\t0,\n \t\t\t\t\t\tnull,\n \t\t\t\t\t\tnull,\n \t\t\t\t\t\tnull,\n \t\t\t\t\t\t0 );\n \n \t\t\t\tbuildCellRowBorder( styleBuffer,\n \t\t\t\t\t\tHTMLTags.ATTR_BORDER_BOTTOM,\n \t\t\t\t\t\tcellStyle.getBorderBottomWidth( ),\n \t\t\t\t\t\tcellStyle.getBorderBottomStyle( ),\n \t\t\t\t\t\tcellStyle.getBorderBottomColor( ),\n \t\t\t\t\t\t0,\n \t\t\t\t\t\tnull,\n \t\t\t\t\t\tnull,\n \t\t\t\t\t\tnull,\n \t\t\t\t\t\t0 );\n \n \t\t\t\tbuildCellRowBorder( styleBuffer,\n \t\t\t\t\t\tHTMLTags.ATTR_BORDER_LEFT,\n \t\t\t\t\t\tcellStyle.getBorderLeftWidth( ),\n \t\t\t\t\t\tcellStyle.getBorderLeftStyle( ),\n \t\t\t\t\t\tcellStyle.getBorderLeftColor( ),\n \t\t\t\t\t\t0,\n \t\t\t\t\t\tnull,\n \t\t\t\t\t\tnull,\n \t\t\t\t\t\tnull,\n \t\t\t\t\t\t0 );\n \t\t\t}\n \t\t}\n \t\telse if ( null == cellStyle )\n \t\t{\n \t\t\tbuildCellRowBorder( styleBuffer,\n \t\t\t\t\tHTMLTags.ATTR_BORDER_TOP,\n \t\t\t\t\tnull,\n \t\t\t\t\tnull,\n \t\t\t\t\tnull,\n \t\t\t\t\t0,\n \t\t\t\t\trowStyle.getBorderTopWidth( ),\n \t\t\t\t\trowStyle.getBorderTopStyle( ),\n \t\t\t\t\trowStyle.getBorderTopColor( ),\n \t\t\t\t\t0 );\n \n \t\t\tbuildCellRowBorder( styleBuffer,\n \t\t\t\t\tHTMLTags.ATTR_BORDER_RIGHT,\n \t\t\t\t\tnull,\n \t\t\t\t\tnull,\n \t\t\t\t\tnull,\n \t\t\t\t\t0,\n \t\t\t\t\trowStyle.getBorderRightWidth( ),\n \t\t\t\t\trowStyle.getBorderRightStyle( ),\n \t\t\t\t\trowStyle.getBorderRightColor( ),\n \t\t\t\t\t0 );\n \n \t\t\tbuildCellRowBorder( styleBuffer,\n \t\t\t\t\tHTMLTags.ATTR_BORDER_BOTTOM,\n \t\t\t\t\tnull,\n \t\t\t\t\tnull,\n \t\t\t\t\tnull,\n \t\t\t\t\t0,\n \t\t\t\t\trowStyle.getBorderBottomWidth( ),\n \t\t\t\t\trowStyle.getBorderBottomStyle( ),\n \t\t\t\t\trowStyle.getBorderBottomColor( ),\n \t\t\t\t\t0 );\n \n \t\t\tbuildCellRowBorder( styleBuffer,\n \t\t\t\t\tHTMLTags.ATTR_BORDER_LEFT,\n \t\t\t\t\tnull,\n \t\t\t\t\tnull,\n \t\t\t\t\tnull,\n \t\t\t\t\t0,\n \t\t\t\t\trowStyle.getBorderLeftWidth( ),\n \t\t\t\t\trowStyle.getBorderLeftStyle( ),\n \t\t\t\t\trowStyle.getBorderLeftColor( ),\n \t\t\t\t\t0 );\n \t\t}\n \t\telse\n \t\t{\n \t\t\t// We have treat the column span. But we haven't treat the row span.\n \t\t\t// It need to be solved in the future.\n \t\t\tint cellWidthValue = getBorderWidthValue( cellComputedStyle,\n \t\t\t\t\tIStyle.STYLE_BORDER_TOP_WIDTH );\n \t\t\tint rowWidthValue = getBorderWidthValue( rowComputedStyle,\n \t\t\t\t\tIStyle.STYLE_BORDER_TOP_WIDTH );\n \t\t\tbuildCellRowBorder( styleBuffer,\n \t\t\t\t\tHTMLTags.ATTR_BORDER_TOP,\n \t\t\t\t\tcellStyle.getBorderTopWidth( ),\n \t\t\t\t\tcellStyle.getBorderTopStyle( ),\n \t\t\t\t\tcellStyle.getBorderTopColor( ),\n \t\t\t\t\tcellWidthValue,\n \t\t\t\t\trowStyle.getBorderTopWidth( ),\n \t\t\t\t\trowStyle.getBorderTopStyle( ),\n \t\t\t\t\trowStyle.getBorderTopColor( ),\n \t\t\t\t\trowWidthValue );\n \n \t\t\tif ( ( cell.getColumn( ) + cell.getColSpan( ) ) == columnCount )\n \t\t\t{\n \t\t\t\tcellWidthValue = getBorderWidthValue( cellComputedStyle,\n \t\t\t\t\t\tIStyle.STYLE_BORDER_RIGHT_WIDTH );\n \t\t\t\trowWidthValue = getBorderWidthValue( rowComputedStyle,\n \t\t\t\t\t\tIStyle.STYLE_BORDER_RIGHT_WIDTH );\n \t\t\t\tbuildCellRowBorder( styleBuffer,\n \t\t\t\t\t\tHTMLTags.ATTR_BORDER_RIGHT,\n \t\t\t\t\t\tcellStyle.getBorderRightWidth( ),\n \t\t\t\t\t\tcellStyle.getBorderRightStyle( ),\n \t\t\t\t\t\tcellStyle.getBorderRightColor( ),\n \t\t\t\t\t\tcellWidthValue,\n \t\t\t\t\t\trowStyle.getBorderRightWidth( ),\n \t\t\t\t\t\trowStyle.getBorderRightStyle( ),\n \t\t\t\t\t\trowStyle.getBorderRightColor( ),\n \t\t\t\t\t\trowWidthValue );\n \t\t\t}\n \t\t\telse\n \t\t\t{\n \t\t\t\tbuildCellRowBorder( styleBuffer,\n \t\t\t\t\t\tHTMLTags.ATTR_BORDER_RIGHT,\n \t\t\t\t\t\tcellStyle.getBorderRightWidth( ),\n \t\t\t\t\t\tcellStyle.getBorderRightStyle( ),\n \t\t\t\t\t\tcellStyle.getBorderRightColor( ),\n \t\t\t\t\t\t0,\n \t\t\t\t\t\tnull,\n \t\t\t\t\t\tnull,\n \t\t\t\t\t\tnull,\n \t\t\t\t\t\t0 );\n \t\t\t}\n \n \t\t\tcellWidthValue = getBorderWidthValue( cellComputedStyle,\n \t\t\t\t\tIStyle.STYLE_BORDER_BOTTOM_WIDTH );\n \t\t\trowWidthValue = getBorderWidthValue( rowComputedStyle,\n \t\t\t\t\tIStyle.STYLE_BORDER_BOTTOM_WIDTH );\n \t\t\tbuildCellRowBorder( styleBuffer,\n \t\t\t\t\tHTMLTags.ATTR_BORDER_BOTTOM,\n \t\t\t\t\tcellStyle.getBorderBottomWidth( ),\n \t\t\t\t\tcellStyle.getBorderBottomStyle( ),\n \t\t\t\t\tcellStyle.getBorderBottomColor( ),\n \t\t\t\t\tcellWidthValue,\n \t\t\t\t\trowStyle.getBorderBottomWidth( ),\n \t\t\t\t\trowStyle.getBorderBottomStyle( ),\n \t\t\t\t\trowStyle.getBorderBottomColor( ),\n \t\t\t\t\trowWidthValue );\n \n \t\t\tif ( cell.getColumn( ) == 0 )\n \t\t\t{\n \t\t\t\tcellWidthValue = getBorderWidthValue( cellComputedStyle,\n \t\t\t\t\t\tIStyle.STYLE_BORDER_LEFT_WIDTH );\n \t\t\t\trowWidthValue = getBorderWidthValue( rowComputedStyle,\n \t\t\t\t\t\tIStyle.STYLE_BORDER_LEFT_WIDTH );\n \t\t\t\tbuildCellRowBorder( styleBuffer,\n \t\t\t\t\t\tHTMLTags.ATTR_BORDER_LEFT,\n \t\t\t\t\t\tcellStyle.getBorderLeftWidth( ),\n \t\t\t\t\t\tcellStyle.getBorderLeftStyle( ),\n \t\t\t\t\t\tcellStyle.getBorderLeftColor( ),\n \t\t\t\t\t\tcellWidthValue,\n \t\t\t\t\t\trowStyle.getBorderLeftWidth( ),\n \t\t\t\t\t\trowStyle.getBorderLeftStyle( ),\n \t\t\t\t\t\trowStyle.getBorderLeftColor( ),\n \t\t\t\t\t\trowWidthValue );\n \t\t\t}\n \t\t\telse\n \t\t\t{\n \t\t\t\tbuildCellRowBorder( styleBuffer,\n \t\t\t\t\t\tHTMLTags.ATTR_BORDER_LEFT,\n \t\t\t\t\t\tcellStyle.getBorderLeftWidth( ),\n \t\t\t\t\t\tcellStyle.getBorderLeftStyle( ),\n \t\t\t\t\t\tcellStyle.getBorderLeftColor( ),\n \t\t\t\t\t\t0,\n \t\t\t\t\t\tnull,\n \t\t\t\t\t\tnull,\n \t\t\t\t\t\tnull,\n \t\t\t\t\t\t0 );\n \t\t\t}\n \n \t\t}\n \n \t\t// output in-line style\n \t\twriter.attribute( HTMLTags.ATTR_STYLE, styleBuffer.toString( ) );\n \t}",
"public void fillRectangle(RectangleShape rectangle);"
] | [
"0.7248705",
"0.719837",
"0.71569234",
"0.6907644",
"0.66043925",
"0.6590799",
"0.6526916",
"0.65082014",
"0.6498043",
"0.6452035",
"0.64359766",
"0.6428389",
"0.64036745",
"0.6394375",
"0.6378227",
"0.6359696",
"0.63528097",
"0.6309467",
"0.6306026",
"0.6283652",
"0.62762916",
"0.62364274",
"0.6235206",
"0.62282974",
"0.6216794",
"0.6209314",
"0.620387",
"0.61887723",
"0.6183298",
"0.61625934",
"0.6157321",
"0.61499125",
"0.6140893",
"0.6133337",
"0.6122247",
"0.611706",
"0.6109852",
"0.60999894",
"0.60984623",
"0.6088944",
"0.60876423",
"0.60853535",
"0.60610133",
"0.6058836",
"0.6056605",
"0.6046249",
"0.6038109",
"0.6023491",
"0.60160893",
"0.5998958",
"0.5973544",
"0.5955338",
"0.5948415",
"0.5941312",
"0.59403044",
"0.5931608",
"0.5931132",
"0.59282035",
"0.59261686",
"0.5925753",
"0.5921985",
"0.5916594",
"0.5916252",
"0.59093267",
"0.59063774",
"0.59026426",
"0.59000635",
"0.58950657",
"0.5892459",
"0.5889466",
"0.5887855",
"0.58816934",
"0.5881439",
"0.5877125",
"0.5873568",
"0.5866628",
"0.586337",
"0.5852755",
"0.58492166",
"0.58475477",
"0.5845294",
"0.5841739",
"0.5839219",
"0.5836228",
"0.5835674",
"0.58236855",
"0.58122253",
"0.58122253",
"0.58055246",
"0.57873666",
"0.5785668",
"0.57769907",
"0.5776865",
"0.5764404",
"0.5761669",
"0.57611614",
"0.5759286",
"0.5757509",
"0.5753961",
"0.57534486"
] | 0.60445374 | 46 |
Colbert's third option is to generate random facts | public void thirdAction () {
// Declare and initialize the fact array
String fact[] = new String[4];
fact[0] = "Hi";
fact[1] = "Stephen Colbert is a satire reporter. He does do interviews";
fact[2] = "Colbert ran many shows: Daily Show, Colbert Report, and Late Show. You are probably on one of these shows.";
fact[3] = "Colbert is funny and good.";
// Generate random facts
int randomFactNumber = (int) (Math.random() * 4);
// Print out the fact and write it to the transcript file
System.out.println(fact[randomFactNumber]);
fileOut.println(fact[randomFactNumber]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void random() {\n\n\t}",
"Randomizer getRandomizer();",
"public abstract void randomize();",
"Boolean getRandomize();",
"private Random rand()\n\t{\n\t\treturn new Random();\n\t}",
"public String getFact() {\n Random randomGenerator = new Random();\n int randomNumber = randomGenerator.nextInt(facts.length);\n return facts[randomNumber];\n }",
"public static Ally getRandomRep () {\n return republican[(int) (Math.random() * republican.length)];\n }",
"public void generateRandomEvents();",
"private String RandomGoal() {\n\t\tList<String> list = Arrays.asList(\"m\", \"m\", \"m\", \"m\", \"m\", \"m\", \"m\", \"m\", \"t\", \"t\");\n\t\tRandom rand = new Random();\n\t\tString randomgoal = list.get(rand.nextInt(list.size()));\n\n\t\treturn randomgoal;\n\t}",
"public static int randomNext() { return 0; }",
"private static String testGetRandomInstance(int iterations)\n {\n String output = \"\";\n for (int i = 0; i < iterations; i++) \n {\n output += \"Saying hello to the random greeter: \" \n + Greeter.getRandomInstance().sayHello() + \"\\n\";\n }\n return output;\n }",
"public void addRandomKids(OperatorFactory o, TerminalFactory t,\r\n int maxDepth, Random rand) {}",
"public int getRandomBreed() {\n Random r = new Random();\n// displayToast(Integer.toString(getRandomBreed())); // not needed. generates another random number\n return r.nextInt(6);\n }",
"public static void Random() {\n\t\tRandom ran =new Random();\r\n\t\trandom=ran.nextInt(6)+1;\r\n\t\t//random=1;\r\n\t\twho=A1063307_GUI.who2;\r\n\t\tif((ch[who].status)>0) {\r\n\t\t\tch[who].location=(ch[who].location)+random;\r\n\t\t\tch[who].status=(ch[who].status)-1;\r\n\t\t\t\r\n\t\t}else {\r\n\t\t\t\treturn;\r\n\t\t\t}\t\t\r\n\t}",
"public static CubeState getRandom(){\n CubeState cs = new CubeState();\n Random rand = new Random();\n for (int i = 0; i < 20; i++) {\n cs = cs.times(Solver.generators.get(rand.nextInt(18)));\n }\n return cs;\n }",
"public Scenario generate() {\n\n //generate random number of Passenger(all human)\n ArrayList liPsg = new ArrayList();\n int totalNumOfPsg = (int) (rd.nextDouble() * PassengerCountMax + PassengerCountMin); //at least one Psg\n for (int i = 0; i < totalNumOfPsg; i++) {\n liPsg.add(getRandomPerson());\n }\n //System.out.println(\"PassengerNum= \"+totalNumOfPsg);\n\n\n //generate random number of Pedestrians(with Max 5) & allocate person+animal randomly(human+animal)\n ArrayList liPdt = new ArrayList();\n int totalNumOfPdst = (int) (rd.nextDouble() * PedestrianCountMax + PedestrianCountMin);//at least one Pdg\n int NumOfPerson = (int) Math.round(rd.nextDouble() * totalNumOfPdst);//if only 1 pdt,along with randomDouble<0.5 , 0.4x*1 rounded=0, will only an animal\n //so if you are random being in pdt but pdt only an animal, you neither wont be in scenario, so your negative probability in scenario is higher.\n int NumOfAnimal = totalNumOfPdst - NumOfPerson;\n for (int i = 0; i < NumOfPerson; i++) {\n liPdt.add(getRandomPerson());\n }\n for (int i = 0; i < NumOfAnimal; i++) {\n liPdt.add(getRandomAnimal());\n }\n //System.out.println(\"PedestrianNum= \"+totalNumOfPdst+\" with \"+NumOfPerson+\" human and \"+NumOfAnimal+\" animals\");\n\n\n //allocating where you are, 0=you absence & do nothing, 1=you in car, 2=you on road !!!!yeah happy solving\n int allocate_of_user = (int) Math.round(rd.nextDouble() * 2);\n if (allocate_of_user == 1) {\n ((Person) liPsg.get(0)).setAsYou(true); //set the first psg is you. !!!!!important Cast Obj into Person!!!!\n } else if (allocate_of_user == 2) {\n for (int i = 0; i < liPdt.size(); i++) {\n if (liPdt.get(i) instanceof Person) {//check whether a person\n ((Person) liPdt.get(i)).setAsYou(true);\n break; // only set once than break rather than set all of people of pdt is you\n }\n }\n }\n\n //Scenario(ArrayList<Character> passengers, ArrayList<Character> pedestrians, boolean isLegalCrossing)\n S = new Scenario(liPsg, liPdt, rd.nextBoolean()); //isLegalCrossing = red or green light;\n return S;\n }",
"private int randomWeight()\n {\n return dice.nextInt(1000000);\n }",
"private String getRandomName(){\n return rndString.nextString();\n }",
"private double getRandom() {\n return 2*Math.random() - 1;\n }",
"Chromosome getRandom();",
"public void random(){\r\n\t\tRandom rand = new Random();\r\n\t\trandArray = new int[6];\r\n\t\tfor (int i = 0; i < 6; i++){\r\n\t\t\t//Randomly generated number from zero to nine\r\n\t\t\trandom = rand.nextInt(10);\r\n\t\t\t//Random values stored into the array\r\n\t\t\trandArray[i] = random;\r\n\t\t\tif(i == 0){\r\n\t\t\t\ta = random;\r\n\t\t\t}\r\n\t\t\tif(i == 1){\r\n\t\t\t\tb = random;\r\n\t\t\t}\r\n\t\t\tif(i == 2){\r\n\t\t\t\tc = random;\r\n\t\t\t}\r\n\t\t\tif(i == 3){\r\n\t\t\t\td = random;\r\n\t\t\t}\r\n\t\t\tif(i == 4){\r\n\t\t\t\tf = random;\r\n\t\t\t}\r\n\t\t\tif(i == 5){\r\n\t\t\t\tg = random;\r\n\t\t\t}\r\n\t\t\t//Random values outputted\r\n\t\t\t//Prints out if the hint was not used.\r\n\t\t\tif (executed == false || guessed == true ){\r\n\t\t\t\tprint(randArray[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t\t//Prints out if the hint was not used.\r\n\t\tif (executed == false || guessed == true){\r\n\t\t\tprintln(\" Randomly Generated Value\");\r\n\t\t}\r\n\t}",
"public abstract boolean isRandom();",
"public abstract int getRandomDamage();",
"public void generateRandomMap() {\n\n\t}",
"float genChance();",
"private int generateRandomNumber() {\n\t\treturn new SplittableRandom().nextInt(0, 3);\n\t}",
"public static TradeGood getRandom() {\n TradeGood[] options = new TradeGood[] {WATER, FURS, ORE, FOOD, GAMES, FIREARMS,\n MEDICINE, NARCOTICS, ROBOTS, MACHINES};\n int index = GameState.getState().rng.nextInt(10);\n return options[index];\n }",
"AttackResult randomAttack();",
"public void rollRandom() {\n\t\tthis.strength = randomWithRange();\r\n\t\tthis.wisdom = randomWithRange();\r\n\t\tthis.dexterity = randomWithRange();\r\n\t\tthis.constitution = randomWithRange();\r\n\t\tthis.intelligence = randomWithRange();\r\n\t\tthis.charisma = randomWithRange();\r\n\t}",
"public String getRandomCharecter(){\n\n\tif (!dataprepared){\n\t prepareData();\n\t}\n\t\n\tAssert.pre(table!=null,\"data must be prepared\");\n\n\treturn (String)table.get(r.nextInt(total));\n\n\t\n }",
"@Test\n public void genRandom() {\n runAndWait(() -> genRandom(10_000, 500, 1), 32, 2000);\n runAndWait(() -> genRandom(10_000, 500, 100), 32, 2000);\n runAndWait(() -> genRandom(250_000, 4000, 50), 4, 5_000);\n }",
"private void random() {\n GameState gs = cc.getGameState();\n ArrayList<int[]> moves = cc.getPlayerMoves(player);\n ArrayList<GameState> states = nextStates(moves, gs);\n for (int[] m : moves) {\n GameState next = checkMove(m, cc);\n states.add(next);\n }\n Random rand = new Random(System.nanoTime());\n int i = rand.nextInt(states.size());\n cc.setAIMove(states.get(i));\n }",
"private static void createPlayfulSet() {\n\n\t\trandomKeys = new ArrayList<>();\n\n\t\trandomKeys.add(GuessRevealerConstants.RANDOM_TEXT1);\n\t\trandomKeys.add(GuessRevealerConstants.RANDOM_TEXT2);\n\t\trandomKeys.add(GuessRevealerConstants.RANDOM_TEXT3);\n\t\trandomKeys.add(GuessRevealerConstants.RANDOM_TEXT4);\n\t\trandomKeys.add(GuessRevealerConstants.RANDOM_TEXT5);\n\t\trandomKeys.add(GuessRevealerConstants.RANDOM_TEXT6);\n\t\trandomKeys.add(GuessRevealerConstants.RANDOM_TEXT7);\n\t\trandomKeys.add(GuessRevealerConstants.END);\n\n\t\trandomCount = randomKeys.size();\n\n\t}",
"private void getRandomNumber() {\n\t\tRandom generator = new Random();\n\t\trandomNumber = generator.nextInt(POSSIBLE_CHOICE.length);\n\t}",
"public static int getRandomAmount(){\n return rand.nextInt(1000);\n }",
"public static void main(String[] args) {\n\r\n\t\tRandom rr=new Random();\r\n\t\t\r\n\t\tSystem.out.println(Math.random());//[0,1)\r\n\t\t \r\n\t\t// 第一种情况 int(强转之后最终的值一定是0)\r\n\t\t// 第二种情况 int(强转之后将小数点舍去 1-5)\r\n\t\tSystem.out.println((int)Math.random()*5);//0.99*5永远到不了5\r\n\t\tSystem.out.println((int)(Math.random()*5+1));//[1,5.)\r\n\t\t\r\n\t\tSystem.out.println(rr.rand107());\r\n\t\tSystem.out.println(rr.rand107());\r\n\t\tSystem.out.println(rr.rand107());\r\n\t\tSystem.out.println(rr.rand107());\r\n\t\t\r\n\t\tfor(int i=0;i<=20;i++){\r\n\t\t\tSystem.out.print(i%7+\"-\");\r\n\t\t\t\r\n\t\t}\r\n\t\t//1-M的随机产生\r\n\t\t//(int)(Math.random()*M+1)\r\n\t\t\r\n\t\t\r\n\t\t//产生0 1的概率不同 Math.random()<p?0:1\r\n\t\tSystem.out.println(\"----\"+rr.rand01p());\r\n\t\tSystem.out.println(\"----\"+rr.rand01());\r\n\t\tfor(int i=0;i<=11;i++){\r\n\t\t\tSystem.out.print(i%6+\"-\");\r\n\t\t \t\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(rr.rand106());\r\n\t}",
"private static int getRandomNumberOfRooms(){\r\n return r.nextInt(50)+1;\r\n }",
"private int getRandomPiece() {\r\n return new Random().nextInt(Constants.NUM_PIECES);\r\n }",
"public void randomize() {\r\n\t\tRandom random = new Random();// random generator used to get random int\r\n\t\tint r;// will hold the random int\r\n\t\tint num;// will hold the filtered random int that determines with entity to use for a tile\r\n\t\tfor (int i = 0; i < WIDTH_TILES; i++) {// loops x-coords\r\n\t\t\tfor (int j = 0; j < HEIGHT_TILES; j++) {// loops y-coords\r\n\t\t\t\tr = random.nextInt(32);// gets random int from 0 to 32\r\n\t\t\t\tif (r < 4) num = 0; else if (r < 8) num = 1; else if (r < 31) num = 2; else num = 3;// distributes different objects\r\n\t\t\t\tif (nodes[i * WIDTH_TILES + j].isOccupied() == false) {// if tile empty or random chosen\r\n\t\t\t\t\tnodes[i * WIDTH_TILES + j] = new Node(new Point(i * BOARD_WIDTH / WIDTH_TILES, j * BOARD_WIDTH / HEIGHT_TILES), new ImageIcon(icons[num]).getImage(), true, occupants[num]);// creates random tile\r\n\t\t\t\t}// if (random)\r\n\t\t\t}// for (j)\r\n\t\t}// for (i)\r\n\t}",
"public void generateRandomVaraibles() {\r\n\r\n\t\tfor (DataVariable var : dataTestModel) {\r\n\t\t\tif (!var.getType().equals(\"LOCAL_DATA\") && !var.getType().equals(\"OUTPUT_DATA\")) {\r\n\t\t\t\tif (var.getType().equals(\"boolean\") || var.getType().equals(\"Boolean\")) {\r\n\t\t\t\t\tvar.setValue(String.valueOf(getRandomBoolean()));\r\n\r\n\t\t\t\t} else if (var.getType().equals(\"int\")) {\r\n\t\t\t\t\tif (var.getMinimumValue() != null && var.getMinimumValue().length() > 0\r\n\t\t\t\t\t\t\t&& var.getMaximumValue() != null && var.getMaximumValue().length() > 0) {\r\n\t\t\t\t\t\tvar.setValue(String.valueOf(randomInt(Integer.parseInt(var.getMinimumValue()),\r\n\t\t\t\t\t\t\t\tInteger.parseInt(var.getMaximumValue()))));\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tvar.setValue(String.valueOf(randomInt(0, 100)));\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (var.getType().equals(\"double\")) {\r\n\t\t\t\t\tif (var.getMinimumValue() != null && var.getMinimumValue().length() > 0\r\n\t\t\t\t\t\t\t&& var.getMaximumValue() != null && var.getMaximumValue().length() > 0) {\r\n\t\t\t\t\t\tvar.setValue(String.valueOf(randomDouple(Double.parseDouble(var.getMinimumValue()),\r\n\t\t\t\t\t\t\t\tDouble.parseDouble(var.getMaximumValue()))));\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tvar.setValue(String.valueOf(randomDouple(0.0, 100.0)));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void chooseRandomTweet() {\n if (random.nextBoolean()) {\n realTweet = true;\n displayRandomTrumpTweet();\n } else {\n realTweet = false;\n displayRandomFakeTweet();\n }\n }",
"void mosaic(int seed);",
"public Random getRandom() {\n\t\treturn (rand);\n\t}",
"@Override\n public String next() {\n Random random = new Random();\n return fruits[random.nextInt(3)];\n }",
"int randomPoint() { return 1 + (int)Math.round((Math.random()*20) % (size - 2)); }",
"public int getRandom() {\n ListNode pick = null;\n ListNode p = head;\n int count = 1;\n while (p != null) {\n if (rand.nextInt(count) == 0) {\n pick = p;\n }\n p = p.next;\n count++;\n }\n return pick.val;\n }",
"public Clue getRandomClue()\n {\n HashMap<String, Clue> usableClues = getUseableClues();\n ArrayList<Clue> list = new ArrayList<>(usableClues.values());\n int i = rand.nextInt(usableClues.size());\n return list.get(i);\n }",
"public void shuffle () {\n this.lives = 6;\n this.attempts.clear();\n this.victory = false;\n this.lose = false;\n Random r = new Random ();\n this._word = _dictionary[r.nextInt(_dictionary.length)];\n // this._word = _dictionary[2]; // Testing purposes\n this.hint.setLength(0);\n for (int i = 0; i < _word.length(); i++) {\n this.hint.append(\"_ \");\n } \n }",
"public Predator reproduce() {\n if(eaten < 2) return null;\n else {\n if ((int) (Math.random() * 100) >= 80) {\n predatorsSpawned++;\n return new Predator(((int) ((speed + Math.random()) * 5)), ((int) (maxEnergy + Math.random()\n * 50)), world, true);\n }\n predatorsSpawned++;\n return new Predator(speed, maxEnergy, world);\n }\n }",
"private void assuerNN_random() {\n //Check, if the variable is null..\n if (this.random == null) {\n //..and now create it.\n this.random = new Random(10);\n }\n }",
"public final void rand() {\n\t\tpush(randomNumberGenerator.nextDouble());\n\t}",
"public int getRandom() {\n Integer ans = null;\n while (ans == null) {\n int r = random.nextInt(size);\n ans = allSet[r];\n if (!realSet.contains(ans)) {\n ans = allSet[r] = null;\n }\n }\n return ans;\n }",
"public S getRandomState();",
"@Test\r\n\tpublic void randomTest() {\r\n\t\tItem item = new Item();\r\n\t\ttry {\r\n\t\t\tItem tempSet[] = item.getRandom(0);\r\n\t\t\tassertNotSame(tempSet.length, 0);\r\n\t\t} catch (SQLException e) {\r\n\t\t\tfail(\"Failed to execute search of random items: SQLException\");\r\n\t\t}\r\n\t}",
"private void collectRandomRIDs(){\n\t\tint numRIDs = iterations + 1;\n\t\trandomRID_list = new String[numRIDs];\n\t\tString randomClusterName;\n\t\tint clusterID, randomPosition;\n\t\t\n\t\t// Collect #iterations of random RID's\n\t\tfor(int i=0; i < numRIDs; i++){\n\t\t\trandomClusterName = env.VERTEX_PREFIX + (int) (Math.random() * env.NUM_VERTEX_TYPE);\n\t\t\tclusterID = db.getClusterIdByName(randomClusterName); \n\t\t\tOClusterPosition [] range = db.getStorage().getClusterDataRange(clusterID);\n\t\t\t\n\t\t\trandomPosition = (int) (Math.random() * range[1].intValue()) + range[0].intValue();\n\t\t\trandomRID_list[i] = \"#\" + clusterID + \":\" + randomPosition;\n\t\t}\n\t\t\n\t}",
"private static void test1() {\n\n\tint n=10000;\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tint val=rand7();\n\t\t\tcount[val]++;\n\t\t}\n\t\t\n\t\tfor(int i:count)\n\t\t\tSystem.out.println(i);\n\t}",
"public int generateRandom() {\n\t\tint random = (int)(Math.random()*((6-1)+1))+1;\n\t\treturn random;\n\t}",
"private void loadRandomState() {\n patternName = \"Random\";\n\n for (int i = 0; i < NUMCELLS; i++)\n currentState[i] = (rand.nextInt() > 0x40000000) ? (byte)1 : (byte)0;\n\n generations = 0;\n }",
"public boolean randomCreate() {\n\t\t// Generates a random genetic code\n\t\t_geneticCode = new GeneticCode();\n\t\t// it has no parent\n\t\t_parentID = -1;\n\t\t_generation = 1;\n\t\t_growthRatio = 16;\n\t\t// initial energy\n\t\t_energy = Math.min(Utils.INITIAL_ENERGY,_world.getCO2());\n\t\t_world.decreaseCO2(_energy);\n\t\t_world.addO2(_energy);\n\t\t// initialize\n\t\tcreate();\n\t\tsymmetric();\n\t\t// put it in the world\n\t\treturn placeRandom();\n\t}",
"public void randomize()\n {\n for (int i=0; i<list.length; i++)\n list[i] = (int)(Math.random() * 100) + 1;\n }",
"private void genRandomMonsters() {\n int numMonsters;\n Random rand = new Random();\n numMonstersByType = new HashMap<>();\n\n //Randomly select the amount of monsters based on the type of room this is.\n if (contents.contains(roomContents.MONSTERS)) {\n numMonsters = rand.nextInt(5) + 4;\n } else {\n numMonsters = rand.nextInt(4);\n }\n\n //For each monster, randomly select a type\n for (int i = 0; i < numMonsters; i++) {\n int type = rand.nextInt(3) + 1;\n if (numMonstersByType.containsKey(type)) {\n numMonstersByType.put(type, numMonstersByType.get(type) + 1);\n } else {\n numMonstersByType.put(type, 1);\n }\n }\n }",
"public List<MExampleCall> getRandomExampleCalls();",
"private static ResourceLocation getRandomMonster(Random rand)\n\t{\n\t\tRandomCollection<ResourceLocation> monsters = new RandomCollection<ResourceLocation>();\n\t\t\n\t\tmonsters.add(10, EntityList.getKey(EntityZombie.class));\n\t\tmonsters.add(10, EntityList.getKey(EntitySkeleton.class));\n\t\tmonsters.add(10, EntityList.getKey(EntitySpider.class));\n\t\tmonsters.add(7, EntityList.getKey(EntityGhost.class));\n\t\tmonsters.add(7, EntityList.getKey(EntityBarbarian.class));\n\t\t//monsters.add(4, EntityList.getKey(EntityBandit.class));\n\t\tmonsters.add(3, EntityList.getKey(EntityBanshee.class));\n\t\tmonsters.add(1, EntityList.getKey(EntityGolem.class));\n\t\t\n\t\treturn monsters.next(rand);\n\t}",
"public String randomGenertateContent(){\n\t\tString []temp = {\"This\",\"Is\",\"Random\",\"Randomize\",\"Content\",\"Random\",\"Randomize\",\"Random\",\"Randomly\",\"Random Text\"};\n\t\tRandom random = new Random();\n\t\tint numOfWord = (int) (random.nextInt(20 - 1 + 1) + 1);\n\t\tString output = \"\";\n\t\tfor(int i=0;i<numOfWord;i++){\n\t\t\tint index = (int) (random.nextInt(temp.length - 2 + 1));\n\t\t\toutput+= temp[index] + \" \";\n\t\t}\n\t\treturn output;\n\t}",
"public void randomizeHaplotype() {\n if (rand == null) {\n log.error(\"Cannot randomize haplotype\");\n log.error(toString());\n System.exit(1);\n }\n\n isPhased = true;\n if (rand.nextDouble() > 0.5) {\n return;\n }\n byte tmp = paternal;\n paternal = maternal;\n maternal = tmp;\n }",
"@Test\n public void random() {\n Shorts.random();\n }",
"protected NNode getRandomNode() {\n\t\tArrayList<NNode> nodearr = new ArrayList<NNode>();\n\t\tnodearr.addAll(nodes.values());\n\t\treturn nodearr.get(Braincraft.randomInteger(nodearr.size()));\n\t}",
"public void setWhoGoesFirstRandom() {\n Random ran = new Random();\n int i = ran.nextInt(2) + 1;\n if(i == 1) {\n setWhoGoesFirst(humanPlayer);\n } else {\n setWhoGoesFirst(aiPlayer);\n }\n }",
"void randomize() {\r\n\t\trandomize(1, this.length());\r\n\t}",
"public static void randomInit(int r) { }",
"private static String getRandomType(){\r\n int index = r.nextInt(typeOfRooms.length);\r\n return typeOfRooms[index];\r\n }",
"public List<IrregularVerb> getRandomVerbs(int count);",
"private void fillRandomList()\n\t{\n\t\trandomList.add(\"I like cheese.\");\n\t\trandomList.add(\"Tortoise can move faster than slow rodent.\");\n\t\trandomList.add(\"I enjoy sitting on the ground.\");\n\t\trandomList.add(\"I like cereal.\");\n\t\trandomList.add(\"This is random.\");\n\t\trandomList.add(\"I like typing\");\n\t\trandomList.add(\"FLdlsjejf is my favorite word.\");\n\t\trandomList.add(\"I have two left toes.\");\n\t\trandomList.add(\"Sqrt(2) = 1.414213562 ...\");\n\t\trandomList.add(\"Hi mom.\");\n\t}",
"static Tour rndTour() {\r\n\t\tTour tr = Tour.sequence();\r\n\t\ttr.randomize();\r\n\t\ttr.distance = tr.distance();\r\n\t\treturn tr;\r\n\t}",
"private void setRand(){\n rand = generator.nextInt(9) + 1;\n }",
"public void randomizeCategory() {\n this.group = (int) (3*Math.random()+1);\n }",
"private void randomBehavior() {\n\t\trandom = rand.nextInt(50);\n\t\tif (random == 0) {\n\t\t\trandom = rand.nextInt(4);\n\t\t\tswitch (random) {\n\t\t\t\tcase 0:\n\t\t\t\t\tchangeFacing(ACTION.DOWN);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\tchangeFacing(ACTION.RIGHT);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tchangeFacing(ACTION.UP);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tchangeFacing(ACTION.LEFT);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}",
"private RandomLocationGen() {}",
"protected void randomStep() {\n\t\tint n = curNode.getDegree();\n\t\tint r = 0;\n\n\t\tif (n > 0) {\n\t\t\tr = ctx.random().nextInt(n);\n\n\t\t\tAntCo2Edge curEdge = (AntCo2Edge) curNode.getEdge(r);\n\n\t\t\tassert curEdge != null : \"found no edge\";\n\n\t\t\tcross(curEdge, true);\n\t\t}\n\t}",
"public int randomDP() {\n\t\treturn(getRandomInteger(10,250));\n\t}",
"public DataSetMember<t> getRandomMember()\n\t{\n\t\tRandom R = new Random();\n\t\tint i = R.nextInt(_data.size());\n\t\treturn _data.get(i);\n\t}",
"static String getRandomAgentName() {\n\n if (_names.isEmpty() && count == 0) {\n initializeNames();\n count++;\n }\n int i = (int) (Math.random() * _names.size());\n String name = \"\";\n try {\n name = _names.remove(i);\n } catch (Exception e) {\n System.out.println(\"NS Error: No more names to hand out.\");\n }\n\n return name;\n }",
"public static LogItem randomImpressionFact() {\n\t\treturn new LogItem(1, 0, 0, 0);\n\t}",
"private Alien getRandomAlien() {\n\t\twhile(roamingAliens >= 0){\n\t\t\tint i = random.nextInt(gameObject.size());\n\t\t\tif(gameObject.get(i)instanceof Alien)\n\t\t\t\treturn (Alien) gameObject.get(i);\n\t\t}\n\t\treturn null;\n\t}",
"public int getRandom() {\n ListNode curr = head2;\n int r = rand.nextInt(size);\n for (int i=0; i<r; i++) {\n if (curr!= null){\n curr = curr.next;\n }\n }\n return curr.val;\n }",
"public void testRand()\n throws IOException, FileNotFoundException\n {\n compareValues(PATH + \"randtable.txt\", PATH + \"RandPair.txt\", FACTORY);\n }",
"public ArrayList<RandomItem> getRandomItems();",
"@Override\n public void nextTuple() {\n final Random rand = new Random();\n int instanceRandom = rand.nextInt(MAX_RANDOM);\n if(instanceRandom == referenceRandom){\n collector.emit(new Values(\"Hello World\"));\n } else {\n collector.emit(new Values(\"Other Random Word\"));\n }\n }",
"long random(long ws) {\r\n\t\treturn (System.currentTimeMillis() % ws);\r\n\t}",
"int random(int m)\n {\n return (int) (1 + Math.random()%m);\n }",
"@Override\r\n\tpublic String getFortune() {\n\t\tString[] s= {\"have a nice day :)\",\r\n\t\t\t\t\"attaboy!\",\r\n\t\t\t\t\"good fortune to you <3\"\r\n\t\t};\r\n\t\tint x;\r\n\t\tx=((int)(Math.random()*9))%3;\r\n\t\t\r\n\t\treturn s[x] ;\r\n\t}",
"private String generateRandomWord()\n {\t\n\tRandom randomNb = new Random(System.currentTimeMillis());\n\tchar [] word = new char[randomNb.nextInt(3)+5];\n\tfor(int i=0; i<word.length; i++)\n\t word[i] = letters[randomNb.nextInt(letters.length)];\n\treturn new String(word);\n }",
"public int randomGene();",
"public int randomizeFirstNumber() {\n a = random.nextInt(100);\n question.setA(a);\n return a;\n }",
"SimulatedAnnealing() {\n generator = new Random(System.currentTimeMillis());\n }",
"public int dmg(){\r\n dmg = rand.nextInt(att);\r\n if(att == 1)\r\n dmg = 1;\r\n return dmg;\r\n }",
"private static Option pickRandom() {\n\t\treturn Option.values()[rand.nextInt(3)];\n\t}",
"@Override\n\tpublic double compete() {\n\t\tdouble result=MyTools.getRandomNum(10, 20); \t\n\t\tsetThisResult(result);\n\t\treturn result;\n\t}",
"private void randomizeEnvironment() {\n }",
"public String getRandom() {\n\t return word.get(new Random().nextInt(word.size()));}",
"private void randomizeSpecs(Specs specs) {\n specs.randomize(random);\n matchSpecs(specs);\n }"
] | [
"0.7012605",
"0.68790114",
"0.66224116",
"0.6595659",
"0.646307",
"0.6389296",
"0.62627715",
"0.6235019",
"0.62099266",
"0.61830705",
"0.61828136",
"0.61341286",
"0.61158496",
"0.61126333",
"0.61081094",
"0.6103844",
"0.6102645",
"0.60993946",
"0.6096626",
"0.60576326",
"0.604177",
"0.6026342",
"0.6019028",
"0.6011202",
"0.60005933",
"0.5973457",
"0.5954311",
"0.5945028",
"0.59280884",
"0.59232235",
"0.59148765",
"0.5907424",
"0.5901387",
"0.5901065",
"0.5868943",
"0.5858393",
"0.58582866",
"0.5848078",
"0.5847886",
"0.5846192",
"0.5841783",
"0.58302975",
"0.58220893",
"0.5815347",
"0.5812689",
"0.5798074",
"0.57801956",
"0.5774212",
"0.5772686",
"0.5772536",
"0.57666075",
"0.5762611",
"0.57567173",
"0.57537055",
"0.5752843",
"0.57460696",
"0.5743543",
"0.57434225",
"0.57429767",
"0.57338774",
"0.5729143",
"0.57286924",
"0.5727905",
"0.5725402",
"0.57143676",
"0.5704331",
"0.57035303",
"0.56992376",
"0.5687357",
"0.56843936",
"0.5683072",
"0.56830305",
"0.5670176",
"0.5669061",
"0.56665486",
"0.56519455",
"0.5651002",
"0.56502414",
"0.5650198",
"0.56492203",
"0.564729",
"0.5645964",
"0.5639494",
"0.5638053",
"0.5636854",
"0.5635707",
"0.563209",
"0.5631902",
"0.56232506",
"0.5615841",
"0.56105405",
"0.5607628",
"0.56071526",
"0.56060535",
"0.55963063",
"0.55948305",
"0.5583613",
"0.55835813",
"0.5576278",
"0.5576243",
"0.55762"
] | 0.0 | -1 |
Delivers to SBBs an event off the top of the queue for an activity context | private void routeQueuedEvent() {
final SleeTransactionManager txMgr = this.container.getTransactionManager();
boolean rollbackTx = true;
try {
EventContextImpl eventContextImpl = de.getEventRouterActivity().getCurrentEventContext();
if (eventContextImpl == null) {
if (logger.isDebugEnabled())
logger.debug("\n\n\nDelivering event : [[[ eventId "
+ de.getEventTypeId() + " on ac "+de.getActivityContextId()+"\n");
// event context not set, create it
eventContextImpl = new EventContextImpl(de,container);
de.getEventRouterActivity().setCurrentEventContext(eventContextImpl);
// do initial event processing
EventTypeComponent eventTypeComponent = container.getComponentRepositoryImpl().getComponentByID(de.getEventTypeId());
if (logger.isDebugEnabled()) {
logger.debug("Active services for event "+de.getEventTypeId()+": "+eventTypeComponent.getActiveServicesWhichDefineEventAsInitial());
}
for (ServiceComponent serviceComponent : eventTypeComponent.getActiveServicesWhichDefineEventAsInitial()) {
if (de.getService() == null || de.getService().equals(serviceComponent.getServiceID())) {
initialEventProcessor.processInitialEvents(serviceComponent, de, txMgr, this.container.getActivityContextFactory());
}
}
}
else {
if (eventContextImpl.isSuspendedNotTransacted()) {
if (logger.isDebugEnabled())
logger.debug("\n\n\nFreezing (due to suspended context) event delivery : [[[ eventId "
+ de.getEventTypeId() + " on ac "+de.getActivityContextId()+"\n");
eventContextImpl.barrierEvent(de);
return;
}
else {
if (logger.isDebugEnabled())
logger.debug("\n\n\nResuming event delivery : [[[ eventId "
+ de.getEventTypeId() + " on ac "+de.getActivityContextId()+"\n");
}
}
// For each SBB that is attached to this activity context.
boolean gotSbb = false;
do {
String rootSbbEntityId = null;
ClassLoader invokerClassLoader = null;
SbbEntity sbbEntity = null;
SbbObject sbbObject = null;
try {
/*
* Start of SLEE Originated Invocation Sequence
* ============================================== This
* sequence consists of either: 1) One "Op Only" SLEE
* Originated Invocation - in the case that it's a
* straightforward event routing for the sbb entity. 2) One
* "Op and Remove" SLEE Originated Invocation - in the case
* it's an event routing to a root sbb entity that ends up
* in a remove to the same entity since the attachment count
* goes to zero after the event invocation 3) One "Op Only"
* followed by one "Remove Only" SLEE Originated Invocation -
* in the case it's an event routing to a non-root sbb
* entity that ends up in a remove to the corresponding root
* entity since the root attachment count goes to zero after
* the event invocation Each Invocation Sequence is handled
* in it's own transaction. All exception handling for each
* invocation sequence is handled here. Any exceptions that
* propagate up aren't necessary to be caught. -Tim
*/
// If this fails then we propagate up since there's nothing to roll-back anyway
txMgr.begin();
ActivityContext ac = null;
Exception caught = null;
SbbEntity highestPrioritySbbEntity = null;
ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader();
Set<String> sbbEntitiesThatHandledCurrentEvent = eventContextImpl.getSbbEntitiesThatHandledEvent();
try {
ac = container.getActivityContextFactory().getActivityContext(de.getActivityContextId(),true);
try {
highestPrioritySbbEntity = nextSbbEntityFinder.next(ac, de.getEventTypeId(), de.getService(), sbbEntitiesThatHandledCurrentEvent);
} catch (Exception e) {
logger.warn("Failed to find next sbb entity to deliver the event "+de+" in "+ac.getActivityContextId(), e);
highestPrioritySbbEntity = null;
}
if (highestPrioritySbbEntity == null) {
gotSbb = false;
sbbEntitiesThatHandledCurrentEvent.clear();
} else {
gotSbb = true;
sbbEntitiesThatHandledCurrentEvent.add(highestPrioritySbbEntity.getSbbEntityId());
}
if (gotSbb) {
if (logger.isDebugEnabled()) {
logger
.debug("Highest priority SBB entity, which is attached to the ac "+de.getActivityContextId()+" , to deliver the event: "
+ highestPrioritySbbEntity.getSbbEntityId());
}
// CHANGE CLASS LOADER
invokerClassLoader = highestPrioritySbbEntity.getSbbComponent().getClassLoader();
Thread.currentThread().setContextClassLoader(invokerClassLoader);
sbbEntity = highestPrioritySbbEntity;
rootSbbEntityId = sbbEntity.getRootSbbId();
EventRouterThreadLocals.setInvokingService(sbbEntity.getServiceId());
// Assign an sbb from the pool
sbbEntity.assignAndActivateSbbObject();
sbbObject = sbbEntity.getSbbObject();
sbbObject.sbbLoad();
// GET AND CHECK EVENT MASK FOR THIS SBB ENTITY
Set eventMask = sbbEntity.getMaskedEventTypes(de.getActivityContextId());
if (!eventMask.contains(de.getEventTypeId())) {
// TIME TO INVOKE THE EVENT HANDLER METHOD
sbbObject.setSbbInvocationState(SbbInvocationState.INVOKING_EVENT_HANDLER);
if (logger.isDebugEnabled()) {
logger
.debug("---> Invoking event handler: ac="+de.getActivityContextId()+" , sbbEntity="+sbbEntity.getSbbEntityId()+" , sbbObject="+sbbObject);
}
sbbEntity.invokeEventHandler(de,ac,eventContextImpl);
if (logger.isDebugEnabled()) {
logger
.debug("<--- Invoked event handler: ac="+de.getActivityContextId()+" , sbbEntity="+sbbEntity.getSbbEntityId()+" , sbbObject="+sbbObject);
}
// check to see if the transaction is marked for
// rollback if it is then we need to get out of
// here soon as we can.
if (txMgr.getRollbackOnly()) {
throw new Exception("The transaction is marked for rollback");
}
sbbObject.setSbbInvocationState(SbbInvocationState.NOT_INVOKING);
} else {
if (logger.isDebugEnabled()) {
logger
.debug("Not invoking event handler since event is masked");
}
}
// IF IT'S AN ACTIVITY END EVENT DETACH SBB ENTITY HERE
if (de.getEventTypeId().equals(ActivityEndEventImpl.EVENT_TYPE_ID)) {
if (logger.isDebugEnabled()) {
logger
.debug("The event is an activity end event, detaching ac="+de.getActivityContextId()+" , sbbEntity="+sbbEntity.getSbbEntityId());
}
highestPrioritySbbEntity.afterACDetach(de.getActivityContextId());
}
// CHECK IF WE CAN CLAIM THE ROOT SBB ENTITY
if (rootSbbEntityId != null) {
if (SbbEntityFactory.getSbbEntity(rootSbbEntityId).getAttachmentCount() != 0) {
if (logger.isDebugEnabled()) {
logger
.debug("Not removing sbb entity "+sbbEntity.getSbbEntityId()+" , the attachment count is not 0");
}
// the root sbb entity is not be claimed
rootSbbEntityId = null;
}
} else {
// it's a root sbb
if (!sbbEntity.isRemoved() && sbbEntity.getAttachmentCount() == 0) {
if (logger.isDebugEnabled()) {
logger
.debug("Removing sbb entity "+sbbEntity.getSbbEntityId()+" , the attachment count is not 0");
}
// If it's the same entity then this is an
// "Op and
// Remove Invocation Sequence"
// so we do the remove in the same
// invocation
// sequence as the Op
SbbEntityFactory.removeSbbEntityWithCurrentClassLoader(sbbEntity,true);
}
}
}
} catch (Exception e) {
logger.error("Failure while routing event; second phase. DeferredEvent ["+ de.getEventTypeId() + "]", e);
if (highestPrioritySbbEntity != null) {
sbbObject = highestPrioritySbbEntity.getSbbObject();
}
caught = e;
}
// do a final check to see if there is another SBB to
// deliver.
// We don't want to waste another loop. Note that
// rollback
// will not has any impact on this because the
// ac.DeliveredSet
// is not in the cache.
if (gotSbb) {
try {
if (nextSbbEntityFinder.next(ac, de.getEventTypeId(),de.getService(),sbbEntitiesThatHandledCurrentEvent) == null) {
gotSbb = false;
}
} catch (Throwable e) {
gotSbb = false;
}
}
if (!gotSbb) {
de.eventProcessingSucceed();
if (logger.isDebugEnabled()) {
logger.debug("Delaying commit for 100ms, needed by wrongly designed tck transaction isolation tests. This only happens with DEBUG log level");
Thread.sleep(100);
}
}
Thread.currentThread().setContextClassLoader(
oldClassLoader);
boolean invokeSbbRolledBack = handleRollback.handleRollback(sbbObject, caught, invokerClassLoader,txMgr);
boolean invokeSbbRolledBackRemove = false;
ClassLoader rootInvokerClassLoader = null;
SbbEntity rootSbbEntity = null;
if (!invokeSbbRolledBack && rootSbbEntityId != null) {
/*
* If we get here this means that we need to do a
* cascading remove of the root sbb entity - since the
* original invocation was done on a non-root sbb entity
* then this is done in a different SLEE originated
* invocation, but inside the same SLEE originated
* invocation sequence. Confused yet? This is case 3) in
* my previous comment - the SLEE originated invocation
* sequence contains two SLEE originated invocations:
* One "Op Only" and One "Remove Only" This is the
* "Remove Only" part. We don't bother doing this if we
* already need to rollback
*/
caught = null;
oldClassLoader = Thread.currentThread().getContextClassLoader();
try {
rootSbbEntity = SbbEntityFactory.getSbbEntity(rootSbbEntityId);
rootInvokerClassLoader = rootSbbEntity.getSbbComponent().getClassLoader();
Thread.currentThread().setContextClassLoader(rootInvokerClassLoader);
SbbEntityFactory.removeSbbEntity(rootSbbEntity,true);
} catch (Exception e) {
logger.error("Failure while routing event; third phase. Event Posting ["+ de + "]", e);
caught = e;
} finally {
Thread.currentThread().setContextClassLoader(oldClassLoader);
}
// We have no target sbb object in a Remove Only SLEE
// originated invocation
// FIXME emmartins review
invokeSbbRolledBackRemove = handleRollback.handleRollback(null, caught, rootInvokerClassLoader,txMgr);
}
/*
* We are now coming to the end of the SLEE originated
* invocation sequence We may need to run sbbRolledBack This
* is done in the same tx if there is no target sbb entity
* in any of the SLEE originated invocations making up this
* SLEE originated invocation sequence Otherwise we do it in
* a separate tx for each SLEE originated invocation that
* has a target sbb entity. In other words we might have a
* maximum of 2 sbbrolledback callbacks invoked in separate
* tx in the case this SLEE Originated Invocation Sequence
* contained an Op Only and a Remove Only (since these have
* different target sbb entities) Pretty obvious really! ;)
*/
if (invokeSbbRolledBack && sbbEntity == null) {
// We do it in this tx
handleSbbRollback.handleSbbRolledBack(null, sbbObject, null, null, invokerClassLoader, false, txMgr);
} else if (sbbEntity != null && !txMgr.getRollbackOnly()
&& sbbEntity.getSbbObject() != null) {
sbbObject.sbbStore();
sbbEntity.passivateAndReleaseSbbObject();
}
if (txMgr.getRollbackOnly()) {
if (logger.isDebugEnabled()) {
logger
.debug("Rolling back SLEE Originated Invocation Sequence");
}
txMgr.rollback();
} else {
if (logger.isDebugEnabled()) {
logger
.debug("Committing SLEE Originated Invocation Sequence");
}
txMgr.commit();
}
/*
* Now we invoke sbbRolledBack for each SLEE originated
* invocation that had a target sbb entity in a new tx - the
* new tx creating is handled inside the handleSbbRolledBack
* method
*/
if (invokeSbbRolledBack && sbbEntity != null) {
// Firstly for the "Op only" or "Op and Remove" part
sbbEntity.getSbbEntityId();
if (logger.isDebugEnabled()) {
logger
.debug("Invoking sbbRolledBack for Op Only or Op and Remove");
}
//FIXME: baranowb: de is passed for test: tests/sbb/abstractclass/SbbRolledBackNewTransaction.xml
handleSbbRollback.handleSbbRolledBack(sbbEntity, null, de, new ActivityContextInterfaceImpl(ac), invokerClassLoader, false, txMgr);
}
if (invokeSbbRolledBackRemove) {
// Now for the "Remove Only" if appropriate
handleSbbRollback.handleSbbRolledBack(rootSbbEntity, null, null, null, rootInvokerClassLoader, true, txMgr);
}
/*
* A note on exception handling here- Any exceptions thrown
* further further up that need to be caught in order to
* handle rollback or otherwise maintain consistency of the
* SLEE state are all handled further up I.e. We *do not*
* need to call rollback here. So any exceptions that get
* here do not result in the SLEE being in an inconsistent
* state, therefore we just log them and carry on.
*/
rollbackTx = false;
} catch (RuntimeException e) {
logger.error(
"Unhandled RuntimeException in event router: ", e);
} catch (Exception e) {
logger.error("Unhandled Exception in event router: ", e);
} catch (Error e) {
logger.error("Unhandled Error in event router: ", e);
throw e; // Always rethrow errors
} catch (Throwable t) {
logger.error("Unhandled Throwable in event router: ", t);
} finally {
try {
if (txMgr.getTransaction() != null) {
if (rollbackTx) {
logger
.error("Rolling back tx in routeTheEvent.");
txMgr.rollback();
} else {
logger
.error("Transaction left open in routeTheEvent! It has to be pinned down and fixed! Debug information follows.");
logger.error(txMgr
.displayOngoingSleeTransactions());
txMgr.commit();
}
}
} catch (SystemException se) {
logger.error("Failure in TX operation", se);
}
if (sbbEntity != null) {
if (logger.isDebugEnabled()) {
logger
.debug("Finished delivering the event "
+ de.getEventTypeId()
+ " to the sbbEntity = "
+ sbbEntity.getSbbEntityId()
+ "]]] \n\n\n");
}
}
}
EventRouterThreadLocals.setInvokingService(null);
if (eventContextImpl.isSuspendedNotTransacted()) {
if (logger.isDebugEnabled())
logger.debug("\n\n\nSuspended event delivery : [[[ eventId "
+ de.getEventTypeId() + " on ac "+de.getActivityContextId()+"\n");
return;
}
// need to ensure gotSbb = false if and only if iter.hasNext()
// == false
} while (gotSbb);
/*
* End of SLEE Originated Invocation Sequence
* ==========================================
*
*/
if (de.getEventTypeId().equals(ActivityEndEventImpl.EVENT_TYPE_ID)) {
activityEndEventPostProcessor.process(de.getActivityContextId(), txMgr, this.container.getActivityContextFactory());
} else if (de.getEventTypeId().equals(TimerEventImpl.EVENT_TYPE_ID)) {
timerEventPostProcessor.process(de,this.container.getTimerFacility());
}
// we got to the end of the event routing, remove the event context
de.getEventRouterActivity().setCurrentEventContext(null);
// manage event references
DeferredEventReferencesManagement eventReferencesManagement = container.getEventRouter().getDeferredEventReferencesManagement();
eventReferencesManagement.eventUnreferencedByActivity(de.getEvent(), de.getActivityContextId());
} catch (Exception e) {
logger.error("Unhandled Exception in event router top try", e);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void handleEvent(Event e) {\n\n ConstellationIdentifier cid = null;\n\n synchronized (this) {\n\n // See if the activity is in one of our queues\n ActivityRecord tmp = lookup.get(e.target);\n\n if (tmp != null) {\n // It is, so enqueue it and return.\n tmp.enqueue(e);\n return;\n }\n\n // See if we have exported it somewhere\n cid = exportedActivities.lookup(e.target);\n\n if (cid == null) {\n // If not, it may have been relocated\n cid = relocatedActivities.lookup(e.target);\n }\n\n if (cid == null) {\n // If not, we simply send the event to the parent\n cid = e.target.getOrigin();\n }\n }\n\n if (cid.equals(identifier)) {\n // the target is local, which means we have lost a local activity\n logger.error(\"Activity \" + e.target\n + \" does no longer exist! (event dropped)\");\n return;\n }\n\n parent.handleEventMessage(new EventMessage(identifier, cid, e));\n }",
"@Override\n public void postEvent(Event event)\n {\n normalQueue.offer(event);\n }",
"protected void onQueued() {}",
"public void push(Object activity);",
"public void onQueue();",
"public void queueMessage(ByteBuffer bb) {\n queue.add(bb);\n processOut();\n updateInterestOps();\n }",
"synchronized ConstellationIdentifier deliverEventMessage(EventMessage m) {\n\n Event e = m.event;\n\n ActivityRecord tmp = lookup.get(e.target);\n\n if (tmp != null) {\n tmp.enqueue(e);\n // System.out.println(\"ST: \" + identifier + \" success\");\n return null;\n }\n\n // If not, it may have been relocated\n ConstellationIdentifier cid = relocatedActivities.lookup(e.target);\n\n if (cid != null) {\n // System.out.println(\"ST: \" + identifier + \" relocated to \" + cid);\n return cid;\n }\n\n // If not, it may have been stolen\n cid = exportedActivities.lookup(e.target);\n\n if (cid != null) {\n // System.out.println(\"ST: \" + identifier + \" exported to \" + cid);\n return cid;\n }\n\n // If not, is should be in the queue of my executor\n // System.out.println(\"ST: \" + identifier + \" posted\");\n postEventMessage(m);\n return null;\n }",
"public void queueMessage(ByteBuffer bb) {\n\t\tqueue.add(bb);\n\t\tprocessOut();\n\t\tupdateInterestOps();\n\t}",
"EventChannel apply(Context context);",
"void dispatchEvent(DistributedEvent event);",
"@Override\n public void append( LogEvent event ) {\n long eventTimestamp;\n if (event instanceof AbstractLoggingEvent) {\n eventTimestamp = ((AbstractLoggingEvent) event).getTimestamp();\n } else {\n eventTimestamp = System.currentTimeMillis();\n }\n LogEventRequest packedEvent = new LogEventRequest(Thread.currentThread().getName(), // Remember which thread this event belongs to\n event, eventTimestamp); // Remember the event time\n\n if (event instanceof AbstractLoggingEvent) {\n AbstractLoggingEvent dbLoggingEvent = (AbstractLoggingEvent) event;\n switch (dbLoggingEvent.getEventType()) {\n\n case START_TEST_CASE: {\n\n // on Test Executor side we block until the test case start is committed in the DB\n waitForEventToBeExecuted(packedEvent, dbLoggingEvent, true);\n\n // remember the test case id, which we will later pass to ATS agent\n testCaseState.setTestcaseId(eventProcessor.getTestCaseId());\n\n // clear last testcase id\n testCaseState.clearLastExecutedTestcaseId();\n\n //this event has already been through the queue\n return;\n }\n case END_TEST_CASE: {\n\n // on Test Executor side we block until the test case start is committed in the DB\n waitForEventToBeExecuted(packedEvent, dbLoggingEvent, true);\n\n // remember the last executed test case id\n testCaseState.setLastExecutedTestcaseId(testCaseState.getTestcaseId());\n\n // clear test case id\n testCaseState.clearTestcaseId();\n // this event has already been through the queue\n return;\n }\n case GET_CURRENT_TEST_CASE_STATE: {\n // get current test case id which will be passed to ATS agent\n ((GetCurrentTestCaseEvent) event).setTestCaseState(testCaseState);\n\n //this event should not go through the queue\n return;\n }\n case START_RUN:\n\n /* We synchronize the run start:\n * Here we make sure we are able to connect to the log DB.\n * We also check the integrity of the DB schema.\n * If we fail here, it does not make sense to run tests at all\n */\n atsConsoleLogger.info(\"Waiting for \"\n + event.getClass().getSimpleName()\n + \" event completion\");\n\n /** disable root logger's logging in order to prevent deadlock **/\n Level level = LogManager.getRootLogger().getLevel();\n Configurator.setRootLevel(Level.OFF);\n\n AtsConsoleLogger.setLevel(level);\n\n // create the queue logging thread and the DbEventRequestProcessor\n if (queueLogger == null) {\n initializeDbLogging(null);\n }\n\n waitForEventToBeExecuted(packedEvent, dbLoggingEvent, false);\n //this event has already been through the queue\n\n /*Revert Logger's level*/\n Configurator.setRootLevel(level);\n AtsConsoleLogger.setLevel(level);\n\n return;\n case END_RUN: {\n /* We synchronize the run end.\n * This way if there are remaining log events in the Test Executor's queue,\n * the JVM will not be shutdown prior to committing all events in the DB, as\n * the END_RUN event is the last one in the queue\n */\n atsConsoleLogger.info(\"Waiting for \"\n + event.getClass().getSimpleName()\n + \" event completion\");\n\n /** disable root logger's logging in order to prevent deadlock **/\n level = LogManager.getRootLogger().getLevel();\n Configurator.setRootLevel(Level.OFF);\n\n AtsConsoleLogger.setLevel(level);\n\n waitForEventToBeExecuted(packedEvent, dbLoggingEvent, true);\n\n /*Revert Logger's level*/\n Configurator.setRootLevel(level);\n AtsConsoleLogger.setLevel(level);\n\n //this event has already been through the queue\n return;\n }\n case DELETE_TEST_CASE: {\n // tell the thread on the other side of the queue, that this test case is to be deleted\n // on first chance\n eventProcessor.requestTestcaseDeletion( ((DeleteTestCaseEvent) dbLoggingEvent).getTestCaseId());\n // this event is not going through the queue\n return;\n }\n default:\n // do nothing about this event\n break;\n }\n }\n\n passEventToLoggerQueue(packedEvent);\n }",
"void onBusEvent(Event event);",
"public static void m37108aB(Activity activity) {\n AppMethodBeat.m2504i(48997);\n C40931c aE = C24143a.m37112aE(activity);\n String str = \"MicroMsg.ProcessManager\";\n String str2 = \"backProcess to1 context: %s procname %s\";\n Object[] objArr = new Object[2];\n objArr[0] = activity;\n objArr[1] = aE == null ? \"\" : aE.bxP();\n C4990ab.m7417i(str, str2, objArr);\n if (aE != null) {\n aE.mo8127c(activity, 0);\n }\n AppMethodBeat.m2505o(48997);\n }",
"public abstract void dispatch(ExchangeContext context);",
"@Override\r\n\t\t\tpublic void execute(LiftEvent e) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void execute(LiftEvent e) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n public void onReceive(final Context context, final Intent intent) {\n service.getExecutor().execute(new SipRunnable() {\n public void doRun() throws SameThreadException {\n onReceiveInternal(context, intent, compatIsInitialStickyBroadcast(intent));\n }\n });\n }",
"abstract protected void queueEntity(Entity entity);",
"@Override\n public void processBroadcastElement(SocketEvent event, Context ctx, Collector<KeyedDataPoint> out) throws Exception {\n BroadcastState<String, SocketEvent> bcState = ctx.getBroadcastState(amplificationDesc);\n // storing in MapState with null as VOID default value\n bcState.put(event.streamKey, event);\n }",
"public void handleEvent(PlayerPosition event)\r\n {\r\n if(m_active)\r\n {\r\n String name = m_botAction.getPlayerName(event.getPlayerID());\r\n\r\n if(event.isInSafe())\r\n {\r\n int ship = m_botAction.getPlayer(event.getPlayerID()).getShipType();\r\n int freq = m_botAction.getPlayer(event.getPlayerID()).getFrequency();\r\n boolean delayExceeded = true;\r\n\r\n if(delaySeconds > 0)\r\n {\r\n long currentTime = System.currentTimeMillis();\r\n\r\n if(m_entryTimes.containsKey(name))\r\n {\r\n long entryTime = m_entryTimes.get(name);\r\n int delta = (int)(currentTime - entryTime);\r\n\r\n if(!enableMS) {\r\n // Do the delay in seconds.\r\n delta /= Tools.TimeInMillis.SECOND;\r\n }\r\n\r\n if(delta < delaySeconds)\r\n {\r\n delayExceeded = false;\r\n }\r\n else\r\n {\r\n m_entryTimes.remove(name);\r\n }\r\n }\r\n else\r\n {\r\n m_entryTimes.put(name, currentTime);\r\n delayExceeded = false;\r\n }\r\n }\r\n\r\n if(delayExceeded)\r\n {\r\n if(specPlayer)\r\n {\r\n m_botAction.spec(event.getPlayerID());\r\n m_botAction.spec(event.getPlayerID());\r\n\r\n if(!speccedMsg.equalsIgnoreCase(\"none\")) {\r\n if(speccedSound != 0)\r\n m_botAction.sendArenaMessage(name + \" \" + speccedMsg, speccedSound);\r\n else\r\n m_botAction.sendArenaMessage(name + \" \" + speccedMsg);\r\n }\r\n }\r\n\r\n if(changeShip && ship != targetShip)\r\n {\r\n m_botAction.setShip(event.getPlayerID(), targetShip);\r\n\r\n if(!shipChgMsg.equalsIgnoreCase(\"none\")) {\r\n if(shipSound != 0)\r\n m_botAction.sendArenaMessage(name + \" \" + shipChgMsg, shipSound);\r\n else\r\n m_botAction.sendArenaMessage(name + \" \" + shipChgMsg);\r\n }\r\n\r\n }\r\n\r\n if(changeFreq && freq != targetFreq)\r\n {\r\n m_botAction.setFreq(event.getPlayerID(), targetFreq);\r\n\r\n if(!freqChgMsg.equalsIgnoreCase(\"none\")) {\r\n if(freqSound != 0)\r\n m_botAction.sendArenaMessage(name + \" \" + freqChgMsg, freqSound);\r\n else\r\n m_botAction.sendArenaMessage(name + \" \" + freqChgMsg);\r\n }\r\n }\r\n }\r\n }\r\n else if(delaySeconds > 0)\r\n {\r\n m_entryTimes.remove(name);\r\n }\r\n }\r\n }",
"private void apply(ShipArrived event) {\n }",
"protected final void send(Event event) {\n logger.debug(\"new event: {}\", event);\n Stats.received.incrementAndGet();\n if(! outQueue.offer(event)) {\n Stats.dropped.incrementAndGet();\n logger.error(\"send failed for {}, destination blocked\", event);\n }\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n String taskName = intent.getStringExtra(\"taskName\");\n int order = intent.getIntExtra(\"order\",-1);\n Toast.makeText(work.this,taskName +\" \" ,Toast.LENGTH_SHORT).show();\n\n if(taskName != null)\n {\n Cursor data = myDB.getListContents();\n\n if(data.getCount() > 0)\n {\n if(order == 2)\n myDB.deleteTask(taskName);\n else if(order == 0)\n {\n myDB.updateTask(taskName,taskName,\"\",1,\"WORK\",\"ordinary\",\"Done\");\n }\n else\n {\n Intent transferIntent = new Intent(getBaseContext(), AddActivity.class );\n // whichActivity = \"WEEKEND\";\n\n //we need to transfer the task we want to edit now and change add Bt to save changes\n // transferIntent.putExtra(\"taskName\",taskName);\n\n while (data.moveToNext()) {\n if (data.getString(3).equals(whichActivity) && data.getString(1).equals(taskName)) {\n transferIntent.putExtra(\"taskName\",taskName);\n transferIntent.putExtra(\"description\",data.getString(2));\n transferIntent.putExtra(\"date\",data.getString(4));\n }\n }\n // transferIntent.putExtra(\"taskName\",taskName);\n startActivity(transferIntent);\n }\n\n\n loadData();\n }\n }\n }",
"public void doSomeChanges() {\n\n eventBus.publish(\"our.event.coming.from.model\", \"some data passed\");\n }",
"@Override\n public void onEnabled(Context context, Intent intent) {\n new EventBusUtils().send(1);\n// Toast.makeText(context, \"激活ok====\", Toast.LENGTH_SHORT).show();\n//\n }",
"@Override\n public void postPriorityEvent(Event event)\n {\n priorityQueue.offer(event);\n }",
"@Override\n\tpublic void execute() {\n\t\t// TODO Auto-generated method stub\n\t\tstate.setTimeForLastEvent(state.getCurrentTime());\n\t\tstate.setCurrentEvent(this);\n\t\tstate.setCurrentTime(startTime);\n\t\tstate.updateIdleTime();\n\t\tstate.updateQueueTime();\n\t\t\n\t\tstate.setCurrentCustomer(cust);\n\t\tstate.callChanged();\n\t\t\n\t\t\n\t\t\n\t\tif (state.isQueueEmpty()) {\n\t\t\tstate.increaseIdleChairs();\n\t\t}else {\n\t\t\tdouble timeForNext = state.getHairdresserFinishTime();\n\t\t\tHairSalonEvent finished = new HaircutFinishedEvent(timeForNext,state,store, state.getFirst());\n\t\t\tstore.add(finished);\n\t\t\tstate.removeFirst();\n\t\t\tstate.increaseCuttinTime(timeForNext);\n\t\t\tstate.setLatestCustomerFinishTime(timeForNext);\n\t\t\t\n\n\t\t}\n\t\tif (state.checkHaircut(cust)){\n\t\t\t\n\t\t\tdouble timeForNext = state.getUnsatisfiedCustomerArrivalTime();\n\t\t\tHairSalonEvent returning = new PriorityCustomerEntersEvent(timeForNext,state,store,cust);\n\t\t\tstore.add(returning);\n\t\t\t\n\t\t\t\n\t\t}else {\n\t\t\tstate.increaseNumberOfCust();\n\t\t}\n\t\t\n\t}",
"protected void ProcessOutboundEvent(XMSEvent evt){\n switch(evt.getEventType()){\n case CALL_CONNECTED:\n System.out.println(\"***** Outbound call connected *****\");\n SetOutboundCallState(OutboundCallStates.CALLCONNECTED);\n ConnectCalls();\n break;\n case CALL_RECORD_END:\n \n break; \n case CALL_SENDDTMF_END:\n System.out.println(\"***** END_DTMF *****\");\n System.out.println(\"***** ReJoin Calls *****\");\n ConnectCalls();\n \n break; \n case CALL_DTMF:\n \n System.out.println(\"***** outbound CALL_DTMF *****\");\n System.out.println(\"data=\" + evt.getData());\n myInboundCall.SendInfo(\"DTMF_\" + evt.getData());\n \n break; \n case CALL_INFO:\n \n System.out.println(\"***** Outbound CALL_INFO *****\");\n System.out.println(\"data=\" + evt.getData());\n myInboundCall.SendInfo(evt.getData());\n\n break;\n case CALL_PLAY_END:\n //May need to do something here\n break;\n case CALL_DISCONNECTED: // The far end hung up will simply wait for the media\n System.out.println(\"***** outbound CALL_Disconnected *****\");\n DisconnectCalls();\n break;\n default:\n System.out.println(\"Unknown Event Type!!\");\n }\n }",
"PrioritizedReactiveTask(Bot bot) {\n exchangeContext(bot);\n }",
"Update withDestination(EventChannelDestination destination);",
"static synchronized void schedule(Event event) {\n if (ENABLED || QUEUE.size() <= MAX_QUEUE_SIZE) {\n QUEUE.add(event);\n }\n\n if (ENABLED) {\n if (QUEUE.size() >= MAX_QUEUE_SIZE) {\n sendAllScheduled();\n } else {\n //The arrival of a new item interrupts the timer and resets the countdown.\n WikipediaApp.getInstance().getMainThreadHandler().removeCallbacks(SEND_RUNNABLE);\n WikipediaApp.getInstance().getMainThreadHandler().postDelayed(SEND_RUNNABLE, WAIT_MS);\n }\n }\n }",
"@Override\n\tpublic void channelActive(GaoContext context) {\n\t\t\n\t}",
"private void registerToEventBusForUpdates(final EventBus eb) {\n eb\n .<JsonObject>consumer(Constants.CACHE_REDIS_EVENTBUS_ADDRESS)\n .handler(message -> {\n LOGGER.fine(\"I have received a message: \" + message.body());\n LOGGER.fine(\"Message type: \" + message.body().getClass().getName());\n writeDataToCache(message);\n });\n }",
"public void handleMessageEvent(StunMessageEvent e) {\n delegate.processRequest(e);\n }",
"public void onBirth(Event ev, double timestamp){\n\t\tRequest request = new Request(timestamp);\n\t\tqueue.add(request);\n\t\t\n\t\t\n\t\t/**\n\t\t * if the queue is empty then start executing directly there is no waiting time.\n\t\t */\n\t\tif(queue.size() == 1){\n\t\t\t\n\t\t\trequest.setStartedProcessing(timestamp);\n\t\t\tEvent event = new Event(timestamp + getTimeOfNextDeath(), EventType.DEATH, this);\n\t\t\tschedule.add(event);\n\t\t}\n\t\t\n\t\tif(ev.getTag()){\n\t\t\t/**\n\t\t\t * schedule the next arrival\n\t\t\t */\n\t\t\tdouble time = getTimeOfNextBirth();\n\t\t\tEvent event = new Event(timestamp + time, EventType.BIRTH, this);\n\t\t\tevent.setTag(true);\n\t\t\tschedule.add(event);\n\t\t}\n\t}",
"public void doService() {\n EventManager eventManager = new EventManager();\n while (!queue.isEmpty()) {\n Event firstEvent = queue.poll();\n if (!(firstEvent instanceof ServerBackEvent) &&\n !(firstEvent instanceof ServerRestEvent)) {\n System.out.println(firstEvent);\n } \n Event nextEvent = eventManager.getNext(servers, gen, firstEvent, stats, probability);\n if (nextEvent != null) {\n queue.add(nextEvent);\n }\n }\n System.out.println(stats);\n \n\n }",
"public void visit(SendBlock sb);",
"private void submitCollectSysTrafficTask() {\n\t\tL.i(this.getClass(), \"CollectSysTrafficTask()...\");\n\t\taddTask(new CollectSysTrafficTask());\n\t}",
"public void handle(PBFTStatusActive sa){\n\n Object lpid = getLocalProcessID();\n\n JDSUtility.debug(\"[handle(statusactive)] s\" + lpid + \", at time \" + getClockValue() + \", received \" + sa);\n\n if(!(\n sa != null && sa.getViewNumber() != null && sa.getPrepared() != null && sa.getCommited() != null &&\n sa.getLastExecutedSEQ() != null && sa.getLastStableCheckpointSEQ() != null && sa.getReplicaID() != null \n )){\n JDSUtility.debug(\"[handle(statusactive)] s\" + lpid + \", at time \" + getClockValue() + \", discarded \" + sa + \" because it's a malformed message.\");\n return;\n }\n\n if(!wasSentByAGroupMember(sa)){\n JDSUtility.debug(\"[handle(statusactive)] s\" + lpid + \", at time \" + getClockValue() + \", discarded \" + sa + \" because it wasn't sent by a group member.\");\n return;\n }\n\n if(sa.getReplicaID().equals(lpid)){\n JDSUtility.debug(\"[handle(statusactive)] s\" + lpid + \", at time \" + getClockValue() + \", discarded \" + sa + \" because it was sent by the local server.\");\n return;\n }\n \n long rlesq = sa.getLastExecutedSEQ();\n long rlcwm = sa.getLastStableCheckpointSEQ();\n int view = sa.getViewNumber();\n\n BitSet prepared = sa.getPrepared();\n BitSet commited = sa.getCommited();\n\n Long lpseq = getPrepareInfo().getLastSequenceNumber(view);\n Long lcseq = getCommitInfo().getLastSequenceNumber(view);\n\n if(lpseq == null) lpseq = getCurrentExecuteSEQ();\n if(lcseq == null) lcseq = getCurrentExecuteSEQ();\n \n long llcwm = getLCWM();\n\n \n Object lsid = getLocalServerID();\n\n PBFTBag bag = new PBFTBag(lsid);\n\n bag.setSequenceNumber(sa.getSequenceNumber());\n\n \n if(sa instanceof PBFTStatusPending){\n PBFTStatusPending sp = (PBFTStatusPending) sa;\n int viewn = sp.getViewNumber();\n\n for(int i = 0; i < getLocalGroup().getGroupSize(); i++){\n IProcess p = getLocalGroup().getMember(i);\n boolean found = false;\n for(Object pid : sp.getChangeViewReplicas()){\n if(p.getID().equals(pid)){\n found = true;\n break;\n }\n }\n\n if(!found){\n PBFTChangeView cv = getChangeViewInfo().getChangeView(viewn, p.getID());\n if(cv != null){\n bag.addMessage(cv);\n PBFTChangeViewACK ack = getChangeViewInfo().getMyACK(view, p.getID());\n if(ack != null){\n bag.addMessage(ack);\n }\n }\n }\n }\n\n boolean hasNewView = sp.hasNewView();\n\n if(!hasNewView){\n PBFTNewView nv = getNewViewInfo().get(viewn);\n if(nv != null){\n bag.addMessage(nv);\n }\n }\n }\n\n for(String digest : sa.getDigests()){\n if(getRequestInfo().hasRequest(digest)){\n bag.addMessage(getRequestInfo().getRequest(digest));\n }\n }\n \n for(long csqn = rlesq + 1; lpseq >= 0 && csqn <= lpseq ; csqn ++){\n\n int i = (int)(csqn - (rlesq+1));\n\n if(csqn > rlcwm){\n if(isPrimary()){\n if(!prepared.get(i)){\n\n PBFTPrePrepare pp = (PBFTPrePrepare) getPrePrepareInfo().get(view, csqn);\n\n if(pp != null) {\n bag.addMessage(pp);\n }\n\n }\n }\n\n PBFTPrepare p = null;\n\n if(!prepared.get(i) && (p = getPrepareInfo().get(view, csqn, lsid)) != null) {\n bag.addMessage(p);\n }\n }\n }\n \n for(long csqn = rlesq + 1; lcseq >= 0 && csqn <= lcseq; csqn ++){\n\n int i = (int)(csqn - (rlesq+1));\n\n if(csqn > rlcwm){\n PBFTCommit c = null;\n\n if(!commited.get(i) && (c = (PBFTCommit ) getCommitInfo().get(view, csqn, lsid))!= null) {\n bag.addMessage(c);\n }\n }\n }\n\n if(rlcwm < llcwm){\n try {\n \n CheckpointLogEntry clogEntry = rStateManager.getBiggestLogEntry();\n if(clogEntry != null){\n long seqn = clogEntry.getCheckpointID();\n String digest = clogEntry.getDigest();\n PBFTCheckpoint checkpoint = new PBFTCheckpoint(seqn, digest, getLocalServerID());\n bag.addMessage(checkpoint);\n }\n\n } catch (Exception ex) {\n Logger.getLogger(PBFTServer.class.getName()).log(Level.SEVERE, null, ex);\n ex.printStackTrace();\n }\n }\n\n if(!bag.isEmpty()){\n emit(bag, new BaseProcess(sa.getReplicaID()));\n }\n }",
"public synchronized void sendOrder(BlockingBuffer buffer,AmazonOrder order){\n try\n {\n buffer.blockingPut(order); // set value in buffer\n } catch (InterruptedException exception) {\n Thread.currentThread().interrupt();\n }\n\n }",
"@Override\r\n\t\t\tpublic void broadcast(ID source, ID target, Boolean hit) {\n\t\t\t\t\r\n\t\t\t}",
"public void invokeEvents() {\n\t\tIntent i = alertMe.createIntentFromSession();\n\t\ti.setClass(this, AlertMeEventHistory.class);\n\t\ti.putExtra(AlertMeConstants.INTENT_REQUEST_KEY, AlertMeConstants.INVOKE_HISTORY);\n startActivityForResult(i, AlertMeConstants.INVOKE_HISTORY);\n }",
"private void processAction(ClientContext context, String relayMsg) throws Exception\r\n {\r\n TwoPlayerClientContext tPCC = (TwoPlayerClientContext) context;\r\n updateContext(tPCC, tPCC.getIOMSG(), tPCC.getMessage());\r\n // update the list\r\n for (TwoPlayerClientContext tp : serverContext.getContextList())\r\n {\r\n if (!tp.equals(tPCC))\r\n {\r\n messageQueue.appendText(\"Processing Action for \" + \r\n tp.getClientID().toString() + \"\\n\");\r\n // copy the data over to other clients\r\n copyData(tPCC, tp);\r\n updateContext(tp, tPCC.getIOMSG(), relayMsg);\r\n }\r\n }\r\n }",
"EventChannel apply();",
"public void c(String str) {\n String str2;\n long j;\n String str3;\n try {\n long currentTimeMillis = System.currentTimeMillis();\n Context a2 = d.a();\n long a3 = m.a(a2, \"action_begin\", 0);\n long a4 = m.a(a2, \"action_end\", 0);\n long a5 = m.a(a2, \"action_auto_end\", 0);\n String a6 = m.a(a2, \"action_name\", \"\");\n if (TextUtils.isEmpty(a6) || a3 <= 0 || a4 != 0) {\n str2 = \"action_name\";\n j = a3;\n str3 = \"SMV2\";\n } else {\n j.a(\"SMV2\", \"Record the last unusual PA event with auto-end.\");\n long j2 = a3;\n j = a3;\n long j3 = a5;\n str2 = \"action_name\";\n str3 = \"SMV2\";\n a(a6, j2, j3, true);\n }\n if (!b) {\n b = true;\n if (!TextUtils.isEmpty(a6) && j > 0 && a4 > 0) {\n boolean j4 = new h().j(j);\n j.a(str3, \"check the last pa event whether been inserted to db. actionBeginTs =\" + j + \" isInserted = \" + j4);\n if (!j4) {\n j.a(str3, \"Record the last unusual PA event without auto-end.\");\n a(a6, j, a4, false);\n }\n }\n }\n m.b(a2, \"action_begin\", currentTimeMillis);\n m.b(a2, \"action_end\", 0);\n m.b(a2, \"action_auto_end\", 0);\n m.b(a2, str2, str);\n try {\n this.c.sendEmptyMessageDelayed(100, 15000);\n } catch (Exception e) {\n e = e;\n }\n } catch (Exception e2) {\n e = e2;\n j.a(\"processActActivated exception: \", (Throwable) e);\n }\n }",
"public void arrive(Port port) {\n ShipArrived event = new ShipArrived(\"id\", port, new Date());\n // apply change du to the event\n // it should require only current state and\n apply(event);\n list.add(event);\n // events will be published to the rest of the system\n // from there.. This is where further side effect will\n // occure\n }",
"public static void pushNextEvent(Basic obj, CompositeActivity ca) {\n\t\tb = obj;\n\t\tStack<Object> stack = b.getCurrentWorkFrame();\n\t\tif (stack.isEmpty()) {\n\t\t\treturn;\n\t\t}\n\t\tif (stack.peek() instanceof ActivityInstance) {\n\t\t\tActivityInstance actInst = (ActivityInstance) stack.peek(); \n\t\t\tif (!(actInst.getActivity() instanceof CompositeActivity))\n\t\t\t\treturn; //already have an event pushed\n\t\t}\n\t\tWorkFrame wf = null;\n\t\tCompositeActivity comp = null;\n\t\t//get the top of the stack, wf or composite\n\t\tif (stack.peek() instanceof WorkFrame) {\n\t\t\twf = (WorkFrame) stack.peek();\n\t\t\tif (Simulator.DEBUG)\n\t\t\t\tSystem.out.println(\"wf: \" + wf.getName() + \" idx \" + wf.getIndex() + wf.getEvents().toString());\n\t\t} else {\n\t\t\tcomp = (CompositeActivity) ((ActivityInstance) stack.peek()).getActivity();\n\t\t}\n\t\tEvent currEvent = null;\n\t\tif (wf == null) {\n\t\t\t//If wf is null then it found a composite activity, so need to find next event in the composite\n\t\t\t//activity\n\t\t\tcurrEvent = getNextEvent(comp);\n\t\t} else {\n\t\t\tcurrEvent = getNextEvent(wf);\n\t\t}\n\t\tif (currEvent == null) {\n\t\t\tif (comp == null) {\n\t\t\t\tif (Simulator.DEBUG) System.out.println(\"popping \" + wf.getName());\n\t\t\t} else if (comp.getEndCondition() == EndCondition.DETECTABLE) {\n\t\t\t\tif (Simulator.DEBUG)\n\t\t\t\t\tSystem.out.println(\"no work left for \" + comp.getName() + \n\t\t\t\t\t\t\" but need detectable to end\");\n\t\t\t\treturn;\t\n\t\t\t} else {\n\t\t\t\tif (frameInImpassed(comp) && comp.getEndCondition() == EndCondition.NOWORK)\n\t\t\t\t\treturn;\n\t\t\t}\n\t\t\tstack.pop();\n\t\t\tif (Simulator.DEBUG) {\n\t\t\t\tSystem.out.println(\"push next event from: \");\n\t\t\t\tSystem.out.println(b.printStack());\n\t\t\t}\n\t\t\tif (stack.isEmpty())\n\t\t\t\tbuildWorkStack(b);\n\t\t\tpushNextEvent(b, null);\n\t\t\treturn;\n\t\t}\n\t\telse{\n\t\t\t//After getting the next event, the stack will change so now a wf will be at the top. Another\n\t\t\t//Composite can't be at the top because you need another workframe to call a composite \n\t\t\twf = (WorkFrame) stack.peek();\n\t\t}\n\t\tif (stack.size() > 2) {\n\t\t\tca = findHighestCompositeForTopWF();\n\t\t}\n\t\tif (currEvent instanceof Conclude) { //if event is conclude\n\t\t\tConclude_Sim.concludeStatement(b, (Conclude) currEvent, wf);\n\t\t\tif (wf == null)\n\t\t\t\twf = (WorkFrame) stack.peek();\n\t\t\twf.incIndex();\n\t\t\tpushNextEvent(b, ca);\n\t\t} else if (currEvent instanceof EventActivity) { //if event is activity\n\t\t\tif (Simulator.DEBUG)\n\t\t\t\tSystem.out.println(\"eventactivity...\");\n\t\t\tEventActivity ea = (EventActivity) currEvent;\t\n\t\t\tboolean eventPushed = false;\n\t\t\t//may need to change next line for composites (more acts to search)\n\t\t\tif (ca != null) { //check composite's activities\n\t\t\t\tIterator<Activity> cactItr = ca.getActivities().iterator();\n\t\t\t\twhile (cactItr.hasNext()) { //look through composite activities first\n\t\t\t\t\tActivity act = cactItr.next();\n\t\t\t\t\tList<Value> params = ea.getParams();\n\t\t\t\t\tif(act.getParams().size() > 0)\n\t\t\t\t\t\tact.setParams(params, obj, wf);\n\t\t\t\t\tActivityInstance newAI = getNextAI(act, ea);\n\t\t\t\t\tif (newAI != null) {\n\t\t\t\t\t\tif (wf == null)\n\t\t\t\t\t\t\twf = (WorkFrame) stack.peek();\n\t\t\t\t\t\tnewAI.getActivity().setLevel(wf.getLevel());\n\t\t\t\t\t\tstack.push(newAI);\n\t\t\t\t\t\tb.setCurrentWorkFrame(stack);\n\t\t\t\t\t\tif (Simulator.DEBUG)\n\t\t\t\t\t\t\tSystem.out.println(b.printStack());\n\t\t\t\t\t\tpushNextEvent(b, null);\n\t\t\t\t\t\teventPushed = true;\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Event has not yet been pushed\n\t\t\tif (!eventPushed) { //check 'global' activities if not yet found\n\t\t\t\tif(wf == null)\n\t\t\t\t\twf = (WorkFrame) stack.peek();\n\t\t\t\t//Loop through all activities to see which activity it is\n\t\t\t\tIterator<Activity> actItr = b.getActivities().iterator();\n\t\t\t\twhile (actItr.hasNext()) {\n\t\t\t\t\tActivity act = actItr.next();\n\t\t\t\t\tList<Value> params = ea.getParams();\n\t\t\t\t\tif(act.getParams().size() > 0 && !(act instanceof CompositeActivity) && act.getName().equals(ea.getName())){\n\t\t\t\t\t\tact.setParams(params, obj, wf);\n\t\t\t\t\t}\n\t\t\t\t\t//Generate an instance of the activity\n\t\t\t\t\tActivityInstance newAI = getNextAI(act, ea);\n\t\t\t\t\tif (newAI != null) {\n\t\t\t\t\t\tif (wf == null)\n\t\t\t\t\t\t\twf = (WorkFrame) stack.peek();\n\t\t\t\t\t\tnewAI.getActivity().setLevel(wf.getLevel());\n\t\t\t\t\t\tnewAI.getActivity().setParams(ea.getParams(), b, wf);\n\t\t\t\t\t\tstack.push(newAI);\n\t\t\t\t\t\tb.setCurrentWorkFrame(stack);\n\t\t\t\t\t\tif (Simulator.DEBUG)\n\t\t\t\t\t\t\tSystem.out.println(b.printStack());\n\t\t\t\t\t\tif (newAI.getActivity() instanceof CompositeActivity) {\n\t\t\t\t\t\t\tWorkFrame newWF = getFrameToExecute(((CompositeActivity) newAI.getActivity()).getWorkFrames());\n\t\t\t\t\t\t\tif (newWF != null) {\n\t\t\t\t\t\t\t\tnewWF.setLevel(((CompositeActivity) newAI.getActivity()).getLevel() + 1);\n\t\t\t\t\t\t\t\tnewWF.setExecuted(true);\n\t\t\t\t\t\t\t\tstack.push(newWF);\n\t\t\t\t\t\t\t\tb.setCurrentWorkFrame(stack);\n\t\t\t\t\t\t\t\tif (Simulator.DEBUG)\n\t\t\t\t\t\t\t\t\tSystem.out.println(b.printStack());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tpushNextEvent(b, null);\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"EventChannel.Update update();",
"private void submitCollectAppsTrafficTask() {\n\t\tL.i(this.getClass(), \"CollectAppsTrafficTask()...\");\n\t\taddTask(new CollectAppsTrafficTask());\n\t}",
"public void postCIAgentEvent(CIAgentEvent event) {\n processCIAgentEvent(event); // don't queue, just process\n }",
"@Override\r\n public void onEvent(FlowableEvent event) {\n }",
"@Override\n\t@PayloadMeta(Payload.class)\n\t@InboundActionMeta(name = \"top\")\n\tpublic void handleInbound(Context ctx) throws ServletException, IOException {\n\t}",
"public static void sendAction(Action act, String hubAddress, Context c) {\n try {\n \t// Loading my identity from preferences\n SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(c);\n\n // for saving the last time the device sent a message to any device\n SharedPreferences.Editor editor = sharedPref.edit();\n\t\t\tCalendar calendar = Calendar.getInstance();\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\t\tString curTime = sdf.format(calendar.getTime());\n\t\t\teditor.putString(\"lastDeviceMsg\", curTime);\n\t\t\teditor.commit();\n\n\t\t\tString myIdentity = sharedPref.getString(\"my_identity\", \"\");\n \tact.addArgument(\"fromUser\", myIdentity);\n \t\n \tString msg = serializeAction(act);\n \n \tIntent i = new Intent(c, GenericService.class);\n \n i.setAction(Constants.SEND_MSG_INTENT);\n i.putExtra(\"action\", msg); // msgTextToSend\n i.putExtra(\"hub_address\", hubAddress);\n \n Log.v(\"Helper\", \"Sending: \" + msg + \"To: \" + hubAddress);\n \n c.startService(i);\n } catch(Exception e) {\n \tLog.e(\"sendAction\", \"Something goofy:\" + e.getMessage());\n }\n\t}",
"boolean deliver(CommInfrastructure busType, String topic, String event);",
"void postEvent(final StorageManagerEvent event)\n {\n // Notify all listeners. Use a local copy of the ccList so it does not\n // change while we are using it.\n CallerContext ccList = this.ccList;\n if (ccList != null)\n {\n // Execute the runnable in each caller context in ccList\n ccList.runInContext(new Runnable()\n {\n public void run()\n {\n // Notify listeners. Use a local copy of data so that it\n // does not change while we are using it.\n CallerContextManager ccm = (CallerContextManager) ManagerManager.getInstance(CallerContextManager.class);\n CallerContext cc = ccm.getCurrentContext();\n CCData data = getCCData(cc);\n if ((data != null) && (data.listeners != null)) data.listeners.notifyChange(event);\n }\n });\n }\n }",
"@Override\r\n\tpublic void eventReceived(TaskEvent event) \r\n\t{\r\n\t\t//Add new Item\r\n\t\tif (event.getOperationType() == TaskEvent.ADD_NEW_TASK_EVENT)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Add a new item to the List\");\r\n\t\t\tModelLocator.getInstance().getTaskList().add((makeTaskFromArray((String[]) event.parametersToCommand())));\r\n\t\t\tSystem.out.println(ModelLocator.getInstance().getTaskList());\r\n\t\t}\r\n\t\telse if (event.getOperationType() == TaskEvent.REMOVE_TASK_EVENT)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Remove Item from the List\");\r\n\t\t\tModelLocator.getInstance().getTaskList().removeElementAt(Integer.parseInt((String)(event.parametersToCommand())));\r\n\t\t\tSystem.out.println(ModelLocator.getInstance().getTaskList());\r\n\t\t}\r\n\t\telse if(event.getOperationType() == TaskEvent.SET_TASK_DONE_EVENT)\r\n\t\t{\r\n\t\t\t//To be implemented\r\n\t\t\t\r\n\t\t}\r\n\t\telse\r\n\t\t\tSystem.out.println(\"Error!!!!!\");\r\n\t\t\r\n\t}",
"@Inject(method = \"broadcastChanges\", at = @At(\"HEAD\"), cancellable = true)\n private void impl$broadcastChangesWithTransactions(final CallbackInfo ci) {\n if (!PhaseTracker.SERVER.onSidedThread()) {\n return;\n }\n this.bridge$detectAndSendChanges(false);\n this.impl$captureSuccess = true; // Detect mod overrides\n ci.cancel();\n }",
"boolean deliver(String busType, String topic, Object event);",
"public void handle(QueueItem<T>[] events, SyncProducer producer, Encoder<T> encoder) throws Exception;",
"@Override\r\n public void handle(Buffer inBuffer) {\n \tlogger.debug(name_log + \"----------------------------------------------------------------------------\");\r\n \t//logger.debug(name_log + \"incoming data: \" + inBuffer.length());\r\n String recvPacket = inBuffer.getString(0, inBuffer.length());\r\n \t\r\n //logger.debug(name_log + \"read data: \" + recvPacket);\r\n logger.info(name_log + \"RECV[\" + recvPacket.length() + \"]> \\n\" + recvPacket + \"\\n\");\r\n \r\n \r\n // -- Packet Analyze ----------------------------------------------------------------\r\n // Writing received message to event bus\r\n\t\t\t\t\r\n JsonObject jo = new JsonObject();\r\n \r\n jo.put(\"recvPacket\", recvPacket);\r\n \r\n eb.send(\"PD_Trap\" + remoteAddr, jo);\r\n\r\n // -- RESPONSE, Send Packet to Target -----------------------------------------------\r\n eb.consumer(remoteAddr + \"Trap_ACK\", message -> {\r\n \twriteToTarget(message.body().toString(), \"Trap_ACK\");\r\n });\r\n \r\n eb.consumer(remoteAddr + \"Trap_NACK\", message -> {\r\n \twriteToTarget(message.body().toString(), \"Trap_NACK\");\r\n });\r\n \r\n }",
"private void execute() {\n this.waitForFinish();\n this.stop();\n logger.info(\"Finished eventing test {}\", this.getClass().getSimpleName());\n Event currentEvent = null;\n Map<Long, Integer> orderVerifyMap = new HashMap<Long, Integer>();\n while((currentEvent =eventRecievedList.poll()) != null)\n {\n \tInteger index = (Integer)currentEvent.getProperty(\"index\");\n \tLong threadId = (Long)currentEvent.getProperty(\"thread\");\n\n \tif(index != null && threadId != null){\n \t\tInteger previousIndex = orderVerifyMap.get(threadId);\n \t\tif(previousIndex == null)\n \t\t{\n \t\t\tif(index != 0)\n \t\t\t{\n \t\t\t\tSystem.out.println(\"Event \" + index + \" recieved first for thread \" + threadId);\n \t\t\t}\n \t\t\torderVerifyMap.put(threadId, index);\n \t\t}\n \t\telse\n \t\t{\n \t\t\tif(previousIndex > index)\n \t\t\t{\n \t\t\t\tSystem.out.println(\"Events for thread \" + threadId + \" out of order. Event \" + previousIndex + \" recieved before \" + index);\n \t\t\t}\n \t\t\telse\n \t\t\t{\n \t\t\t\torderVerifyMap.put(threadId, index);\n \t\t\t}\n \t\t}\n \t}\n }\n try {\n Thread.sleep(15 * 1000);\n } catch (final InterruptedException ie) {\n // ignore\n }\n }",
"@Override\n public void onClick(View view) {\n Intent intent = new Intent(getApplicationContext(), StartActivityReceiver.class);\n intent.putExtra(\"zjf\", \"123\");\n sendBroadcast(intent);\n }",
"protected void forward(IAnnounceEvent event){\r\n \t\ttry {\r\n \t\t\t_wrappedOut.write(event.getSerial());\r\n \t\t\t_output.writeASE(event.toSExp());\r\n \t\t} catch (IOException e) {\r\n \t\t\tSystem.err.println(\"Failed forwarding the message:\\n\"+event.toSExp()+\"\\nbecause: \"+e.getMessage());\r\n \t\t}\r\n \t}",
"boolean deliver(CommInfrastructure busType, String topic, Object event);",
"@Override\n\t\tpublic void onReceive(Context context, Intent intent) {\n\t\t}",
"protected void ProcessInboundEvent(XMSEvent evt){\n \n FunctionLogger logger=new FunctionLogger(\"ProcessInboundEvent\",this,myLogger);\n logger.args(evt);\n try{\n switch(evt.getEventType()){\n case CALL_OFFERED:\n System.out.println(\"***** Inbound CALL_Offered *****\");\n SetGatewayState(GatewayStates.ESTABLISHING);\n SetInboundCallState(InboundCallStates.ACCEPTCALL);\n //Should there ba an accept Call\n\n StartOutboundCall(evt.getCall().getCalledAddress(),evt.getCall().getConnectionAddress());\n \n break;\n case CALL_CONNECTED:\n System.out.println(\"***** Inbound CALL_Connected *****\");\n SetInboundCallState(InboundCallStates.CALLCONNECTED);\n StartOutboundCall(evt.getCall().getCalledAddress(),evt.getCall().getConnectionAddress());\n if(PlayRingbackFlag ){\n myInboundCall.PlayOptions.SetMediaType(XMSMediaType.VIDEO);\n myInboundCall.Play(RingbackFile);\n } \n break;\n \n case CALL_INFO:\n \n System.out.println(\"***** Inbound CALL_INFO *****\");\n System.out.println(\"data=\" + evt.getData());\n myOutboundCall.SendInfo(evt.getData());\n \n break;\n case CALL_DTMF:\n \n System.out.println(\"***** inbound CALL_DTMF *****\");\n System.out.println(\"data=\" + evt.getData());\n \n UnJoinCalls(); \n SendDTMF(evt.getData()); \n \n break; \n case CALL_SENDDTMF_END:\n \n System.out.println(\"***** END_DTMF *****\");\n System.out.println(\"***** ReJoin Calls *****\");\n ConnectCalls();\n \n break;\n \n case CALL_RECORD_END:\n break; \n case CALL_PLAY_END:\n break;\n case CALL_DISCONNECTED: \n System.out.println(\"***** inbound CALL_Disconnected *****\");\n DisconnectCalls();\n break;\n default:\n System.out.println(\"Unknown Event Type!!\");\n }\n }catch(XMSGatewayOutboundCallException e){\n logger.info(\"Error is received\",e);\n }\n }",
"public void consumeEvent(InteractionEvent event, int userId) {\n \t\tif (!interactionHistorySizes.containsKey(userId)) {\n \t\t\tinteractionHistorySizes.put(userId, 0);\n \t\t}\n \t\tinteractionHistorySizes.put(userId, interactionHistorySizes.get(userId) + 1);\n \n \t\t// Record start and end date of history\n \t\tList<Date> dateRange;\n \t\tif (!interactionHistoryRanges.containsKey(userId)) {\n \t\t\t// There are two positions in the array: start and end date\n \t\t\tdateRange = new ArrayList<Date>(2);\n \t\t\tinteractionHistoryRanges.put(userId, dateRange);\n \t\t}\n \t\tdateRange = interactionHistoryRanges.get(userId);\n \t\tif (dateRange.size() == 0) {\n \t\t\tdateRange.add(event.getDate());\n \t\t} else if (dateRange.size() == 1) {\n \t\t\tdateRange.add(event.getDate());\n \t\t} else {\n \t\t\tdateRange.set(endDatePosition, event.getDate());\n \t\t}\n \n \t\t// Accumulate active duration -- assumes see all of events of a user in\n \t\t// order\n \t\tif (currentUser == -1 || currentUser != userId) {\n \t\t\tlastUserEvent = event;\n \t\t\tcurrentUser = userId;\n \t\t}\n \t\t// Restart accumulation if greater than 5 min has elapsed between events\n \t\tlong elapsed = event.getDate().getTime() - lastUserEvent.getDate().getTime();\n \t\tif (elapsed < FIVEMININMS) {\n \t\t\tif (!interactionHistoryActiveDuration.containsKey(userId)) {\n \t\t\t\tinteractionHistoryActiveDuration.put(userId, new Long(0));\n \t\t\t}\n \t\t\tinteractionHistoryActiveDuration.put(userId, interactionHistoryActiveDuration.get(userId) + elapsed);\n \t\t}\n \t\tlastUserEvent = event;\n \n \t}",
"public void postEvent(final IpcEvent event) {\n\t\tif (eventQueue != null) {\n\t\t\teventQueue.add(event);\n\t\t}\n\t}",
"public static void handleIntent (Context context, Intent intent) {\n String actionKey = intent.getAction();\n String eventType = intent.getStringExtra(EXTRA_EVENT_TYPE);\n\n if (actionKey != null && eventType != null) {\n\n Intent responseIntent = null;\n Intent frameworkIntent = null;\n\n Action action = ActionHelper.getAction(context, actionKey);\n\n if (eventType.equalsIgnoreCase(COMMAND_FIRE)) {\n frameworkIntent = getFrameworkCompatibleIntent(intent.getStringExtra(EXTRA_CONFIG),\n intent.getBooleanExtra(EXTRA_SAVE_DEFAULT, false), false, REQ_TYPE_FIRE,\n actionKey, intent.getStringExtra(EXTRA_REQUEST_ID));\n\n } else if (eventType.equalsIgnoreCase(COMMAND_REVERT)) {\n frameworkIntent = getFrameworkCompatibleIntent(Persistence.retrieveValue(context, actionKey + DEFAULT_FW_SUFFIX),\n false, true, REQ_TYPE_REVERT,\n actionKey, intent.getStringExtra(EXTRA_REQUEST_ID));\n\n } else if (eventType.equalsIgnoreCase(COMMAND_REFRESH)) {\n if (action != null) {\n responseIntent = action.handleRefresh(context, intent);\n }\n\n } else if (eventType.equalsIgnoreCase(COMMAND_LIST)) {\n if (action != null) {\n responseIntent = action.handleList(context, intent);\n }\n }\n\n if (responseIntent != null) {\n if (LOG_INFO) {\n Log.i(TAG, \"Sending response: \" + responseIntent.toUri(0));\n }\n context.sendBroadcast(responseIntent, PERM_ACTION_PUBLISHER_ADMIN);\n }\n\n if (frameworkIntent != null) {\n if (LOG_INFO) {\n Log.i(TAG, \"Sending intent to framework: \" + frameworkIntent.toUri(0));\n }\n context.sendBroadcast(frameworkIntent);\n }\n } else {\n Log.w(TAG, \"Action not recognized for command = \" + eventType);\n }\n }",
"void startPumpingEvents();",
"private void flushOutbound0() {\n/* 454 */ runPendingTasks();\n/* */ \n/* 456 */ flush();\n/* */ }",
"void addToQueue(WebhookMessage msg);",
"public void onReceive(android.content.Context r7, android.content.Intent r8) {\n /*\n r6 = this;\n java.lang.String r7 = r8.getAction()\n int r0 = r7.hashCode()\n r1 = 672715421(0x2818d29d, float:8.4833645E-15)\n r2 = 2\n r3 = 0\n r4 = -1\n r5 = 1\n if (r0 == r1) goto L_0x0030\n r1 = 1178001221(0x4636df45, float:11703.817)\n if (r0 == r1) goto L_0x0026\n r1 = 1478749832(0x5823ee88, float:7.2097952E14)\n if (r0 == r1) goto L_0x001c\n goto L_0x003a\n L_0x001c:\n java.lang.String r0 = \"chatMessageSendqueueBackground\"\n boolean r7 = r7.equals(r0)\n if (r7 == 0) goto L_0x003a\n r7 = 0\n goto L_0x003b\n L_0x0026:\n java.lang.String r0 = \"chatMessageBroadcastSendqueueBackground\"\n boolean r7 = r7.equals(r0)\n if (r7 == 0) goto L_0x003a\n r7 = 1\n goto L_0x003b\n L_0x0030:\n java.lang.String r0 = \"chatMessageBroadcastChangequeueBackground\"\n boolean r7 = r7.equals(r0)\n if (r7 == 0) goto L_0x003a\n r7 = 2\n goto L_0x003b\n L_0x003a:\n r7 = -1\n L_0x003b:\n switch(r7) {\n case 0: goto L_0x00a1;\n case 1: goto L_0x0077;\n case 2: goto L_0x0040;\n default: goto L_0x003e;\n }\n L_0x003e:\n goto L_0x0181\n L_0x0040:\n java.lang.String r7 = \"broadcastClosed\"\n boolean r7 = r8.getBooleanExtra(r7, r3)\n me.bridgefy.entities.transport.AppEntityBroadcast r7 = p140me.bridgefy.entities.transport.AppEntityBroadcast.getAppEntityBroadcastChange(r7)\n me.bridgefy.service.a.a r8 = p140me.bridgefy.service.p144a.C3615a.m10678a()\n java.util.List r8 = r8.mo29652b()\n java.util.Iterator r8 = r8.iterator()\n L_0x0056:\n boolean r0 = r8.hasNext()\n if (r0 == 0) goto L_0x0181\n java.lang.Object r0 = r8.next()\n me.bridgefy.entities.BridgefyPeer r0 = (p140me.bridgefy.entities.BridgefyPeer) r0\n java.lang.String r0 = r0.getId()\n com.bridgefy.sdk.client.Device r0 = com.bridgefy.sdk.framework.controller.DeviceManager.getDeviceByUserId(r0)\n java.util.HashMap r1 = r7.toHashMap() // Catch:{ Exception -> 0x0072 }\n r0.sendMessage(r1) // Catch:{ Exception -> 0x0072 }\n goto L_0x0056\n L_0x0072:\n r0 = move-exception\n r0.printStackTrace()\n goto L_0x0056\n L_0x0077:\n java.lang.String r7 = \"bridgefyMessage\"\n java.lang.String r7 = r8.getStringExtra(r7) // Catch:{ Exception -> 0x009b }\n me.bridgefy.entities.Message r7 = p140me.bridgefy.entities.Message.create(r7) // Catch:{ Exception -> 0x009b }\n me.bridgefy.entities.transport.AppEntityMessage r8 = new me.bridgefy.entities.transport.AppEntityMessage // Catch:{ Exception -> 0x009b }\n r8.<init>(r7, r2) // Catch:{ Exception -> 0x009b }\n boolean r7 = p140me.bridgefy.main.C3608c.m10650c() // Catch:{ Exception -> 0x009b }\n r7 = r7 ^ r5\n r8.setKu(r7) // Catch:{ Exception -> 0x009b }\n java.util.HashMap r7 = r8.toHashMap() // Catch:{ Exception -> 0x009b }\n com.bridgefy.sdk.client.Message r7 = com.bridgefy.sdk.client.Bridgefy.createMessage(r7) // Catch:{ Exception -> 0x009b }\n com.bridgefy.sdk.client.Bridgefy.sendBroadcastMessage(r7) // Catch:{ Exception -> 0x009b }\n goto L_0x0181\n L_0x009b:\n r7 = move-exception\n r7.printStackTrace()\n goto L_0x0181\n L_0x00a1:\n android.os.Bundle r7 = r8.getExtras()\n java.lang.String r0 = \"userId\"\n r1 = 0\n java.lang.String r7 = r7.getString(r0, r1)\n if (r7 == 0) goto L_0x0181\n me.bridgefy.integration.b r0 = p140me.bridgefy.integration.C3549b.this\n me.bridgefy.a.d r0 = r0.f9294c\n java.util.ArrayList r0 = r0.mo28344c(r7)\n java.util.ArrayList r1 = new java.util.ArrayList\n r1.<init>()\n java.lang.String r2 = \"bridgefyMessage\"\n java.lang.String r8 = r8.getStringExtra(r2)\n if (r8 == 0) goto L_0x00fe\n me.bridgefy.entities.Message r8 = p140me.bridgefy.entities.Message.create(r8) // Catch:{ JsonSyntaxException -> 0x00f7 }\n java.lang.String r2 = r8.getMessageId() // Catch:{ JsonSyntaxException -> 0x00f7 }\n java.lang.String r3 = java.lang.String.valueOf(r4) // Catch:{ JsonSyntaxException -> 0x00f7 }\n boolean r2 = r2.equals(r3) // Catch:{ JsonSyntaxException -> 0x00f7 }\n if (r2 == 0) goto L_0x00e9\n java.util.UUID r2 = java.util.UUID.randomUUID() // Catch:{ JsonSyntaxException -> 0x00f7 }\n java.lang.String r2 = r2.toString() // Catch:{ JsonSyntaxException -> 0x00f7 }\n r8.setMessageId(r2) // Catch:{ JsonSyntaxException -> 0x00f7 }\n java.lang.String r2 = r8.getMessageId() // Catch:{ JsonSyntaxException -> 0x00f7 }\n r8.setOfflineId(r2) // Catch:{ JsonSyntaxException -> 0x00f7 }\n L_0x00e9:\n int r2 = r8.getType() // Catch:{ JsonSyntaxException -> 0x00f7 }\n if (r2 != r5) goto L_0x00f3\n r1.add(r8) // Catch:{ JsonSyntaxException -> 0x00f7 }\n goto L_0x00fe\n L_0x00f3:\n r0.add(r8) // Catch:{ JsonSyntaxException -> 0x00f7 }\n goto L_0x00fe\n L_0x00f7:\n java.lang.String r8 = \"MessageCenter\"\n java.lang.String r2 = \"Sending queue without any new message at the top.\"\n android.util.Log.w(r8, r2)\n L_0x00fe:\n java.util.Iterator r8 = r0.iterator()\n L_0x0102:\n boolean r2 = r8.hasNext()\n if (r2 == 0) goto L_0x0118\n java.lang.Object r2 = r8.next()\n me.bridgefy.entities.Message r2 = (p140me.bridgefy.entities.Message) r2\n int r3 = r2.getType()\n if (r3 != r5) goto L_0x0102\n r1.add(r2)\n goto L_0x0102\n L_0x0118:\n r0.remove(r1)\n int r8 = r1.size()\n if (r8 <= 0) goto L_0x0161\n me.bridgefy.service.a.a r8 = p140me.bridgefy.service.p144a.C3615a.m10678a()\n boolean r8 = r8.mo29651a(r7)\n if (r8 == 0) goto L_0x0146\n me.bridgefy.integration.b r8 = p140me.bridgefy.integration.C3549b.this\n android.content.Context r8 = r8.mo29428a()\n me.bridgefy.integration.b r2 = p140me.bridgefy.integration.C3549b.this\n me.bridgefy.ormlite.DatabaseHelper r2 = r2.f9297f\n me.bridgefy.service.d.b r8 = p140me.bridgefy.service.p147d.C3622b.m10715a(r8, r2)\n boolean r8 = r8.mo29663b()\n if (r8 != 0) goto L_0x0146\n me.bridgefy.integration.b r8 = p140me.bridgefy.integration.C3549b.this\n r8.m10414a(r1)\n L_0x0146:\n me.bridgefy.integration.b r8 = p140me.bridgefy.integration.C3549b.this\n android.content.Context r8 = r8.mo29428a()\n me.bridgefy.integration.b r2 = p140me.bridgefy.integration.C3549b.this\n me.bridgefy.ormlite.DatabaseHelper r2 = r2.f9297f\n me.bridgefy.service.d.b r8 = p140me.bridgefy.service.p147d.C3622b.m10715a(r8, r2)\n boolean r8 = r8.mo29663b()\n if (r8 == 0) goto L_0x0161\n me.bridgefy.integration.b r8 = p140me.bridgefy.integration.C3549b.this\n r8.m10415a(r1, r7)\n L_0x0161:\n int r8 = r0.size()\n if (r8 <= 0) goto L_0x0181\n me.bridgefy.service.a.a r8 = p140me.bridgefy.service.p144a.C3615a.m10678a()\n boolean r8 = r8.mo29651a(r7)\n if (r8 == 0) goto L_0x0177\n me.bridgefy.integration.b r7 = p140me.bridgefy.integration.C3549b.this\n r7.m10414a(r0)\n goto L_0x0181\n L_0x0177:\n me.bridgefy.integration.b r8 = p140me.bridgefy.integration.C3549b.this\n r8.m10414a(r0)\n me.bridgefy.integration.b r8 = p140me.bridgefy.integration.C3549b.this\n r8.m10415a(r0, r7)\n L_0x0181:\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p140me.bridgefy.integration.C3549b.C3551a.onReceive(android.content.Context, android.content.Intent):void\");\n }",
"@Override\r\n\tpublic void onReceive(Context context, Intent intent) {\r\n\t}",
"public void onEventAction(final Event event, final String textMsg, final int action) {\n if (action == R.id.ic_action_vector_resend_message) {\n getActivity().runOnUiThread(new Runnable() {\n @Override\n public void run() {\n resend(event);\n }\n });\n } else if (action == R.id.ic_action_vector_redact_message) {\n getActivity().runOnUiThread(new Runnable() {\n @Override\n public void run() {\n new AlertDialog.Builder(getActivity())\n .setMessage(getString(R.string.redact) + \" ?\")\n .setCancelable(false)\n .setPositiveButton(R.string.ok,\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n if (event.isUndelivered() || event.isUnknownDevice()) {\n // delete from the store\n mSession.getDataHandler().deleteRoomEvent(event);\n\n // remove from the adapter\n mAdapter.removeEventById(event.eventId);\n mAdapter.notifyDataSetChanged();\n mEventSendingListener.onMessageRedacted(event);\n } else {\n redactEvent(event.eventId);\n }\n }\n })\n .setNegativeButton(R.string.cancel, null)\n .show();\n }\n });\n } else if (action == R.id.ic_action_vector_copy) {\n getActivity().runOnUiThread(new Runnable() {\n @Override\n public void run() {\n SystemUtilsKt.copyToClipboard(getActivity(), textMsg);\n }\n });\n } else if ((action == R.id.ic_action_vector_cancel_upload) || (action == R.id.ic_action_vector_cancel_download)) {\n getActivity().runOnUiThread(new Runnable() {\n @Override\n public void run() {\n new AlertDialog.Builder(getActivity())\n .setMessage((action == R.id.ic_action_vector_cancel_upload) ?\n R.string.attachment_cancel_upload : R.string.attachment_cancel_download)\n .setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n mRoom.cancelEventSending(event);\n\n getActivity().runOnUiThread(new Runnable() {\n @Override\n public void run() {\n mAdapter.notifyDataSetChanged();\n }\n });\n }\n })\n .setNegativeButton(R.string.no, null)\n .show();\n }\n });\n } else if (action == R.id.ic_action_vector_quote) {\n Activity attachedActivity = getActivity();\n\n if ((null != attachedActivity) && (attachedActivity instanceof VectorRoomActivity)) {\n // Quote all paragraphs instead\n String[] messageParagraphs = textMsg.split(\"\\n\\n\");\n String quotedTextMsg = \"\";\n for (int i = 0; i < messageParagraphs.length; i++) {\n if (!messageParagraphs[i].trim().equals(\"\")) {\n quotedTextMsg += \"> \" + messageParagraphs[i];\n }\n\n if (!((i + 1) == messageParagraphs.length)) {\n quotedTextMsg += \"\\n\\n\";\n }\n }\n ((VectorRoomActivity) attachedActivity).insertQuoteInTextEditor(quotedTextMsg + \"\\n\\n\");\n }\n } else if ((action == R.id.ic_action_vector_share) || (action == R.id.ic_action_vector_forward) || (action == R.id.ic_action_vector_save)) {\n //\n Message message = JsonUtils.toMessage(event.getContent());\n\n String mediaUrl = null;\n String mediaMimeType = null;\n EncryptedFileInfo encryptedFileInfo = null;\n\n if (message instanceof ImageMessage) {\n ImageMessage imageMessage = (ImageMessage) message;\n\n mediaUrl = imageMessage.getUrl();\n mediaMimeType = imageMessage.getMimeType();\n encryptedFileInfo = imageMessage.file;\n } else if (message instanceof VideoMessage) {\n VideoMessage videoMessage = (VideoMessage) message;\n\n mediaUrl = videoMessage.getUrl();\n encryptedFileInfo = videoMessage.file;\n\n if (null != videoMessage.info) {\n mediaMimeType = videoMessage.info.mimetype;\n }\n } else if (message instanceof FileMessage) {\n FileMessage fileMessage = (FileMessage) message;\n\n mediaUrl = fileMessage.getUrl();\n mediaMimeType = fileMessage.getMimeType();\n encryptedFileInfo = fileMessage.file;\n }\n\n // media file ?\n if (null != mediaUrl) {\n onMediaAction(action, mediaUrl, mediaMimeType, message.body, encryptedFileInfo);\n } else if ((action == R.id.ic_action_vector_share) || (action == R.id.ic_action_vector_forward) || (action == R.id.ic_action_vector_quote)) {\n // use the body\n final Intent sendIntent = new Intent();\n\n sendIntent.setAction(Intent.ACTION_SEND);\n sendIntent.putExtra(Intent.EXTRA_TEXT, textMsg);\n sendIntent.setType(\"text/plain\");\n\n if (action == R.id.ic_action_vector_forward) {\n CommonActivityUtils.sendFilesTo(getActivity(), sendIntent);\n } else {\n startActivity(sendIntent);\n }\n }\n } else if (action == R.id.ic_action_vector_permalink) {\n SystemUtilsKt.copyToClipboard(getActivity(), PermalinkUtils.createPermalink(event));\n } else if (action == R.id.ic_action_vector_report) {\n onMessageReport(event);\n } else if ((action == R.id.ic_action_view_source) || (action == R.id.ic_action_view_decrypted_source)) {\n getActivity().runOnUiThread(new Runnable() {\n @Override\n public void run() {\n View view = getActivity().getLayoutInflater().inflate(R.layout.dialog_event_content, null);\n TextView textview = view.findViewById(R.id.event_content_text_view);\n\n Gson gson = new GsonBuilder()\n .disableHtmlEscaping()\n .setPrettyPrinting()\n .create();\n\n textview.setText(gson.toJson(JsonUtils.toJson((action == R.id.ic_action_view_source) ? event : event.getClearEvent())));\n\n new AlertDialog.Builder(getActivity())\n .setView(view)\n .setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n }\n })\n .show();\n }\n });\n } else if (action == R.id.ic_action_device_verification) {\n onE2eIconClick(event, mAdapter.getDeviceInfo(event.eventId));\n } else if (action == R.id.ic_action_re_request_e2e_key) {\n mSession.getCrypto().reRequestRoomKeyForEvent(event);\n\n mReRequestKeyDialog = new AlertDialog.Builder(getActivity())\n .setTitle(R.string.e2e_re_request_encryption_key_dialog_title)\n .setMessage(R.string.e2e_re_request_encryption_key_dialog_content)\n .setPositiveButton(R.string.ok, null)\n .setOnDismissListener(new DialogInterface.OnDismissListener() {\n @Override\n public void onDismiss(DialogInterface dialog) {\n mReRequestKeyDialog = null;\n }\n })\n .show();\n }\n }",
"@Trace(excludeFromTransactionTrace = true, leaf = true)\n private void tracedActivityFromFlyweight() {\n TracedActivity tracedActivity = AgentBridge.getAgent().getTransaction().createAndStartTracedActivity();\n Assert.assertTrue(tracedActivity instanceof NoOpSegment);\n }",
"public abstract void onCommand(MessageEvent context) throws Exception;",
"RequestSender onRefuse(Consumer<Message> consumer);",
"private void postEvent(AWTEvent theEvent, int priority) {\n EventQueueItem newItem = new EventQueueItem(theEvent);\n\tif (queues[priority].head == null) {\n\t boolean shouldNotify = noEvents();\n\n\t queues[priority].head = queues[priority].tail = newItem;\n\n // This component doesn't have any events of this type on the \n // queue, so we have to initialize the RepaintArea with theEvent\n\t if (theEvent.getID() == PaintEvent.PAINT ||\n theEvent.getID() == PaintEvent.UPDATE) {\n Object source = theEvent.getSource();\n ((Component)source).coalesceEvents(theEvent, theEvent);\n\t }\n\n\t if (shouldNotify) {\n\t notifyAll();\n\t }\n\t} else {\n\t Object source = theEvent.getSource();\n\t boolean isPeerEvent = theEvent instanceof PeerEvent;\n\n\t // For Component source events, traverse the entire list,\n\t // trying to coalesce events\n\t if (source instanceof Component) {\n\t EventQueueItem q = queues[priority].head;\n\n\t\tfor (;;) {\n\t\t if (q.id == newItem.id && q.event.getSource() == source) {\n\t\t AWTEvent coalescedEvent;\n\t\t\tcoalescedEvent = ((Component)source).coalesceEvents(q.event, theEvent);\n\t\t\tif (isPeerEvent) {\n\t\t\t if( coalescedEvent == null && q.event instanceof PeerEvent) {\n\t\t\t\tcoalescedEvent = ((PeerEvent)q.event).coalesceEvents((PeerEvent)theEvent);\n\t\t\t }\n\t\t\t}\n\t\t\tif (coalescedEvent != null) {\n\t\t\t // Remove debugging statement because\n\t\t\t // calling AWTEvent.toString here causes a\n\t\t\t // deadlock.\n\t\t\t //\n\t\t\t // if (dbg.on) {\n\t\t\t // dbg.println(\"EventQueue coalesced event: \" +\n\t\t\t // coalescedEvent);\n\t\t\t // }\n\t\t\t q.event = coalescedEvent;\n\t\t\t return;\n\t\t\t}\n\t\t }\n\t\t if (q.next != null) {\n\t\t q = q.next;\n\t\t } else {\n\t\t break;\n\t\t }\n\t\t}\n\t }\n\n // The event was not coalesced or has non-Component source.\n // Insert it at the end of the appropriate Queue.\n\t if (theEvent.getID() == PaintEvent.PAINT ||\n theEvent.getID() == PaintEvent.UPDATE) {\n\t\t// This component doesn't have any events of this type on the \n // queue, so we have to initialize the RepaintArea with theEvent\n\t ((Component)source).coalesceEvents(theEvent, theEvent);\n\t }\n\n\t queues[priority].tail.next = newItem;\n\t queues[priority].tail = newItem;\n\t}\n }",
"private void m1557a(Task task) {\n synchronized (f1826f) {\n if (f1827g == null) {\n f1827g = new SideChannelManager(this.f1828d.getApplicationContext());\n }\n f1827g.queueTask(task);\n }\n }",
"void connectionActivity(ConnectionEvent ce);",
"private void enterToRunwayQueue() {\n\t\tqueue.insert(this);\n\t}",
"void processBackEvent(AchieveSettings settings);",
"private void onReceiveInternal(Context context, Intent intent, boolean isSticky) throws SameThreadException {\n String action = intent.getAction();\n Log.d(THIS_FILE, \"Internal receive \" + action);\n if (action.equals(ConnectivityManager.CONNECTIVITY_ACTION)) {\n ConnectivityManager cm =\n (ConnectivityManager)context.getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo activeNetwork = cm.getActiveNetworkInfo();\n onConnectivityChanged(activeNetwork, isSticky);\n } else if (action.equals(SipManager.ACTION_SIP_ACCOUNT_CHANGED)) {\n final long accountId = intent.getLongExtra(SipProfile.FIELD_ID, SipProfile.INVALID_ID);\n // Should that be threaded?\n if (accountId != SipProfile.INVALID_ID) {\n final SipProfile account = service.getAccount(accountId);\n if (account != null) {\n Log.d(THIS_FILE, \"Enqueue set account registration\");\n service.setAccountRegistration(account, account.active ? 1 : 0, true);\n }\n }\n } else if (action.equals(SipManager.ACTION_SIP_ACCOUNT_DELETED)){\n final long accountId = intent.getLongExtra(SipProfile.FIELD_ID, SipProfile.INVALID_ID);\n if(accountId != SipProfile.INVALID_ID) {\n final SipProfile fakeProfile = new SipProfile();\n fakeProfile.id = accountId;\n service.setAccountRegistration(fakeProfile, 0, true);\n }\n } else if (action.equals(SipManager.ACTION_SIP_CAN_BE_STOPPED)) {\n service.cleanStop();\n } else if (action.equals(SipManager.ACTION_SIP_REQUEST_RESTART)){\n service.restartSipStack();\n } else if(action.equals(ACTION_VPN_CONNECTIVITY)) {\n onConnectivityChanged(null, isSticky);\n }\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n }",
"private void sendUpdateBroadcastForResult(AfChapterInfo afChapterInfo) {\n\t\tafChapterInfo.eventBus_action=Constants.UPDATE_BROADCAST_MSG;\r\n\t\tEventBus.getDefault().post(afChapterInfo);\r\n\t\t/*Intent intent = new Intent(Constants.UPDATE_BROADCAST_MSG);\r\n\t\tintent.putExtra(Constants.BROADCAST_MSG_OBJECT, afChapterInfo);\r\n\t\tPalmchatApp.getApplication().sendBroadcast(intent);*/\r\n\t}",
"@Override\n\tpublic synchronized <T> Future<T> sendEvent(Event<T> e) {\n\n\t\tif (typesQueue != null && !typesQueue.isEmpty())\n\t\t{\n\t\t\tFuture future=new Future();\n\t\t\tif(subscribersMessages!=null)\n\t\t\t{\n\t\t\t\tSubscriber temp = typesQueue.get(e.getClass()).peek();\n\t\t\t\tif(temp!=null)\n\t\t\t\t{\n\t\t\t\t\tsubscribersMessages.get(temp).add(e);\n\t\t\t\t\troundRubbin(typesQueue.get(e.getClass()));\n\t\t\t\t\tresults.put(e,future);\n\t\t\t\t\tnotifyAll();\n\t\t\t\t\treturn future;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\treturn null;\n\n\t\t\t}\n\t\t}\n\n\t\t\treturn null;\n\t}",
"@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tMessage msg=handler.obtainMessage();\r\n\t\t\t\tmsg.arg1=position;\r\n\t\t\t\tmsg.what=1;\r\n\t\t\t\tmsg.sendToTarget();\r\n\t\t\t}",
"private void sendQueueToWear() {\n new APITask(new APICallback() {\n @Override\n public void r(String result) {\n try {\n JSONArray normalOrderQueue = new JSONObject(result).getJSONArray(\"queue\");\n\n for (int i = 0; i < normalOrderQueue.length(); i++) {\n if (gettingHelp(normalOrderQueue.getJSONObject(i)))\n if (mAdapter.helpedByMe(normalOrderQueue.getJSONObject(i))) {\n JSONObject attendedUser = normalOrderQueue.getJSONObject(i);\n normalOrderQueue = new JSONArray();\n normalOrderQueue.put(attendedUser);\n break;\n } else {\n normalOrderQueue.remove(i);\n i--;\n }\n }\n\n String queue = normalOrderQueue.toString();\n\n PutDataMapRequest putDataMapReq = PutDataMapRequest.create(\"/stayawhile/queue\");\n putDataMapReq.getDataMap().putString(QUEUE_KEY, queue);\n PutDataRequest putDataReq = putDataMapReq.asPutDataRequest();\n putDataReq.setUrgent();\n PendingResult<DataApi.DataItemResult> pendingResult =\n Wearable.DataApi.putDataItem(mGoogleApiClient, putDataReq);\n }\n catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }).execute(\"method\", \"queue/\" + Uri.encode(mQueueName));\n }",
"public void eventProgress() {\n inProgressState.doAction(context);\n System.out.println(context.getState().toString());\n\n // assign judge for event\n judge.assignJudge();\n\n // declare winner of the event\n System.out.print(\"\\nDeclare Winner\\n\");\n winner.declareWinner();\n\n System.out.print(\"\\nThe winner is : \"+winner.getWinner());\n\n // send message to the students\n Student student = new Student();\n student.sendWinnerNotificationToStudents();\n\n // end state of the event\n stopState.doAction(context);\n System.out.println(context.getState().toString());\n\n }",
"public interface HoldBackQueueListener {\n public void messagePutInHoldBackQueue(Message message);\n public void messageRemovedFromHoldBackQueue(Message message);\n}",
"@Override\r\n\tpublic void execute(ActionContext ctx) {\n\t\t\r\n\t}",
"private void queueModified() {\n\tmServiceExecutorCallback.queueModified();\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n }",
"private void publishEcsPositionDemand(Optional<IEventService> eventService, ConfigKey configKey, DoubleItem azItem,\n\t\t\tDoubleItem elItem) {\n\t\tSystemEvent se = jadd(new SystemEvent(configKey.prefix()), azItem, elItem);\n\t\tlog.debug(\"Inside TpkEventPublisher publishEcsPositionDemand \" + configKey + \": \" + se + \": eventService is: \"\n\t\t\t\t+ eventService);\n\t\teventService.ifPresent(e -> e.publish(se).handle((x, ex) -> {\n\t\t\tlog.error(\n\t\t\t\t\t\"Inside TpkEventPublisher publishEcsPositionDemand : failed to publish ecs position demand: \" + se,\n\t\t\t\t\tex);\n\t\t\treturn null;\n\t\t}));\n\t}",
"private void incomingBT_handle()\n {\n if(BT_Message_Handle_Func != null)\n BT_Message_Handle_Func.run();\n\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n QuoteNotificationService.doAction(context);\n //throw new UnsupportedOperationException(\"Not yet implemented\");\n }"
] | [
"0.5891122",
"0.5870679",
"0.57521963",
"0.57377607",
"0.5693815",
"0.5683485",
"0.5592948",
"0.5573357",
"0.5554865",
"0.5317981",
"0.52912074",
"0.52732253",
"0.52712035",
"0.5261674",
"0.52452445",
"0.52452445",
"0.5243053",
"0.5225507",
"0.52197695",
"0.51981163",
"0.517225",
"0.51522243",
"0.51440924",
"0.5143493",
"0.51411605",
"0.51371276",
"0.513638",
"0.51277983",
"0.5113002",
"0.5093336",
"0.50884163",
"0.5077558",
"0.507605",
"0.5072749",
"0.506238",
"0.503393",
"0.50234467",
"0.5021178",
"0.50183237",
"0.50138175",
"0.5010842",
"0.50074315",
"0.50073665",
"0.50056267",
"0.5003262",
"0.500166",
"0.49947456",
"0.4992736",
"0.49898112",
"0.4983973",
"0.49769276",
"0.49760193",
"0.49626574",
"0.4958105",
"0.49531588",
"0.4952202",
"0.49520776",
"0.49480885",
"0.49449524",
"0.49395028",
"0.49373195",
"0.49235517",
"0.49195653",
"0.49187568",
"0.4918038",
"0.49159762",
"0.49157196",
"0.49128422",
"0.4906505",
"0.4903686",
"0.48998177",
"0.4899039",
"0.48963943",
"0.489426",
"0.4892348",
"0.4887098",
"0.48857272",
"0.4885512",
"0.48845857",
"0.48827648",
"0.4880873",
"0.48791334",
"0.4875513",
"0.48695385",
"0.48647094",
"0.48647094",
"0.48647094",
"0.48636544",
"0.4862224",
"0.4860975",
"0.48597476",
"0.48549864",
"0.4851816",
"0.48495194",
"0.4845386",
"0.48445815",
"0.48445815",
"0.48425436",
"0.484115",
"0.48365828"
] | 0.70237845 | 0 |
Register the bluetooth event callback and update the list | public void registerCallback() {
if (mLocalManager == null) {
Log.e(TAG, "registerCallback() Bluetooth is not supported on this device");
return;
}
mLocalManager.setForegroundActivity(mFragment.getContext());
mLocalManager.getEventManager().registerCallback(this);
mLocalManager.getProfileManager().addServiceListener(this);
forceUpdate();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void registrarEventosBluetooth() {\n IntentFilter filtro = new IntentFilter();\n filtro.addAction(BluetoothAdapter.ACTION_STATE_CHANGED);\n filtro.addAction(BluetoothAdapter.ACTION_DISCOVERY_FINISHED);\n filtro.addAction(BluetoothDevice.ACTION_FOUND);\n activity.registerReceiver(bluetoothReceiver, filtro);\n }",
"@Override\n public void onBluetoothDeviceFound(BluetoothDevice btDevice) {\n }",
"private void bluetoothList(CallbackContext callbackContext) throws JSONException {\n BluetoothAdapter bluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\n Set<BluetoothDevice> pairedDevices = bluetoothAdapter.getBondedDevices();\n\n JSONArray arrayList = new JSONArray();\n\n // Lista todos os dispositivos pareados.\n if (pairedDevices.size() > 0) {\n for (BluetoothDevice device : pairedDevices) {\n String name = device.getName();\n String address = device.getAddress();\n arrayList.put(name + \"_\" + address);\n }\n callbackContext.success(arrayList);\n }\n }",
"private void updateBluetoothList(){\n\t\tif(bluetoothAdapter == null){\n\t\t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n\t\t\tbuilder.setTitle(R.string.no_bt_error_dialog_title);\n\t\t\tbuilder.setMessage(R.string.no_bt_error_dialog_message);\n\t\t\tbuilder.setNeutralButton(R.string.no_bt_error_dialog_btn, new OnClickListener() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\tfinish();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\t\n\t\t//check if it is enabled\n//\t\tif (!bluetoothAdapter.isEnabled()) {\n//\t\t Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n//\t\t startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\n//\t\t}\n\t\t\n\t\tSet<BluetoothDevice> pairedDevices = bluetoothAdapter\n\t\t\t\t.getBondedDevices();\n\t\t\n\t\tpairedlist = new ArrayList<BluetoothDevice>();\n\t\t\n\t\tif (pairedDevices.size() > 0) {\n\t\t\tfor (BluetoothDevice device : pairedDevices) {\n\t\t\t\tif (isDeviceUsefulForSMS(device.getBluetoothClass()\n\t\t\t\t\t\t.getMajorDeviceClass())) {\n\t\t\t\t\tpairedlist.add(device);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(pairedlist.size() <= 0){\n\t\t\tshowBTPairedDialog();\n\t\t}\n\t\t\n\t\tupdateBTListView();\n\t}",
"private void createAct(){\n\t\ttry{\n\t\t\tthis.mPairedDevicesArrayAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1);\n\t\t\tthis.mNewDevicesArrayAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1);\n\t\t\tfinal ListView pairedListView = (ListView) this.findViewById(R.id.pairedDevicesLV);\n\t\t\tpairedListView.setAdapter(this.mPairedDevicesArrayAdapter);\n\t\t\tpairedListView.setOnItemClickListener(this.mDeviceClickListener);\n\n\t\t\tfinal ListView newDevicesListView = (ListView) this.findViewById(R.id.detectedDevicesLV);\n\t\t\tnewDevicesListView.setAdapter(this.mNewDevicesArrayAdapter);\n\t\t\tnewDevicesListView.setOnItemClickListener(this.mDeviceClickListener);\n\n\t\t\tmReceiver = new BroadcastReceiver() {\n\t\t\t public void onReceive(Context context, Intent intent) {\n\t\t\t String action = intent.getAction();\n\t\t\t \n\t\t\t if (action.equals(BluetoothDevice.ACTION_FOUND)) {\n\t\t\t \t//Wenn ein neues Bluetooth Geraet gefunden wurde\n\t\t\t\t\t\tfinal BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);\n\t\t\t\t\t\tif (device.getBondState() != BluetoothDevice.BOND_BONDED) {\n\t\t\t\t\t\t\tVisitMultiplayerGame.this.mNewDevicesArrayAdapter.add(device.getName() + \"\\n\" + device.getAddress());\n\t\t\t\t\t\t\tbt.addPairedDevice(device);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (action.equals(BluetoothAdapter.ACTION_DISCOVERY_FINISHED)) {\n\t\t\t\t\t\t//Wenn die Suche nach neuen Geraeten abgeschlossen wurde\n\t\t\t\t\t\tVisitMultiplayerGame.this.setProgressBarIndeterminateVisibility(false);\n\t\t\t\t\t\tif (VisitMultiplayerGame.this.mNewDevicesArrayAdapter.getCount() == 0) {\n\t\t\t\t\t\t\tVisitMultiplayerGame.this.mNewDevicesArrayAdapter.add(getString(R.string.NoDevicesFound));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstatus.setText(getString(R.string.PleaseSelectADevice));\n\t\t\t\t\t\tprogress.dismiss();\n\t\t\t\t\t}\n\t\t\t }\n\t\t\t};\n\t\t\t\n\t\t\t//Event Handler registrieren, wenn Geraet gefunden wurde\n\t\t\tIntentFilter filter = new IntentFilter(BluetoothDevice.ACTION_FOUND);\n\t\t\tthis.registerReceiver(this.mReceiver, filter);\n\n\t\t\t//Event Handler registrieren, wenn Suche beendet wurde gefunden wurde\n\t\t\tfilter = new IntentFilter(BluetoothAdapter.ACTION_DISCOVERY_FINISHED);\n\t\t\tthis.registerReceiver(this.mReceiver, filter);\n\t\t\t\n\t\t\t// Get a set of currently paired devices\n\t\t\tfinal Set<BluetoothDevice> pairedDevices = bt.getPairedDevices();\n\t\t\tif (pairedDevices.size() > 0) {\n\t\t\t\tthis.findViewById(R.id.pairedDevicesLV).setVisibility(View.VISIBLE);\n\t\t\t\tfor (final BluetoothDevice device : pairedDevices) {\n\t\t\t\t\tthis.mPairedDevicesArrayAdapter.add(device.getName() + \"\\n\" + device.getAddress());\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis.mPairedDevicesArrayAdapter.add(getString(R.string.NoPairedDevices));\n\t\t\t}\n\t\t}\n\t\tcatch(Exception ex){\n\t\t\tex.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tbt.getPairedDevices();\n\t\tbt.discoverDevices();\n\t\t\n\t\tprogress = new ProgressDialog(this);\n\t\tprogress.setMessage(getString(R.string.SearchingForNewDevices));\n\t\tprogress.setIndeterminate(true);\n\t\tprogress.show();\n\t}",
"void onStateChange(BluetoothService.BTState state);",
"public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_bluetooth_handler);\n final Button back=(Button) findViewById(R.id.button_back);\n bluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\n checkBTState();\n\n try {\n serverSocket=bluetoothAdapter.listenUsingInsecureRfcommWithServiceRecord(label, MY_UUID);\n } catch (IOException e){}\n\n try{\n bluetoothSocket=serverSocket.accept();\n }catch (IOException e) {}\n\n try{\n outputStream=MainActivity1.bluetoothSocket.getOutputStream();\n }catch (IOException e){\n Log.d(MainActivity1.label,\"Output stream connection failed.\");\n }\n\n receiver=new BroadcastReceiver() {\n @Override\n public void onReceive(Context context, Intent intent)\n {\n String a=intent.getAction();\n\n if(BluetoothDevice.ACTION_FOUND.equals(a))\n {\n BluetoothDevice device=intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);\n\n bluetoothItems.add(device.getName());\n }\n }\n };\n IntentFilter filter=new IntentFilter(BluetoothDevice.ACTION_FOUND);\n registerReceiver(receiver, filter);\n\n //searching();\n\n ListView bluetoothList=(ListView) findViewById(R.id.listView_bluetoothItems);\n\n bluetoothList.setAdapter(new ArrayAdapter<String>(this,R.layout.abc_list_menu_item_layout));\n\n back.setOnClickListener(new OnClickListener() {\n @Override\n public void onClick(View v) {\n startActivity(new Intent(getApplicationContext(), ControllerHomeScreen.class));\n }\n });\n }",
"public interface OnDeviceSelectedListener {\n\n /**\n * Method used to send the address of a selected bluetooth device.\n * @param address the MAC address of the bluetooth device.\n */\n void onDeviceSelected(String address);\n}",
"public interface ScanCallBack {\n void getDevices(final BluetoothDevice bluetoothDevice, final int rssi);\n}",
"private void registerListClickCallBack() {\n\t\t\n\t\tListView myList = (ListView)findViewById(R.id.listViewFromDB);\n\t\tmyList.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View viewClicked,\n\t\t\t\t\tint position, long idInDB) {\n\t\t\t\t\n\t\t\t\tupdateItemForId(idInDB);\n\t\t\t\n\t\t\t}\n\t\t});\n\t}",
"public void listBT() {\n Log.d(\"Main Activity\", \"Listing BT elements\");\n if (searchBt) {\n //Discover bluetooth devices\n final List<String> list = new ArrayList<>();\n list.add(\"\");\n pairedDevices.addAll(mBluetoothAdapter.getBondedDevices());\n // If there are paired devices\n if (pairedDevices.size() > 0) {\n // Loop through paired devices\n for (BluetoothDevice device : pairedDevices) {\n // Add the name and address to an array adapter to show in a ListView\n list.add(device.getName() + \"\\n\" + device.getAddress());\n }\n }\n if (!h7) {\n Log.d(\"Main Activity\", \"Listing BTLE elements\");\n final BluetoothAdapter.LeScanCallback leScanCallback = new BluetoothAdapter.LeScanCallback() {\n public void onLeScan(final BluetoothDevice device, final int rssi, final byte[] scanRecord) {\n if (!list.contains(device.getName() + \"\\n\" + device.getAddress())) {\n Log.d(\"Main Activity\", \"Adding \" + device.getName());\n list.add(device.getName() + \"\\n\" + device.getAddress());\n pairedDevices.add(device);\n }\n }\n };\n\n\n Thread scannerBTLE = new Thread() {\n public void run() {\n Log.d(\"Main Activity\", \"Starting scanning for BTLE\");\n mBluetoothAdapter.startLeScan(leScanCallback);\n try {\n Thread.sleep(5000);\n Log.d(\"Main Activity\", \"Stoping scanning for BTLE\");\n mBluetoothAdapter.stopLeScan(leScanCallback);\n } catch (InterruptedException e) {\n Log.e(\"Main Activity\", \"ERROR: on scanning\");\n }\n }\n };\n\n scannerBTLE.start();\n }\n\n //Populate drop down\n spinner1 = (Spinner) findViewById(R.id.spinner1);\n ArrayAdapter<String> dataAdapter = new ArrayAdapter<>(this,\n android.R.layout.simple_spinner_item, list);\n dataAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n spinner1.setOnItemSelectedListener(this);\n spinner1.setAdapter(dataAdapter);\n\n for (int i = 0; i < dataAdapter.getCount(); i++) {\n if (dataAdapter.getItem(i).contains(\"Polar H7\")) spinner1.setSelection(i);\n }\n\n if (DataHandler.getInstance().getID() != 0 && DataHandler.getInstance().getID() < spinner1.getCount())\n spinner1.setSelection(DataHandler.getInstance().getID());\n }\n }",
"@Subscribe(threadMode = ThreadMode.MAIN)\n public void onDevicesReceived(OnReceiverDevicesEvent event){\n //if(!devicesListAdapter.isEmpty()) devicesListAdapter.clear(); // clear old names\n\n\n devicesListAdapter.removeAll();\n Log.d(\"P2P\", \"Found something on events!\");\n //Toast.makeText(getContext(), \"Found something\", Toast.LENGTH_LONG).show();\n Collection<WifiP2pDevice> devs = event.getDevices().getDeviceList();\n devsList.addAll(devs);\n\n\n\n for(int i = 0; i < devsList.size(); i++){\n\n if(!devicesListAdapter.hasItem(devsList.get(i))){\n Log.d(\"P2P\", \"Device Found: \" + devsList.get(0).deviceName);\n devicesListAdapter.add(devsList.get(i).deviceName);\n devicesListAdapter.notifyDataSetChanged();\n }\n\n }\n\n\n }",
"void bluetoothDeactivated();",
"private void registerBLEBrocastReceiver() {\n BlueToothReceiver.registerCardStatusMonitoring(mHandler);\n\n //MyBroadcastReceiver\n mBleReceiver = new BlueToothReceiver();\n IntentFilter filter = new IntentFilter();\n filter.addAction(\"android.bluetooth.device.action.ACL_CONNECTED\");\n filter.addAction(\"android.bluetooth.device.action.ACL_DISCONNECTED\");\n filter.addAction(\"android.bluetooth.device.action.FOUND\");\n filter.addAction(\"android.bluetooth.device.action.ACL_DISCONNECT_REQUESTED\");\n //register receiver\n registerReceiver(mBleReceiver, filter);\n }",
"private void bluetoothSelected(JSONArray data, final CallbackContext callbackContext) throws JSONException {\n String arrayList = data.getString(0);\n\n String[] parts = arrayList.split(\"_\");\n\n String name = parts[0];\n String macAddress = parts[1];\n\n PinpadObject pinpad = new PinpadObject(name, macAddress, false);\n\n // Passa o pinpad selecionado para o provider de conexao bluetooth.\n BluetoothConnectionProvider bluetoothConnectionProvider = new BluetoothConnectionProvider(StoneSDK.this.cordova.getActivity(), pinpad);\n bluetoothConnectionProvider.setDialogMessage(\"Criando conexao com o pinpad selecionado\"); // Mensagem exibida do dialog.\n bluetoothConnectionProvider.setWorkInBackground(false); // Informa que havera um feedback para o usuario.\n bluetoothConnectionProvider.setConnectionCallback(new StoneCallbackInterface() {\n\n public void onSuccess() {\n Toast.makeText(StoneSDK.this.cordova.getActivity(), \"Pinpad conectado\", Toast.LENGTH_SHORT).show();\n callbackContext.success();\n }\n\n public void onError() {\n Toast.makeText(StoneSDK.this.cordova.getActivity(), \"Erro durante a conexao. Verifique a lista de erros do provider para mais informacoes\", Toast.LENGTH_SHORT).show();\n callbackContext.error(\"Erro durante a conexao. Verifique a lista de erros do provider para mais informacoes\");\n }\n\n });\n bluetoothConnectionProvider.execute(); // Executa o provider de conexao bluetooth.\n }",
"@Override\n\t\tpublic void onReceive(Context context, Intent intent) {\n\t\t\tSystem.out.println(\"Called onReceive\");\n\t\t\tString action = intent.getAction();\n\t\t\t//When a new device is found\n\t\t\ttry{\n\t\t\tif(action.equals(BluetoothDevice.ACTION_FOUND)) {\n\t\t\t\tSystem.out.println(\"Called ACTION_FOUND\");\n\t\t\t\tBluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);\n\t\t\t\tSystem.out.println(\"Device Name: \"+device.getName());\n\t\t\t\tSystem.out.println(\"Device Addr: \"+device.getAddress());\n\t\t\t\tname = device.getName();\n\t\t\t\taddress = device.getAddress();\n\t\t\t\t//BTArrayAdapter.add(device.getName() + \"\\n\" + device.getAddress());\n\t\t\t\t//BTArrayAdapter.notifyDataSetChanged();\n\t\t\t\t//System.out.println(BTArrayAdapter.getCount());\n\t\t\t\t//for (int i=1;i<=BTArrayAdapter.getCount();i++){\n\t\t\t\t//System.out.println(\"Contents of Array: \"+BTArrayAdapter.getItem(0));\n\t\t\t\t//}\n\t\t\t}\n\t\t\t}catch(Exception e){System.out.println(\"Exception in ACTION_FOUND: \"+e);\n\t\t\t}\n\t\t\tif(BluetoothAdapter.ACTION_DISCOVERY_FINISHED.equals(action)){\n\t\t\t\tSystem.out.println(\"Scanning Done...\");\n\t\t\t\tFile locationFileDir = Environment.getExternalStoragePublicDirectory(\"/cusp/health\");\n\t\t\t\tlocationFileDir.mkdirs();\n\t\t\t\t String locfilename = locationFileDir.getPath() + File.separator + \"Bid.txt\";\n\t\t\t\t File location = new File (locfilename);\n\t\t\t\t if (!locationFileDir.exists() && locationFileDir.mkdirs()) {\n\t\t\t\t\t\tSystem.out.println(\"Cannot create File/ Folder\");\n\t\t\t\t\t}\n\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\tSystem.out.println(\"Writing Device Information to file\");\n\t\t\t\t\t\t\tout = new PrintWriter(location);\n\t\t\t\t\t\t\tout.println(\"Name: \"+name);\n\t\t\t\t\t\t\tout.println(\"Address: \"+address);\n\t\t\t\t\t\t\tout.flush();\n\t\t\t\t\t\t out.close();\n\t\t\t\t\t\t System.out.println(\"Wrote to the file..!\");\n\t\t\t\t\t\t\t}catch(Exception e){System.out.println(\"Error Flushing to a File \" +e);}\n\t\t\t\t//myBluetoothAdapter.startDiscovery();\n\t\t\t\t//System.out.println(\"Scanning Again...\");\n\t\t\t\t//Toast.makeText(getApplicationContext(), \"Scanning Again...\", Toast.LENGTH_SHORT).show();\n\t\t\t}\n\t\t}",
"public interface BluetoothScanListener {\n void onScanResult(int callbackType, ScanResult result);\n void onBatchScanResults(List<ScanResult> results);\n void onScanFailed(int errorCode);\n}",
"@Override\n public void onScannedBleDeviceAdded(BluetoothDevice device) {\n Log.d(TAG, \"onScannedBleDeviceAdded enter\");\n// Message msg = mHandler.obtainMessage();\n// msg.what = SCAN_DEVICE_ADD_FLAG;\n// msg.obj = device;\n// mHandler.sendMessage(msg);\n updateScanDialog(SCAN_DEVICE_ADD_FLAG, device);\n }",
"private void setupBluetooth() {\n if (!getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)) {\n Toast.makeText(this, R.string.ble_not_supported, Toast.LENGTH_SHORT).show();\n finish();\n }\n\n // Initializes Bluetooth adapter.\n final BluetoothManager bluetoothManager =\n (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE);\n bluetoothAdapter = bluetoothManager.getAdapter();\n\n // Ensures Bluetooth is available on the device and it is enabled. If not,\n // displays a dialog requesting user permission to enable Bluetooth.\n if (bluetoothAdapter == null || !bluetoothAdapter.isEnabled()) {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, 1);\n }\n\n Set<BluetoothDevice> pairedDevices = bluetoothAdapter.getBondedDevices();\n\n if (pairedDevices.size() > 0) {\n // There are paired devices. Get the name and address of each paired device.\n for (BluetoothDevice device : pairedDevices) {\n String deviceName = device.getName();\n String deviceHardwareAddress = device.getAddress(); // MAC address\n String deviceType = device.getBluetoothClass().getDeviceClass() + \"\";\n\n Movie movie = new Movie(deviceName, deviceHardwareAddress, deviceType);\n movieList.add(movie);\n\n }\n\n mAdapter.notifyDataSetChanged();\n }\n }",
"public interface BluetoothListener {\n\t/**\n\t * Get a description of the game, to be displayed on the BluetoothFragment layout.\n\t * @return\n\t */\n\tString getHelpString();\n\t\n\t/**\n\t * @see #onConnectedAsServer(String)\n\t */\n\tvoid onConnectedAsClient(String deviceName);\n\t\n\t/**\n\t * The 2 devices have established a bluetooth connection.\n\t * The typical action at this point is to hide the bluetooth\n\t * fragment and show the game fragment. From now on the\n\t * communication between client and server is symmetrical:\n\t * both devices can equally send and receive messages.\n\t * \n\t * Sometimes it is useful to know which device requested the\n\t * connection (the client) and which side accepted that\n\t * connection (the server).\n\t * \n\t * @param deviceName the name of the remote device\n\t */\n\tvoid onConnectedAsServer(String deviceName);\n\t\n\t/**\n\t * Typically the Activity will hide the game fragment and show\n\t * the BluetoothFragment, to allow the user to re-connect.\n\t */\n\tvoid onConnectionLost();\n\t\n\tvoid onError(String message);\n\t\n\t/**\n\t * A data message has been received from the remote device.\n\t * This corresponds to the other device performing a write().\n\t * @see BluetoothService#write(byte[] data)\n\t * \n\t * @param data\n\t */\n\tvoid onMessageRead(byte[] data);\n\t\n\t/**\n\t * A status message sent by the bluetooth service to be displayed\n\t * by the activity using Toast.\n\t * @param string\n\t */\n\tvoid onMessageToast(String string);\n\t\n\t/**\n\t * Called when the state of the bluetooth service has changed.\n\t * @see class BluetoothService.BTState for possible values.\n\t * @param state\n\t */\n\tvoid onStateChange(BluetoothService.BTState state);\n\t\n\t/**\n\t * Pass the object that will handle bluetooth communication.\n\t * Null if bluetooth not available on this device.\n\t * The main method to use in communication is write(byte[] data)\n\t * \n\t * @see BluetoothService#write(byte[] data)\n\t * @param bluetoothService\n\t */\n\tvoid setBluetoothService(BluetoothService bluetoothService);\n\n\t/**\n\t * A status message sent by the bluetooth service to be displayed\n\t * somewhere.\n\t * @param message\n\t */\n\tvoid setStatusMessage(String message);\n}",
"public interface OnBluetoothReadListener {\n\t\tvoid onRead(byte[] status);\n\t}",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_recorder);\n\n //points = new ArrayList<TGEegPower>();\n //db = new frequencyTable(this);\n //Bundle extras = getIntent().getExtras();\n //thought = extras.getString(\"thought\");\n //current = new EEGPoint(thought);\n\n assignVariables();\n btSelect.setChecked(false);\n\n if (mBluetoothAdapter == null) {\n // Device does not support Bluetooth\n btSelect.setClickable(false);\n pairedIndicator.setText(\"Bluetooth not supported.\");\n\n }\n\n else{\n btSelect.setChecked(true);\n tgDevice = new TGDevice(mBluetoothAdapter, handler);\n Toast.makeText(getApplicationContext(), \"The handler shit is done...\",Toast.LENGTH_SHORT).show();\n\n list = new ArrayList<>(); //The '<>' indicates String. No need of explicit declaration, it seems.\n\n pairedDevices = mBluetoothAdapter.getBondedDevices();\n\n if (pairedDevices.size() > 0)\n {\n for (BluetoothDevice device : pairedDevices)\n {\n list.add(device.getName() + \",\" + device.getAddress());\n if(device.getName().startsWith(\"Mind\")){\n pairedIndicator.setText(\"MindWave Mobile is paired.\");\n pairedFlag=1;\n }\n }\n\n if(pairedFlag==0){\n pairedIndicator.setText(\"MindWave Mobile is not paired.\");\n }\n }\n\n /*\n if (mBluetoothAdapter.isEnabled()) {\n btSelect.setChecked(true);\n tgDevice = new TGDevice(mBluetoothAdapter, handler);\n Toast.makeText(getApplicationContext(), \"The handler shit is done...\",Toast.LENGTH_SHORT).show();\n }*/\n\n if(tgDevice.getState() != TGDevice.STATE_CONNECTING && tgDevice.getState() != TGDevice.STATE_CONNECTED)\n tgDevice.connect(rawEnabled);\n\n\n\n btSelect.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {\n @Override\n public void onCheckedChanged(CompoundButton buttonView,boolean isChecked){\n\n if(isChecked){\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\n }\n\n else{\n mBluetoothAdapter.disable();\n }\n\n }\n });\n\n recordNow.setOnClickListener(\n new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n // get an image from the camera\n if (mBluetoothAdapter.isEnabled()) {\n\n }\n }\n }\n );\n }\n }",
"private void initBluetooth() {\n IntentFilter filter = new IntentFilter(BluetoothDevice.ACTION_FOUND);\n this.registerReceiver(mReceiver, filter);\n\n // Register for broadcasts when discovery has finished\n filter = new IntentFilter(BluetoothAdapter.ACTION_DISCOVERY_FINISHED);\n this.registerReceiver(mReceiver, filter);\n\n // Get the local Bluetooth adapter\n mBtAdapter = BluetoothAdapter.getDefaultAdapter();\n\n // Get a set of currently paired devices\n Set<BluetoothDevice> pairedDevices = mBtAdapter.getBondedDevices();\n\n // Initialize the BluetoothChatService to perform bluetooth connections\n mChatService = new BluetoothChatService(this, mHandler);\n }",
"public void onStart(){ \r\n\t\t//ensure bluetooth is enabled \r\n\t\tensureBluetoothIsEnabled();\r\n\t\tsuper.onStart(); \t\r\n\t}",
"public interface BLEOADCallback {\n void onProgress(BluetoothDevice bluetoothDevice, int progress);\n void onCancel(BluetoothDevice bluetoothDevice);\n void onSuccess(BluetoothDevice bluetoothDevice);\n}",
"public interface OnBluetoothWriteListener {\n\t\tvoid onWrite();\n\t}",
"@Override\n public void onLeScan(final BluetoothDevice device, int rssi, byte[] scanRecord) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n mLeDeviceListAdapter.addDevice(device);\n mLeDeviceListAdapter.notifyDataSetChanged();\n }\n });\n }",
"public void bluetooth_setup_client()\r\n {\n\r\n\t\tIntentFilter filter = new IntentFilter();\r\n\t\tfilter.addAction(BluetoothDevice.ACTION_FOUND);\r\n\t\tfilter.addAction(BluetoothAdapter.ACTION_DISCOVERY_FINISHED);\r\n\t\tif(client_receiver != null) {\r\n\t\t\tLoaderActivity.m_Activity.unregisterReceiver(client_receiver);\r\n\t\t}\r\n\t\tclient_receiver = new Bluetooth_Device_Found_Revicer();\r\n\t\tLoaderActivity.m_Activity.registerReceiver(client_receiver, filter);\r\n\t\tbluetooth_adapter.startDiscovery();\r\n\t\tmessages.clear();\r\n }",
"private void BTKies() {\n Set<BluetoothDevice> pairedDevices;\n ArrayAdapter<String> BTArrayAdapter;\n final Dialog dialog = new Dialog(this);\n dialog.setContentView(R.layout.devicedialog);\n dialog.setTitle(\"Kies een verbinding\");\n BTListView = (ListView) dialog.findViewById(R.id.listView1);\n BTListView.setVisibility(View.VISIBLE);\n\n BTArrayAdapter = new ArrayAdapter<String>(this,\n android.R.layout.simple_list_item_1);\n BTListView.setAdapter(BTArrayAdapter);\n pairedDevices = BT.getBondedDevices();\n for (BluetoothDevice device : pairedDevices)\n BTArrayAdapter.add(device.getName() + \"\\n\" + device.getAddress());\n\n dialog.show();\n\n // Pick het item uit de list\n BTListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n long arg3) {\n ListView lv = (ListView) arg0;\n TextView tv = (TextView) lv.getChildAt(arg2);\n String s = tv.getText().toString();\n\n Connect(s); // Make connection\n }\n\n private void Connect(String s) {\n int i = s.length();\n address = s.substring(i - 17);\n BluetoothDevice device = BT.getRemoteDevice(address);\n Log.d(TAG, \"Connecting to ... \" + device);\n BT.cancelDiscovery();\n try { // omgaan met exeptions\n btSocket = device\n .createRfcommSocketToServiceRecord(MY_UUID);\n btSocket.connect();\n // hier de comunicatie invullen ***********************************************\n writeData(\"c#\"); // vraag om een bevestiging van de verbinding\n BTListView.setVisibility(View.INVISIBLE);\n dialog.dismiss();\n beginListenForData();\n } catch (IOException e) {\n try {\n btSocket.close();\n } catch (IOException e2) {\n DisplayToast(\"Unable to end the connection\");\n }\n DisplayToast(\"Ontvanger niet beschikbaar. Kies opnieuw\");\n }\n }\t// einde connect\n\n });\t// einde onClick\n }",
"@Override\r\n\tprotected void onHandleIntent(Intent intent) {\n\t\tfinal BluetoothManager bluetoothManager = (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE);\r\n\t\tmBluetoothAdapter = bluetoothManager.getAdapter();\r\n\r\n\t\t// Checks if Bluetooth is supported on the device.\r\n\t\tif (mBluetoothAdapter == null) {\r\n\t\t\tLog.i(TAG, \"Bluetooth is not supported\");\r\n\t\t\treturn;\r\n\t\t} else {\r\n\t\t\tLog.i(TAG, \"mBluetoothAdapter = \" + mBluetoothAdapter);\r\n\t\t}\r\n\r\n\t\t//启用蓝牙\r\n\t\t//mBluetoothAdapter.enable();\r\n\t\t//Log.i(TAG, \"mBluetoothAdapter.enable\");\r\n\t\t\r\n\t\tmBLE = new BluetoothLeClass(this);\r\n\t\t\r\n\t\tif (!mBLE.initialize()) {\r\n\t\t\tLog.e(TAG, \"Unable to initialize Bluetooth\");\r\n\t\t}\r\n\t\tLog.i(TAG, \"mBLE = e\" + mBLE);\r\n\r\n\t\t// 发现BLE终端的Service时回调\r\n\t\tmBLE.setOnServiceDiscoverListener(mOnServiceDiscover);\r\n\r\n\t\t// 收到BLE终端数据交互的事件\r\n\t\tmBLE.setOnDataAvailableListener(mOnDataAvailable);\r\n\t\t\r\n\t\t//开始扫描\r\n\t\tmBLE.scanLeDevice(true);\r\n\t\t\r\n\t\t/*\r\n\t\tMRBluetoothManage.Init(this, new MRBluetoothEvent() {\r\n\t\t\t@Override\r\n\t\t\tpublic void ResultStatus(int result) {\r\n\t\t\t\tswitch (result) {\r\n\t\t\t\tcase MRBluetoothManage.MRBLUETOOTHSTATUS_NOT_OPEN:\r\n\t\t\t\t\t//Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\r\n\t\t\t\t\t//startActivityForResult(enableBtIntent, 100);\r\n\t\t\t\t\tLog.d(TAG, \"MRBLUETOOTHSTATUS_NOT_OPEN\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase MRBluetoothManage.MRBLUETOOTHSTATUS_INIT_OK:\r\n\t\t\t\t\tMRBluetoothManage.scanAndConnect();\r\n\t\t\t\t\tLog.d(TAG, \"MRBLUETOOTHSTATUS_INIT_OK\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase MRBluetoothManage.MRBLUETOOTHSTATUS_SCAN_START:\r\n\t\t\t\t\tLog.d(TAG, \"MRBLUETOOTHSTATUS_SCAN_START\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase MRBluetoothManage.MRBLUETOOTHSTATUS_SCAN_END:\r\n\t\t\t\t\tLog.d(TAG, \"MRBLUETOOTHSTATUS_SCAN_END\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase MRBluetoothManage.MRBLUETOOTHSTATUS_CONNECT_START:\r\n\t\t\t\t\tLog.d(TAG, \"MRBLUETOOTHSTATUS_CONNECT_START\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase MRBluetoothManage.MRBLUETOOTHSTATUS_CONNECT_OK:\r\n\t\t\t\t\tLog.d(TAG, \"MRBLUETOOTHSTATUS_CONNECT_OK\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase MRBluetoothManage.MRBLUETOOTHSTATUS_CONNECT_CLOSE:\r\n\t\t\t\t\tLog.d(TAG, \"MRBLUETOOTHSTATUS_CONNECT_CLOSE\");\r\n\t\t\t\t\tMRBluetoothManage.stop();\r\n\t\t\t\t\tMRBluetoothManage.scanAndConnect();\r\n\t\t\t\t\t//MRBluetoothManage.Init(BluetoothService.this, this);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void ResultDevice(ArrayList<BluetoothDevice> deviceList) {\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void ResultData(byte[] data) {\r\n\t\t\t\tLog.i(TAG, data.toString());\r\n\t\t\t\tbyte[] wenDuByte = new byte[2];\r\n\t\t\t\tbyte[] shiDuByte = new byte[2];\r\n\t\t\t\tbyte[] shuiFenByte = new byte[2];\r\n\t\t\t\tbyte[] ziWaiXianByte = new byte[2];\r\n\t\t\t\tSystem.arraycopy(data, 4, wenDuByte, 0, 2);\r\n\t\t\t\tSystem.arraycopy(data, 6, shiDuByte, 0, 2);\r\n\t\t\t\tSystem.arraycopy(data, 8, shuiFenByte, 0, 2);\r\n\t\t\t\tSystem.arraycopy(data, 10, ziWaiXianByte, 0, 2);\r\n\t\t\t\tTestModel model = new TestModel();\r\n\t\t\t\tmodel.wenDu = BitConverter.toShort(wenDuByte);\r\n\t\t\t\tmodel.shiDu = BitConverter.toShort(shiDuByte);\r\n\t\t\t\tmodel.shuiFen = BitConverter.toShort(shuiFenByte);\r\n\t\t\t\tmodel.ziWaiXian = BitConverter.toShort(ziWaiXianByte);\r\n\t\t\t\t//Log.d(TAG, model.toString());\r\n\t\t\t\tsendData(model);\r\n\t\t\t}\r\n\t\t});\r\n\t\t*/\r\n\t}",
"public void bind(BluetoothDevice device){\n tv_blue_list_name.setText(device.getName());\n tv_blue_list_address.setText(device.getAddress());\n\n }",
"private void addBluetoothUsage() {\n BatterySipper bs = new BatterySipper(BatterySipper.DrainType.BLUETOOTH, null, 0);\n mBluetoothPowerCalculator.calculateRemaining(bs, mStats, mRawRealtimeUs, mRawUptimeUs,\n mStatsType);\n aggregateSippers(bs, mBluetoothSippers, \"Bluetooth\");\n if (bs.totalPowerMah > 0) {\n mUsageList.add(bs);\n }\n }",
"public interface OnBluetoothConnectionPendingListener {\n\t\tvoid onConnectionPending();\n\t}",
"public interface OnBluetoothConnectListener {\n\t\tvoid onConnect(boolean connected);\n\t}",
"public interface MessageReceivedCallback {\n public void BLEMessageReceived(byte[] data);\n void BLEDeviceConnected();\n void BLEDeviceDisconnected();\n}",
"@Override\n public void onScanResult(int callbacktype, final ScanResult result) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n mLeDeviceListAdapter.addDevice(result.getDevice());\n mLeDeviceListAdapter.notifyDataSetChanged();\n }\n });\n }",
"BluetoothDeviceGroup(Context context, ServiceListener listener) {\n mProfileConnector.connect(context, listener);\n mAdapter = BluetoothAdapter.getDefaultAdapter();\n mAttributionSource = mAdapter.getAttributionSource();\n IBluetoothManager mgr = mAdapter.getBluetoothManager();\n if (mgr != null) {\n try {\n mgr.registerStateChangeCallback(mBluetoothStateChangeCallback);\n } catch (RemoteException re) {\n Log.e(TAG, \"\", re);\n }\n }\n }",
"public interface BLEPeripheralChatEvents extends BLEChatEvents {\n void onClientDisconnect(BluetoothDevice device);\n void onInitRfcommSocket();\n void onConnectRfcommSocket();\n}",
"public void startBluetooth(){\n mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\n if (!mBluetoothAdapter.isEnabled()) {\n Intent btIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n //btIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(btIntent);\n }\n mBluetoothAdapter.startDiscovery();\n System.out.println(\"@ start\");\n IntentFilter filter = new IntentFilter(BluetoothDevice.ACTION_FOUND);\n getActivity().registerReceiver(mReceiver, filter);\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n Bluetooth_14_feb receiveObj = (Bluetooth_14_feb) context.getApplicationContext();\n boolean appActive = receiveObj.isActivityVisible();\n //int appActive = receiveObj.getActivityCount();\n //Log.d(TAG,\"onReceive:receiver\");\n String action = intent.getAction(); // Get intent's action string\n Bundle extras = intent.getExtras();\n\n if (extras == null) return; // All intents of interest have extras.\n\n\n switch (action) {\n case \"android.bluetooth.adapter.action.STATE_CHANGED\": {\n\n int state = extras.getInt(\"android.bluetooth.adapter.extra.STATE\", FAIL);\n switch (state) {\n case BluetoothAdapter.STATE_OFF: \n if (!appActive) {\n\n Toast.makeText(context,\"Bluetooth:OFF\",Toast.LENGTH_SHORT).show();\n\n }\n else{\n\n Intent inten = new Intent(context,ConnectivityDialog.class);\n inten.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n context.startActivity(inten);\n //num=1;\n\n }\n\n break;\n \n case BluetoothAdapter.STATE_ON:\n\n\n if(!appActive) {\n Log.d(TAG,\"state-on-appactive\");\n Toast.makeText(context, \"Bluetooth:ON\", Toast.LENGTH_SHORT).show();\n }\n else{\n\n Intent i = new Intent(\"FINISH\");\n //i.setAction(\"FINISH\");\n context.sendBroadcast(i);\n Toast.makeText(context, \"Bluetooth:ON\", Toast.LENGTH_SHORT).show();\n }\n\n\n\n break;\n\n }\n\n }\n }\n }",
"private void initPlugin() {\n if (bluetoothAdapter == null) {\n Log.e(LOG_TAG, \"Bluetooth is not supported\");\n } else {\n Log.e(LOG_TAG, \"Bluetooth is supported\");\n\n sendJS(\"javascript:cordova.plugins.BluetoothStatus.hasBT = true;\");\n\n //test if BLE supported\n if (!mcordova.getActivity().getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)) {\n Log.e(LOG_TAG, \"BluetoothLE is not supported\");\n } else {\n Log.e(LOG_TAG, \"BluetoothLE is supported\");\n sendJS(\"javascript:cordova.plugins.BluetoothStatus.hasBTLE = true;\");\n }\n \n // test if BT is connected to a headset\n \n if (bluetoothAdapter.getProfileConnectionState(BluetoothProfile.HEADSET) == BluetoothProfile.STATE_CONNECTED ) {\n Log.e(LOG_TAG, \" Bluetooth connected to headset\");\n sendJS(\"javascript:cordova.fireWindowEvent('BluetoothStatus.connected');\");\n } else {\n Log.e(LOG_TAG, \"Bluetooth is not connected to a headset \" + bluetoothAdapter.getProfileConnectionState(BluetoothProfile.HEADSET));\n }\n\n //test if BT enabled\n if (bluetoothAdapter.isEnabled()) {\n Log.e(LOG_TAG, \"Bluetooth is enabled\");\n\n sendJS(\"javascript:cordova.plugins.BluetoothStatus.BTenabled = true;\");\n sendJS(\"javascript:cordova.fireWindowEvent('BluetoothStatus.enabled');\");\n } else {\n Log.e(LOG_TAG, \"Bluetooth is not enabled\");\n }\n }\n }",
"public void onIBeaconServiceConnect();",
"public void onCreate() {\n\t\tSystem.out.println(\"This service is called!\");\n\t\tmyBluetoothAdapter= BluetoothAdapter.getDefaultAdapter();\n\t\tmyBluetoothAdapter.enable();\n\t\tSystemClock.sleep(5000);\n\t\tif (myBluetoothAdapter.isEnabled()){\n\t\t\tSystem.out.println(\"BT is enabled...\");\n\t\t\tdiscover = myBluetoothAdapter.startDiscovery();\n\t\t}\n\t\tSystem.out.println(myBluetoothAdapter.getScanMode());\n\t\t\n\t\tSystem.out.println(\"Discovering: \"+myBluetoothAdapter.isDiscovering());\n\t\t//registerReceiver(bReceiver, new IntentFilter(BluetoothDevice.ACTION_FOUND));\n\t\tIntentFilter filter1 = new IntentFilter(BluetoothDevice.ACTION_FOUND);\n\t\tIntentFilter filter2 = new IntentFilter(BluetoothAdapter.ACTION_DISCOVERY_FINISHED);\n\t\tthis.registerReceiver(bReceiver, filter1);\n\t\tthis.registerReceiver(bReceiver, filter2);\n\t\t//registerReceiver(bReceiver, new IntentFilter(BluetoothAdapter.ACTION_DISCOVERY_FINISHED));\n\t}",
"void onCloseBleComplete();",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n handler = new Handler();\n scanInfoView = findViewById(R.id.scanInfo);\n\n communicationAdapter = new BluetoothAdapterBlindSwimmers();\n communicationDevice = new BluetoothImp();\n devices = new ArrayList<>();\n\n Button startScanButton = findViewById(R.id.startScanButton);\n startScanButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n devices.clear();\n scanForDevices(true);\n }\n });\n ListView scanListView = findViewById(R.id.scanListView);\n\n arrayAdapter = new DeviceArrayAdapter(this, devices);\n scanListView.setAdapter(arrayAdapter);\n scanListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> arg0, View arg1, int position, long arg3) { onDeviceSelected(position); }\n });\n }",
"public void deviceDiscovered(RemoteDevice btDevice, DeviceClass cod) {\n // add the device to the vector\n if (!vecDevices.contains(btDevice)) {\n vecDevices.addElement(btDevice);\n }\n }",
"public void deviceDiscovered(RemoteDevice btDevice, DeviceClass cod) {\n devicesDiscovered.addElement(btDevice);\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n final BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\n if (mBluetoothAdapter == null) {\n // Device does not support Bluetooth\n }\n\n if (!mBluetoothAdapter.isEnabled()) {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\n }\n\n BluetoothDevice mmDevice = null;\n\n List<String> mArray = new ArrayList<String>();\n Set<BluetoothDevice> pairedDevices = mBluetoothAdapter.getBondedDevices();\n // If there are paired devices\n if (pairedDevices.size() > 0) {\n // Loop through paired devices\n for (BluetoothDevice device : pairedDevices) {\n // Add the name and address to an array adapter to show in a ListView\n if(device.getName().equals(deviceName))\n mmDevice = device;\n mArray.add(device.getName() + \"\\n\" + device.getAddress());\n }\n }\n\n //Creating the socket.\n BluetoothSocket mmSocket;\n BluetoothSocket tmp = null;\n\n UUID myUUID = UUID.fromString(mUUID);\n try {\n // MY_UUID is the app's UUID string, also used by the server code\n tmp = mmDevice.createRfcommSocketToServiceRecord(myUUID);\n } catch (IOException e) { }\n mmSocket = tmp;\n\n //socket created, try to connect\n\n try {\n mmSocket.connect();\n } catch (IOException e) {\n e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.\n }\n\n // Run the example\n JArduino arduino = new BlinkAndAnalog(mmSocket);\n arduino.runArduinoProcess();\n\n Log.i(TAG, \"onCreate\");\n setContentView(R.layout.main);\n }",
"private void bonded_devices_get()\n\t\t{\n\t\t\tmPairedDevList.clear();\n\t\t\tSet<BluetoothDevice> PairedDevices = btAdapter.getBondedDevices();\n\t\t\tif(PairedDevices.size() > 0)\n\t\t\t{\n\t\t\t\tmPairedTitle.setVisibility(View.VISIBLE);\n\t\t\t\tfor(BluetoothDevice device : PairedDevices)\n\t\t\t\t{\n\t\t\t\t\tString device_info = device.getName()+\"\\n\"+device.getAddress();\n\t\t\t\t\tmPairedDevList.add(device_info);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tmPairedTitle.setVisibility(View.GONE);\n\t\t\t\tmPairedDevList.add(\"No Bonded Devices\");\n\t\t\t}\n\t\t}",
"@Override\n public void onBeaconServiceConnect() {\n beaconManager.setRangeNotifier(new RangeNotifier() {\n @Override\n public void didRangeBeaconsInRegion(final Collection<Beacon> beacons, Region region) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n if (beacons.size() > 0) {\n for (Beacon beacon : beacons) mBeaconList.addBeacon(beacon);\n mBeaconList.notifyDataSetChanged();\n }\n }\n });\n }\n });\n\n try {\n beaconManager.startRangingBeaconsInRegion(new Region(\"myRangingUniqueId\", null, null, null));\n } catch (RemoteException e) {\n Log.d(TAG, \"Exception caught in ServiceConnect\");\n }\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n /**\n * Load previously saved state and set the view for the\n * activity. Set the title of the activity using the action\n * bar and create a handlers to schedule messages and\n * runnables/actions.\n */\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_device_scan);\n //getActionBar().setTitle(R.string.title_devices);\n mHandler = new Handler();\n mListView = findViewById(R.id.list);\n mListView.setOnItemClickListener(devicesClickListener);\n\n /**\n * Check whether BLE is supported on the device. You can then\n * selectively disable BLE_related features. Display non-intrusive\n * pop up message to indicate this and end activity.\n */\n if (!getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)) {\n Toast.makeText(this, R.string.ble_not_supported, Toast.LENGTH_SHORT).show();\n finish();\n }\n\n /**\n * Request access to dangerous permissions: ACCESS_FINE_LOCATION and ACCESS_COARSE_LOCATION.\n * These permissions have to be declared in the manifest file and explicitly requested\n * (prompting the user for access).\n */\n ActivityCompat.requestPermissions(this, mPermissions, REQUEST_APP_PERMISSIONS);\n\n /**\n * Initializes a Bluetooth adapter to handle BLE requests/tasks such as scanning,\n * pairing, etc. Get the system level Bluetooth Service and acquire its bluetooth\n * adapter.\n */\n final BluetoothManager bluetoothManager =\n (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE);\n mBluetoothAdapter = bluetoothManager.getAdapter();\n\n /**\n * Check if Bluetooth is supported on this device, i.e. no bluetooth adapter.\n * If it isn't, display a short message and end activity.\n */\n if (mBluetoothAdapter == null) {\n Toast.makeText(this, R.string.bluetooth_not_supported,\n Toast.LENGTH_SHORT).show();\n finish();\n return;\n }\n }",
"@Override\n\t\t\tpublic void handleMessage(Message msg) {\n\t\t\t\tprocessBluetoothDeviceMessage(msg);\n\t\t\t}",
"public void driverBaseDataReceivedProxy(PeripheralHardwareDataEvent oEvent);",
"public void handler(){\n bluetoothIn = new Handler() {\n boolean tempSound = true;\n\n /**\n * handle message received from bluetooth\n * @param msg message received\n */\n public void handleMessage(Message msg) {\n switch (msg.what) {\n case handlerState:\n String readMessage = (String) msg.obj; // msg.arg1 = bytes from connect thread\n ReceivedData.setData(readMessage);\n break;\n\n case handlerState1:\n tempSound = Boolean.parseBoolean((String) msg.obj);\n ReceivedData.setSound(tempSound);\n break;\n\n case handlerState5:\n if(\"ACK\".equals ((String) msg.obj ))\n ReceivedData.clearPPGwaveBuffer();\n break;\n\n }\n ReceivedData.Process();\n }\n };\n\n}",
"private void handleMessageBluetooth(Message msg) {\n\t\tToaster.doToastShort(context, \"Handle Bluetooth Mesage\");\n\t}",
"@Override\n public void onConnected(Bundle bundle) {\n Wearable.DataApi.addListener(googleApiClient, this);\n }",
"@Override\n public void onCharacteristicChanged(BluetoothGatt gatt,\n BluetoothGattCharacteristic characteristic) {\n byte[] bytes = characteristic.getValue();\n Log.i(\"onCharacteristicChanged\", \"Receive the return data. uuid:\" + characteristic.getUuid().toString() + \" bytes:\" + StringConvertUtil.bytesToHexString(bytes));\n if (_PeripheryBluetoothServiceCallBack != null){\n _PeripheryBluetoothServiceCallBack.OnReceiveCallBack(characteristic.getUuid(),bytes);\n }\n super.onCharacteristicChanged(gatt,characteristic);\n }",
"public void listDevices(final BluetoothAdapter bluetoothAdapter){\n Set<BluetoothDevice> pairedDevices = bluetoothAdapter.getBondedDevices();\n ArrayList pairedDeviceList = new ArrayList();\n String address = null;\n\n if (pairedDevices.size() > 0) {\n int i = 0;\n // There are paired devices. Get the name and address of each paired device.\n for (BluetoothDevice device : pairedDevices) {\n String deviceName = device.getName().trim();\n String deviceHardwareAddress = device.getAddress(); // MAC address\n if (deviceName.equals(DEVICE_NAME)){\n address = device.getAddress().trim();\n System.out.println(address +\"\\n\");\n }\n pairedDeviceList.add(\"Device Name: \" + deviceName + \" Device MAC Address: \" + deviceHardwareAddress);\n }\n\n System.out.println(pairedDeviceList.get(0) + \"\\n\");\n\n final String finalAddress = address;\n AsyncTask.execute(new Runnable(){\n @Override\n public void run(){\n bluetoothDevice = bluetoothAdapter.getRemoteDevice(finalAddress);\n BLEDevice = new BluetoothLeService(bluetoothDevice, quantifenUUID);\n BLEDevice.connect(BluetoothActivity.this, testUUID);\n }\n });\n\n\n }\n }",
"private void initBLESetup() {\n // Initializes Bluetooth adapter.\n final BluetoothManager bluetoothManager = (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE);\n mBluetoothAdapter = bluetoothManager.getAdapter();\n //Beginning in Android 6.0 (API level 23), users grant permissions to apps while the app is running, not when they install the app.\n //Obtaining dynamic permissions from the user\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { //23\n if (this.checkSelfPermission(Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n final AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"This app needs location access.\");\n builder.setMessage(\"Please grant location access to this app.\");\n builder.setPositiveButton(android.R.string.ok, null);\n builder.setOnDismissListener(new DialogInterface.OnDismissListener() {\n public void onDismiss(DialogInterface dialog) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M)\n requestPermissions(new String[]{Manifest.permission.ACCESS_COARSE_LOCATION}, PERMISSION_REQUEST_COARSE_LOCATION);\n }\n\n });// See onRequestPermissionsResult callback method for negative behavior\n builder.show();\n }\n }\n // Create callback methods\n if (Build.VERSION.SDK_INT >= 21) //LOLLIPOP\n newerVersionScanCallback = new ScanCallback() {\n @Override\n public void onScanResult(int callbackType, ScanResult result) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n BluetoothDevice btDevice = result.getDevice();\n ScanRecord mScanRecord = result.getScanRecord();\n int rssi = result.getRssi();\n// Log.i(TAG, \"Address: \"+ btDevice.getAddress());\n// Log.i(TAG, \"TX Power Level: \" + result.getScanRecord().getTxPowerLevel());\n// Log.i(TAG, \"RSSI in DBm: \" + rssi);\n// Log.i(TAG, \"Manufacturer data: \"+ mScanRecord.getManufacturerSpecificData());\n// Log.i(TAG, \"device name: \"+ mScanRecord.getDeviceName());\n// Log.i(TAG, \"Advertise flag: \"+ mScanRecord.getAdvertiseFlags());\n// Log.i(TAG, \"service uuids: \"+ mScanRecord.getServiceUuids());\n// Log.i(TAG, \"Service data: \"+ mScanRecord.getServiceData());\n byte[] recordBytes = mScanRecord.getBytes();\n\n iBeacon ib = parseBLERecord(recordBytes);\n\n if (ib != null) {\n setLog(ib.getUuid(), ib.getMajor(), ib.getMinor(), rssi);\n\n }\n }\n }\n\n @Override\n public void onScanFailed(int errorCode) {\n Log.e(\"Scan Failed\", \"Error Code: \" + errorCode);\n }\n };\n else\n olderVersionScanCallback =\n new BluetoothAdapter.LeScanCallback() {\n @Override\n public void onLeScan(final BluetoothDevice device, final int rssi,\n final byte[] scanRecord) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Log.i(\"onLeScan\", device.toString());\n\n iBeacon ib = parseBLERecord(scanRecord);\n\n if (ib != null) {\n setLog(ib.getUuid(), ib.getMajor(), ib.getMinor(), rssi);\n\n }\n }\n });\n }\n };\n }",
"@Override\r\n public void onCreate() {\n intent = new Intent(BROADCAST_ACTION);\r\n startBTService();\r\n// try{\r\n// mConnectedThread.write(\"2\".getBytes());\r\n// }catch(Exception e){\r\n//\r\n// }\r\n }",
"private void bluetooth_connect_device() throws IOException\n {\n try\n {\n myBluetooth = BluetoothAdapter.getDefaultAdapter();\n address = myBluetooth.getAddress();\n pairedDevices = myBluetooth.getBondedDevices();\n if (pairedDevices.size()>0)\n {\n for(BluetoothDevice bt : pairedDevices)\n {\n address=bt.getAddress().toString();name = bt.getName().toString();\n Toast.makeText(getApplicationContext(),\"Connected\", Toast.LENGTH_SHORT).show();\n\n }\n }\n\n }\n catch(Exception we){}\n myBluetooth = BluetoothAdapter.getDefaultAdapter();//get the mobile bluetooth device\n BluetoothDevice dispositivo = myBluetooth.getRemoteDevice(address);//connects to the device's address and checks if it's available\n btSocket = dispositivo.createInsecureRfcommSocketToServiceRecord(myUUID);//create a RFCOMM (SPP) connection\n btSocket.connect();\n try { t1.setText(\"BT Name: \"+name+\"\\nBT Address: \"+address); }\n catch(Exception e){}\n }",
"@Override\n public void onBeaconServiceConnect() {\n beaconManager.addRangeNotifier(new RangeNotifier() {\n @Override\n public void didRangeBeaconsInRegion(Collection<Beacon> beacons,Region region) {\n Log.i(\"beacon\",\"Beacon Size:\"+beacons.size());\n Log.i(\"beaconManager\",\"beaconRanging\");\n if (beacons.size() > 0) {\n Iterator<Beacon> beaconIterator = beacons.iterator();\n while (beaconIterator.hasNext()) {\n Beacon beacon = beaconIterator.next();\n logBeaconData(LBD.Find_Loc(beacon,2));\n }\n }\n }\n\n });\n try {\n beaconManager.startRangingBeaconsInRegion(new Region(\"myRangingUniqueId\",\n null, null, null));\n } catch (RemoteException e) {\n e.printStackTrace();\n }\n\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n if (BluetoothAdapter.ACTION_DISCOVERY_STARTED.equals(intent.getAction())) {\n Log.v(MainActivity.TAG, \"### BT ACTION_DISCOVERY_STARTED ###\");\n } else if (BluetoothAdapter.ACTION_DISCOVERY_FINISHED.equals(intent.getAction())) {\n Log.v(MainActivity.TAG, \"### BT ACTION_DISCOVERY_FINISHED ###\");\n } else if (BluetoothDevice.ACTION_FOUND.equals(intent.getAction())) {\n Log.v(MainActivity.TAG, \"### BT BluetoothDevice.ACTION_FOUND ###\");\n BluetoothDevice btDevice = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);\n if (btDevice != null && scanCallback != null)\n scanCallback.run(btDevice);\n } else if (BluetoothDevice.ACTION_BOND_STATE_CHANGED.equals(intent.getAction())) {\n Log.v(MainActivity.TAG, \"### BT ACTION_BOND_STATE_CHANGED ###\");\n int cur_bond_state = intent.getIntExtra(BluetoothDevice.EXTRA_BOND_STATE, BluetoothDevice.BOND_NONE);\n int previous_bond_state = intent.getIntExtra(BluetoothDevice.EXTRA_PREVIOUS_BOND_STATE, BluetoothDevice.BOND_NONE);\n Log.v(MainActivity.TAG, \"### cur_bond_state ###\" + cur_bond_state + \" ~~ previous_bond_state\" + previous_bond_state);\n }\n }",
"@Override\n public void onConnectionStateChange(BluetoothGatt gatt, int status,\n int newState) {\n Log.i(\"onConnectionStateChange\", \"The connection status has changed. status:\" + status + \" newState:\" + newState + \"\");\n try {\n if(status == BluetoothGatt.GATT_SUCCESS) {\n switch (newState) {\n // Has been connected to the device\n case BluetoothProfile.STATE_CONNECTED:\n Log.i(\"onConnectionStateChange\", \"Has been connected to the device\");\n if(_ConnectionStatus == ConnectionStatus.Connecting) {\n _ConnectionStatus = ConnectionStatus.Connected;\n try {\n if (_PeripheryBluetoothServiceCallBack != null)\n _PeripheryBluetoothServiceCallBack.OnConnected();\n if (gatt.getDevice().getBondState() == BluetoothDevice.BOND_BONDED){\n //Url : https://github.com/NordicSemiconductor/Android-DFU-Library/blob/release/dfu/src/main/java/no/nordicsemi/android/dfu/DfuBaseService.java\n Log.i(\"onConnectionStateChange\",\"Waiting 1600 ms for a possible Service Changed indication...\");\n // Connection successfully sleep 1600ms, the connection success rate will increase\n Thread.sleep(1600);\n }\n } catch (Exception e){}\n // Discover service\n gatt.discoverServices();\n }\n break;\n // The connection has been disconnected\n case BluetoothProfile.STATE_DISCONNECTED:\n Log.i(\"onConnectionStateChange\", \"The connection has been disconnected\");\n if(_ConnectionStatus == ConnectionStatus.Connected) {\n if (_PeripheryBluetoothServiceCallBack != null)\n _PeripheryBluetoothServiceCallBack.OnDisConnected();\n }\n Close();\n _ConnectionStatus = ConnectionStatus.DisConnected;\n break;\n /*case BluetoothProfile.STATE_CONNECTING:\n Log.i(\"onConnectionStateChange\", \"Connecting ...\");\n _ConnectionStatus = ConnectionStatus.Connecting;\n break;\n case BluetoothProfile.STATE_DISCONNECTING:\n Log.i(\"onConnectionStateChange\", \"Disconnecting ...\");\n _ConnectionStatus = ConnectionStatus.DisConnecting;\n break;*/\n default:\n Log.e(\"onConnectionStateChange\", \"newState:\" + newState);\n break;\n }\n }else {\n Log.i(\"onConnectionStateChange\", \"GATT error\");\n Close();\n if(_ConnectionStatus == ConnectionStatus.Connecting\n && _Timeout - (new Date().getTime() - _ConnectStartTime.getTime()) > 0) {\n Log.i(\"Connect\", \"Gatt Error! Try to reconnect (\"+_ConnectIndex+\")...\");\n _ConnectionStatus = ConnectionStatus.DisConnected;\n Connect(); // Connect\n }else {\n _ConnectionStatus = ConnectionStatus.DisConnected;\n if (_PeripheryBluetoothServiceCallBack != null)\n _PeripheryBluetoothServiceCallBack.OnDisConnected();\n }\n }\n }catch (Exception ex){\n Log.e(\"onConnectionStateChange\", ex.toString());\n }\n super.onConnectionStateChange(gatt, status, newState);\n }",
"@FunctionalInterface\npublic interface IRawEventCallback {\n /**\n * Callback on the native parser thread with the shared byte[] array associated with the direct\n * ByteBuffer associated with the GetDirectBufferAddress call.\n * @param beaconInfo the beacon info read only bytebuffer, must be copied as it would be modified on the next beacon\n * event from the bluetooth stack.\n */\n public boolean beaconEvent(ByteBuffer beaconInfo);\n}",
"@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\t\n\t\tbtAdapt = BluetoothAdapter.getDefaultAdapter(); //初始化藍牙\n\t\t// 用BroadcastReceiver來取得搜尋結果\n\t\tIntentFilter intent = new IntentFilter();\n\t\tintent.addAction(BluetoothDevice.ACTION_FOUND);\n\t\tintent.addAction(BluetoothDevice.ACTION_BOND_STATE_CHANGED);\n\t\tintent.addAction(BluetoothAdapter.ACTION_SCAN_MODE_CHANGED);\n\t\tintent.addAction(BluetoothAdapter.ACTION_STATE_CHANGED);\n\t\tregisterReceiver(searchDevices, intent); //註冊廣播接收器\n\t\tsm = (SensorManager) getSystemService(SENSOR_SERVICE);\n\t\tsm.registerListener(BluetoothService.this, \n sm.getDefaultSensor(Sensor.TYPE_ORIENTATION), \n SensorManager.SENSOR_DELAY_FASTEST); \n\t}",
"@Override\n\t\t\tpublic void onReceive(Context context, Intent intent)\n\t\t\t{\n\t\t\t\tString action = intent.getAction();\n\t\t\t\tif(BluetoothDevice.ACTION_FOUND.equals(action))\n\t\t\t\t{\n\t\t\t\t\tBluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);\n\t\t\t\t\tif(device.getBondState() != BluetoothDevice.BOND_BONDED)\n\t\t\t\t\t{\n\t\t\t\t\t\tmAvailableTitle.setVisibility(View.VISIBLE);\n\t\t\t\t\t\tmAvailableDevList.add(device.getName()+\"\\n\"+device.getAddress());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if(BluetoothAdapter.ACTION_DISCOVERY_FINISHED.equals(action))\n\t\t\t\t{\n\t\t\t\t\tsetProgressBarIndeterminateVisibility(false);\n\t\t\t\t\tsetTitle(\"Choose Device\");\n\t\t\t\t\tif(mAvailableDevList.getCount() == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tmAvailableDevList.add(\"No availabel devices!\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}",
"private void setListener2(BluetoothReader reader) {\n mBluetoothReader2\n .setOnAuthenticationCompleteListener(new OnAuthenticationCompleteListener() {\n\n @Override\n public void onAuthenticationComplete(\n BluetoothReader bluetoothReader, final int errorCode) {\n\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n if (errorCode == BluetoothReader.ERROR_SUCCESS) {\n mTxtAuthentication\n .setText(\"Authentication Success!\");\n mEditApdu.setText(\"FF CA 00 00 00\");\n mAuthentication.setEnabled(false);\n } else {\n mTxtAuthentication\n .setText(\"Authentication Failed!\");\n }\n }\n });\n }\n\n });\n\n /* Wait for receiving ATR string. */\n mBluetoothReader2\n .setOnAtrAvailableListener(new OnAtrAvailableListener() {\n\n @Override\n public void onAtrAvailable(BluetoothReader bluetoothReader,\n final byte[] atr, final int errorCode) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n if (atr == null) {\n mTxtATR.setText(getErrorString(errorCode));\n } else {\n mTxtATR.setText(Utils.toHexString(atr));\n }\n }\n });\n }\n\n });\n\n /* Wait for power off response. */\n mBluetoothReader2\n .setOnCardPowerOffCompleteListener(new OnCardPowerOffCompleteListener() {\n\n @Override\n public void onCardPowerOffComplete(\n BluetoothReader bluetoothReader, final int result) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n mTxtATR.setText(getErrorString(result));\n }\n });\n }\n\n });\n\n /* Wait for response APDU. */\n mBluetoothReader2\n .setOnResponseApduAvailableListener(new OnResponseApduAvailableListener() {\n\n @Override\n public void onResponseApduAvailable(\n BluetoothReader bluetoothReader, final byte[] apdu,\n final int errorCode) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n mTxtResponseApdu.setText(getResponseString(\n apdu, errorCode));\n // InnerTes(\"tes\");\n }\n });\n }\n\n });\n mBluetoothReader2\n .setOnResponseApduAvailableListener(new OnResponseApduAvailableListener() {\n\n @Override\n public void onResponseApduAvailable(\n BluetoothReader bluetoothReader, final byte[] apdu,\n final int errorCode) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n mTxtScan.setText(getResponseString(\n apdu, errorCode));\n String uid = mTxtScan.getText().toString();\n uid_final= uid;\n final String uid2=mTxtScan.getText().toString();\n /*** Kirim Variabel String uid ke ChildviewHolder **/\n /** code start here **/\n Tes tes = new Tes() {\n\n\n @Override\n public String onClickTes(String uid) {\n return null;\n }\n\n @Override\n public String getUid() {\n return mTxtScan.getText().toString();\n\n }\n };\n tes.onClickTes(uid);\n uid_final = tes.getUid();\n Log.d(\"uidFinal_listener\",\" \"+uid_final);\n requestUid(tes);\n\n\n //uid_final=\"tes\";\n // InnerTes(\"tes\");\n// rvTxtScan.setText(getResponseString(\n// apdu, errorCode));\n getInfoCard(uid);\n }\n\n\n });\n\n\n\n }\n\n });\n\n\n /* Wait for escape command response. */\n mBluetoothReader2\n .setOnEscapeResponseAvailableListener(new OnEscapeResponseAvailableListener() {\n\n @Override\n public void onEscapeResponseAvailable(\n BluetoothReader bluetoothReader,\n final byte[] response, final int errorCode) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n mTxtEscapeResponse.setText(getResponseString(\n response, errorCode));\n }\n });\n }\n\n });\n\n /* Wait for device info available. */\n mBluetoothReader2\n .setOnDeviceInfoAvailableListener(new OnDeviceInfoAvailableListener() {\n\n @Override\n public void onDeviceInfoAvailable(\n BluetoothReader bluetoothReader, final int infoId,\n final Object o, final int status) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n if (status != BluetoothGatt.GATT_SUCCESS) {\n Toast.makeText(ReaderActivity.this,\n \"Failed to read device info!\",\n Toast.LENGTH_SHORT).show();\n return;\n }\n switch (infoId) {\n case BluetoothReader.DEVICE_INFO_SYSTEM_ID: {\n // mTxtSystemId.setText(Utils.toHexString((byte[]) o));\n }\n break;\n case BluetoothReader.DEVICE_INFO_MODEL_NUMBER_STRING:\n // mTxtModelNo.setText((String) o);\n break;\n case BluetoothReader.DEVICE_INFO_SERIAL_NUMBER_STRING:\n // mTxtSerialNo.setText((String) o);\n break;\n case BluetoothReader.DEVICE_INFO_FIRMWARE_REVISION_STRING:\n // mTxtFirmwareRev.setText((String) o);\n break;\n case BluetoothReader.DEVICE_INFO_HARDWARE_REVISION_STRING:\n // mTxtHardwareRev.setText((String) o);\n break;\n case BluetoothReader.DEVICE_INFO_MANUFACTURER_NAME_STRING:\n //mTxtManufacturerName.setText((String) o);\n break;\n default:\n break;\n }\n }\n });\n }\n\n });\n\n /* Wait for battery level available. */\n if (mBluetoothReader2 instanceof Acr1255uj1Reader) {\n ((Acr1255uj1Reader) mBluetoothReader2)\n .setOnBatteryLevelAvailableListener(new OnBatteryLevelAvailableListener() {\n\n @Override\n public void onBatteryLevelAvailable(\n BluetoothReader bluetoothReader,\n final int batteryLevel, int status) {\n Log.i(TAG, \"mBatteryLevelListener data: \" + batteryLevel);\n\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n // mTxtBatteryLevel2.setText(getBatteryLevelString(batteryLevel));\n }\n });\n\n }\n\n });\n }\n\n /* Handle on battery status available. */\n if (mBluetoothReader2 instanceof Acr3901us1Reader) {\n ((Acr3901us1Reader) mBluetoothReader2)\n .setOnBatteryStatusAvailableListener(new OnBatteryStatusAvailableListener() {\n\n @Override\n public void onBatteryStatusAvailable(\n BluetoothReader bluetoothReader,\n final int batteryStatus, int status) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n // mTxtBatteryStatus2.setText(getBatteryStatusString(batteryStatus));\n }\n });\n }\n\n });\n }\n\n /* Handle on slot status available. */\n mBluetoothReader2\n .setOnCardStatusAvailableListener(new OnCardStatusAvailableListener() {\n\n @Override\n public void onCardStatusAvailable(\n BluetoothReader bluetoothReader,\n final int cardStatus, final int errorCode) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n if (errorCode != BluetoothReader.ERROR_SUCCESS) {\n mTxtSlotStatus\n .setText(getErrorString(errorCode));\n } else {\n mTxtSlotStatus\n .setText(getCardStatusString(cardStatus));\n }\n }\n });\n }\n\n });\n\n mBluetoothReader2\n .setOnEnableNotificationCompleteListener(new OnEnableNotificationCompleteListener() {\n\n @Override\n public void onEnableNotificationComplete(\n BluetoothReader bluetoothReader, final int result) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n if (result != BluetoothGatt.GATT_SUCCESS) {\n /* Fail */\n Toast.makeText(\n ReaderActivity.this,\n \"The device is unable to set notification!\",\n Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(ReaderActivity.this,\n \"The device is ready to use!\",\n Toast.LENGTH_SHORT).show();\n }\n }\n });\n }\n\n });\n }",
"void setBluetoothService(BluetoothService bluetoothService);",
"void addEventRegistrationCallback(EventRegistrationCallback eventRegistrationCallback);",
"private void notifyDevicesChanged() {\n runInAudioThread(new Runnable() {\n @Override\n public void run() {\n WritableArray data = Arguments.createArray();\n final boolean hasHeadphones = availableDevices.contains(DEVICE_HEADPHONES);\n for (String device : availableDevices) {\n if (hasHeadphones && device.equals(DEVICE_EARPIECE)) {\n // Skip earpiece when headphones are plugged in.\n continue;\n }\n WritableMap deviceInfo = Arguments.createMap();\n deviceInfo.putString(\"type\", device);\n deviceInfo.putBoolean(\"selected\", device.equals(selectedDevice));\n data.pushMap(deviceInfo);\n }\n getContext().getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class).emit(DEVICE_CHANGE_EVENT, data);\n JitsiMeetLogger.i(TAG + \" Updating audio device list\");\n }\n });\n }",
"void onConnectDeviceComplete();",
"@Override\n public void registerCallback(@NonNull BleMessageStreamCallback callback) {\n mCallbacks.add(callback);\n }",
"public void connectButtonListener()\n {\n final Context context = Monitoring.this;\n btnConnectDisconnect = (Button) findViewById(R.id.btn_select);\n\n btnConnectDisconnect.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View arg0)\n {\n if (!mBtAdapter.isEnabled())\n {\n Log.i(TAG, \"onClick - Bluetooth not enabled yet\");\n Intent enableIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableIntent, REQUEST_ENABLE_BT);\n }\n else\n {\n if (btnConnectDisconnect.getText().toString().equals(\"Connect\"))\n {\n //Connect button pressed, open DeviceListActivity class,\n // with popup windows that scan for devices...\n Intent newIntent = new Intent(context, Scanner.class);\n startActivityForResult(newIntent, REQUEST_SELECT_DEVICE);\n }\n else\n {\n //Disconnect button pressed\n if (mDevice != null)\n {\n mService.disconnect();\n }\n }\n }\n }\n });\n }",
"@Override\n\t\tpublic void onReceive(Context context, Intent intent) {\n\t\t\tString action = intent.getAction();\n\t\t\tBundle b = intent.getExtras();\n\t\t\tObject[] lstName = b.keySet().toArray();\n\t\t\t\n\t //顯示所有收到的資訊及細節\n\t\t\tfor(int i =0; i < lstName.length;i++){\n\t\t\t\tString keyName = lstName[i].toString();\n\t\t\t\tLog.e(keyName,String.valueOf(b.get(keyName)));\n\t\t\t}\n\t\t\tBluetoothDevice device = null;\n\t\t\t//搜尋設備時,取得設備的MAC位址\n\t\t\tif(BluetoothDevice.ACTION_FOUND.equals(action)){\n\t\t\t\tdevice = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);\n\t\t\t\tString str =device.getName()+\"|\"+ device.getAddress();\n\t\t\t\tif(devices.indexOf(str) == -1){\n\t\t\t\t\tdevices.add(str);\n\t\t\t\t}\n\t\t\t\tadapter1.notifyDataSetChanged();\n\t\t\t}else if (BluetoothDevice.ACTION_BOND_STATE_CHANGED.equals(action)) {\n\t\t\t\tdevice = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);\n\t\t\t\tswitch ((device.getBondState())) {\n\t\t\t\tcase BluetoothDevice.BOND_BONDING:\n\t\t\t\t\tLog.d(tag,\"正在配對.....\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase BluetoothDevice.BOND_BONDED:\n\t\t\t\t\tLog.d(tag,\"完成配對\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase BluetoothDevice.BOND_NONE:\n\t\t\t\t\tLog.d(tag,\"取消配對\");\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\t\n\t\t}",
"@Override\n\t\tpublic void onReceive(Context context, Intent intent) {\n\t\t\tString action = intent.getAction();\n\t\t\tBundle b = intent.getExtras();\n\t\t\tObject[] lstName = b.keySet().toArray();\n\t\t\t\n\t\t\t// 顯示所有收到的資訊及細節\n\t\t\tfor( int i=0; i<lstName.length; i++ ){\n\t\t\t\tString keyName = lstName[i].toString();\n\t\t\t\tLog.e(keyName, String.valueOf(b.get(keyName)));\n\t\t\t}\n\t\t\tBluetoothDevice device = null;\n\t\t\t// 搜尋設備時,取得設備的MAC位址\n\t\t\tif( BluetoothDevice.ACTION_FOUND.equals(action) ){\n\t\t\t\tdevice = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);\n\t\t\t\tString str = device.getName() + \"|\" + device.getAddress();\n\t\t\t\tif( devices.indexOf(str) == -1 ) //防止重複增加\n\t\t\t\t\tdevices.add(str);\n\t\t\t\tBluetoothConnect.adapterdevices.notifyDataSetChanged();\n\t\t\t}\n\t\t\telse if( BluetoothDevice.ACTION_BOND_STATE_CHANGED.equals(action) ){\n\t\t\t\tdevice = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);\n\t\t\t\tswitch( device.getBondState() ){\n\t\t\t\t\tcase BluetoothDevice.BOND_BONDING:\n\t\t\t\t\t\tLog.d(tag, \"正在配對\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase BluetoothDevice.BOND_BONDED:\n\t\t\t\t\t\tLog.d(tag, \"完成配對\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase BluetoothDevice.BOND_NONE:\n\t\t\t\t\t\tLog.d(tag, \"取消配對\");\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"private void subscribeToScanSubscription() {\n mScanSubscription = BluetoothConnection.getBleClient(this).scanBleDevices(\n new ScanSettings.Builder()\n .setScanMode(ScanSettings.SCAN_MODE_LOW_LATENCY)\n .build(),\n\n new ScanFilter.Builder()\n .setServiceUuid(new ParcelUuid(BLUETOOTH_SERVICE_UUID))\n .build()\n )\n .subscribe(\n scanResult -> {\n // Process scan result here.\n RxBleDevice rxBleDevice = scanResult.getBleDevice();\n\n Handler handler = new Handler(Looper.getMainLooper());\n handler.post(() -> {\n if(!mBtDeviceAddress.contains(rxBleDevice.getMacAddress())) {\n CustomLogger.log(\"MainActivity: mLeScanCallback: Discovered device\" + rxBleDevice.getName());\n mBtDeviceObjectList.add(new BtDeviceObject(rxBleDevice, new Date().getTime()));\n mBtDeviceAddress.add(rxBleDevice.getMacAddress());\n mDeviceListAdapter.notifyDataSetChanged();\n } else {\n int indexOfBtDevice = mBtDeviceAddress.indexOf(rxBleDevice.getMacAddress());\n if(indexOfBtDevice != -1) {\n mBtDeviceObjectList.get(indexOfBtDevice).timeSinceLastUpdate = new Date().getTime();\n }\n }\n }\n );\n\n\n },\n throwable -> {\n // Handle an error here.\n CustomLogger.log(\"MainActivity: subscribeToScanSubscription: Failed to subscribe. throwable \" + throwable.getMessage(), 'e');\n\n }\n );\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n setContentView(R.layout.activity_main);\n btnOn = findViewById(R.id.bluetoothStart); // кнопка включения\n btnOff = findViewById(R.id.bluetoothStop); // кнопка выключения\n statusText = findViewById(R.id.statusBluetooth); // для вывода текста, полученного\n btState = findViewById(R.id.bluetoothIm);\n workState = findViewById(R.id.workStatIm);\n\n h = new Handler() {\n public void handleMessage(android.os.Message msg) {\n switch (msg.what) {\n case RECIEVE_MESSAGE:\n statusText.setText(\"msg\");// если приняли сообщение в Handler\n byte[] readBuf = (byte[]) msg.obj;\n String strIncom = new String(readBuf, 0, msg.arg1);\n sb.append(strIncom); // формируем строку\n int endOfLineIndex = sb.indexOf(\"\\r\\n\"); // определяем символы конца строки\n if (endOfLineIndex > 0) { // если встречаем конец строки,\n String sbprint = sb.substring(0, endOfLineIndex); // то извлекаем строку\n sb.delete(0, sb.length()); // и очищаем sb\n statusText.setText(\"Ответ от датчика: \" + sbprint); // обновляем TextView\n String[] step_data = sbprint.split(\" \");\n writeFile(step_data[0]);\n writeFile(\";\");\n writeFile(step_data[1]);\n writeFile(\";\");\n writeFile(step_data[2]);\n writeFile(\";\\n\");\n btnOff.setEnabled(true);\n btnOn.setEnabled(true);\n }\n //Log.d(TAG, \"...Строка:\"+ sb.toString() + \"Байт:\" + msg.arg1 + \"...\");\n break;\n }\n };\n };\n\n btAdapter = BluetoothAdapter.getDefaultAdapter(); // получаем локальный Bluetooth адаптер\n\n if (btAdapter.isEnabled()) {\n SharedPreferences prefs_btdev = getSharedPreferences(\"btdev\", 0);\n String btdevaddr=prefs_btdev.getString(\"btdevaddr\",\"?\");\n\n if (btdevaddr != \"?\") {\n BluetoothDevice device = btAdapter.getRemoteDevice(btdevaddr);\n UUID SERIAL_UUID = UUID.fromString(\"0000f00d-1212-afde-1523-785fef13d123\"); // bluetooth serial port service\n //UUID SERIAL_UUID = device.getUuids()[0].getUuid(); //if you don't know the UUID of the bluetooth device service, you can get it like this from android cache\n try {\n btSocket = device.createRfcommSocketToServiceRecord(SERIAL_UUID);\n } catch (Exception e) {\n Log.e(\"\",\"Error creating socket\");\n }\n\n try {\n btSocket.connect();\n Log.e(\"\",\"Connected\");\n } catch (IOException e) {\n Log.e(\"\",e.getMessage());\n try {\n Log.e(\"\",\"trying fallback...\");\n btSocket =(BluetoothSocket) device.getClass().getMethod(\"createRfcommSocket\", new Class[] {int.class}).invoke(device,1);\n btSocket.connect();\n Log.e(\"\",\"Connected\");\n } catch (Exception e2) {\n Log.e(\"\", \"Couldn't establish Bluetooth connection!\");\n }\n }\n } else {\n Log.e(\"\",\"BT device not selected\");\n }\n }\n\n checkBTState();\n\n btnOn.setOnClickListener(new OnClickListener() { // определяем обработчик при нажатии на кнопку\n public void onClick(View v) {\n //btnOn.setEnabled(false);\n workState.setImageResource(R.drawable.ic_action_work_on);\n mConnectedThread.run();\n // TODO start writing in file\n }\n });\n\n btnOff.setOnClickListener(new OnClickListener() {\n public void onClick(View v) {\n //btnOff.setEnabled(false);\n workState.setImageResource(R.drawable.ic_action_work_off);\n mConnectedThread.cancel();\n // TODO stop writing in file\n }\n });\n }",
"public void\t\tnotifyUCallbackListener(URBIEvent event);",
"void setCallback(IResponseCallback<WalletDataDecl.ListResultTmpl<Response>> cb);",
"@Override\n public void onReceive(Context context, Intent intent) {\n if (!TrackerSharePreference.getConstant(context).isCardRegistered()) return;\n\n MyApplication.appendLog(MyApplication.getCurrentDate() + \" : BeaconReceiver OnReceive callback\\n\");\n mContext = context;\n\n Log.v(TAG, \"onReceive() \");\n\n if (intent.getAction() == null) {\n Log.e(TAG, \"ERROR: action is null\");\n } else {\n // Look whether we find our device\n if (ACTION_SCANNER_FOUND_DEVICE.equals(intent.getAction())) {\n Bundle extras = intent.getExtras();\n\n if (extras != null) {\n Object obj = extras.get(BluetoothLeScanner.EXTRA_LIST_SCAN_RESULT);\n if (obj instanceof ArrayList) {\n ArrayList<ScanResult> scanResults = (ArrayList<ScanResult>) obj;\n Log.v(TAG, \"There are \" + scanResults.size() + \" results\");\n\n for (ScanResult result : scanResults) {\n if (result.getScanRecord() == null) {\n Log.d(TAG, \"getScanRecord is null\");\n continue;\n }\n\n TrackerSharePreference trackerSharePreference = TrackerSharePreference.getConstant(context);\n trackerSharePreference.setAlreadyCreateWorkerThread(false);\n trackerSharePreference.setRanging(true);\n trackerSharePreference.setBeaconTimestamp(MyApplication.getCurrentDate());\n trackerSharePreference.setCurrentState(StateMachine.RING_NOTIFICATION_STATE.getValue());\n playSound(context.getApplicationContext());\n showRangNotification(context.getApplicationContext());\n\n Log.d(\"BleReceiver\", \"showNotification\");\n\n }\n\n } else {\n // Received something, but not a list of scan results...\n Log.d(TAG, \" no ArrayList but \" + obj);\n }\n } else {\n Log.d(TAG, \"no extras\");\n }\n }\n }\n }",
"public void initDevice() {\n myBluetoothAdapter = android.bluetooth.BluetoothAdapter.getDefaultAdapter();\n pairedDevices = myBluetoothAdapter.getBondedDevices();\n }",
"void notifyAdapters(Object event);",
"public BluetoothList(BluetoothDialog dialog, Context context, BluetoothAdapter blAdapter, ArrayList<BluetoothDevice> devices, ArrayList<String> name, ArrayList<String> address) {\n this.bluetoothDialog = dialog;\n this.context = context;\n this.bluetoothDevices = devices;\n this.bluetoothAdapter = blAdapter;\n this.deviceName = name;\n this.deviceAddress = address;\n this.carControllerActivity = new CarControllerActivity();\n }",
"@Override\n public void onDeviceAdded(final MidiDeviceInfo device) {\n for(Map.Entry<DeviceCallback, Handler> item : mCallbacks.entrySet()) {\n final DeviceCallback callback = item.getKey();\n Handler handler = item.getValue();\n if(handler == null) {\n callback.onDeviceAdded(device);\n } else {\n handler.post(new Runnable() {\n @Override\n public void run() {\n callback.onDeviceAdded(device);\n }\n });\n }\n }\n }",
"@Override\r\n public void disconnected(SyncEvent e) {\n btFechar.setEnabled(true);\r\n }",
"@Subscribe(threadMode = ThreadMode.MAIN, sticky = true)\n public void onCaptureDeviceDiscoveryChange(DeviceDiscoveryEvent event) {\n Log.d(TAG, \"DeviceDiscoveryEvent received \");\n enableManualDiscoveryButton(true);\n DiscoveredDevice device = event.getDiscoveredDevice();\n if(device != null) {\n Log.d(TAG, \"name \" + device.getName());\n Log.d(TAG, \"unique id \" + device.getUniqueIdentifier());\n\n updateFavoriteSpinner(device.getUniqueIdentifier(), device.getName());\n }\n }",
"@Override\n public void onServicesDiscovered(BluetoothGatt gatt, int status) {\n Log.i(\"onServicesDiscovered\", \"Obtaining device service information ......\");\n if (status == BluetoothGatt.GATT_SUCCESS) {\n try{\n String messages = \"-------------- (\"+Periphery.getAddress()+\")Service Services information : --------------------\\n\";\n List<BluetoothGattService> serviceList = gatt.getServices();\n messages += \"Total:\"+serviceList.size()+\"\\n\";\n for (int i = 0; i < serviceList.size(); i++) {\n BluetoothGattService theService = serviceList.get(i);\n BLEGattServiceList.add(new BLEGattService(theService));\n\n String serviceName = theService.getUuid().toString();\n String msg = \"---- Service UUID:\"+serviceName+\" -----\\n\";\n // Each Service contains multiple features\n List<BluetoothGattCharacteristic> characterList = theService.getCharacteristics();\n msg += \"Characteristic UUID List:\\n\";\n for (int j = 0; j < characterList.size(); j++) {\n BluetoothGattCharacteristic theCharacter = characterList.get(j);\n msg += \"(\"+(j+1)+\"):\"+theCharacter.getUuid()+\"\\n\";\n //msg += \" --> Value:\"+ StringConvertUtil.bytesToHexString(theCharacter.getValue())+\"\\n\";\n }\n msg += \"\\n\\n\";\n messages += msg;\n }\n messages += \"-------------- (\"+Periphery.getAddress()+\")--------------------\\n\";\n Log.i(\"onServicesDiscovered\", messages);\n }catch (Exception ex){\n Log.e(\"onServicesDiscovered\", \"Exception:\" + ex.toString());\n }\n }\n if (_PeripheryBluetoothServiceCallBack!=null){\n _PeripheryBluetoothServiceCallBack.OnServicesed(BLEGattServiceList);\n }\n super.onServicesDiscovered(gatt, status);\n }",
"void onBusEvent(Event event);",
"private void manageConnectedSocket(BluetoothSocket acceptSocket) {\n\n }",
"@Override\r\n public void driverBaseDataReceived(PeripheralHardwareDataEvent oEvent);",
"@Override\r\n\t\tpublic int onCallBack(int type, String url, String ext)\r\n\t\t\t\tthrows RemoteException {\n\t\t\tfor(EventBus handler:mEventBus){\r\n\t\t\t\thandler.onEvent(type,url,ext);\r\n\t\t\t}\r\n\t\t\treturn 0;\r\n\t\t}",
"@Override\n public void onReceive(Context context, Intent intent) {\n\n MainActivity activity = (MainActivity) context;\n\n\n String action = intent.getAction();\n if (BluetoothDevice.ACTION_FOUND.equals(action));\n {\n\n Log.d(\"receive\",\"action found\");\n try {\n\n // rssi = intent.getShortExtra(BluetoothDevice.EXTRA_RSSI, Short.MIN_VALUE);\n\n\n BluetoothDevice bluetoothDevice = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);\n Short rssi = intent.getShortExtra(BluetoothDevice.EXTRA_RSSI,Short.MIN_VALUE);\n\n activity.setDisciveredDevice(bluetoothDevice,rssi);\n\n Log.d(\"receive\", \" Name = \"+bluetoothDevice.getName() );\n Log.d(\"receive\", \" Address = \"+bluetoothDevice.getAddress() );\n\n Toast.makeText(context,\"action found\",Toast.LENGTH_SHORT).show();\n\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n\n }\n\n }",
"@Override\n public void blePeripheralFound(BluetoothDeviceWrapper device, int rssi, byte[] record) {\n if ((null != device.getgBeacon()) /*|| (null != device.getiBeacon()) || (null != device.getAltBeacon())*/) {\n if ((weakReference.get()!=null) && (weakReference.get().getDeviceQueue().size() < 350)) {\n weakReference.get().getDeviceQueue().offer(device);\n }\n }\n }",
"@Override\n public void onScanFinished() {\n Log.d(TAG, \"Scan Finished\");\n if(dicePlus == null){\n BluetoothManipulator.startScan();\n }\n }",
"void addAdvertCallback(AdvertCallback callback);",
"void onDeviceSelected(String address);",
"private void contactsListEvent(){\n UI.getContacts().addListSelectionListener(new ListSelectionListener() {\r\n @Override\r\n public void valueChanged(ListSelectionEvent e) {\r\n UI.getProperList().clear(); //Clear screen\r\n UI.getContacts().setCellRenderer(clearNotification); //Clear notification\r\n UI.getUserName().setText((String) UI.getContacts().getSelectedValue()); //Set selected username\r\n String currentChat = (String)UI.getContacts().getSelectedValue();\r\n if(chats.containsKey(currentChat)){ //If database exists\r\n for(String s: chats.get(currentChat)){ //Load messages to screen\r\n UI.getProperList().addElement(s);\r\n }\r\n }\r\n }\r\n });\r\n }",
"private void regFliter() {\n\t\tIntentFilter filter = new IntentFilter();\r\n\t\tfilter.addAction(OsConstants.JSH.ADD_DEVICES_SUCCES);\r\n\t\tfilter.addAction(OsConstants.JSH.SETTIING_WIFI_SUCCESS);\r\n\t\tregisterReceiver(mReceiver, filter);\r\n\t}",
"private void onDeviceList(RequestDeviceList r){\n\t\t//Answer the request with the list of devices from the group\n\t\tgetSender().tell(new ReplyDeviceList(r.requestId, deviceActors.keySet()), getSelf());\n\t}"
] | [
"0.686207",
"0.64995486",
"0.64736897",
"0.63600284",
"0.63595927",
"0.633208",
"0.63146675",
"0.62816316",
"0.6260194",
"0.6100889",
"0.6043666",
"0.6026535",
"0.6023275",
"0.60024583",
"0.59946007",
"0.59741557",
"0.59659374",
"0.5964098",
"0.5950084",
"0.58989996",
"0.58982396",
"0.5850656",
"0.58315563",
"0.5785695",
"0.57669705",
"0.57516015",
"0.57508296",
"0.5689257",
"0.5685545",
"0.56774175",
"0.5657106",
"0.56467915",
"0.562791",
"0.56215644",
"0.55915534",
"0.55803424",
"0.5577083",
"0.5575129",
"0.55526626",
"0.5552481",
"0.5552315",
"0.5550791",
"0.5546905",
"0.55387586",
"0.5530616",
"0.55206704",
"0.5511454",
"0.55048704",
"0.5501946",
"0.5475539",
"0.5466538",
"0.54534596",
"0.545322",
"0.5448379",
"0.5443825",
"0.5406687",
"0.54059416",
"0.5401185",
"0.53951997",
"0.53907084",
"0.539031",
"0.538697",
"0.53799313",
"0.53684133",
"0.5365166",
"0.5352453",
"0.5352241",
"0.533631",
"0.53288925",
"0.5326087",
"0.5323812",
"0.53113717",
"0.5303422",
"0.5289341",
"0.5283885",
"0.52769756",
"0.5276975",
"0.5276592",
"0.52723455",
"0.52672505",
"0.52571464",
"0.52545345",
"0.5251763",
"0.52517587",
"0.5244734",
"0.5244445",
"0.52433276",
"0.5243032",
"0.5241036",
"0.5238314",
"0.52258325",
"0.5224058",
"0.5222114",
"0.5215296",
"0.521441",
"0.5210355",
"0.52083284",
"0.5207882",
"0.52049834",
"0.5198234"
] | 0.7234475 | 0 |
Unregister the bluetooth event callback | public void unregisterCallback() {
if (mLocalManager == null) {
Log.e(TAG, "unregisterCallback() Bluetooth is not supported on this device");
return;
}
mLocalManager.setForegroundActivity(null);
mLocalManager.getEventManager().unregisterCallback(this);
mLocalManager.getProfileManager().removeServiceListener(this);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void bluetoothDeactivated();",
"@Override\n public void unregisterCallback(@NonNull BleMessageStreamCallback callback) {\n mCallbacks.remove(callback);\n }",
"@Override\n public boolean onUnbind(Intent intent) {\n \tcloseBluetooth();\n return super.onUnbind(intent);\n }",
"public void m4567b() {\n try {\n LocalBroadcastManager.getInstance(this.f4212b).unregisterReceiver(this);\n } catch (Exception e) {\n }\n }",
"public void removePeripheralEventListener(PeripheralHardwareDriverInterface l);",
"public void unregisterListener(BluetoothCommListener lis)\n {\n if (mEnable) {\n mBS.unregisterListener(this);\n if (mListener == lis) { // Must be same mListener of course\n mListener = null;\n mContext.unregisterReceiver(receiver); // TODO: Not working? get all devices found twice in LOG?\n }\n }\n }",
"private void unregisterAfterCallBroadcastReceiver(){\n if (mADialogBroadcastIsRegistered){\n try {\n this.unregisterReceiver(afterCallBroadcastReceiver);\n mADialogBroadcastIsRegistered=false;\n }catch (Exception e){\n e.printStackTrace();\n }\n }\n }",
"private void deregisterBroadcastReceiver(){\n activity.unregisterReceiver(hceNotificationsReceiver);\n }",
"public void unregister(BTCommObserver observer, BTEvent event) {\n\t\tthis.observers.removeElement(event, observer);\n\t}",
"@Override\n protected void onStop() {\n super.onStop();\n uart.unregisterCallback(this);\n uart.disconnect();\n }",
"@Override\n protected void onUnregister() {\n Core.unregister(this);\n }",
"@Override\n\t\t\t\t\tpublic void myUnregisterReceiver(BroadcastReceiver receiver)\n\t\t\t\t\t{\n\t\t\t\t\t\tunregisterReceiver(receiver);\n\t\t\t\t\t}",
"private void m17251h() {\n this.f13994d.unregisterReceiver(this.f13995e);\n }",
"public void unregisterCallback(IInstrumentServiceCallback callback) {\n\t\t\tif (callback != null)\n\t\t\t\tm_callbacks.unregister(callback);\n\t\t}",
"void onUnbind();",
"@Override\n protected void onDestroy() {\n super.onDestroy();\n\n unbindService(conn);\n unregisterReceiver(mbtBroadcastReceiver);\n }",
"@Override\n public void onDestroy() {\n this.unregisterReceiver(mReceiver);\n }",
"public void mo29430b() {\n Log.w(\"MessageCenter\", \"unregistering MessageCenter's Broadcast Receiver\");\n C1049a.m3996a(this.f9292a).mo4058a((BroadcastReceiver) this.f9298g);\n }",
"@Override\n\tpublic void unregisterEventListener(IHFModuleEventListener li) {\n\t\tLog.d(\"HFModuleManager\", \"unregisterEventListener\");\n\t\tthis.eventListenerList.remove(li);\n\t}",
"public synchronized void unregisterCallback(CarHvacEventCallback callback) {\n mCallbacks.remove(callback);\n try {\n List<CarPropertyConfig> configs = getPropertyList();\n for (CarPropertyConfig c : configs) {\n // Register each individual propertyId\n mCarPropertyMgr.unregisterListener(mListenerToBase, c.getPropertyId());\n }\n } catch (Exception e) {\n Log.e(TAG, \"getPropertyList exception \", e);\n }\n if (mCallbacks.isEmpty()) {\n mCarPropertyMgr.unregisterListener(mListenerToBase);\n mListenerToBase = null;\n }\n }",
"public void unregister(BTCommObserver observer) {\n\t\tthis.observers.removeElement(observer);\n\t}",
"@Override\n\tpublic void unregistListener(IListener listener) throws RemoteException {\n\t\tremoteCallbackList.unregister(listener);\n\t}",
"@Override\n protected void onDestroy() {\n EventBus.getDefault().unregister(this);\n\n super.onDestroy();\n }",
"@Override\n protected void onUnregistered(Context context, String registrationId) {\n Log.i(TAG, \"Device unregistered\");\n UnityPlayer.UnitySendMessage(\"ECPNManager\",\"UnregisterDevice\",registrationId);\n }",
"public void unregisterListener() {\n mPhone.listen(mPhoneStateListener, PhoneStateListener.LISTEN_NONE);\n /* SPRD: Bug 697839 add For VOLTE and VoWiFi icon. @{ */\n try {\n if (mIsImsListenerRegistered) {\n mIsImsListenerRegistered = false;\n if (mIImsServiceEx != null) {\n mIImsServiceEx.unregisterforImsRegisterStateChanged(mImsUtListenerExBinder);\n }\n }\n /* SPRD: modify for bug723743 @{ */\n if (mIsImsReceiverRegistered) {\n mContext.unregisterReceiver(mImsIntentReceiver);\n mIsImsReceiverRegistered = false;\n }\n if (mIsModemReciverRegistered) {\n mContext.unregisterReceiver(mModemStateChangeReciver);\n mIsModemReciverRegistered = false;\n }\n /* @} */\n } catch (RemoteException e) {\n Log.e(mTag, \"RemoteException: \" + e);\n }\n /* @} */\n mContext.getContentResolver().unregisterContentObserver(mObserver);\n /* SPRD: Dual volte signalStrength display for bug 666045. @{ */\n if (mDualVoLTEListener != null) {\n mPhone.listen(mDualVoLTEListener, PhoneStateListener.LISTEN_NONE);\n }\n mContext.unregisterReceiver(mReceiver);\n /* @} */\n }",
"@Implementation(minSdk = N)\n protected void unregisterAudioRecordingCallback(AudioManager.AudioRecordingCallback cb) {\n audioRecordingCallbacks.remove(cb);\n }",
"public void unegisterListener(BioSensorEventListener listener, BioSensor sensor, int sampleRate) {\n\t\tLog.d(TAG, \"unregister\");\n\t\tfor(int i = 0; i < mRegisterdListeners.size(); i++) {\n\t\t\tif(sensor.getSensorId() == mRegisterdListeners.get(i).getSensor().getSensorId()) { \n\t\t\t\tif(sampleRate == mRegisterdListeners.get(i).getSampleRate()) {\n\t\t\t\t\tmRegisterdListeners.remove(i);\n//\t\t\t\t\tmArduinoTasks.get(i).cancel();\n//\t\t\t\t\tmArduinoTasks.remove(i);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n//\t\tmScheduler.cancel();\n\t}",
"void onCloseBleComplete();",
"@Override\n protected void onDestroy() {\n super.onDestroy();\n EventBus.getDefault().unregister(this);\n }",
"@Override\n public void onDestroy() {\n super.onDestroy();\n activity.unregisterReceiver(brocast);\n }",
"public abstract void unregister();",
"@Override\n public void onServiceDisconnected(ComponentName name) {\n bleService.disconnect();\n bleService = null;\n }",
"public void\t\tremoveUCallbackListener(String\t\ttag);",
"public abstract void unregisterDataReceiverToAndroid(Context context);",
"public void unRegister(Context context) {\n context.unregisterReceiver(this);\n Log.d(TAG, \"ConnectionReceiver unregistered!\");\n }",
"@Override\n public void onDestroy() {\n LocalBroadcastManager.getInstance(getContext()).unregisterReceiver(us);\n LocalBroadcastManager.getInstance(getContext()).unregisterReceiver(ud);\n super.onDestroy();\n }",
"@Override\n protected void onDestroy() {\n super.onDestroy();\n try {\n // Close bluetooth socket\n btSocket.close();\n } catch (IOException e) {\n }\n }",
"@Override\r\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t\ttry {\r\n\t\t\tunregisterReceiver(newReceiver);\r\n\t\t} catch (Exception e) {\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tunregisterReceiver(userReceiver);\r\n\t\t} catch (Exception e) {\r\n\t\t}\r\n\t\tBmobChat.getInstance(this).stopPollService();\r\n\t}",
"public void unregister()\n\t{\n\t\tcancelPrevRegisterTask();\n\n\t\tpushRegistrar.unregisterPW(mContext);\n\t}",
"private void m22003b() {\n if (this.f23836h) {\n this.f23833e.unregisterReceiver(this.f23837i);\n this.f23836h = false;\n }\n }",
"@Override\r\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t\tunregisterReceiver(mReceiver);\r\n\t}",
"@Override\n\tpublic void onDestroy() {\n\t\tsuper.onDestroy();\n\t\tthis.unregisterReceiver(receiver);\n\t}",
"@Override\r\n protected void onDestroy() {\r\n GlobalBus.getBus().unregister(this);\r\n super.onDestroy();\r\n }",
"public void unregisterNotify( Notify notify );",
"@Override\r\n public void onDestroy() {\n\t if (accountChangedReceiver != null) {\r\n\t try {\r\n\t \tunregisterReceiver(accountChangedReceiver);\r\n\t } catch (IllegalArgumentException e) {\r\n\t \t// Nothing to do\r\n\t }\r\n\t }\r\n\r\n // Stop the core\r\n Thread t = new Thread() {\r\n /**\r\n * Processing\r\n */\r\n public void run() {\r\n stopCore();\r\n }\r\n };\r\n t.start();\r\n }",
"public void onDestroy() {\n PackageManagerActivity.super.onDestroy();\n LocalBroadcastManager.getInstance(this).unregisterReceiver(this.h);\n }",
"public void unregister() {\n this.dispatcher.context.unregisterReceiver(this);\n }",
"@Override\n public void onDestroy() {\n EventBusWraper.getInstance().unregister(mContext);\n super.onDestroy();\n // unRegister();\n }",
"@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\tunregisterReceiver(mReceiver);\n\t}",
"void unbind(EventService service);",
"public void onDeactivation() { }",
"void unRegister(NotificationListener<ObservableIntentServiceNotificationType> notificationStrategy);",
"private void unregisterListener() {\n mSensorManager.unregisterListener(this);\n }",
"@Override\n public void onScannedBleDeviceRemoved(BluetoothDevice device) {\n Log.d(TAG, \"onScannedBleDeviceRemoved enter\");\n// Message msg = mHandler.obtainMessage();\n// msg.what = SCAN_DEVICE_REMOVE_FLAG;\n// msg.obj = device;\n// mHandler.sendMessage(msg);\n updateScanDialog(SCAN_DEVICE_REMOVE_FLAG, device);\n }",
"public void removeDeviceListener(DeviceDriverListener device);",
"public void onInCallServiceUnbind() {\n HiLog.info(LOG_LABEL, \"onInCallServiceUnbind.\", new Object[0]);\n this.mIsInCallServiceBinded = false;\n releaseResource();\n }",
"@Implementation(minSdk = O)\n protected void unregisterAudioPlaybackCallback(AudioManager.AudioPlaybackCallback cb) {\n audioPlaybackCallbacks.remove(cb);\n }",
"public void\t\tremoveUCallbackListener(String tag)\n\t{\n\t\ttab.remove(tag);\n\t}",
"@Override\r\n public void onDestroy() {\n\tEventBus.getDefault().unregister(this);\r\n\tsuper.onDestroy();\r\n }",
"@Override\n\tpublic void unregister() {\n\t\tEventBus.INSTANCE.removeListener(this);\n\t\tcompletedGameSound.dispose();\n\t\tlostGameSound.dispose();\n\t\tsucceededSound.dispose();\n\t\tfailSound.dispose();\n\t}",
"@Override\n public void onDetach() {\n super.onDetach();\n if (busIsRegistered) {\n BusService.getBus().unregister(this);\n busIsRegistered = false;\n }\n }",
"@Override\n protected void onDestroy() {\n super.onDestroy();\n try {\n if (mBluetoothSocket != null) {\n mBluetoothSocket.close();\n mBluetoothSocket = null;\n }\n } catch (Exception e) {\n Log.e(\"Tag\", \"Exe \", e);\n }\n }",
"@Override\n public void onDestroy() {\n BusProvider.getInstance().unregister(this);\n super.onDestroy();\n }",
"public void mBTClose1() {\n if (oBTServer!=null)\n oBTServer.mCloseService2(); //Disconnect a relayed device\n mDisconnect();\n if (oBTadapter != null) {\n if (oBTadapter.isEnabled()) {\n if (isOpenedByMe) //170905 only if this application opened the bluetooth\n oBTadapter.disable();\n }\n }\n if (mReceiver1!=null)\n try { //Protection from crash bugfix 171013\n mContext.unregisterReceiver(mReceiver1);\n }\n catch (final Exception exception) {\n // The receiver was not registered. There is nothing to do in that case. Everything is fine.\n }\n }",
"@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\tif(otgReceiver!=null){\n\t\t\tunregisterReceiver(otgReceiver);\n\t\t}\n\t\tif(finishReceiver!=null){\n\t\t\tunregisterReceiver(finishReceiver);\n\t\t}\n\t}",
"@Override\n public void onDestroy() {\n unregisterReceiver(mBLEUpdateReceiver);\n unregisterReceiver(mMqttUpdateReceiver);\n unbindService(mBleServiceConnection);\n unbindService(mMqttServiceConnection);\n\n Log.d(TAG,\"Manager Service Destroyed\");\n\n super.onDestroy();\n }",
"@Override\n protected void onDestroy() {\n super.onDestroy();\n unregisterReceiver(myReceiver);\n }",
"private void unregisterForBatteryStatus()\n\t{\n\t\tif(isReceiverRegistered && statusResult == null && batteryView != null && !batteryView.isShown())\n\t\t{\n\t\t\tActivity activity = RhodesActivity.safeGetInstance();\n\t\t\tif(activity != null)\n\t\t\t{\n\t\t\t\tactivity.unregisterReceiver(this);\n\t\t\t\tisReceiverRegistered = false;\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public void onDetach() {\n if (callbackManager != null) callbackManager.setActivity(null);\n super.onDetach();\n }",
"static <T> void unregisterObserver(@NonNull Observer<T> cb) {\n if (Thread.currentThread() != Looper.getMainLooper().getThread()) {\n throw new IllegalStateException(\"Must be called on UI thread.\");\n }\n for (Iterator<CallbackSubscriptionTuple> i=callbacks().iterator(); i.hasNext(); ) {\n CallbackSubscriptionTuple cbSub = i.next();\n if (cbSub.cb.equals(cb)) {\n cbSub.sub.unsubscribe();\n i.remove();\n return;\n }\n }\n }",
"@Override\n\tprotected void onDestroy() {\n\t\t// TODO Auto-generated method stub\n\t\tsuper.onDestroy();\n\t\ttry {\n\t\t\tunregisterReceiver(mHandleMessageReceiver);\n\t\t\tGCMRegistrar.onDestroy(this);\n\t\t} catch (Exception e) {\n\n\t\t\tLog.e(\"UnRegister Receiver Error\", \"> \" + e.getMessage());\n\t\t}\n\t}",
"@Override\n protected void onDestroy() {\n super.onDestroy();\n unregisterReceiver(broadcastReceiver);\n }",
"public void unregisterListener() {\n\t\tthis.listener = null;\n\t}",
"public void onCallRemoved(android.telecom.Call call) {\n call.unregisterCallback(mCallCallback);\n }",
"@Override\r\n\tpublic void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t\tif (wt != null && !wt.isCancelled()) {\r\n\t\t\twt.cancel(true);\r\n\t\t}\r\n\t\t\r\n\t\tactivity.unregisterReceiver(receiver);\r\n\t}",
"private void unregisterBroadcastReceivers(){\n if (mBufferBroadcastIsRegistered)\n try {\n this.unregisterReceiver(BufferBroadcastReceiver);\n mBufferBroadcastIsRegistered=false;\n }catch (Exception e){\n e.printStackTrace();\n }\n\n /**unregister broadcastReceiver for seekBar*/\n if (mSeekBarBroadcastIsRegistered){\n try {\n this.unregisterReceiver(seekBarBroadcastReceiver);\n mSeekBarBroadcastIsRegistered=false;\n }catch (Exception e){\n e.printStackTrace();\n }\n }\n\n /** register broadcastReceiver for afterCall alertDialog\n * in StopService in case of call while playing */\n\n }",
"public void unregister(Observer obj);",
"public void unbind(PusherCallback callback) {\n\t\twhile (mGlobalCallbacks.remove(callback))\n\t\t\t;\n\n\t\t/* remove all matching callbacks from each local callback list */\n\t\tfor (List<PusherCallback> localCallbacks : mLocalCallbacks.values()) {\n\t\t\twhile (localCallbacks.remove(callback))\n\t\t\t\t;\n\t\t}\n\t}",
"public void onUnsubscribe() {\n\n }",
"protected abstract void unregisterObserver();",
"@Override\n protected void onDestroy() {\n unregisterReceiver();\n super.onDestroy();\n }",
"@Override\n protected void onDestroy() {\n LocalBroadcastManager.getInstance(this).unregisterReceiver(mMessageReceiver);\n super.onDestroy();\n }",
"public abstract void unregisterListeners();",
"@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\t\n\t\tif(mReceiver != null) unregisterReceiver(mReceiver);\n\t}",
"public void removeDisconnectedCallback(OctaveReference listener) {\n\t\tlistenerDisconnected.remove(listener);\n\t}",
"@Override\n protected void onDestroy() {\n unregisterReceiver(mReceiver);\n super.onDestroy();\n }",
"@Override\n public void unpin(IObserver observer) {\n listeners.remove(observer);\n }",
"@Override\n protected void onUnregistered() throws RemoteException {\n\n }",
"public void unregisterListeners(){\n listeners.clear();\n }",
"@Override\n\tpublic void onDestroy() {\n\t\tthis.unregisterReceiver(notifyServiceReceiver);\n\t\tsuper.onDestroy();\n\t}",
"private void unregisterListener() {\n\t\tif (!mHasStarted || mSensorManager == null) {\n\t\t\treturn;\n\t\t}\n\t\tmHasStarted = false;\n\t\tmSensorManager.unregisterListener(mAccListener);\n\t}",
"@Override\r\n public void disconnected(SyncEvent e) {\n btFechar.setEnabled(true);\r\n }",
"public void unregisterReceiver() {\n try {\n mContext.unregisterReceiver(mReceiver);\n } catch (IllegalArgumentException e) {\n }\n }",
"@Override\n protected void onDestroy() {\n LocalBroadcastManager.getInstance(this).unregisterReceiver(\n mMessageReceiver);\n super.onDestroy();\n }",
"@Override\n\tpublic void onDestroy() {\n\t\tsuper.onDestroy();\n\t\tif (baseBroadcase != null) {\n\t\t\tgetActivity().unregisterReceiver(baseBroadcase);\n\t\t}\n\t}",
"public void unsubscribe(ProcessRegisterCallback processRegisterCallback) {\n processRegisterCallbacks.remove(processRegisterCallback);\n }",
"@Override\n public void onDestroy() {\n super.onDestroy();\n mAbleBLEService = null;\n }",
"void unsetEvent();",
"@Override\n protected void onDestroy() {\n super.onDestroy();\n unregisterReceiver(receiver);\n }",
"public void removeCallback(EventCallback<T> callback) {\n callbacks.remove(callback);\n }"
] | [
"0.7417763",
"0.69896775",
"0.6858225",
"0.6767762",
"0.67261934",
"0.6688237",
"0.6659464",
"0.66410315",
"0.66129583",
"0.6539773",
"0.6525212",
"0.649338",
"0.64845634",
"0.64422685",
"0.6424849",
"0.6413467",
"0.6410989",
"0.6409824",
"0.6354895",
"0.6315713",
"0.6312999",
"0.63018686",
"0.62857604",
"0.62813455",
"0.6278434",
"0.6269057",
"0.6263726",
"0.6262722",
"0.6251873",
"0.6249937",
"0.6243603",
"0.6240487",
"0.62350017",
"0.62333554",
"0.6228667",
"0.6217244",
"0.62145245",
"0.62095594",
"0.61964226",
"0.61843824",
"0.61815006",
"0.618022",
"0.6175531",
"0.6174887",
"0.6174816",
"0.61728966",
"0.61610293",
"0.6159415",
"0.61520386",
"0.6151269",
"0.61474276",
"0.61434716",
"0.61276156",
"0.61048913",
"0.61026394",
"0.60950416",
"0.60919",
"0.60797393",
"0.60764045",
"0.6072749",
"0.606912",
"0.60534316",
"0.60529655",
"0.605255",
"0.6049936",
"0.60414654",
"0.60360146",
"0.6035756",
"0.60279244",
"0.60273564",
"0.60269225",
"0.6021851",
"0.60202956",
"0.601647",
"0.6013543",
"0.60067594",
"0.60052556",
"0.60041296",
"0.59964377",
"0.5994417",
"0.5993663",
"0.59924084",
"0.59907186",
"0.5987806",
"0.5987232",
"0.5986997",
"0.59760725",
"0.5972346",
"0.5964802",
"0.5963881",
"0.59516454",
"0.5950725",
"0.5950163",
"0.59481585",
"0.5936995",
"0.59363",
"0.5927488",
"0.5907377",
"0.59024847",
"0.58852106"
] | 0.8194312 | 0 |
Force to update the list of bluetooth devices | public void forceUpdate() {
if (mLocalManager == null) {
Log.e(TAG, "forceUpdate() Bluetooth is not supported on this device");
return;
}
if (BluetoothAdapter.getDefaultAdapter().isEnabled()) {
final Collection<CachedBluetoothDevice> cachedDevices =
mLocalManager.getCachedDeviceManager().getCachedDevicesCopy();
for (CachedBluetoothDevice cachedBluetoothDevice : cachedDevices) {
update(cachedBluetoothDevice);
}
} else {
removeAllDevicesFromPreference();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void updateBluetoothList(){\n\t\tif(bluetoothAdapter == null){\n\t\t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n\t\t\tbuilder.setTitle(R.string.no_bt_error_dialog_title);\n\t\t\tbuilder.setMessage(R.string.no_bt_error_dialog_message);\n\t\t\tbuilder.setNeutralButton(R.string.no_bt_error_dialog_btn, new OnClickListener() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\tfinish();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\t\n\t\t//check if it is enabled\n//\t\tif (!bluetoothAdapter.isEnabled()) {\n//\t\t Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n//\t\t startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\n//\t\t}\n\t\t\n\t\tSet<BluetoothDevice> pairedDevices = bluetoothAdapter\n\t\t\t\t.getBondedDevices();\n\t\t\n\t\tpairedlist = new ArrayList<BluetoothDevice>();\n\t\t\n\t\tif (pairedDevices.size() > 0) {\n\t\t\tfor (BluetoothDevice device : pairedDevices) {\n\t\t\t\tif (isDeviceUsefulForSMS(device.getBluetoothClass()\n\t\t\t\t\t\t.getMajorDeviceClass())) {\n\t\t\t\t\tpairedlist.add(device);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(pairedlist.size() <= 0){\n\t\t\tshowBTPairedDialog();\n\t\t}\n\t\t\n\t\tupdateBTListView();\n\t}",
"private void bonded_devices_get()\n\t\t{\n\t\t\tmPairedDevList.clear();\n\t\t\tSet<BluetoothDevice> PairedDevices = btAdapter.getBondedDevices();\n\t\t\tif(PairedDevices.size() > 0)\n\t\t\t{\n\t\t\t\tmPairedTitle.setVisibility(View.VISIBLE);\n\t\t\t\tfor(BluetoothDevice device : PairedDevices)\n\t\t\t\t{\n\t\t\t\t\tString device_info = device.getName()+\"\\n\"+device.getAddress();\n\t\t\t\t\tmPairedDevList.add(device_info);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tmPairedTitle.setVisibility(View.GONE);\n\t\t\t\tmPairedDevList.add(\"No Bonded Devices\");\n\t\t\t}\n\t\t}",
"private void bluetoothList(CallbackContext callbackContext) throws JSONException {\n BluetoothAdapter bluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\n Set<BluetoothDevice> pairedDevices = bluetoothAdapter.getBondedDevices();\n\n JSONArray arrayList = new JSONArray();\n\n // Lista todos os dispositivos pareados.\n if (pairedDevices.size() > 0) {\n for (BluetoothDevice device : pairedDevices) {\n String name = device.getName();\n String address = device.getAddress();\n arrayList.put(name + \"_\" + address);\n }\n callbackContext.success(arrayList);\n }\n }",
"public void listDevices(final BluetoothAdapter bluetoothAdapter){\n Set<BluetoothDevice> pairedDevices = bluetoothAdapter.getBondedDevices();\n ArrayList pairedDeviceList = new ArrayList();\n String address = null;\n\n if (pairedDevices.size() > 0) {\n int i = 0;\n // There are paired devices. Get the name and address of each paired device.\n for (BluetoothDevice device : pairedDevices) {\n String deviceName = device.getName().trim();\n String deviceHardwareAddress = device.getAddress(); // MAC address\n if (deviceName.equals(DEVICE_NAME)){\n address = device.getAddress().trim();\n System.out.println(address +\"\\n\");\n }\n pairedDeviceList.add(\"Device Name: \" + deviceName + \" Device MAC Address: \" + deviceHardwareAddress);\n }\n\n System.out.println(pairedDeviceList.get(0) + \"\\n\");\n\n final String finalAddress = address;\n AsyncTask.execute(new Runnable(){\n @Override\n public void run(){\n bluetoothDevice = bluetoothAdapter.getRemoteDevice(finalAddress);\n BLEDevice = new BluetoothLeService(bluetoothDevice, quantifenUUID);\n BLEDevice.connect(BluetoothActivity.this, testUUID);\n }\n });\n\n\n }\n }",
"private void addPairedDevices(){\r\n\t\t// ensure devices wont be added twice\r\n\t\tmPairedDevicesArrayAdapter.clear();\r\n\t\tSet<BluetoothDevice> pairedDevices = mBtAdapter.getBondedDevices();\r\n\t\t//bluetooth has to be enabled\r\n\t\tif(mBtAdapter.isEnabled()){\r\n\t\t\t//there are no paired devices ...\r\n\t\t\tif(pairedDevices.size() == 0){\r\n\t \t\t//inform user to pair devices manually\r\n\t \t\tToast.makeText(this, \"No paired devices detected. Please pair devices!\", Toast.LENGTH_SHORT).show();\r\n\t \t\treturnToPriviousActivityWithoutDevice();\r\n\t \t} \r\n\t\t\t//there are paired devices ...\r\n\t\t\telse{\r\n\t\t\t\t//inform user\r\n\t \t\tToast.makeText(this, \"Paired devices detected.\", Toast.LENGTH_SHORT).show();\r\n\t \t\tfindViewById(R.id.paired_devices).setVisibility(View.VISIBLE); \t\t\r\n\t \t // Loop through paired devices\r\n\t \t for (BluetoothDevice device : pairedDevices) {\r\n\t \t // Add the name and address to an array adapter to show in a ListView\t \t \t\r\n\t \t mPairedDevicesArrayAdapter.add(device.getName() + \"\\n\" + device.getAddress());\r\n\t \t }\r\n\t \t}\r\n\t\t}\r\n\t}",
"private void notifyDevicesChanged() {\n runInAudioThread(new Runnable() {\n @Override\n public void run() {\n WritableArray data = Arguments.createArray();\n final boolean hasHeadphones = availableDevices.contains(DEVICE_HEADPHONES);\n for (String device : availableDevices) {\n if (hasHeadphones && device.equals(DEVICE_EARPIECE)) {\n // Skip earpiece when headphones are plugged in.\n continue;\n }\n WritableMap deviceInfo = Arguments.createMap();\n deviceInfo.putString(\"type\", device);\n deviceInfo.putBoolean(\"selected\", device.equals(selectedDevice));\n data.pushMap(deviceInfo);\n }\n getContext().getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class).emit(DEVICE_CHANGE_EVENT, data);\n JitsiMeetLogger.i(TAG + \" Updating audio device list\");\n }\n });\n }",
"public void discoverDevices(){\r\n \t// If we're already discovering, stop it\r\n if (mBtAdapter.isDiscovering()) {\r\n mBtAdapter.cancelDiscovery();\r\n }\r\n \r\n Toast.makeText(this, \"Listining for paired devices.\", Toast.LENGTH_LONG).show();\r\n \tmBtAdapter.startDiscovery(); \r\n }",
"public void initDevice() {\n myBluetoothAdapter = android.bluetooth.BluetoothAdapter.getDefaultAdapter();\n pairedDevices = myBluetoothAdapter.getBondedDevices();\n }",
"private void updateDeviceList() {\r\n\t\tavailableCams.removeAllElements();\r\n\t\tavailableCams.addElement(NO_CAMERA);\r\n\t\t\r\n\t\tmediaSrc.updateDeviceList();\r\n\t\tfor(CameraController c : mediaSrc.getAvailableCameras()) {\r\n\t\t\tavailableCams.addElement(c);\r\n\t\t}\r\n\t\t\r\n\t\tif(mediaSrc.getActiveCamera() != null) {\r\n\t\t\tavailableCams.setSelectedItem(mediaSrc.getActiveCamera());\r\n\t\t} else {\r\n\t\t\tavailableCams.setSelectedItem(NO_CAMERA);\r\n\t\t}\r\n\t}",
"private void updateUI() {\n Log.i(DEBUG.TAG, \"BTDevicesActivity - updateUI - start\");\n\n btnBTScan.setEnabled(btAdapter.isEnabled() && !btAdapter.isDiscovering());\n\n if (btAdapter.isDiscovering())\n btnBTScan.setText(R.string.btn_bt_devices_scan_running_text);\n else\n btnBTScan.setText(R.string.btn_bt_devices_scan_text);\n tglBTToggle.setChecked(btAdapter.isEnabled());\n\n // remove all found (if any) devices when BT is disabled\n if (!btAdapter.isEnabled())\n lvAdapter.clear();\n\n if (lvAdapter.getCount() > 0)\n tvHeader.setText(R.string.tv_bt_devices_header_text_devices_found);\n else\n tvHeader.setText(R.string.tv_bt_devices_header_text_no_devices);\n\n Log.i(DEBUG.TAG, \"BTDevicesActivity - updateUI - finish\");\n }",
"public void listBT() {\n Log.d(\"Main Activity\", \"Listing BT elements\");\n if (searchBt) {\n //Discover bluetooth devices\n final List<String> list = new ArrayList<>();\n list.add(\"\");\n pairedDevices.addAll(mBluetoothAdapter.getBondedDevices());\n // If there are paired devices\n if (pairedDevices.size() > 0) {\n // Loop through paired devices\n for (BluetoothDevice device : pairedDevices) {\n // Add the name and address to an array adapter to show in a ListView\n list.add(device.getName() + \"\\n\" + device.getAddress());\n }\n }\n if (!h7) {\n Log.d(\"Main Activity\", \"Listing BTLE elements\");\n final BluetoothAdapter.LeScanCallback leScanCallback = new BluetoothAdapter.LeScanCallback() {\n public void onLeScan(final BluetoothDevice device, final int rssi, final byte[] scanRecord) {\n if (!list.contains(device.getName() + \"\\n\" + device.getAddress())) {\n Log.d(\"Main Activity\", \"Adding \" + device.getName());\n list.add(device.getName() + \"\\n\" + device.getAddress());\n pairedDevices.add(device);\n }\n }\n };\n\n\n Thread scannerBTLE = new Thread() {\n public void run() {\n Log.d(\"Main Activity\", \"Starting scanning for BTLE\");\n mBluetoothAdapter.startLeScan(leScanCallback);\n try {\n Thread.sleep(5000);\n Log.d(\"Main Activity\", \"Stoping scanning for BTLE\");\n mBluetoothAdapter.stopLeScan(leScanCallback);\n } catch (InterruptedException e) {\n Log.e(\"Main Activity\", \"ERROR: on scanning\");\n }\n }\n };\n\n scannerBTLE.start();\n }\n\n //Populate drop down\n spinner1 = (Spinner) findViewById(R.id.spinner1);\n ArrayAdapter<String> dataAdapter = new ArrayAdapter<>(this,\n android.R.layout.simple_spinner_item, list);\n dataAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n spinner1.setOnItemSelectedListener(this);\n spinner1.setAdapter(dataAdapter);\n\n for (int i = 0; i < dataAdapter.getCount(); i++) {\n if (dataAdapter.getItem(i).contains(\"Polar H7\")) spinner1.setSelection(i);\n }\n\n if (DataHandler.getInstance().getID() != 0 && DataHandler.getInstance().getID() < spinner1.getCount())\n spinner1.setSelection(DataHandler.getInstance().getID());\n }\n }",
"private void setupBluetooth() {\n if (!getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)) {\n Toast.makeText(this, R.string.ble_not_supported, Toast.LENGTH_SHORT).show();\n finish();\n }\n\n // Initializes Bluetooth adapter.\n final BluetoothManager bluetoothManager =\n (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE);\n bluetoothAdapter = bluetoothManager.getAdapter();\n\n // Ensures Bluetooth is available on the device and it is enabled. If not,\n // displays a dialog requesting user permission to enable Bluetooth.\n if (bluetoothAdapter == null || !bluetoothAdapter.isEnabled()) {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, 1);\n }\n\n Set<BluetoothDevice> pairedDevices = bluetoothAdapter.getBondedDevices();\n\n if (pairedDevices.size() > 0) {\n // There are paired devices. Get the name and address of each paired device.\n for (BluetoothDevice device : pairedDevices) {\n String deviceName = device.getName();\n String deviceHardwareAddress = device.getAddress(); // MAC address\n String deviceType = device.getBluetoothClass().getDeviceClass() + \"\";\n\n Movie movie = new Movie(deviceName, deviceHardwareAddress, deviceType);\n movieList.add(movie);\n\n }\n\n mAdapter.notifyDataSetChanged();\n }\n }",
"private void selectAvailableDevices() {\n\n ArrayList deviceStrs = new ArrayList();\n final ArrayList<String> devices = new ArrayList();\n\n BluetoothAdapter btAdapter = BluetoothAdapter.getDefaultAdapter();\n // checking and enabling bluetooth\n if (!btAdapter.isEnabled()) {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\n } else {\n btAdapter = BluetoothAdapter.getDefaultAdapter();\n Set<BluetoothDevice> pairedDevices = btAdapter.getBondedDevices();\n if (pairedDevices.size() > 0) {\n for (BluetoothDevice device : pairedDevices) {\n deviceStrs.add(device.getName() + \"\\n\" + device.getAddress());\n devices.add(device.getAddress());\n }\n }\n\n // show a list of paired devices to connect with\n final AlertDialog.Builder alertDialog = new AlertDialog.Builder(this);\n ArrayAdapter adapter = new ArrayAdapter(this, android.R.layout.select_dialog_singlechoice,\n deviceStrs.toArray(new String[deviceStrs.size()]));\n alertDialog.setSingleChoiceItems(adapter, -1, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n int position = ((AlertDialog) dialog).getListView().getCheckedItemPosition();\n String deviceAddress = devices.get(position);\n setDeviceAddress(deviceAddress);\n chosen = true;\n //notify user for ongoing connection\n launchRingDialog();\n\n }\n });\n\n alertDialog.setTitle(R.string.blueChose);\n alertDialog.show();\n }\n }",
"public Set<BluetoothDevice> getPairedDevicesList(){\n if(isBluetoothSupported()){\n if(!baBTAdapter.isEnabled()){\n turnOnBluetooth();\n }\n }\n else{\n return null;\n }\n\n return baBTAdapter.getBondedDevices();\n }",
"private void updateDevicesList() {\n\n netDevicesPanel.removeAll();\n\n netManager.getRecentlySeenDevices().forEach(device -> {\n netDevicesPanel.add(new DevicePanel(device));\n });\n\n netDevicesPanel.revalidate();\n netDevicesPanel.repaint();\n }",
"public void updateData() {\n List<Device> devices = Lists.newArrayList();\n CustomAdapter customAdapter = (CustomAdapter) deviceListView.getAdapter();\n for (int i = 0; i < customAdapter.getCount(); i++) {\n Model model = customAdapter.getItem(i);\n if (model.isChecked()) {\n devices.add(model.getDevice());\n }\n }\n\n SensorDao sensorDao = new SensorDao(parentActivity);\n Map<Device, List<Sensor>> sensorDeviceMap = sensorDao.fetchDeviceSpecificSensors(devices);\n\n // Aggregate the information about sensor and devices based on unique\n // Map<BluetoothDevice, Map<FileName, List<SensorLabels>>>\n Map<BluetoothDevice, Map<String, List<String>>> rearrangedSensorDeviceInfo = Maps.newHashMap();\n for (Map.Entry<Device, List<Sensor>> elem : sensorDeviceMap.entrySet()) {\n Device device = elem.getKey();\n BluetoothDevice bluetoothDevice = CommonUtils.getBluetoothAdapter(\n parentActivity, REQUEST_BT_ENABLE).getRemoteDevice(device.getDeviceId());\n Map<String, List<String>> fileNameSensorNameMap = rearrangedSensorDeviceInfo.get(bluetoothDevice);\n List<Sensor> sensors = elem.getValue();\n\n if (fileNameSensorNameMap == null) {\n fileNameSensorNameMap = Maps.newHashMap();\n rearrangedSensorDeviceInfo.put(bluetoothDevice, fileNameSensorNameMap);\n }\n\n for(Sensor sensor : sensors) {\n String dataFilePath = sensor.getSensorDataFilePath();\n String sensorName = sensor.getSensorLabel();\n List<String> sensorNames = fileNameSensorNameMap.get(dataFilePath);\n if (sensorNames == null) {\n fileNameSensorNameMap.put(dataFilePath, Lists.newArrayList(sensorName));\n } else {\n sensorNames.add(sensorName);\n }\n }\n }\n\n IntentFilter intentFilter = new IntentFilter();\n intentFilter.addAction(ServerActionsService.ACTION_TRANSFER_FILE_AND_INSERT_DATA_STARTED);\n intentFilter.addAction(ServerActionsService.ACTION_TRANSFER_FILE_AND_INSERT_DATA_FINISHED);\n intentFilter.addAction(ServerActionsService.ACTION_TRANSFER_FILE_AND_INSERT_DATA_ENDED);\n intentFilter.addAction(ServerActionsService.ACTION_TRANSFER_FILE_AND_INSERT_DATA_INITIATED);\n parentActivity.registerReceiver(broadcastReceiver, intentFilter);\n\n //Start service for every device.\n for (Map.Entry<BluetoothDevice, Map<String, List<String>>> elem : rearrangedSensorDeviceInfo.entrySet()) {\n BluetoothDevice device = elem.getKey();\n Map<String, List<String>> fileNameSensorsMap = elem.getValue();\n if (fileNameSensorsMap.size() > 0) {\n Bundle bundle = new Bundle();\n bundle.putParcelable(ServerActionsService.PARAM_BLUETOOTH_DEVICE, device);\n bundle.putSerializable(PARAM_FILENAME_SENSOR_INFO, (Serializable) fileNameSensorsMap);\n\n Intent intent = new Intent(parentActivity, ServerActionsService.class);\n intent.setAction(ServerActionsService.ACTION_TRANSFER_FILE_AND_INSERT_DATA);\n intent.putExtras(bundle);\n\n parentActivity.startService(intent);\n }\n }\n }",
"private void getPairedDevices() {\n\t\tdevicesArray = btAdapter.getBondedDevices();\n\t\tif(devicesArray.size()>0){\n\t\t\tfor(BluetoothDevice device:devicesArray){\n\t\t\t\tpairedDevices.add(device.getName());\n\t\t\t}\n\t\t}\n\t}",
"public void displayPairedDevices() {\n\t\tBluetoothAdapter mBluetoothAdapter = BluetoothAdapter\n\t\t\t\t.getDefaultAdapter();\n\t\tSet<BluetoothDevice> bondedDevices = mBluetoothAdapter\n\t\t\t\t.getBondedDevices();\n\n\t\tList<String> s = new ArrayList<String>();\n\t\tpairedDevices = new ArrayList<BluetoothDevice>();\n\t\tfor (BluetoothDevice bt : bondedDevices) {\n\t\t\ts.add(bt.getName());\n\t\t\tpairedDevices.add(bt);\n\t\t}\n\t\tListView List = (ListView) findViewById(R.id.paired_devices);\n\n\t\tList.setAdapter(new ArrayAdapter<String>(this, R.layout.device_row, s));\n\t}",
"public void bind(BluetoothDevice device){\n tv_blue_list_name.setText(device.getName());\n tv_blue_list_address.setText(device.getAddress());\n\n }",
"@Subscribe(threadMode = ThreadMode.MAIN)\n public void onDevicesReceived(OnReceiverDevicesEvent event){\n //if(!devicesListAdapter.isEmpty()) devicesListAdapter.clear(); // clear old names\n\n\n devicesListAdapter.removeAll();\n Log.d(\"P2P\", \"Found something on events!\");\n //Toast.makeText(getContext(), \"Found something\", Toast.LENGTH_LONG).show();\n Collection<WifiP2pDevice> devs = event.getDevices().getDeviceList();\n devsList.addAll(devs);\n\n\n\n for(int i = 0; i < devsList.size(); i++){\n\n if(!devicesListAdapter.hasItem(devsList.get(i))){\n Log.d(\"P2P\", \"Device Found: \" + devsList.get(0).deviceName);\n devicesListAdapter.add(devsList.get(i).deviceName);\n devicesListAdapter.notifyDataSetChanged();\n }\n\n }\n\n\n }",
"void bluetoothDeactivated();",
"public void setDevices(Peripheral[] devices) {\r\n\tthis.deviceList.clear();\r\n\tif (devices != null) {\r\n\t int numEl = devices.length;\r\n\t for (int i = 0; i < numEl; i++) {\r\n\t\tthis.deviceList.add(devices[i]);\r\n\t }\r\n\t}\r\n }",
"private void addBluetoothUsage() {\n BatterySipper bs = new BatterySipper(BatterySipper.DrainType.BLUETOOTH, null, 0);\n mBluetoothPowerCalculator.calculateRemaining(bs, mStats, mRawRealtimeUs, mRawUptimeUs,\n mStatsType);\n aggregateSippers(bs, mBluetoothSippers, \"Bluetooth\");\n if (bs.totalPowerMah > 0) {\n mUsageList.add(bs);\n }\n }",
"public DeviceListChanged(@NotNull List<? extends AudioDevice> list) {\n super(null);\n Intrinsics.checkNotNullParameter(list, \"devices\");\n this.a = list;\n }",
"void refresh() {\n List<IDevice> list = Lists.newArrayList();\n// if (fan == null) {\n// ToastUtils.showShort(R.string.dev_invalid_error);\n// } else {\n// list.add(fan);\n// if (stove != null) {\n// list.add(stove);\n// }\n// }\n list = Plat.deviceService.queryDevices();\n adapter.loadData(list);\n }",
"private void bluetooth_connect_device() throws IOException\n {\n try\n {\n myBluetooth = BluetoothAdapter.getDefaultAdapter();\n address = myBluetooth.getAddress();\n pairedDevices = myBluetooth.getBondedDevices();\n if (pairedDevices.size()>0)\n {\n for(BluetoothDevice bt : pairedDevices)\n {\n address=bt.getAddress().toString();name = bt.getName().toString();\n Toast.makeText(getApplicationContext(),\"Connected\", Toast.LENGTH_SHORT).show();\n\n }\n }\n\n }\n catch(Exception we){}\n myBluetooth = BluetoothAdapter.getDefaultAdapter();//get the mobile bluetooth device\n BluetoothDevice dispositivo = myBluetooth.getRemoteDevice(address);//connects to the device's address and checks if it's available\n btSocket = dispositivo.createInsecureRfcommSocketToServiceRecord(myUUID);//create a RFCOMM (SPP) connection\n btSocket.connect();\n try { t1.setText(\"BT Name: \"+name+\"\\nBT Address: \"+address); }\n catch(Exception e){}\n }",
"@Override\n public void onBluetoothDeviceFound(BluetoothDevice btDevice) {\n }",
"private void displayList(){\n\t\tmArrayAdapter.clear();\n\t\tBT.setupBT();\n\n\t\tListView newDevicesListView = (ListView)\n\t\t\t\tdialog.findViewById(R.id.device_list_display);\n\n\t\tnewDevicesListView.setAdapter(mArrayAdapter);\n\t\tnewDevicesListView.setClickable(true);\n\t}",
"private void listDevices(Context context) {\n\t DeviceList list = new DeviceList();\n\t int result = LibUsb.getDeviceList(context, list);\n\t if(result < 0) throw new LibUsbException(\"Unable to get device list\", result);\n\n\t try\n\t {\n\t for(Device device: list)\n\t {\n\t DeviceDescriptor descriptor = new DeviceDescriptor();\n\t result = LibUsb.getDeviceDescriptor(device, descriptor);\n\t if (result != LibUsb.SUCCESS) throw new LibUsbException(\"Unable to read device descriptor\", result);\n\t System.out.println(\"vendorId=\" + descriptor.idVendor() + \", productId=\" + descriptor.idProduct());\n\t }\n\t }\n\t finally\n\t {\n\t // Ensure the allocated device list is freed\n\t LibUsb.freeDeviceList(list, true);\n\t }\n\t}",
"public void findBluetooth() {\n BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\n if (mBluetoothAdapter == null) {\n // Device does not support Bluetooth\n btStatusDisplay.setText(\"Device does not support Bluetooth\");\n }\n btStatusDisplay.setText(\"Trying to connect...\");\n\n /** Pops up request to enable if found not enabled */\n if (!mBluetoothAdapter.isEnabled()) {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\n }\n /** Get reference to scale as Bluetooth device \"mmDevice\" */\n Set<BluetoothDevice> pairedDevices = mBluetoothAdapter.getBondedDevices();\n if (pairedDevices.size() > 0) {\n for (BluetoothDevice device : pairedDevices) {\n if (device.getName().equals(\"BLUE\")) {\n mmDevice = device;\n btStatusDisplay.setText(\"Bluetooth device found\");\n break;\n }\n }\n }\n }",
"public void monitorFoundDevices() {\n //start a thread\n new Thread() {\n public void run() {\n //loop till mBeaconListAdapter has been skilled.\n while(mBeaconListAdapter != null) {\n try {\n //Since it will update UI, runOnUiThread is called here.\n getActivity().runOnUiThread(new Runnable() {\n @Override\n public void run() {\n for (int i = 0; i < mBeaconListAdapter.getCount(); i++) {\n if (!mBleWrapper.checkDeviceConnection(mBeaconListAdapter.\n getDevice(i).getAddress()))\n mBeaconListAdapter.removeDevice(i);\n }\n }\n });\n\n Thread.sleep(MONITOR_DELAY_TIME_INTERVAL);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }\n }.start();\n }",
"private void onDevicesListUpdate(Map<String, Boolean> newValue, Map<String, Boolean> oldValue) {\n newValue = newValue == null ? Collections.<String, Boolean>emptyMap() : newValue;\n oldValue = oldValue == null ? Collections.<String, Boolean>emptyMap() : oldValue;\n\n for (Map.Entry<String, Boolean> entry : newValue.entrySet()) {\n String entryKey = entry.getKey();\n if (!oldValue.containsKey(entryKey) && !(entryKey).equals(getMyDeviceId())) {\n onDeviceConnected(entryKey, entry.getValue());\n }\n }\n\n for (Map.Entry<String, Boolean> entry : oldValue.entrySet()) {\n String entryKey = entry.getKey();\n if (!newValue.containsKey(entryKey) && !(entryKey).equals(getMyDeviceId())) {\n onDeviceDisconnected(entryKey, entry.getValue());\n }\n }\n }",
"private void BTKies() {\n Set<BluetoothDevice> pairedDevices;\n ArrayAdapter<String> BTArrayAdapter;\n final Dialog dialog = new Dialog(this);\n dialog.setContentView(R.layout.devicedialog);\n dialog.setTitle(\"Kies een verbinding\");\n BTListView = (ListView) dialog.findViewById(R.id.listView1);\n BTListView.setVisibility(View.VISIBLE);\n\n BTArrayAdapter = new ArrayAdapter<String>(this,\n android.R.layout.simple_list_item_1);\n BTListView.setAdapter(BTArrayAdapter);\n pairedDevices = BT.getBondedDevices();\n for (BluetoothDevice device : pairedDevices)\n BTArrayAdapter.add(device.getName() + \"\\n\" + device.getAddress());\n\n dialog.show();\n\n // Pick het item uit de list\n BTListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n long arg3) {\n ListView lv = (ListView) arg0;\n TextView tv = (TextView) lv.getChildAt(arg2);\n String s = tv.getText().toString();\n\n Connect(s); // Make connection\n }\n\n private void Connect(String s) {\n int i = s.length();\n address = s.substring(i - 17);\n BluetoothDevice device = BT.getRemoteDevice(address);\n Log.d(TAG, \"Connecting to ... \" + device);\n BT.cancelDiscovery();\n try { // omgaan met exeptions\n btSocket = device\n .createRfcommSocketToServiceRecord(MY_UUID);\n btSocket.connect();\n // hier de comunicatie invullen ***********************************************\n writeData(\"c#\"); // vraag om een bevestiging van de verbinding\n BTListView.setVisibility(View.INVISIBLE);\n dialog.dismiss();\n beginListenForData();\n } catch (IOException e) {\n try {\n btSocket.close();\n } catch (IOException e2) {\n DisplayToast(\"Unable to end the connection\");\n }\n DisplayToast(\"Ontvanger niet beschikbaar. Kies opnieuw\");\n }\n }\t// einde connect\n\n });\t// einde onClick\n }",
"private void updateAdapter(List<DeviceInfo> data) {\n ArrayList<String> devices = new ArrayList<>();\n for (DeviceInfo device : data) {\n devices.add(device.getEKID() +\n ((device.getFriendlyName() != null && !device.getFriendlyName().isEmpty()) ? \", \" + device.getFriendlyName() : \"\"));\n }\n try {\n devicesEntriesForSpinner.clear();\n devicesEntriesForSpinner.addAll(devices);\n setDeviceSpinnerAdapter();\n } catch (Exception ex) {\n Log.e(TAG, ex.getMessage());\n }\n }",
"void setBluetoothService(BluetoothService bluetoothService);",
"@Override\n\t\tpublic void onReceive(Context context, Intent intent) {\n\t\t\tSystem.out.println(\"Called onReceive\");\n\t\t\tString action = intent.getAction();\n\t\t\t//When a new device is found\n\t\t\ttry{\n\t\t\tif(action.equals(BluetoothDevice.ACTION_FOUND)) {\n\t\t\t\tSystem.out.println(\"Called ACTION_FOUND\");\n\t\t\t\tBluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);\n\t\t\t\tSystem.out.println(\"Device Name: \"+device.getName());\n\t\t\t\tSystem.out.println(\"Device Addr: \"+device.getAddress());\n\t\t\t\tname = device.getName();\n\t\t\t\taddress = device.getAddress();\n\t\t\t\t//BTArrayAdapter.add(device.getName() + \"\\n\" + device.getAddress());\n\t\t\t\t//BTArrayAdapter.notifyDataSetChanged();\n\t\t\t\t//System.out.println(BTArrayAdapter.getCount());\n\t\t\t\t//for (int i=1;i<=BTArrayAdapter.getCount();i++){\n\t\t\t\t//System.out.println(\"Contents of Array: \"+BTArrayAdapter.getItem(0));\n\t\t\t\t//}\n\t\t\t}\n\t\t\t}catch(Exception e){System.out.println(\"Exception in ACTION_FOUND: \"+e);\n\t\t\t}\n\t\t\tif(BluetoothAdapter.ACTION_DISCOVERY_FINISHED.equals(action)){\n\t\t\t\tSystem.out.println(\"Scanning Done...\");\n\t\t\t\tFile locationFileDir = Environment.getExternalStoragePublicDirectory(\"/cusp/health\");\n\t\t\t\tlocationFileDir.mkdirs();\n\t\t\t\t String locfilename = locationFileDir.getPath() + File.separator + \"Bid.txt\";\n\t\t\t\t File location = new File (locfilename);\n\t\t\t\t if (!locationFileDir.exists() && locationFileDir.mkdirs()) {\n\t\t\t\t\t\tSystem.out.println(\"Cannot create File/ Folder\");\n\t\t\t\t\t}\n\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\tSystem.out.println(\"Writing Device Information to file\");\n\t\t\t\t\t\t\tout = new PrintWriter(location);\n\t\t\t\t\t\t\tout.println(\"Name: \"+name);\n\t\t\t\t\t\t\tout.println(\"Address: \"+address);\n\t\t\t\t\t\t\tout.flush();\n\t\t\t\t\t\t out.close();\n\t\t\t\t\t\t System.out.println(\"Wrote to the file..!\");\n\t\t\t\t\t\t\t}catch(Exception e){System.out.println(\"Error Flushing to a File \" +e);}\n\t\t\t\t//myBluetoothAdapter.startDiscovery();\n\t\t\t\t//System.out.println(\"Scanning Again...\");\n\t\t\t\t//Toast.makeText(getApplicationContext(), \"Scanning Again...\", Toast.LENGTH_SHORT).show();\n\t\t\t}\n\t\t}",
"public void configureDeviceListView(){\n deviceListView = findViewById(R.id.device_listView);\n combinedDeviceList = new ArrayList<>();\n deviceListAdapter = new DeviceListAdapter(this, combinedDeviceList);\n deviceListView.setAdapter(deviceListAdapter);\n }",
"public void connect(View v) {\n turnOn(v);\n startActivity(new Intent(Settings.ACTION_BLUETOOTH_SETTINGS));\n Toast.makeText(getApplicationContext(), \"Select device\", Toast.LENGTH_LONG).show();\n System.err.println(bluetoothAdapter.getBondedDevices());\n }",
"void onRestoreDevices() {\n synchronized (mConnectedDevices) {\n for (int i = 0; i < mConnectedDevices.size(); i++) {\n DeviceInfo di = mConnectedDevices.valueAt(i);\n AudioSystem.setDeviceConnectionState(\n di.mDeviceType,\n AudioSystem.DEVICE_STATE_AVAILABLE,\n di.mDeviceAddress,\n di.mDeviceName,\n di.mDeviceCodecFormat);\n }\n }\n }",
"private void createAct(){\n\t\ttry{\n\t\t\tthis.mPairedDevicesArrayAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1);\n\t\t\tthis.mNewDevicesArrayAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1);\n\t\t\tfinal ListView pairedListView = (ListView) this.findViewById(R.id.pairedDevicesLV);\n\t\t\tpairedListView.setAdapter(this.mPairedDevicesArrayAdapter);\n\t\t\tpairedListView.setOnItemClickListener(this.mDeviceClickListener);\n\n\t\t\tfinal ListView newDevicesListView = (ListView) this.findViewById(R.id.detectedDevicesLV);\n\t\t\tnewDevicesListView.setAdapter(this.mNewDevicesArrayAdapter);\n\t\t\tnewDevicesListView.setOnItemClickListener(this.mDeviceClickListener);\n\n\t\t\tmReceiver = new BroadcastReceiver() {\n\t\t\t public void onReceive(Context context, Intent intent) {\n\t\t\t String action = intent.getAction();\n\t\t\t \n\t\t\t if (action.equals(BluetoothDevice.ACTION_FOUND)) {\n\t\t\t \t//Wenn ein neues Bluetooth Geraet gefunden wurde\n\t\t\t\t\t\tfinal BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);\n\t\t\t\t\t\tif (device.getBondState() != BluetoothDevice.BOND_BONDED) {\n\t\t\t\t\t\t\tVisitMultiplayerGame.this.mNewDevicesArrayAdapter.add(device.getName() + \"\\n\" + device.getAddress());\n\t\t\t\t\t\t\tbt.addPairedDevice(device);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (action.equals(BluetoothAdapter.ACTION_DISCOVERY_FINISHED)) {\n\t\t\t\t\t\t//Wenn die Suche nach neuen Geraeten abgeschlossen wurde\n\t\t\t\t\t\tVisitMultiplayerGame.this.setProgressBarIndeterminateVisibility(false);\n\t\t\t\t\t\tif (VisitMultiplayerGame.this.mNewDevicesArrayAdapter.getCount() == 0) {\n\t\t\t\t\t\t\tVisitMultiplayerGame.this.mNewDevicesArrayAdapter.add(getString(R.string.NoDevicesFound));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstatus.setText(getString(R.string.PleaseSelectADevice));\n\t\t\t\t\t\tprogress.dismiss();\n\t\t\t\t\t}\n\t\t\t }\n\t\t\t};\n\t\t\t\n\t\t\t//Event Handler registrieren, wenn Geraet gefunden wurde\n\t\t\tIntentFilter filter = new IntentFilter(BluetoothDevice.ACTION_FOUND);\n\t\t\tthis.registerReceiver(this.mReceiver, filter);\n\n\t\t\t//Event Handler registrieren, wenn Suche beendet wurde gefunden wurde\n\t\t\tfilter = new IntentFilter(BluetoothAdapter.ACTION_DISCOVERY_FINISHED);\n\t\t\tthis.registerReceiver(this.mReceiver, filter);\n\t\t\t\n\t\t\t// Get a set of currently paired devices\n\t\t\tfinal Set<BluetoothDevice> pairedDevices = bt.getPairedDevices();\n\t\t\tif (pairedDevices.size() > 0) {\n\t\t\t\tthis.findViewById(R.id.pairedDevicesLV).setVisibility(View.VISIBLE);\n\t\t\t\tfor (final BluetoothDevice device : pairedDevices) {\n\t\t\t\t\tthis.mPairedDevicesArrayAdapter.add(device.getName() + \"\\n\" + device.getAddress());\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis.mPairedDevicesArrayAdapter.add(getString(R.string.NoPairedDevices));\n\t\t\t}\n\t\t}\n\t\tcatch(Exception ex){\n\t\t\tex.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tbt.getPairedDevices();\n\t\tbt.discoverDevices();\n\t\t\n\t\tprogress = new ProgressDialog(this);\n\t\tprogress.setMessage(getString(R.string.SearchingForNewDevices));\n\t\tprogress.setIndeterminate(true);\n\t\tprogress.show();\n\t}",
"private void enableBT() {\n if (bluetoothAdapter == null) {\n Log.e(LOG_TAG, \"Bluetooth is not supported\");\n } else if (!bluetoothAdapter.isEnabled()) {\n bluetoothAdapter.enable();\n }\n }",
"@Override\n public void run() {\n for (ListIterator<BtDeviceObject> btDeviceListIterator = mBtDeviceObjectList.listIterator(); btDeviceListIterator.hasNext();) {\n BtDeviceObject btDeviceObject = btDeviceListIterator.next();\n if(new Date().getTime() - btDeviceObject.timeSinceLastUpdate > 2000){\n btDeviceListIterator.remove();\n mBtDeviceAddress.remove(btDeviceObject.bluetoothDevice.getMacAddress());\n mDeviceListAdapter.notifyDataSetChanged();\n }\n }\n\n mCheckIfBtDeviceTimerExpiredHandler.postDelayed(this, 500);\n }",
"public void onClickStart(View view) {\n\n HashMap<String, UsbDevice> usbDevices = usbManager.getDeviceList();\n if (!usbDevices.isEmpty()) {\n boolean keep = true;\n for (Map.Entry<String, UsbDevice> entry : usbDevices.entrySet()) {\n device = entry.getValue();\n int deviceVID = device.getVendorId();\n if (deviceVID == 0x2341)//Arduino Vendor ID\n {\n PendingIntent pi = PendingIntent.getBroadcast(this, 0, new Intent(ACTION_USB_PERMISSION), 0);\n usbManager.requestPermission(device, pi);\n keep = false;\n } else {\n connection = null;\n device = null;\n }\n\n if (!keep)\n break;\n }\n }\n\n\n }",
"public void deviceDiscovered(RemoteDevice btDevice, DeviceClass cod) {\n // add the device to the vector\n if (!vecDevices.contains(btDevice)) {\n vecDevices.addElement(btDevice);\n }\n }",
"public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_bluetooth_handler);\n final Button back=(Button) findViewById(R.id.button_back);\n bluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\n checkBTState();\n\n try {\n serverSocket=bluetoothAdapter.listenUsingInsecureRfcommWithServiceRecord(label, MY_UUID);\n } catch (IOException e){}\n\n try{\n bluetoothSocket=serverSocket.accept();\n }catch (IOException e) {}\n\n try{\n outputStream=MainActivity1.bluetoothSocket.getOutputStream();\n }catch (IOException e){\n Log.d(MainActivity1.label,\"Output stream connection failed.\");\n }\n\n receiver=new BroadcastReceiver() {\n @Override\n public void onReceive(Context context, Intent intent)\n {\n String a=intent.getAction();\n\n if(BluetoothDevice.ACTION_FOUND.equals(a))\n {\n BluetoothDevice device=intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);\n\n bluetoothItems.add(device.getName());\n }\n }\n };\n IntentFilter filter=new IntentFilter(BluetoothDevice.ACTION_FOUND);\n registerReceiver(receiver, filter);\n\n //searching();\n\n ListView bluetoothList=(ListView) findViewById(R.id.listView_bluetoothItems);\n\n bluetoothList.setAdapter(new ArrayAdapter<String>(this,R.layout.abc_list_menu_item_layout));\n\n back.setOnClickListener(new OnClickListener() {\n @Override\n public void onClick(View v) {\n startActivity(new Intent(getApplicationContext(), ControllerHomeScreen.class));\n }\n });\n }",
"public boolean mBT_PickDevice2(){ //Will change sRemoteDeviceName\n if (oBTadapter==null) return false;\n bDevicePickerActive=true;\n oBTadapter.startDiscovery();\n {\n Intent intent = new Intent(\"android.bluetooth.devicepicker.action.LAUNCH\");\n mContext.startActivity(intent); //startActivityForResult\n }\n mSleep(1000);\n return true;\n }",
"public void DiscoverUsb(View view) {\n \t// Initiate variables\n \tString UsbList = \"Detailed Device List:\\n\";\n \tArrayAdapter<String> connectedDevicesAdapter;\n \tconnectedDevicesAdapter = new ArrayAdapter<String>(getApplicationContext(), android.R.layout.simple_spinner_dropdown_item, android.R.id.text1) ;\n \tString VendorName = \"Dummy\";\n \tString ProductName = \"Dummy\";\n \t// Do something in response to button\n \t\n // Retrieve the text view\n TextView textView = (TextView) findViewById(R.id.usb_list_view);\n\n \n // Retrieve the UsbManager service with its message\n UsbManager manager = (UsbManager) getSystemService(Context.USB_SERVICE);\n\n HashMap<String, UsbDevice> deviceList = manager.getDeviceList();\n Iterator<UsbDevice> deviceIterator = deviceList.values().iterator();\n while(deviceIterator.hasNext()){\n UsbDevice device = deviceIterator.next();\n \n UsbList=UsbList.concat(\"Device Name:\\n\"+device.getDeviceName()+\"\\n\") ;\n UsbList=UsbList.concat(\"VendorId:\"+Integer.toHexString(device.getVendorId())+\"\\t\"+\"ProductId:\"+Integer.toHexString(device.getProductId())+\"\\n\") ;\n\n UsbList=UsbList.concat(\"VendorId:\"+device.getVendorId()+\"\\t\"+\"ProductId:\"+device.getProductId()+\"\\n\") ;\n\n\n UsbList=UsbList.concat(\"Device Class:\"+Integer.toHexString(device.getDeviceClass())+\"\\t\"+\"subClass:\"+device.getDeviceSubclass()+\"\\n\") ;\n UsbList=UsbList.concat(\"DeviceId:\"+device.getDeviceId()+\"\\t\"+\"InterfaceCount:\"+device.getInterfaceCount()+\"\\n\") ;\n \n int Vid = device.getVendorId();\n \n test();\n \n switch (Vid) {\n case 2372:\n \tVendorName = \"KORG, Inc.\";\n \tProductName = \"nanoKONTROL studio controller\";\n \tbreak;\t\n case 2235:\n \tVendorName = \"Texas Instruments Japan\";\n \tProductName = \"PCM2900 Audio Codec\";\n \tbreak;\n default:\n\t\t\t\t// do nothing.\n\t\t\t\tbreak;\t\n }\n \n UsbList=UsbList.concat(VendorName+\"\\n\"+ProductName+\"\\n\") ;\n \n connectedDevicesAdapter.add(VendorName+\"\\t\"+ProductName);\n UsbList=UsbList.concat(\"\\n\");\n }\n textView.setText(UsbList);\n \n\t\tSpinner UsbListSpinner = (Spinner) findViewById(R.id.usb_list_spinner); \n\t\t\n\t\t\n\t\t\n\t\tUsbListSpinner.setAdapter(connectedDevicesAdapter);\n \n }",
"public void deviceDiscovered(RemoteDevice btDevice, DeviceClass cod) {\n devicesDiscovered.addElement(btDevice);\n }",
"@Override\n public void checkBluetoothInteface() {\n if (!isConnected) {\n checkForBluetooth();\n }\n }",
"public void ConnectUsb(View view) {\n \tSpinner UsbListSpinner = (Spinner) findViewById(R.id.usb_list_spinner);\n \tString VendorName = \"Dummy\";\n \tString ProductName = \"Dummy\";\n \tTextView textView = (TextView) findViewById(R.id.usb_list_view);\n \tString UsbList = (String) textView.getText();\n // Retrieve the UsbManager service with its message\n UsbManager manager = (UsbManager) getSystemService(Context.USB_SERVICE);\n PendingIntent mPermissionIntent = PendingIntent.getBroadcast(this, 0, new Intent(ACTION_USB_PERMISSION), 0);\n\n HashMap<String, UsbDevice> deviceList = manager.getDeviceList();\n Iterator<UsbDevice> deviceIterator = deviceList.values().iterator();\n while(deviceIterator.hasNext()){\n UsbDevice device = deviceIterator.next();\n String SelectedText = String.valueOf(UsbListSpinner.getSelectedItem());\n int Vid = device.getVendorId();\n \n \n switch (Vid) {\n case 2372:\n \tVendorName = \"KORG, Inc.\";\n \tProductName = \"nanoKONTROL studio controller\";\n \tbreak;\t\n case 2235:\n \tVendorName = \"Texas Instruments Japan\";\n \tProductName = \"PCM2900 Audio Codec\";\n \tbreak;\n default:\n\t\t\t\t// do nothing.\n\t\t\t\tbreak;\t\n }\n \n String IteratorText = VendorName+\"\\t\"+ProductName;\n// UsbList=UsbList.concat(\"\\n Selected:\" + SelectedText);\n// UsbList=UsbList.concat(\"\\n Device:\" + IteratorText);\n if(SelectedText.equalsIgnoreCase(IteratorText)){\n \tmanager.requestPermission(device, mPermissionIntent);\n// \tToast.makeText(view.getContext(), \n// \t\t\t\"OnItemSelectedListener : \" + String.valueOf(device.getDeviceName()),\n// \t\t\tToast.LENGTH_SHORT).show();\n }\n }\n textView.setText(UsbList);\n }",
"@Override\n public void onClick(View v)\n {\n if (!mBluetoothAdapter.isEnabled()) {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\n }\n\n if (clicked) {\n registerDevicesBtn.setText(\"Register Devices\");\n clicked = false;\n mBluetoothAdapter.cancelDiscovery();\n Log.d(\"BT\", \"Cancelled task.\");\n } else {\n registerDevicesBtn.setText(\"Stop Registering Devices\");\n clicked = true;\n devices = new ArrayList<>();\n mBluetoothAdapter.startDiscovery();\n Log.d(\"BT\", \"Started task.\");\n }\n }",
"void replaceDevices(Set<String> devices) {\n availableDevices = devices;\n resetSelectedDevice();\n }",
"void addDeviceComplete(boolean hasOtherDevices);",
"private void turnOnBT() {\n\t\tIntent intent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n\t\tstartActivityForResult(intent, 1);\n\t}",
"private void setupBluetooth() throws NullPointerException{\n if( Utils.isOS( Utils.OS.ANDROID ) ){\n \t\n // Gets bluetooth hardware from phone and makes sure that it is\n // non-null;\n BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();\n \n // If bluetooth hardware does not exist...\n if (adapter == null) {\n Log.d(TAG, \"BluetoothAdapter is is null\");\n throw new NullPointerException(\"BluetoothAdapter is null\");\n } else {\n Log.d(TAG, \"BluetoothAdapter is is non-null\");\n }\n \n bluetoothName = adapter.getName();\n \n //TODO: restart bluetooth?\n \t\n try {\n bluetoothConnectionThreads.add( new ServerThread(adapter, router, uuid) );\n } catch (NullPointerException e) {\n throw e;\n }\n if (Constants.DEBUG)\n Log.d(TAG, \"Sever Thread Created\");\n // Create a new clientThread\n bluetoothConnectionThreads.add( new ClientThread(adapter, router, uuid) );\n if (Constants.DEBUG)\n Log.d(TAG, \"Client Thread Created\");\n }\n else if( Utils.isOS( Utils.OS.WINDOWS ) ){\n //TODO: implement this\n }\n else if( Utils.isOS( Utils.OS.LINUX ) ){\n //TODO: implement this\n }\n else if( Utils.isOS( Utils.OS.OSX ) ){\n //TODO: implement this\n }\n else{\n //TODO: throw exception?\n }\n \n }",
"public void bluetooth_setup_client()\r\n {\n\r\n\t\tIntentFilter filter = new IntentFilter();\r\n\t\tfilter.addAction(BluetoothDevice.ACTION_FOUND);\r\n\t\tfilter.addAction(BluetoothAdapter.ACTION_DISCOVERY_FINISHED);\r\n\t\tif(client_receiver != null) {\r\n\t\t\tLoaderActivity.m_Activity.unregisterReceiver(client_receiver);\r\n\t\t}\r\n\t\tclient_receiver = new Bluetooth_Device_Found_Revicer();\r\n\t\tLoaderActivity.m_Activity.registerReceiver(client_receiver, filter);\r\n\t\tbluetooth_adapter.startDiscovery();\r\n\t\tmessages.clear();\r\n }",
"private void getDevice(){\n\t\tdialog.setContentView(R.layout.device_list_popup);\n\t\tdialog.setCancelable(true);\n\t\tdialog.setTitle(\"Paired Bluetooth Devices\");\n\t\tdialog.show();\n\t\tProgressBar tempSpinner = (ProgressBar)dialog.findViewById(R.id.progressBar);\n\t\ttempSpinner.setVisibility(View.INVISIBLE); //Hide the progress bar while we aren't connecting\n\n\t\tListView lv = (ListView) dialog.findViewById(R.id.device_list_display);\n\t\tlv.setAdapter(new ArrayAdapter<String> (this, R.layout.device_list_popup));\n\n\t\tlv.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n\t\t\tpublic void onItemClick(AdapterView<?> arg, View view, int position, long id) {\n\t\t\t\tString address = (String) ((TextView) view).getText();\n\t\t\t\tfor (String temp : address.split(\"\\n\")) {\n\t\t\t\t\taddress = temp; //Only get address, discard name\n\t\t\t\t}\n\t\t\t\tBluetoothDevice device = BluetoothAdapter.getDefaultAdapter().getRemoteDevice(address);\n\t\t\t\tnew ConnectTask().execute(device);\n\t\t\t}\n\t\t});\n\t}",
"public void onStart(){ \r\n\t\t//ensure bluetooth is enabled \r\n\t\tensureBluetoothIsEnabled();\r\n\t\tsuper.onStart(); \t\r\n\t}",
"public void discoveryFinished(ArrayList<Device> wifiDevices, ArrayList<Device> bluetoothDevices) {\n if (willUpdateDeviceList) {\n this.wifiDevices = wifiDevices;\n this.bluetoothDevices = bluetoothDevices;\n if (combinedDeviceList.size() > 0)\n combinedDeviceList.clear();\n combinedDeviceList.addAll(this.bluetoothDevices);\n combinedDeviceList.addAll(this.wifiDevices);\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n deviceListAdapter.notifyDataSetChanged();\n }\n });\n if (!rssiRecorded) {\n if (Constants.EXP_NO == Constants.MAX_NO_OF_EXPS) {\n showToast(\"rssi recorded\", 1);\n Constants.EXP_NO = 0;\n rssiRecorded = true;\n writeResult(null, Constants.RSSI, Constants.BLUETOOTH_DEVICE);\n }\n else {\n rssiDevices.addAll(this.bluetoothDevices);\n Constants.EXP_NO++;\n }\n }\n }\n }",
"private void getDevices(){\n progress.setVisibility(View.VISIBLE);\n\n emptyMessage.setVisibility(View.GONE);\n getListView().setVisibility(View.GONE);\n\n // request device list from the server\n Model.PerformRESTCallTask gd = Model.asynchRequest(this,\n getString(R.string.rest_url) + \"?\"\n + \"authentification_key=\" + MainActivity.authentificationKey + \"&operation=\" + \"getdevices\",\n //Model.GET,\n \"getDevices\");\n tasks.put(\"getDevices\", gd);\n }",
"public void bluetooth_enable_discoverability()\r\n {\n\t\t\r\n Intent discoverableIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE);\r\n\t\tdiscoverableIntent.putExtra(BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION, 300);\r\n\t\tLoaderActivity.m_Activity.startActivity(discoverableIntent);\r\n\t\tserver_connect_thread = new Server_Connect_Thread();\r\n\t\tserver_connect_thread.start();\r\n\t\tmessages.clear();\r\n }",
"private void deviceUpdated() {\n if (!mIsCreate) {\n mSyncthingService.getApi().editDevice(mDevice, getActivity(), this);\n }\n }",
"private void resetBluetooth() {\n if (mBtAdapter != null) {\n mBtAdapter.disable();\n mHandler.postDelayed(new Runnable() {\n\n @Override\n public void run() {\n checkEnableBt();\n }\n }, 200);\n\n }\n }",
"private void onDeviceList(RequestDeviceList r){\n\t\t//Answer the request with the list of devices from the group\n\t\tgetSender().tell(new ReplyDeviceList(r.requestId, deviceActors.keySet()), getSelf());\n\t}",
"private void initBluetooth() {\n IntentFilter filter = new IntentFilter(BluetoothDevice.ACTION_FOUND);\n this.registerReceiver(mReceiver, filter);\n\n // Register for broadcasts when discovery has finished\n filter = new IntentFilter(BluetoothAdapter.ACTION_DISCOVERY_FINISHED);\n this.registerReceiver(mReceiver, filter);\n\n // Get the local Bluetooth adapter\n mBtAdapter = BluetoothAdapter.getDefaultAdapter();\n\n // Get a set of currently paired devices\n Set<BluetoothDevice> pairedDevices = mBtAdapter.getBondedDevices();\n\n // Initialize the BluetoothChatService to perform bluetooth connections\n mChatService = new BluetoothChatService(this, mHandler);\n }",
"@Override\n public void onConnectionStateChange(BluetoothGatt gatt, int status,\n int newState) {\n Log.i(\"onConnectionStateChange\", \"The connection status has changed. status:\" + status + \" newState:\" + newState + \"\");\n try {\n if(status == BluetoothGatt.GATT_SUCCESS) {\n switch (newState) {\n // Has been connected to the device\n case BluetoothProfile.STATE_CONNECTED:\n Log.i(\"onConnectionStateChange\", \"Has been connected to the device\");\n if(_ConnectionStatus == ConnectionStatus.Connecting) {\n _ConnectionStatus = ConnectionStatus.Connected;\n try {\n if (_PeripheryBluetoothServiceCallBack != null)\n _PeripheryBluetoothServiceCallBack.OnConnected();\n if (gatt.getDevice().getBondState() == BluetoothDevice.BOND_BONDED){\n //Url : https://github.com/NordicSemiconductor/Android-DFU-Library/blob/release/dfu/src/main/java/no/nordicsemi/android/dfu/DfuBaseService.java\n Log.i(\"onConnectionStateChange\",\"Waiting 1600 ms for a possible Service Changed indication...\");\n // Connection successfully sleep 1600ms, the connection success rate will increase\n Thread.sleep(1600);\n }\n } catch (Exception e){}\n // Discover service\n gatt.discoverServices();\n }\n break;\n // The connection has been disconnected\n case BluetoothProfile.STATE_DISCONNECTED:\n Log.i(\"onConnectionStateChange\", \"The connection has been disconnected\");\n if(_ConnectionStatus == ConnectionStatus.Connected) {\n if (_PeripheryBluetoothServiceCallBack != null)\n _PeripheryBluetoothServiceCallBack.OnDisConnected();\n }\n Close();\n _ConnectionStatus = ConnectionStatus.DisConnected;\n break;\n /*case BluetoothProfile.STATE_CONNECTING:\n Log.i(\"onConnectionStateChange\", \"Connecting ...\");\n _ConnectionStatus = ConnectionStatus.Connecting;\n break;\n case BluetoothProfile.STATE_DISCONNECTING:\n Log.i(\"onConnectionStateChange\", \"Disconnecting ...\");\n _ConnectionStatus = ConnectionStatus.DisConnecting;\n break;*/\n default:\n Log.e(\"onConnectionStateChange\", \"newState:\" + newState);\n break;\n }\n }else {\n Log.i(\"onConnectionStateChange\", \"GATT error\");\n Close();\n if(_ConnectionStatus == ConnectionStatus.Connecting\n && _Timeout - (new Date().getTime() - _ConnectStartTime.getTime()) > 0) {\n Log.i(\"Connect\", \"Gatt Error! Try to reconnect (\"+_ConnectIndex+\")...\");\n _ConnectionStatus = ConnectionStatus.DisConnected;\n Connect(); // Connect\n }else {\n _ConnectionStatus = ConnectionStatus.DisConnected;\n if (_PeripheryBluetoothServiceCallBack != null)\n _PeripheryBluetoothServiceCallBack.OnDisConnected();\n }\n }\n }catch (Exception ex){\n Log.e(\"onConnectionStateChange\", ex.toString());\n }\n super.onConnectionStateChange(gatt, status, newState);\n }",
"private void searchDeviceOrOpenBluetooth() {\n if (!BtUtil.isOpen(bluetoothAdapter)) {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, OPEN_BLUETOOTH_REQUEST);\n } else {\n BtUtil.searchDevices(bluetoothAdapter);\n }\n }",
"public void onResume(){\r\n\t\t//necessary if bluetooth-enabling-dialog appears \r\n\t\taddPairedDevices();\r\n\t\tsuper.onResume();\r\n\t}",
"public void updateList()\r\n\t{\r\n\t\tclientQueue.offer(name);\r\n\t}",
"public void reloadSoundDevices();",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_recorder);\n\n //points = new ArrayList<TGEegPower>();\n //db = new frequencyTable(this);\n //Bundle extras = getIntent().getExtras();\n //thought = extras.getString(\"thought\");\n //current = new EEGPoint(thought);\n\n assignVariables();\n btSelect.setChecked(false);\n\n if (mBluetoothAdapter == null) {\n // Device does not support Bluetooth\n btSelect.setClickable(false);\n pairedIndicator.setText(\"Bluetooth not supported.\");\n\n }\n\n else{\n btSelect.setChecked(true);\n tgDevice = new TGDevice(mBluetoothAdapter, handler);\n Toast.makeText(getApplicationContext(), \"The handler shit is done...\",Toast.LENGTH_SHORT).show();\n\n list = new ArrayList<>(); //The '<>' indicates String. No need of explicit declaration, it seems.\n\n pairedDevices = mBluetoothAdapter.getBondedDevices();\n\n if (pairedDevices.size() > 0)\n {\n for (BluetoothDevice device : pairedDevices)\n {\n list.add(device.getName() + \",\" + device.getAddress());\n if(device.getName().startsWith(\"Mind\")){\n pairedIndicator.setText(\"MindWave Mobile is paired.\");\n pairedFlag=1;\n }\n }\n\n if(pairedFlag==0){\n pairedIndicator.setText(\"MindWave Mobile is not paired.\");\n }\n }\n\n /*\n if (mBluetoothAdapter.isEnabled()) {\n btSelect.setChecked(true);\n tgDevice = new TGDevice(mBluetoothAdapter, handler);\n Toast.makeText(getApplicationContext(), \"The handler shit is done...\",Toast.LENGTH_SHORT).show();\n }*/\n\n if(tgDevice.getState() != TGDevice.STATE_CONNECTING && tgDevice.getState() != TGDevice.STATE_CONNECTED)\n tgDevice.connect(rawEnabled);\n\n\n\n btSelect.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {\n @Override\n public void onCheckedChanged(CompoundButton buttonView,boolean isChecked){\n\n if(isChecked){\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\n }\n\n else{\n mBluetoothAdapter.disable();\n }\n\n }\n });\n\n recordNow.setOnClickListener(\n new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n // get an image from the camera\n if (mBluetoothAdapter.isEnabled()) {\n\n }\n }\n }\n );\n }\n }",
"private void displayGattServices(List<BluetoothGattService> gattServices) {\n if (gattServices == null) return;\n String uuid = null;\n String unknownServiceString = getResources().getString(R.string.unknown_service);\n String unknownCharaString = getResources().getString(R.string.unknown_characteristic);\n ArrayList<HashMap<String, String>> gattServiceData = new ArrayList<HashMap<String, String>>();\n ArrayList<ArrayList<HashMap<String, String>>> gattCharacteristicData\n = new ArrayList<ArrayList<HashMap<String, String>>>();\n mGattCharacteristics = new ArrayList<ArrayList<BluetoothGattCharacteristic>>();\n\n // final String action = intent.getAction();\n // if (BluetoothLeService.ACTION_GATT_SERVICES_DISCOVERED\n // .equals(action)) {\n // Logger.e(\"Service discovered\");\n // if(mTimer!=null)\n // mTimer.cancel();\n // prepareGattServices(BluetoothLeService.getSupportedGattServices());\n\n /*\n / Changes the MTU size to 512 in case LOLLIPOP and above devices\n */\n // if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n // BluetoothLeService.exchangeGattMtu(512);\n // }\n // } //else if (BluetoothLeService.ACTION_GATT_SERVICE_DISCOVERY_UNSUCCESSFUL\n // .equals(action)) {\n // mProgressDialog.dismiss();\n // if(mTimer!=null)\n // mTimer.cancel();\n // showNoServiceDiscoverAlert();\n // }\n // Loops through available GATT Services.\n for (BluetoothGattService gattService : gattServices) {\n HashMap<String, String> currentServiceData = new HashMap<String, String>();\n uuid = gattService.getUuid().toString();\n currentServiceData.put(LIST_NAME,SampleGattAttributes.lookup(uuid, unknownServiceString));\n currentServiceData.put(LIST_UUID, uuid);\n gattServiceData.add(currentServiceData);\n\n ArrayList<HashMap<String, String>> gattCharacteristicGroupData =\n new ArrayList<HashMap<String, String>>();\n List<BluetoothGattCharacteristic> gattCharacteristics =\n gattService.getCharacteristics();\n ArrayList<BluetoothGattCharacteristic> charas =\n new ArrayList<BluetoothGattCharacteristic>();\n\n if (uuid.equals(SampleGattAttributes.SERVER_UART)) {\n for (BluetoothGattCharacteristic gattCharacteristic : gattCharacteristics) {\n String uuidchara = gattCharacteristic.getUuid().toString();\n mReadCharacteristic = gattCharacteristic;\n if (uuidchara.equalsIgnoreCase(SampleGattAttributes.SERVER_UART_tx)) {\n Log.e(TAG,\"gatt- \"+gattCharacteristic);\n mNotifyCharacteristic = gattCharacteristic;\n prepareBroadcastDataNotify(mNotifyCharacteristic);\n }\n }\n }\n // Loops through available Characteristics.\n for (BluetoothGattCharacteristic gattCharacteristic : gattCharacteristics) {\n charas.add(gattCharacteristic);\n HashMap<String, String> currentCharaData = new HashMap<String, String>();\n uuid = gattCharacteristic.getUuid().toString();\n currentCharaData.put(LIST_NAME, SampleGattAttributes.lookup(uuid, unknownCharaString));\n currentCharaData.put(LIST_UUID, uuid);\n gattCharacteristicGroupData.add(currentCharaData);\n\n }\n mGattCharacteristics.add(charas);\n gattCharacteristicData.add(gattCharacteristicGroupData);\n }\n }",
"protected void connectBluetooth(int i) {\n Intent intent = new Intent(this, MainActivity.class);\n // Try top 3 devices\n ArrayList<BluetoothDevice> devices = new ArrayList<>();\n// for (int i = 0; i < mScanResults.size() && i < 3; i++) {\n ScanInfo info = mScanResults.get(i);\n devices.add(mBtAdapter.getRemoteDevice(info.address)); //getRemoteDevice()返回相应的被指定蓝牙连接的远端设备。\n// }\n intent.putParcelableArrayListExtra(BluetoothDevice.EXTRA_DEVICE, devices);\n Log.i(TAG, \"Devices : \" + intent.putParcelableArrayListExtra(BluetoothDevice.EXTRA_DEVICE, devices));\n\n this.startActivity(intent);\n }",
"private void ensureBluetoothEnabled() {\n if (!mBluetoothAdapter.isEnabled()) {\n Intent enableBtIntent = new Intent(\n BluetoothAdapter.ACTION_REQUEST_ENABLE);\n main.startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\n } else {\n connectToBluetoothDevice(\"00:06:66:64:42:97\"); // Hard coded MAC of the BT-device.\n Log.i(tag, \"Connected to device!\");\n }\n }",
"public void connect_bt(String deviceAddress) {\n Intent intent = new Intent(\"OBDStatus\");\n intent.putExtra(\"message\", \"Trying to connect with device\");\n context.sendBroadcast(intent);\n disconnect();\n BluetoothAdapter btAdapter = BluetoothAdapter.getDefaultAdapter();\n btAdapter.cancelDiscovery();\n if (deviceAddress == null || deviceAddress.isEmpty()) {\n intent.putExtra(\"message\", \"Device not found\");\n context.sendBroadcast(intent);\n return;\n }\n\n if (!btAdapter.isEnabled()) {\n intent.putExtra(\"message\", \"Bluetooth is disabled\");\n context.sendBroadcast(intent);\n return;\n }\n\n BluetoothDevice device = btAdapter.getRemoteDevice(deviceAddress);\n\n UUID uuid = UUID.fromString(\"00001101-0000-1000-8000-00805F9B34FB\");\n\n try {\n socket = device.createInsecureRfcommSocketToServiceRecord(uuid);\n socket.connect();\n isConnected = true;\n intent.putExtra(\"message\", \"OBD connected\");\n context.sendBroadcast(intent);\n } catch (IOException e) {\n Log.e(\"gping2\", \"There was an error while establishing Bluetooth connection. Falling back..\", e);\n Class<?> clazz = socket.getRemoteDevice().getClass();\n Class<?>[] paramTypes = new Class<?>[]{Integer.TYPE};\n BluetoothSocket sockFallback = null;\n try {\n Method m = clazz.getMethod(\"createInsecureRfcommSocket\", paramTypes);\n Object[] params = new Object[]{Integer.valueOf(1)};\n sockFallback = (BluetoothSocket) m.invoke(socket.getRemoteDevice(), params);\n sockFallback.connect();\n isConnected = true;\n socket = sockFallback;\n intent.putExtra(\"message\", \"OBD connected\");\n context.sendBroadcast(intent);\n } catch (Exception e2) {\n intent.putExtra(\"message\", \"OBD Connection error\");\n context.sendBroadcast(intent);\n Log.e(\"gping2\", \"BT connect error\");\n }\n }\n this.deviceAddress = deviceAddress;\n saveNewAddress();\n }",
"static void toggle(Context context) {\n Log.i(TAG, \"toggle Bluetooth\");\n\n // Just toggle Bluetooth power, as long as we're not already in\n // an intermediate state.\n BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();\n int state = adapter.getState();\n if (state == BluetoothAdapter.STATE_OFF)\n adapter.enable();\n else if (state == BluetoothAdapter.STATE_ON)\n adapter.disable();\n }",
"public void setTargetDevicesToCombo(Combo combo, DialogModel dialogModel,\n\t\t\tint cache, boolean addHardwareDevices) throws Exception, IOException {\n\n\t\tif (addHardwareDevices) {\n\t\t\tConnectionPropertyValue connectionPropertyValue = StartUp\n\t\t\t\t\t.getConnectionProperties();\n\t\t\tString host = connectionPropertyValue.getHost();\n\t\t\tboolean needToUpdate = false;\n\t\n\t\t\tif (cache == 0) {\n\t\t\t\tneedToUpdate = true;\n\t\t\t} else {\n\t\t\t\tcache = cache * 60000;\n\t\t\t\tif (StartUp.lastLoadTime == 0\n\t\t\t\t\t\t|| ((StartUp.lastLoadTime + cache) < System\n\t\t\t\t\t\t\t\t.currentTimeMillis())) {\n\t\t\t\t\tneedToUpdate = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (dialogModel.getTargetDeviceList() == null || needToUpdate) {\n\t\t\t\ttry {\n\t\t\t\t\tdialogModel.setTargetDeviceList(getTargetDevices(dialogModel, cache));\n\t\t\t\t} catch (Exception ex) {\n\t\t\t\t\tLogExceptionHandler.log(ex.getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (dialogModel.getTargetDeviceList() != null\n\t\t\t\t\t&& !dialogModel.getTargetDeviceList().isEmpty()) {\n\n\t\t\t\tIterator<TargetDeviceValue> iterator = dialogModel\n\t\t\t\t\t\t.getTargetDeviceList().iterator();\n\t\t\t\twhile (iterator.hasNext()) {\n\t\t\t\t\tTargetDeviceValue targetDeviceValue = (TargetDeviceValue) iterator\n\t\t\t\t\t\t\t.next();\n\n\t\t\t\t\tString hostname = makeHostPartForComboControl(targetDeviceValue\n\t\t\t\t\t\t\t.getProperties());\n\t\t\t\t\tif (host != null) {\n\t\t\t\t\t\tcombo.add(targetDeviceValue.getAlias() + hostname);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tList<ISymbianSDK> targetEmulatorDevicesList = getTargetEmulatorDevices();\n\t\tif (dialogModel.getTargetEmulatorDeviceList() == null) {\n\t\t\tdialogModel.setTargetEmulatorDeviceList(targetEmulatorDevicesList);\n\t\t}\n\t\t\n\t\tif (dialogModel.getTargetEmulatorDeviceList() != null\n\t\t\t\t&& !dialogModel.getTargetEmulatorDeviceList().isEmpty()) {\n\t\t\tIterator<ISymbianSDK> iterator = dialogModel.getTargetEmulatorDeviceList().iterator();\n\t\t\twhile(iterator.hasNext()) {\n\t\t\t\tISymbianSDK symbianSDK = iterator.next();\n\t\t\t\tcombo.add(symbianSDK.getUniqueId() + EMULATOR_DEVICE_POSTFIX);\n\t\t\t}\n\t\t}\n\t\t\t\n\t\tif ((dialogModel.getTargetDeviceList() != null \n\t\t\t\t&& dialogModel.getTargetDeviceList().isEmpty())\n\t\t\t&& (dialogModel.getTargetEmulatorDeviceList() != null\n\t\t\t\t&& dialogModel.getTargetEmulatorDeviceList().isEmpty())\n\t\t\t|| dialogModel.getTargetDeviceList() == null && dialogModel.getTargetEmulatorDeviceList() == null) {\n\t\t\t// Not found target devices\n\t\t\tthrow new Exception(\n\t\t\t\t\tMessages\n\t\t\t\t\t\t\t.getString(\"DialogContentFactory.didNotFindTargetDeviceListException\")); \n\t\t }\n\t}",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n handler = new Handler();\n scanInfoView = findViewById(R.id.scanInfo);\n\n communicationAdapter = new BluetoothAdapterBlindSwimmers();\n communicationDevice = new BluetoothImp();\n devices = new ArrayList<>();\n\n Button startScanButton = findViewById(R.id.startScanButton);\n startScanButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n devices.clear();\n scanForDevices(true);\n }\n });\n ListView scanListView = findViewById(R.id.scanListView);\n\n arrayAdapter = new DeviceArrayAdapter(this, devices);\n scanListView.setAdapter(arrayAdapter);\n scanListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> arg0, View arg1, int position, long arg3) { onDeviceSelected(position); }\n });\n }",
"private void displayGattServices(List<BluetoothGattService> gattServices) {\n\n if (gattServices == null) return;\n String uuid = null;\n String unknownServiceString = getResources().getString(R.string.unknown_service);\n String unknownCharaString = getResources().getString(R.string.unknown_characteristic);\n ArrayList<HashMap<String, String>> gattServiceData = new ArrayList<HashMap<String, String>>();\n ArrayList<ArrayList<HashMap<String, String>>> gattCharacteristicData\n = new ArrayList<ArrayList<HashMap<String, String>>>();\n mGattCharacteristics = new ArrayList<ArrayList<BluetoothGattCharacteristic>>();\n\n // Loops through available GATT Services.\n for (BluetoothGattService gattService : gattServices) {\n HashMap<String, String> currentServiceData = new HashMap<String, String>();\n uuid = gattService.getUuid().toString();\n currentServiceData.put(\n LIST_NAME, SampleGattAttributes.lookup(uuid, unknownServiceString));\n currentServiceData.put(LIST_UUID, uuid);\n gattServiceData.add(currentServiceData);\n\n ArrayList<HashMap<String, String>> gattCharacteristicGroupData =\n new ArrayList<HashMap<String, String>>();\n List<BluetoothGattCharacteristic> gattCharacteristics =\n gattService.getCharacteristics();\n ArrayList<BluetoothGattCharacteristic> charas =\n new ArrayList<BluetoothGattCharacteristic>();\n\n // Loops through available Characteristics.\n for (BluetoothGattCharacteristic gattCharacteristic : gattCharacteristics) {\n charas.add(gattCharacteristic);\n HashMap<String, String> currentCharaData = new HashMap<String, String>();\n uuid = gattCharacteristic.getUuid().toString();\n currentCharaData.put(\n LIST_NAME, SampleGattAttributes.lookup(uuid, unknownCharaString));\n currentCharaData.put(LIST_UUID, uuid);\n gattCharacteristicGroupData.add(currentCharaData);\n }\n mGattCharacteristics.add(charas);\n gattCharacteristicData.add(gattCharacteristicGroupData);\n }\n System.out.println(\"main device UUID = \" + uuid);\n\n }",
"public List getDevices() {\n return devices;\n }",
"@Override\n protected void onResume() {\n /**\n * Enable Bluetooth if it is not enabled. Create a new list of devices and attach\n * it to the list view so it will be shown; then start scanning for devices.\n */\n super.onResume();\n if(!mBluetoothAdapter.isEnabled()) {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\n }\n\n mLeDeviceListAdapter = new LeDeviceListAdapter();\n mListView.setAdapter((mLeDeviceListAdapter));\n scanLeDevice(true);\n }",
"public BluetoothList(BluetoothDialog dialog, Context context, BluetoothAdapter blAdapter, ArrayList<BluetoothDevice> devices, ArrayList<String> name, ArrayList<String> address) {\n this.bluetoothDialog = dialog;\n this.context = context;\n this.bluetoothDevices = devices;\n this.bluetoothAdapter = blAdapter;\n this.deviceName = name;\n this.deviceAddress = address;\n this.carControllerActivity = new CarControllerActivity();\n }",
"private void checkBTState() {\n\n if (btAdapter == null) {\n Toast.makeText(getBaseContext(), \"Device does not support bluetooth\", Toast.LENGTH_LONG).show();\n } else {\n if (btAdapter.isEnabled()) {\n } else {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, 1);\n }\n }\n }",
"private void displayGattServices(List<BluetoothGattService> gattServices) {\n if (gattServices == null) return;\n String uuid = null;\n String unknownServiceString = getResources().getString(R.string.unknown_service);\n String unknownCharaString = getResources().getString(R.string.unknown_characteristic);\n ArrayList<HashMap<String, String>> gattServiceData = new ArrayList<HashMap<String, String>>();\n ArrayList<ArrayList<HashMap<String, String>>> gattCharacteristicData\n = new ArrayList<ArrayList<HashMap<String, String>>>();\n mGattCharacteristics = new ArrayList<ArrayList<BluetoothGattCharacteristic>>();\n\n // Loops through available GATT Services.\n for (BluetoothGattService gattService : gattServices) {\n HashMap<String, String> currentServiceData = new HashMap<String, String>();\n uuid = gattService.getUuid().toString();\n currentServiceData.put(\n LIST_NAME, SampleGattAttributes.lookup(uuid, unknownServiceString));\n currentServiceData.put(LIST_UUID, uuid);\n gattServiceData.add(currentServiceData);\n\n ArrayList<HashMap<String, String>> gattCharacteristicGroupData =\n new ArrayList<HashMap<String, String>>();\n List<BluetoothGattCharacteristic> gattCharacteristics =\n gattService.getCharacteristics();\n ArrayList<BluetoothGattCharacteristic> charas =\n new ArrayList<BluetoothGattCharacteristic>();\n\n // Loops through available Characteristics.\n for (BluetoothGattCharacteristic gattCharacteristic : gattCharacteristics) {\n charas.add(gattCharacteristic);\n HashMap<String, String> currentCharaData = new HashMap<String, String>();\n uuid = gattCharacteristic.getUuid().toString();\n currentCharaData.put(\n LIST_NAME, SampleGattAttributes.lookup(uuid, unknownCharaString));\n currentCharaData.put(LIST_UUID, uuid);\n gattCharacteristicGroupData.add(currentCharaData);\n //custom code\n if(uuid.equals(\"0000ffe1-0000-1000-8000-00805f9b34fb\") && mNotifyCharacteristic == null) {\n mBluetoothLeService.setCharacteristicNotification(gattCharacteristic, true);\n mNotifyCharacteristic = gattCharacteristic;\n }\n }\n mGattCharacteristics.add(charas);\n gattCharacteristicData.add(gattCharacteristicGroupData);\n }\n }",
"public void initDevices() {\n for (Device device: deviceList) {\n device.init(getCpu().getTime());\n }\n }",
"private void checkBTState() {\n\n if(btAdapter==null) {\n Toast.makeText(getBaseContext(), \"Device does not support bluetooth\", Toast.LENGTH_LONG).show();\n } else {\n if (btAdapter.isEnabled()) {\n } else {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, 1);\n }\n }\n }",
"void addDevice(String device) {\n availableDevices.add(device);\n resetSelectedDevice();\n }",
"@Override\n\t\tpublic void onReceive(Context context, Intent intent) {\n\t\t\tString action = intent.getAction();\n\t\t\tBundle b = intent.getExtras();\n\t\t\tObject[] lstName = b.keySet().toArray();\n\t\t\t\n\t\t\t// 顯示所有收到的資訊及細節\n\t\t\tfor( int i=0; i<lstName.length; i++ ){\n\t\t\t\tString keyName = lstName[i].toString();\n\t\t\t\tLog.e(keyName, String.valueOf(b.get(keyName)));\n\t\t\t}\n\t\t\tBluetoothDevice device = null;\n\t\t\t// 搜尋設備時,取得設備的MAC位址\n\t\t\tif( BluetoothDevice.ACTION_FOUND.equals(action) ){\n\t\t\t\tdevice = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);\n\t\t\t\tString str = device.getName() + \"|\" + device.getAddress();\n\t\t\t\tif( devices.indexOf(str) == -1 ) //防止重複增加\n\t\t\t\t\tdevices.add(str);\n\t\t\t\tBluetoothConnect.adapterdevices.notifyDataSetChanged();\n\t\t\t}\n\t\t\telse if( BluetoothDevice.ACTION_BOND_STATE_CHANGED.equals(action) ){\n\t\t\t\tdevice = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);\n\t\t\t\tswitch( device.getBondState() ){\n\t\t\t\t\tcase BluetoothDevice.BOND_BONDING:\n\t\t\t\t\t\tLog.d(tag, \"正在配對\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase BluetoothDevice.BOND_BONDED:\n\t\t\t\t\t\tLog.d(tag, \"完成配對\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase BluetoothDevice.BOND_NONE:\n\t\t\t\t\t\tLog.d(tag, \"取消配對\");\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"private void CheckBtIsOn() {\n mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\n\n if (!mBluetoothAdapter.isEnabled()) {\n Toast.makeText(getApplicationContext(), \"Bluetooth Disabled!\",\n Toast.LENGTH_SHORT).show();\n\n // Start activity to show bluetooth options\n Intent enableBtIntent = new Intent(mBluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\n }\n }",
"private void connectBluetooth() {\n try {\n if (blueTooth == null && macSet) {\n Log.d(\"lol\", \"macSet connect bluetooootooththoth\");\n blueTooth = new BluetoothConnection(macAddress, this, listener);\n blueTooth.connect();\n }\n } catch (Exception e) {\n Log.d(\"lol\", \"Failed connection: \" + e.getMessage() + \" \" + e.getClass());\n }\n }",
"private void ensureBluetoothIsEnabled(){\r\n\t\t//if Bluetooth is not enabled, enable it now\r\n\t\tif (!mBtAdapter.isEnabled()) { \t\t\r\n \t enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\r\n \t startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\r\n \t}\r\n\t}",
"@Override\n\t\tpublic void onReceive(Context context, Intent intent) {\n\t\t\tString action = intent.getAction();\n\t\t\tBundle b = intent.getExtras();\n\t\t\tObject[] lstName = b.keySet().toArray();\n\t\t\t\n\t //顯示所有收到的資訊及細節\n\t\t\tfor(int i =0; i < lstName.length;i++){\n\t\t\t\tString keyName = lstName[i].toString();\n\t\t\t\tLog.e(keyName,String.valueOf(b.get(keyName)));\n\t\t\t}\n\t\t\tBluetoothDevice device = null;\n\t\t\t//搜尋設備時,取得設備的MAC位址\n\t\t\tif(BluetoothDevice.ACTION_FOUND.equals(action)){\n\t\t\t\tdevice = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);\n\t\t\t\tString str =device.getName()+\"|\"+ device.getAddress();\n\t\t\t\tif(devices.indexOf(str) == -1){\n\t\t\t\t\tdevices.add(str);\n\t\t\t\t}\n\t\t\t\tadapter1.notifyDataSetChanged();\n\t\t\t}else if (BluetoothDevice.ACTION_BOND_STATE_CHANGED.equals(action)) {\n\t\t\t\tdevice = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);\n\t\t\t\tswitch ((device.getBondState())) {\n\t\t\t\tcase BluetoothDevice.BOND_BONDING:\n\t\t\t\t\tLog.d(tag,\"正在配對.....\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase BluetoothDevice.BOND_BONDED:\n\t\t\t\t\tLog.d(tag,\"完成配對\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase BluetoothDevice.BOND_NONE:\n\t\t\t\t\tLog.d(tag,\"取消配對\");\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\t\n\t\t}",
"@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\t\n\t\tswitch (requestCode) {\n\t\tcase REQUEST_ENABLE_BT:\n\t\t\tif(resultCode != RESULT_OK){\n\t\t\t\tToast.makeText(this, \"An error occured while enabling BT.\", Toast.LENGTH_LONG).show();\n\t\t\t\thasBTenabled = false;\n\t\t\t\tfinish();\n\t\t\t}else{\n\t\t\t\tsetupBTService();\n\t\t\t\tupdateBluetoothList();\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\tcase BT_SETTINGS_RESULT:\n\t\t\tupdateBluetoothList();\n\t\t\tbreak;\n\t\t\t\n case REQUEST_CONNECT_DEVICE_SECURE:\n // When DeviceListActivity returns with a device to connect\n if (resultCode == Activity.RESULT_OK) {\n connectDevice(data, true);\n }\n break;\n\t\t}\n\t}",
"private void registrarEventosBluetooth() {\n IntentFilter filtro = new IntentFilter();\n filtro.addAction(BluetoothAdapter.ACTION_STATE_CHANGED);\n filtro.addAction(BluetoothAdapter.ACTION_DISCOVERY_FINISHED);\n filtro.addAction(BluetoothDevice.ACTION_FOUND);\n activity.registerReceiver(bluetoothReceiver, filtro);\n }",
"public abstract List<NADevice> getDevices(Context context);",
"private void btnFindDevicesClicked(Intent intent, int findDeviceRequest)\n {\n if (btAdapter.isEnabled()) startActivityForResult(intent, findDeviceRequest);\n // Else display error until bluetooth is enabled\n else\n {\n Toast.makeText(getApplicationContext(), \"Enable Bluetooth to continue\", Toast.LENGTH_SHORT).show();\n setUpBluetooth();\n }\n }",
"void updateViewToDevice()\n {\n if (!mBeacon.isConnected())\n {\n return;\n }\n\n KBCfgCommon oldCommonCfg = (KBCfgCommon)mBeacon.getConfigruationByType(KBCfgType.KBConfigTypeCommon);\n KBCfgCommon newCommomCfg = new KBCfgCommon();\n KBCfgEddyURL newUrlCfg = new KBCfgEddyURL();\n KBCfgEddyUID newUidCfg = new KBCfgEddyUID();\n try {\n //check if user update advertisement type\n int nAdvType = 0;\n if (mCheckBoxURL.isChecked()){\n nAdvType |= KBAdvType.KBAdvTypeEddyURL;\n }\n if (mCheckboxUID.isChecked()){\n nAdvType |= KBAdvType.KBAdvTypeEddyUID;\n }\n if (mCheckboxTLM.isChecked()){\n nAdvType |= KBAdvType.KBAdvTypeEddyTLM;\n }\n //check if the parameters changed\n if (oldCommonCfg.getAdvType() != nAdvType)\n {\n newCommomCfg.setAdvType(nAdvType);\n }\n\n //adv period, check if user change adv period\n Integer changeTag = (Integer)mEditBeaconAdvPeriod.getTag();\n if (changeTag > 0)\n {\n String strAdvPeriod = mEditBeaconAdvPeriod.getText().toString();\n if (Utils.isPositiveInteger(strAdvPeriod)) {\n Float newAdvPeriod = Float.valueOf(strAdvPeriod);\n newCommomCfg.setAdvPeriod(newAdvPeriod);\n }\n }\n\n //tx power ,\n changeTag = (Integer)mEditBeaconTxPower.getTag();\n if (changeTag > 0)\n {\n String strTxPower = mEditBeaconTxPower.getText().toString();\n Integer newTxPower = Integer.valueOf(strTxPower);\n if (newTxPower > oldCommonCfg.getMaxTxPower() || newTxPower < oldCommonCfg.getMinTxPower()) {\n toastShow(\"tx power not valid\");\n return;\n }\n newCommomCfg.setTxPower(newTxPower);\n }\n\n //device name\n String strDeviceName = mEditBeaconName.getText().toString();\n if (!strDeviceName.equals(oldCommonCfg.getName()) && strDeviceName.length() < KBCfgCommon.MAX_NAME_LENGTH) {\n newCommomCfg.setName(strDeviceName);\n }\n\n //uid config\n if (mCheckboxUID.isChecked())\n {\n KBCfgEddyUID oldUidCfg = (KBCfgEddyUID)mBeacon.getConfigruationByType(KBCfgType.KBConfigTypeEddyUID);\n String strNewNID = mEditEddyNID.getText().toString();\n String strNewSID = mEditEddySID.getText().toString();\n if (!strNewNID.equals(oldUidCfg.getNid()) && KBUtility.isHexString(strNewNID)){\n newUidCfg.setNid(strNewNID);\n }\n\n if (!strNewSID.equals(oldUidCfg.getSid()) && KBUtility.isHexString(strNewSID)){\n newUidCfg.setSid(strNewSID);\n }\n }\n\n //url config\n if (mCheckBoxURL.isChecked())\n {\n KBCfgEddyURL oldUrlCfg = (KBCfgEddyURL)mBeacon.getConfigruationByType(KBCfgType.KBConfigTypeEddyURL);\n String strUrl = mEditEddyURL.getText().toString();\n if (!strUrl.equals(oldUrlCfg.getUrl())){\n newUrlCfg.setUrl(strUrl);\n }\n }\n\n //TLM advertisement interval configuration (optional)\n if (mCheckboxTLM.isChecked()){\n //The default TLM advertisement interval is 10. The KBeacon will send 1 TLM advertisement packet every 10 advertisement packets.\n //newCommomCfg.setTLMAdvInterval(8);\n }\n }catch (KBException excpt)\n {\n toastShow(\"config data is invalid:\" + excpt.errorCode);\n excpt.printStackTrace();\n }\n\n ArrayList<KBCfgBase> cfgList = new ArrayList<>(3);\n cfgList.add(newCommomCfg);\n cfgList.add(newUidCfg);\n cfgList.add(newUrlCfg);\n mDownloadButton.setEnabled(false);\n mBeacon.modifyConfig(cfgList, new KBeacon.ActionCallback() {\n @Override\n public void onActionComplete(boolean bConfigSuccess, KBException error) {\n mDownloadButton.setEnabled(true);\n if (bConfigSuccess)\n {\n clearChangeTag();\n toastShow(\"config data to beacon success\");\n }\n else\n {\n if (error.errorCode == KBException.KBEvtCfgNoParameters)\n {\n toastShow(\"No data need to be config\");\n }\n else\n {\n toastShow(\"config failed for error:\" + error.errorCode);\n }\n }\n }\n });\n }",
"private void updateList() {\r\n\t\ttry {\r\n\t\t\t// Reset the list\r\n\t\t\tcalls.clear();\r\n\r\n\t\t\tif (apiEnabled) {\r\n\t\t \t// Get list of pending sessions\r\n\t\t \tSet<IPCall> currentCalls = callApi.getIPCalls();\r\n\t\t \tcalls = new ArrayList<IPCall>(currentCalls);\r\n\t\t\t\tif (calls.size() > 0){\r\n\t\t\t String[] items = new String[calls.size()]; \r\n\t\t\t for (int i = 0; i < items.length; i++) {\r\n\t\t\t\t\t\titems[i] = getString(R.string.label_session, calls.get(i).getCallId());\r\n\t\t\t }\r\n\t\t\t\t\tsetListAdapter(new ArrayAdapter<String>(IPCallSessionsList.this, android.R.layout.simple_list_item_1, items));\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsetListAdapter(null);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch(Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tUtils.showMessageAndExit(IPCallSessionsList.this, getString(R.string.label_api_failed));\r\n\t\t}\r\n }",
"private void initBLESetup() {\n // Initializes Bluetooth adapter.\n final BluetoothManager bluetoothManager = (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE);\n mBluetoothAdapter = bluetoothManager.getAdapter();\n //Beginning in Android 6.0 (API level 23), users grant permissions to apps while the app is running, not when they install the app.\n //Obtaining dynamic permissions from the user\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { //23\n if (this.checkSelfPermission(Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n final AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"This app needs location access.\");\n builder.setMessage(\"Please grant location access to this app.\");\n builder.setPositiveButton(android.R.string.ok, null);\n builder.setOnDismissListener(new DialogInterface.OnDismissListener() {\n public void onDismiss(DialogInterface dialog) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M)\n requestPermissions(new String[]{Manifest.permission.ACCESS_COARSE_LOCATION}, PERMISSION_REQUEST_COARSE_LOCATION);\n }\n\n });// See onRequestPermissionsResult callback method for negative behavior\n builder.show();\n }\n }\n // Create callback methods\n if (Build.VERSION.SDK_INT >= 21) //LOLLIPOP\n newerVersionScanCallback = new ScanCallback() {\n @Override\n public void onScanResult(int callbackType, ScanResult result) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n BluetoothDevice btDevice = result.getDevice();\n ScanRecord mScanRecord = result.getScanRecord();\n int rssi = result.getRssi();\n// Log.i(TAG, \"Address: \"+ btDevice.getAddress());\n// Log.i(TAG, \"TX Power Level: \" + result.getScanRecord().getTxPowerLevel());\n// Log.i(TAG, \"RSSI in DBm: \" + rssi);\n// Log.i(TAG, \"Manufacturer data: \"+ mScanRecord.getManufacturerSpecificData());\n// Log.i(TAG, \"device name: \"+ mScanRecord.getDeviceName());\n// Log.i(TAG, \"Advertise flag: \"+ mScanRecord.getAdvertiseFlags());\n// Log.i(TAG, \"service uuids: \"+ mScanRecord.getServiceUuids());\n// Log.i(TAG, \"Service data: \"+ mScanRecord.getServiceData());\n byte[] recordBytes = mScanRecord.getBytes();\n\n iBeacon ib = parseBLERecord(recordBytes);\n\n if (ib != null) {\n setLog(ib.getUuid(), ib.getMajor(), ib.getMinor(), rssi);\n\n }\n }\n }\n\n @Override\n public void onScanFailed(int errorCode) {\n Log.e(\"Scan Failed\", \"Error Code: \" + errorCode);\n }\n };\n else\n olderVersionScanCallback =\n new BluetoothAdapter.LeScanCallback() {\n @Override\n public void onLeScan(final BluetoothDevice device, final int rssi,\n final byte[] scanRecord) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Log.i(\"onLeScan\", device.toString());\n\n iBeacon ib = parseBLERecord(scanRecord);\n\n if (ib != null) {\n setLog(ib.getUuid(), ib.getMajor(), ib.getMinor(), rssi);\n\n }\n }\n });\n }\n };\n }",
"@Override\n public void onProgressChanged(SeekBar seekBar, int i, boolean b) {\n Device[] devices = App.getInstance().getDevices();\n for (Device device : devices) {\n device.setPwmDuty(seekBar.getProgress());\n }\n }"
] | [
"0.79350877",
"0.7387304",
"0.67067707",
"0.6613782",
"0.6589056",
"0.6588196",
"0.6542602",
"0.65117174",
"0.64873487",
"0.6482544",
"0.64609396",
"0.64458513",
"0.64444107",
"0.6397585",
"0.6384045",
"0.63571674",
"0.6348377",
"0.6319114",
"0.62858295",
"0.6274423",
"0.6258974",
"0.6215509",
"0.61535215",
"0.6144342",
"0.6138773",
"0.60781306",
"0.6067043",
"0.6062255",
"0.6061603",
"0.6058292",
"0.60485333",
"0.60441643",
"0.59661055",
"0.5947124",
"0.59378004",
"0.59306085",
"0.587023",
"0.586676",
"0.5844977",
"0.58431256",
"0.5835081",
"0.58344764",
"0.5830789",
"0.5822213",
"0.58205396",
"0.58050126",
"0.5799649",
"0.5798253",
"0.57914454",
"0.5781064",
"0.5748771",
"0.57192665",
"0.5717045",
"0.5705308",
"0.5703637",
"0.5698698",
"0.56891674",
"0.5672261",
"0.5664626",
"0.5663323",
"0.565807",
"0.56505513",
"0.564973",
"0.56428534",
"0.5622786",
"0.56190497",
"0.56185126",
"0.56085765",
"0.5603988",
"0.56005806",
"0.5598272",
"0.55905503",
"0.5590493",
"0.55888045",
"0.5578406",
"0.5572021",
"0.5570178",
"0.55649006",
"0.5550524",
"0.55417305",
"0.55409074",
"0.5536797",
"0.5533147",
"0.55264086",
"0.55260813",
"0.55235565",
"0.5521526",
"0.5520736",
"0.5516417",
"0.5509798",
"0.5509145",
"0.55053794",
"0.547556",
"0.5474705",
"0.54723656",
"0.5457512",
"0.5445005",
"0.54404426",
"0.5439008",
"0.543313"
] | 0.77699494 | 1 |
Used to combine the hearing aid entries just after pairing. Once both the hearing aids get connected and their hiSyncId gets populated, this gets called for one of the 2 hearing aids so that only one entry in the connected devices list will be seen. | @Override
public void onDeviceDeleted(CachedBluetoothDevice cachedDevice) {
removePreference(cachedDevice);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Collection<BluetoothDevice> getUniqueConnectedDevices() {\n ArrayList<BluetoothDevice> result;\n synchronized (mLock) {\n result = new ArrayList<>(mHfpDevicesByAddress.values());\n }\n Set<Long> seenHiSyncIds = new LinkedHashSet<>();\n // Add the left-most active device to the seen list so that we match up with the list\n // generated in BluetoothRouteManager.\n if (mBluetoothHearingAidService != null) {\n for (BluetoothDevice device : mBluetoothHearingAidService.getActiveDevices()) {\n if (device != null) {\n result.add(device);\n seenHiSyncIds.add(mHearingAidDeviceSyncIds.getOrDefault(device, -1L));\n break;\n }\n }\n }\n synchronized (mLock) {\n for (BluetoothDevice d : mHearingAidDevicesByAddress.values()) {\n long hiSyncId = mHearingAidDeviceSyncIds.getOrDefault(d, -1L);\n if (seenHiSyncIds.contains(hiSyncId)) {\n continue;\n }\n result.add(d);\n seenHiSyncIds.add(hiSyncId);\n }\n }\n return Collections.unmodifiableCollection(result);\n }",
"private boolean comparePersistentIdEntrys(@Nonnull PairwiseId one, @Nonnull PairwiseId other)\n {\n // Do not compare times\n //\n return Objects.equals(one.getPairwiseId(), other.getPairwiseId()) &&\n Objects.equals(one.getIssuerEntityID(), other.getIssuerEntityID()) &&\n Objects.equals(one.getRecipientEntityID(), other.getRecipientEntityID()) &&\n Objects.equals(one.getSourceSystemId(), other.getSourceSystemId()) &&\n Objects.equals(one.getPrincipalName(), other.getPrincipalName()) &&\n Objects.equals(one.getPeerProvidedId(), other.getPeerProvidedId());\n }",
"private void addPairedDevices(){\r\n\t\t// ensure devices wont be added twice\r\n\t\tmPairedDevicesArrayAdapter.clear();\r\n\t\tSet<BluetoothDevice> pairedDevices = mBtAdapter.getBondedDevices();\r\n\t\t//bluetooth has to be enabled\r\n\t\tif(mBtAdapter.isEnabled()){\r\n\t\t\t//there are no paired devices ...\r\n\t\t\tif(pairedDevices.size() == 0){\r\n\t \t\t//inform user to pair devices manually\r\n\t \t\tToast.makeText(this, \"No paired devices detected. Please pair devices!\", Toast.LENGTH_SHORT).show();\r\n\t \t\treturnToPriviousActivityWithoutDevice();\r\n\t \t} \r\n\t\t\t//there are paired devices ...\r\n\t\t\telse{\r\n\t\t\t\t//inform user\r\n\t \t\tToast.makeText(this, \"Paired devices detected.\", Toast.LENGTH_SHORT).show();\r\n\t \t\tfindViewById(R.id.paired_devices).setVisibility(View.VISIBLE); \t\t\r\n\t \t // Loop through paired devices\r\n\t \t for (BluetoothDevice device : pairedDevices) {\r\n\t \t // Add the name and address to an array adapter to show in a ListView\t \t \t\r\n\t \t mPairedDevicesArrayAdapter.add(device.getName() + \"\\n\" + device.getAddress());\r\n\t \t }\r\n\t \t}\r\n\t\t}\r\n\t}",
"private static void mergingSync() {\n Observable.merge(getDataSync(1), getDataSync(2)).blockingForEach(System.out::println);\n }",
"private ClusterCombination checkAndDoJoinMultiPearson(ClusterCombination CC1, ClusterCombination CC2) {\n boolean doJoin = true;\r\n ArrayList<Cluster> CCList = new ArrayList<>(CC1.getClusters().size()+1); //list of output clusters for new CC if join is succesfull\r\n\r\n ArrayList<Cluster> CC1Clusters = CC1.getClusters();\r\n ArrayList<Cluster> CC2Clusters = CC2.getClusters();\r\n\r\n ArrayList<Cluster> LHS1 = CC1.getLHS();\r\n ArrayList<Cluster> LHS2 = CC2.getLHS();\r\n\r\n ArrayList<Cluster> RHS1 = CC1.getRHS();\r\n ArrayList<Cluster> RHS2 = CC2.getRHS();\r\n\r\n for(int i =0; i<CC1Clusters.size()-1; i++) {\r\n Cluster C1 = CC1Clusters.get(i);\r\n Cluster C2 = CC2Clusters.get(i);\r\n\r\n boolean overlap = checkClusterOverlap(C1, C2); // check if there is some overlap\r\n\r\n\r\n\r\n if(!overlap){ //the cluster in this position does not overlap, we don't need to join\r\n doJoin=false;\r\n break;\r\n }else{ // there is overlap, add the intersection of C1 and C2\r\n if(C1.getNPoints() <= C2.getNPoints()){\r\n CCList.add(C1);\r\n }else{\r\n CCList.add(C2);\r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n if(doJoin){ // each cluster in the candidate (except the last) does overlap\r\n // so, according to apriori, we join -> return the overlapping clusters + the last clusters of CC1 and CC2\r\n Cluster lastCC1 = CC1Clusters.get(CC1Clusters.size()-1);\r\n Cluster lastCC2 = CC2Clusters.get(CC2Clusters.size()-1);\r\n if(lastCC1.getClusterId() <= lastCC2.getClusterId()){ // make sure to respect ordering of clusters within a candidate by ID. otherwise this could be designated as a duplicate\r\n CCList.add(lastCC1); CCList.add(lastCC2);\r\n }else{\r\n CCList.add(lastCC2); CCList.add(lastCC1);\r\n }\r\n\r\n ArrayList<Cluster> newLHS = new ArrayList<>();\r\n ArrayList<Cluster> newRHS = new ArrayList<>();\r\n for(int i = 0; i<LHS1.size(); i++){\r\n newLHS.add(CCList.get(i));\r\n }\r\n for(int i = LHS1.size(); i<CCList.size(); i++){\r\n newRHS.add(CCList.get(i));\r\n }\r\n\r\n ClusterCombination newCC = new MultiPearsonClusterCombination(newLHS, newRHS);\r\n newCC.checkAndSetMaxSubsetLowerBound(Math.max(CC1.getLB(), CC1.getMaxLowerBoundSubset()));\r\n newCC.checkAndSetMaxSubsetLowerBound(Math.max(CC2.getLB(), CC2.getMaxLowerBoundSubset()));\r\n\r\n return newCC;\r\n\r\n }else{\r\n return null;\r\n }\r\n }",
"public void pairPlayers() {\n List<UUID> lis = new ArrayList<UUID>(playerRegistry.keySet());\n \n Collections.shuffle(lis);\n UUID first = lis.get(0);\n\n for(int i = 0; i <= lis.size(); i++) {\n UUID temp = lis.get(i);\n if(i == lis.size()) {\n pairedPlayers.put(temp, first);\n break;\n }\n\n UUID tempNext = lis.get(i + 1);\n pairedPlayers.put(temp, tempNext);\n }\n\n SecretSanta._this().logDebug(\"[GiftManager] Pairing complete: \" + pairedPlayers.toString());\n }",
"public CachedBluetoothDevice getConnectedHearingAidDevice() {\n BluetoothAdapter bluetoothAdapter;\n if (this.mHearingAidProfileSupported && (bluetoothAdapter = this.mBluetoothAdapter) != null && bluetoothAdapter.isEnabled()) {\n for (BluetoothDevice bluetoothDevice : this.mLocalBluetoothManager.getProfileManager().getHearingAidProfile().getConnectedDevices()) {\n if (!this.mLocalBluetoothManager.getCachedDeviceManager().isSubDevice(bluetoothDevice)) {\n return this.mLocalBluetoothManager.getCachedDeviceManager().findDevice(bluetoothDevice);\n }\n }\n }\n return null;\n }",
"private void computeSharedFriends() throws NoSuchAlgorithmException {\n commonFriends = mClientPSI.getCardinality(getSRTFromServerTuple());\n }",
"@Override\n protected DataSet<GraphHead> computeNewGraphHeads() {\n return firstCollection.getGraphHeads()\n .union(secondCollection.getGraphHeads())\n .groupBy(new Id<GraphHead>())\n .reduceGroup(new GroupCountEquals<GraphHead>(2));\n }",
"private static void DoJoin()\n\t{\n\n\t\tArrayList<Attribute> inAttsRight = new ArrayList<Attribute>();\n\t\tinAttsRight.add(new Attribute(\"Int\", \"o_orderkey\"));\n\t\tinAttsRight.add(new Attribute(\"Int\", \"o_custkey\"));\n\t\tinAttsRight.add(new Attribute(\"Str\", \"o_orderstatus\"));\n\t\tinAttsRight.add(new Attribute(\"Float\", \"o_totalprice\"));\n\t\tinAttsRight.add(new Attribute(\"Str\", \"o_orderdate\"));\n\t\tinAttsRight.add(new Attribute(\"Str\", \"o_orderpriority\"));\n\t\tinAttsRight.add(new Attribute(\"Str\", \"o_clerk\"));\n\t\tinAttsRight.add(new Attribute(\"Int\", \"o_shippriority\"));\n\t\tinAttsRight.add(new Attribute(\"Str\", \"o_comment\"));\n\n\t\tArrayList<Attribute> inAttsLeft = new ArrayList<Attribute>();\n\t\tinAttsLeft.add(new Attribute(\"Int\", \"c_custkey\"));\n\t\tinAttsLeft.add(new Attribute(\"Str\", \"c_name\"));\n\t\tinAttsLeft.add(new Attribute(\"Str\", \"c_address\"));\n\t\tinAttsLeft.add(new Attribute(\"Int\", \"c_nationkey\"));\n\t\tinAttsLeft.add(new Attribute(\"Str\", \"c_phone\"));\n\t\tinAttsLeft.add(new Attribute(\"Float\", \"c_acctbal\"));\n\t\tinAttsLeft.add(new Attribute(\"Str\", \"c_mktsegment\"));\n\t\tinAttsLeft.add(new Attribute(\"Str\", \"c_comment\"));\n\n\t\tArrayList<Attribute> outAtts = new ArrayList<Attribute>();\n\t\toutAtts.add(new Attribute(\"Str\", \"att1\"));\n\t\toutAtts.add(new Attribute(\"Int\", \"att2\"));\n\t\toutAtts.add(new Attribute(\"Int\", \"att3\"));\n\t\toutAtts.add(new Attribute(\"Str\", \"att4\"));\n\t\toutAtts.add(new Attribute(\"Int\", \"att5\"));\n\n\t\tArrayList<String> leftHash = new ArrayList<String>();\n\t\tleftHash.add(\"c_custkey\");\n\n\t\tArrayList<String> rightHash = new ArrayList<String>();\n\t\trightHash.add(\"o_custkey\");\n\n\t\tString selection = \"right.o_custkey == left.c_custkey && right.o_custkey > Int (1000)\";\n\n\t\tHashMap<String, String> exprs = new HashMap<String, String>();\n\t\texprs.put(\"att1\", \"right.o_comment + Str(\\\" \\\") + left.c_comment\");\n\t\texprs.put(\"att2\", \"right.o_custkey\");\n\t\texprs.put(\"att3\", \"left.c_custkey\");\n\t\texprs.put(\"att4\", \"left.c_name\");\n\t\texprs.put(\"att5\", \"right.o_orderkey\");\n\n\t\t// run the join\n\t\ttry\n\t\t{\n\t\t\tnew Join(inAttsLeft, inAttsRight, outAtts, leftHash, rightHash, selection, exprs, \"customer.tbl\", \"orders.tbl\",\n\t\t\t\t\t\"out.tbl\", \"g++\", \"cppDir/\");\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\n\t}",
"private List<Identifier> determineAdapters(Message msg, PeerInfo newPeerInfo){\r\n\t\t\r\n\t\tif (peerToAdaptersMappings.size() > MAP_SIZE_LIMIT) peerToAdaptersMappings.clear();\r\n\t\t\r\n\t\tif (peerToAdaptersMappings.containsKey(newPeerInfo)){ //uses just peer id comparison here. \r\n\t\t\t//this is a known recipient\r\n\t\t\t//However, we still need to check if the available list of adapters (routing list) is valid.\r\n\t\t\t\r\n\t\t\tPair<List<Identifier>, PeerInfo> p;\r\n\t\t\tp = peerToAdaptersMappings.get(newPeerInfo);\r\n\t\t\t\r\n\t\t\tint i = 1;\r\n\t\t\twhile (p == null && i<4) { //this can happen if another thread flushed the entry in the meantime. That same thread should also update the value, though\r\n\t\t\t\ttry {\r\n\t\t\t\t\tThread.sleep(i*20);\r\n\t\t\t\t} catch (InterruptedException ignored) {}\r\n\t\t\t\tp = peerToAdaptersMappings.get(newPeerInfo);\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (i >= 4 && p == null){\r\n\t\t\t\t//the other thread obviously did not do the job yet. We will take care of it in the rest of the method.\r\n\t\t\t}else{\r\n\t\t\t\tPeerInfo oldPeerInfo = p.second;\r\n\t\t\t\tif (newPeerInfo.equalsByDeepCoparison(oldPeerInfo)){\r\n\t\t\t\t\treturn p.first; //return the existing list of adapters, since nothing changed in the PeerInfo from last time\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} \r\n\t\t\r\n\t\t// if we arrived here it means, either:\r\n\t\t// sending message to this peer for the first time \r\n\t\t// OR\r\n\t\t// the information we have is outdated, so let's update it\r\n\t\t\r\n\r\n\t\tList<Identifier> adapters = adapterMgr.createEndpointForPeer(newPeerInfo); //need not be synced, since invoking createEndpointForPeer multiple times should be fine\r\n\t\tPair<List<Identifier>, PeerInfo> p = new Pair<List<Identifier>, PeerInfo>(adapters, newPeerInfo);\r\n\t\t\r\n\t\tsynchronized(peerToAdaptersMappings){ //just using ConcurrentHashMap is not enough, because we need to save the reference to the map's key in the second object of the Pair, which is the object of the map, and if 2 thread repeat put, the value will get updated, but that value will contain the wrong reference to the key, meaning that subsequently the deep comparison between the old and the new PeerInfo object will not be possible\r\n\t\t\tpeerToAdaptersMappings.remove(newPeerInfo); //in reality, we remove an existing entry, if any. Since the PeerInfo.equals just compares Ids, it should locate the exact entry.\r\n\t\t\tpeerToAdaptersMappings.put(newPeerInfo, p); //we now put in the new value, which is a Pair, whose second element points to the key of the entry in the peerToAdaptersMappings where the Pair value belongs\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t// Now we have the list of all possible Adapters trough which we can deliver the message to the peer.\r\n\t\t// However, depending on peer's stated delivery policy we may want to restrict this list.\r\n\t\t// For example, in case of DeliveryPolicy.PREFERRED, we will just return the first Adapter.\r\n\t\t// But, in case of either TO_ALL_CHANNELS or AT_LEAST_ONE, we return all adapters, because in either case\r\n\t\t// the policy foresees sending to multiple adapters, but interpreting responses from all/one channel as ultimate success, respectively. \r\n\t\t\r\n\t\t\r\n\t\tif (newPeerInfo.getDeliveryPolicy() == DeliveryPolicy.Peer.PREFERRED){\r\n\t\t\tIdentifier preferred = adapters.get(0);\r\n\t\t\tList<Identifier> prefList = new ArrayList<Identifier>();\r\n\t\t\tprefList.add(preferred);\r\n\t\t\treturn prefList;\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn adapters;\r\n\t}",
"@SuppressWarnings(\"unchecked\")\n\tpublic void colleceRelatedPairs() {\n\t\trelatedPairs = new HashSet[words.size()];\n\t\tfor(int i = 0; i < relatedPairs.length; i++){\n\t\t\tSet<Integer> related = new HashSet<Integer>();\n\t\t\trelatedPairs[i] = related;\n\t\t}\n\t\t\n\t\tlong uniquePairs = 0;\n\t\tfor(int i = 0; i < words.size(); i++){\n\t\t\tif(goodWords.get(i)){\n\t\t\t\tString word1 = words.get(i);\n\t\t\t\tfor(int j = i+1; j < words.size(); j++){\n\t\t\t\t\tif(goodWords.get(j)){\n\t\t\t\t\t\tString word2 = words.get(j);\n\t\t\t\t\t\t\n\t\t\t\t\t\tuniquePairs++;\n\t\t\t\t\t\tint similarity = binDst.getSimilarity(word1, word2);\n\t\t\t\t\t\tif(similarity == 1){\n\t\t\t\t\t\t\t//System.out.println(word1 + \"\\t\" + word2);\n\t\t\t\t\t\t\taddPair(i, j);\n\t\t\t\t\t\t\taddPair(j, i);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(i % 1000 == 0){\n\t\t\t\tLOGGER.info(\"Pairs: \" + i);\n\t\t\t}\n\t\t}\n\t\tLOGGER.info(\"Unique Pairs: \" + uniquePairs);\n\t}",
"private void combineSSIDs(@NonNull NetworkCapabilities nc) {\n if (mSSID != null && !mSSID.equals(nc.mSSID)) {\n throw new IllegalStateException(\"Can't combine two SSIDs\");\n }\n setSSID(nc.mSSID);\n }",
"private void phaseTwo(){\r\n\r\n\t\tCollections.shuffle(allNodes, random);\r\n\t\tList<Pair<Node, Node>> pairs = new ArrayList<Pair<Node, Node>>();\r\n\t\t\r\n\t\t//For each node in allNode, get all relationshpis and iterate through each relationship.\r\n\t\tfor (Node n1 : allNodes){\r\n\r\n\t\t\ttry (Transaction tx = graphDb.beginTx()){\r\n\t\t\t\t//If a node n1 is related to any other node in allNodes, add those relationships to rels.\r\n\t\t\t\t//Avoid duplication, and self loops.\r\n\t\t\t\tIterable<Relationship> ite = n1.getRelationships(Direction.BOTH);\t\t\t\t\r\n\r\n\t\t\t\tfor (Relationship rel : ite){\r\n\t\t\t\t\tNode n2 = rel.getOtherNode(n1);\t//Get the other node\r\n\t\t\t\t\tif (allNodes.contains(n2) && !n1.equals(n2)){\t\t\t\t\t//If n2 is part of allNodes and n1 != n2\r\n\t\t\t\t\t\tif (!rels.contains(rel)){\t\t\t\t\t\t\t\t\t//If the relationship is not already part of rels\r\n\t\t\t\t\t\t\tPair<Node, Node> pA = new Pair<Node, Node>(n1, n2);\r\n\t\t\t\t\t\t\tPair<Node, Node> pB = new Pair<Node, Node>(n2, n1);\r\n\r\n\t\t\t\t\t\t\tif (!pairs.contains(pA)){\r\n\t\t\t\t\t\t\t\trels.add(rel);\t\t\t\t\t\t\t\t\t\t\t//Add the relationship to the lists.\r\n\t\t\t\t\t\t\t\tpairs.add(pA);\r\n\t\t\t\t\t\t\t\tpairs.add(pB);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\ttx.success();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn;\r\n\t}",
"@Override\n protected BackendEntry mergeEntries(BackendEntry e1, BackendEntry e2) {\n\n UltraSearchBackendEntry current = (UltraSearchBackendEntry) e1;\n UltraSearchBackendEntry next = (UltraSearchBackendEntry) e2;\n\n E.checkState(current == null || current.type().isVertex(),\n \"The current entry must be null or VERTEX\");\n E.checkState(next != null && next.type().isEdge(),\n \"The next entry must be EDGE\");\n\n if (current != null) {\n Id nextVertexId = IdGenerator.of(\n next.<String>column(HugeKeys.OWNER_VERTEX));\n if (current.id().equals(nextVertexId)) {\n current.subRow(next.row());\n return current;\n }\n }\n\n return this.wrapByVertex(next);\n }",
"public static String combinedUniqueId() {\n\t\t// generate combined unique id using device id, pseudo unique id and\n\t\t// android id\n\t\tString _combinedUniqueId = deviceId() + pseudoUniqueId() + androidId();\n\n\t\tLog.d(LOG_TAG, \"The combined unique id = \" + _combinedUniqueId);\n\n\t\treturn StringUtils.md5(_combinedUniqueId);\n\t}",
"void linkElementsAsPeerDuplicates(String userId,\n String metadataElement1GUID,\n String metadataElement2GUID,\n int statusIdentifier,\n String steward,\n String stewardTypeName,\n String stewardPropertyName,\n String source,\n String notes,\n boolean setKnownDuplicate) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException;",
"@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:59:45.473 -0500\", hash_original_method = \"ABB64391FEF3212581FCE62A24663F37\", hash_generated_method = \"5D650CF88D5D3982DDC619DAC8596630\")\n \npublic int connectSync(Context srcContext, Handler srcHandler, Messenger dstMessenger) {\n if (DBG) log(\"halfConnectSync srcHandler to the dstMessenger E\");\n\n // We are connected\n connected(srcContext, srcHandler, dstMessenger);\n\n if (DBG) log(\"halfConnectSync srcHandler to the dstMessenger X\");\n return STATUS_SUCCESSFUL;\n }",
"public void discoverDevices(){\r\n \t// If we're already discovering, stop it\r\n if (mBtAdapter.isDiscovering()) {\r\n mBtAdapter.cancelDiscovery();\r\n }\r\n \r\n Toast.makeText(this, \"Listining for paired devices.\", Toast.LENGTH_LONG).show();\r\n \tmBtAdapter.startDiscovery(); \r\n }",
"public static boolean isHandTwoPair(Hand h, HandScore hs) {\n\r\n\t\tboolean isTwoPair = false;\r\n\t\t\r\n\t\tif (h.getCardsInHand().get(eCardPlace.FIRSTCARD.getCardNo()).geteRank() == h.getCardsInHand()\r\n\t\t\t\t.get(eCardPlace.SECONDCARD.getCardNo()).geteRank() && h.getCardsInHand().get(eCardPlace.THIRDCARD.getCardNo()).geteRank() == h.getCardsInHand()\r\n\t\t\t\t\t\t.get(eCardPlace.FOURTHCARD.getCardNo()).geteRank()) {\r\n\t\t\tisTwoPair = true;\r\n\t\t\ths.setHandStrength(eHandStrength.TwoPair.getHandStrength());\r\n\t\t\ths.setHiHand(h.getCardsInHand().get(eCardPlace.FIRSTCARD.getCardNo()).geteRank().getiRankNbr());\r\n\t\t\ths.setLoHand(0);\r\n\t\t\tArrayList<Card> kickers = new ArrayList<Card>();\r\n\t\t\tkickers.add(h.getCardsInHand().get(eCardPlace.FIFTHCARD.getCardNo()));\r\n\t\t\ths.setKickers(kickers);\r\n\r\n\t\t} else if (h.getCardsInHand().get(eCardPlace.SECONDCARD.getCardNo()).geteRank() == h.getCardsInHand()\r\n\t\t\t\t.get(eCardPlace.THIRDCARD.getCardNo()).geteRank() && h.getCardsInHand().get(eCardPlace.FOURTHCARD.getCardNo()).geteRank() == h.getCardsInHand()\r\n\t\t\t\t\t\t.get(eCardPlace.FIFTHCARD.getCardNo()).geteRank()) {\r\n\t\t\tisTwoPair = true;\r\n\t\t\ths.setHandStrength(eHandStrength.TwoPair.getHandStrength());\r\n\t\t\ths.setHiHand(h.getCardsInHand().get(eCardPlace.FOURTHCARD.getCardNo()).geteRank().getiRankNbr());\r\n\t\t\ths.setLoHand(0);\r\n\t\t\tArrayList<Card> kickers = new ArrayList<Card>();\r\n\t\t\tkickers.add(h.getCardsInHand().get(eCardPlace.FIRSTCARD.getCardNo()));\r\n\t\t\ths.setKickers(kickers);\r\n\t\t}\r\n\t\t\r\n\t\telse if (h.getCardsInHand().get(eCardPlace.FIRSTCARD.getCardNo()).geteRank() == h.getCardsInHand()\r\n\t\t\t\t.get(eCardPlace.SECONDCARD.getCardNo()).geteRank() && h.getCardsInHand().get(eCardPlace.FOURTHCARD.getCardNo()).geteRank() == h.getCardsInHand()\r\n\t\t\t\t\t\t.get(eCardPlace.FIFTHCARD.getCardNo()).geteRank()) {\r\n\t\t\tisTwoPair = true;\r\n\t\t\ths.setHandStrength(eHandStrength.TwoPair.getHandStrength());\r\n\t\t\ths.setHiHand(h.getCardsInHand().get(eCardPlace.FIFTHCARD.getCardNo()).geteRank().getiRankNbr());\r\n\t\t\ths.setLoHand(0);\r\n\t\t\tArrayList<Card> kickers = new ArrayList<Card>();\r\n\t\t\tkickers.add(h.getCardsInHand().get(eCardPlace.THIRDCARD.getCardNo()));\r\n\t\t\ths.setKickers(kickers);\r\n\t\t}\r\n\t\treturn isTwoPair;\r\n\t}",
"private static void mergingSyncMadeAsync() {\n Observable.merge(getDataSync(1).subscribeOn(Schedulers.io()), getDataSync(2).subscribeOn(Schedulers.io())).blockingForEach(System.out::println);\n }",
"private void mergeAddFriendFromOtherRsp(AddFriendFromOther.Rsp value) {\n if (rspCase_ == 12 &&\n rsp_ != AddFriendFromOther.Rsp.getDefaultInstance()) {\n rsp_ = AddFriendFromOther.Rsp.newBuilder((AddFriendFromOther.Rsp) rsp_)\n .mergeFrom(value).buildPartial();\n } else {\n rsp_ = value;\n }\n rspCase_ = 12;\n }",
"private static Map<String, String> syncAttributes(Map<String, String> first, Map<String, String> second){\n Map<String, String> synced = new HashMap<>();\n\n for(String firstKey : first.keySet()){\n if(second.containsKey(firstKey)){\n //both contain the same key -> take from second\n synced.put(firstKey, second.get(firstKey));\n }else{\n //second doesn't contain this key -> take from first\n synced.put(firstKey, first.get(firstKey));\n }\n }\n\n for(String secondKey : second.keySet()){\n if(!synced.containsKey(secondKey)){\n //since first doesn't contain this key (or it would already be in syned) we take this key\n synced.put(secondKey, second.get(secondKey));\n }\n }\n return synced;\n }",
"private void getPairedDevices() {\n\t\tdevicesArray = btAdapter.getBondedDevices();\n\t\tif(devicesArray.size()>0){\n\t\t\tfor(BluetoothDevice device:devicesArray){\n\t\t\t\tpairedDevices.add(device.getName());\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public void appendEdge(Integer first, Integer second) {\n if (col.containsKey(first) && col.containsKey(second)) {\n col.get(first).add(second);\n col.get(second).add(first); \n }\n }",
"private void registerPairs(SantaConfig sc) {\n Set<String> keys = sc.getBaseKeys(\"paired\");\n for(String key : keys) {\n UUID owner = UUID.fromString(key);\n UUID rec = UUID.fromString(sc.getBaseString(\"paired.\" + key));\n pairedPlayers.put(owner, rec);\n }\n }",
"private boolean mConnect2Device1(BluetoothDevice oDevice1){\n mStateSet(kBT_Connecting); //Connecting to a server\n if (mIsAndroidDevice(oDevice1)) {\n if (mConnect2Device_Sub(UUID_ANDROID_INSECURE, oDevice1)) {\n mStateSet(kBT_Connected1);\n mMsgLog(\"ANDROID Connected: \" +oDevice1.getName());\n oDevice=oDevice1;\n return true;\n }\n } else if (mIsClassic(oDevice1)) { // Classic bluetoot device\n if ( mConnect2Device_Sub(UUID_LMDEVICE_INSECURE, oDevice1)) {\n mStateSet(kBT_Connected1);\n mMsgLog(9,\"Classic bluetooth Connected: \" +oDevice1.getName() );\n oDevice=oDevice1;\n return true;\n }\n }\n mMsgDebug(\"Could not connect\");\n // mBTClose1();\n return false;\n}",
"private static void handleJoin(DatagramPacket packet){\n byte[] packetData = packet.getData();\n InetAddress packetAddr = packet.getAddress();\n if(packetData[0]== (byte)'W') {\n if (!map.containsKey(packetAddr)) {\n byte[] bytes = new byte[8];\n for (int i = 0; i < 8; i++) {\n bytes[i] = packetData[i + 1];\n }\n String name = \"\";\n for (int i = 9; i < packetData.length; i++) {\n name += (char) packetData[i];\n }\n System.out.println(\"Adding \"+name+\":\"+packetAddr.getHostAddress());\n DH dh = new DH(BigInteger.valueOf('&'));\n BigInteger[] bigs = dh.generateRandomKeys(BigInteger.valueOf(77));\n// DH.getSharedSecretKey(bigs[0],BigInteger.valueOf(77),new BigInteger(bytes));\n map.put(packetAddr, new Client(DH.getSharedSecretKey(bigs[0], BigInteger.valueOf(77), new BigInteger(bytes)),name));\n map.get(packetAddr).setB(new BigInteger(bytes));\n map.get(packetAddr).setAddress(packetAddr);\n map.get(packetAddr).lives=5;\n System.out.println(Arrays.toString(bigs) + \":\" + new BigInteger(bytes));\n sendWRQResponse(bigs[1], packet);\n }\n }\n }",
"public static boolean isHandPair(Hand h, HandScore hs) {\n\t\tboolean isPair = false;\r\n\t\t\r\n\t\tif (h.getCardsInHand().get(eCardPlace.FIRSTCARD.getCardNo()).geteRank() == h.getCardsInHand()\r\n\t\t\t\t.get(eCardPlace.SECONDCARD.getCardNo()).geteRank()) {\r\n\t\t\tisPair = true;\r\n\t\t\ths.setHandStrength(eHandStrength.Pair.getHandStrength());\r\n\t\t\ths.setHiHand(h.getCardsInHand().get(eCardPlace.FIRSTCARD.getCardNo()).geteRank().getiRankNbr());\r\n\t\t\ths.setLoHand(0);\r\n\t\t\tArrayList<Card> kickers = new ArrayList<Card>();\r\n\t\t\tkickers.add(h.getCardsInHand().get(eCardPlace.FIFTHCARD.getCardNo()));\r\n\t\t\ths.setKickers(kickers);\r\n\t\t}\r\n\t\t\r\n\t\tif (h.getCardsInHand().get(eCardPlace.SECONDCARD.getCardNo()).geteRank() == h.getCardsInHand()\r\n\t\t\t\t.get(eCardPlace.THIRDCARD.getCardNo()).geteRank()) {\r\n\t\t\tisPair = true;\r\n\t\t\ths.setHandStrength(eHandStrength.Pair.getHandStrength());\r\n\t\t\ths.setHiHand(h.getCardsInHand().get(eCardPlace.SECONDCARD.getCardNo()).geteRank().getiRankNbr());\r\n\t\t\ths.setLoHand(0);\r\n\t\t\tArrayList<Card> kickers = new ArrayList<Card>();\r\n\t\t\tkickers.add(h.getCardsInHand().get(eCardPlace.FIFTHCARD.getCardNo()));\r\n\t\t\ths.setKickers(kickers);\r\n\t\t}\r\n\t\t\r\n\t\tif (h.getCardsInHand().get(eCardPlace.THIRDCARD.getCardNo()).geteRank() == h.getCardsInHand()\r\n\t\t\t\t.get(eCardPlace.FOURTHCARD.getCardNo()).geteRank()) {\r\n\t\t\tisPair = true;\r\n\t\t\ths.setHandStrength(eHandStrength.Pair.getHandStrength());\r\n\t\t\ths.setHiHand(h.getCardsInHand().get(eCardPlace.THIRDCARD.getCardNo()).geteRank().getiRankNbr());\r\n\t\t\ths.setLoHand(0);\r\n\t\t\tArrayList<Card> kickers = new ArrayList<Card>();\r\n\t\t\tkickers.add(h.getCardsInHand().get(eCardPlace.FIFTHCARD.getCardNo()));\r\n\t\t\ths.setKickers(kickers);\r\n\t\t}\r\n\t\t\r\n\t\tif (h.getCardsInHand().get(eCardPlace.FOURTHCARD.getCardNo()).geteRank() == h.getCardsInHand()\r\n\t\t\t\t.get(eCardPlace.FIFTHCARD.getCardNo()).geteRank()) {\r\n\t\t\tisPair = true;\r\n\t\t\ths.setHandStrength(eHandStrength.Pair.getHandStrength());\r\n\t\t\ths.setHiHand(h.getCardsInHand().get(eCardPlace.FOURTHCARD.getCardNo()).geteRank().getiRankNbr());\r\n\t\t\ths.setLoHand(0);\r\n\t\t\tArrayList<Card> kickers = new ArrayList<Card>();\r\n\t\t\tkickers.add(h.getCardsInHand().get(eCardPlace.THIRDCARD.getCardNo()));\r\n\t\t\ths.setKickers(kickers);\r\n\t\t}\r\n\t\t\r\n\t\treturn isPair;\r\n\t}",
"public void avoidBotAndOtherASs(Set<Integer> ASesToLieAbout, Set<AS> advertiseToTheseASes) {\n BGPPath pathOfMerit = new BGPPath(this.asn * -1);\n\n /*\n * Lying reverse poison, prepend bot ASes\n */\n for (Integer tAS : this.botSet) {\n pathOfMerit.appendASToPath(tAS);\n }\n\n /*\n * If we have ASs to lie about apart from the critical side AS, do it here\n */\n if (ASesToLieAbout != null && !(ASesToLieAbout.isEmpty())) {\n for (Integer tAS : ASesToLieAbout) {\n pathOfMerit.appendASToPath((tAS));\n }\n }\n\n pathOfMerit.prependASToPath(this.asn);\n\n // If we don't have a specific AS set to advertise out to, advertise to all interfaces.\n if (advertiseToTheseASes == null || advertiseToTheseASes.isEmpty()) {\n\n /*\n * Advertise to all of our customers\n */\n for (AS tCust : this.customers) {\n tCust.advPath(pathOfMerit);\n }\n\n /*\n * Since this is a hole punched route, we always advertise to peers and prov\n */\n for (AS tPeer : this.peers) {\n tPeer.advPath(pathOfMerit);\n }\n\n for (AS tProv : this.providers) {\n tProv.advPath(pathOfMerit);\n }\n\n /*\n * Update the adj-out-rib with the correct set of ASes we have\n * adverstised the current best path to\n */\n\n Set<AS> newAdvTo = new HashSet<>();\n\n newAdvTo.addAll(this.customers);\n newAdvTo.addAll(this.peers);\n newAdvTo.addAll(this.providers);\n\n this.adjOutRib.put(this.asn * -1, newAdvTo);\n } else {\n for (AS tAS : advertiseToTheseASes) {\n tAS.advPath(pathOfMerit);\n }\n\n Set<AS> newAdvTo = new HashSet<>();\n\n newAdvTo.addAll(advertiseToTheseASes);\n\n this.adjOutRib.put(this.asn * -1, newAdvTo);\n }\n }",
"private void connectingPeer() {\n for (int index = 0; index < this.peers.size(); index++) {\n String peerUrl = urlAdderP2PNodeName((String) this.peers.get(index));\n try {\n Node distNode = NodeFactory.getNode(peerUrl);\n P2PService peer = (P2PService) distNode.getActiveObjects(P2PService.class.getName())[0];\n \n if (!peer.equals(this.localP2pService)) {\n // Send a message to the remote peer to record me\n peer.register(this.localP2pService);\n // Add the peer in my group of acquaintances\n this.acqGroup.add(peer);\n }\n } catch (Exception e) {\n logger.debug(\"The peer at \" + peerUrl +\n \" couldn't be contacted\", e);\n }\n }\n }",
"public void union(int first, int second){\n int firstId = find(first);\n int secondId = find(second);\n //Check if these are already connected\n if(firstId == secondId){\n return;\n }\n if(size[firstId] < size[secondId]){\n size[secondId]+=size[firstId];\n grid[first] = secondId;\n }\n else {\n size[firstId]+=size[secondId];\n grid[second] = firstId;\n }\n --numOfComponents;\n }",
"private void addPair(int word1, int word2) {\n\t\trelatedPairs[word1].add(word2);\n\t}",
"private void doJoin(){\n\n final String aggHost = System.getProperty(\"aggregate.host.uri\", \"\");\n if (aggHost.isEmpty()) {\n command(\"/aggregate\", \"addBot\", Record.of()\n .slot(\"node\", nodeUri().toString())\n .slot(\"key\", System.getProperty(\"device.name\", \"\")));\n } else {\n command(aggHost, \"/aggregate\", \"addBot\", Record.of()\n .slot(\"host\", hostUriHack().toString()) // ws://192.168.0.151:9001\n .slot(\"node\", nodeUri().toString()) // /bot/6\n .slot(\"key\", System.getProperty(\"device.name\", \"\")));// RaspiBot6|192.168.0.151:9001\n }\n }",
"public static void AuId2Id3hop(){\n\t\t\r\n\t\tlong AID=2052648321L;\r\n\t\tlong AID2=2041650587L;\r\n\t\tlong ID=1511277043L;\r\n\t\tlong AFID=97018004L;\r\n\t\tSearchWrapper.search( AID, ID);\r\n\t}",
"@Override\n public int hashCode() {\n\n return (this.device.hashCode() + this.MAC.hashCode());\n }",
"private boolean linkMappingCoreSeparate( VirtualLink vLink, SubstrateSwitch edgeSwitch1,\n\t\t\tSubstrateSwitch edgeSwitch2, Topology topo) {\n\t\tMap<SubstrateSwitch, LinkedList<SubstrateSwitch>> listAggConnectEdge = topo.getListAggConnectEdge();\n\t\tMap<SubstrateSwitch, LinkedList<SubstrateSwitch>> listCoreConnectAggMap = topo.getListCoreConnectAgg();\t\n\t\tLinkedList<LinkPhyEdge> listPhyEdge = topo.getListLinkPhyEdge();\n\t\tLinkedList<SubstrateLink> listLinkBandwidth = topo.getLinkBandwidth();\n\t\tLinkedList<SubstrateSwitch> listAggSort1 = new LinkedList<>();\n\t\tLinkedList<SubstrateSwitch> listAggSort2 = new LinkedList<>();\n\t\tLinkedList<SubstrateSwitch> listCoreSort1 = new LinkedList<>();\n\t\tLinkedList<SubstrateSwitch> listCoreSort2 = new LinkedList<>();\n\t\t\n\t\tService sService = vLink.getsService();\n\t\tService dService = vLink.getdService();\n\t\t\n\t\tdouble bandwidthDemand = vLink.getBandwidthRequest();\n\t\tint count = 0;\n\t\t\n\t\tSubstrateSwitch edge1 = null, edge2 = null;\n\t\tSubstrateSwitch agg1 = null, agg2 = null;\n\t\tSubstrateSwitch core = null;\n\t\t\n\t\tLinkPhyEdge linkEdge1 = null, linkEdge2 = null;\n\t\t\n\t\tSubstrateLink linkAggEdge1a = null, linkAggEdge1b = null;\n\t\tSubstrateLink linkAggEdge2a = null, linkAggEdge2b = null;\n\t\tSubstrateLink linkCoreAgg1a = null, linkCoreAgg1b = null;\n\t\tSubstrateLink linkCoreAgg2a = null, linkCoreAgg2b = null;\n\t\t//===get edge switch connect to server=====================================//\n\t\tfor (LinkPhyEdge linkPhyEdge: listPhyEdge) { \n\t\t\t\n\t\t\tif(linkPhyEdge.getPhysicalServer().equals(sService.getBelongToServer())){\n\t\t\t\tedge1 = linkPhyEdge.getEdgeSwitch();\n\t\t\t\tif(linkPhyEdge.getBandwidth() < bandwidthDemand) {\n\t\t\t\t\treturn false;\n\t\t\t\t}else {\n\t\t\t\t\tlinkEdge1 = linkPhyEdge;\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\t\t\tif(linkPhyEdge.getPhysicalServer().equals(dService.getBelongToServer())) {\n\t\t\t\tedge2 = linkPhyEdge.getEdgeSwitch();\n\t\t\t\tif(linkPhyEdge.getBandwidth() < bandwidthDemand) {\n\t\t\t\t\treturn false;\n\t\t\t\t}else {\n\t\t\t\t\tlinkEdge2 = linkPhyEdge;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tlistAggSort1 = sortListSwitch(listAggConnectEdge.get(edge1));\n\t\tlistAggSort2 = sortListSwitch(listAggConnectEdge.get(edge2));\n\t\n\t\t//=== find link connect Agg to Edge ======================================//\n\t\tAGG_EDGE_LOOP1:\n\t\tfor(int index = 0; index < listAggSort1.size(); index++) {\n\t\t\tagg1 = listAggSort1.get(index);\n\t\t\tfor (SubstrateLink link : listLinkBandwidth) {\n\t\t\t\tif(link.getStartSwitch() == edge1 && link.getEndSwitch() == agg1) {\n\t\t\t\t\tif(link.getBandwidth() < bandwidthDemand) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}else {\n\t\t\t\t\t\tlinkAggEdge1a = link;\n\t\t\t\t\t\tcount ++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(link.getStartSwitch() == agg1 && link.getEndSwitch() == edge1) {\n\t\t\t\t\tif(link.getBandwidth() < bandwidthDemand) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}else {\n\t\t\t\t\t\tlinkAggEdge1b = link;\n\t\t\t\t\t\tcount ++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(count == 2) break AGG_EDGE_LOOP1;\n\t\t\t}\t\n\t\t} // end for loop 1\n\t\tcount = 0;\n\t\tAGG_EDGE_LOOP2:\n\t\tfor(int index = 0; index < listAggSort2.size(); index++) {\n\t\t\tagg2 = listAggSort2.get(index);\n\t\t\tfor (SubstrateLink link : listLinkBandwidth) {\n\t\t\t\tif(link.getStartSwitch() == edge2 && link.getEndSwitch() == agg2) {\n\t\t\t\t\tif(link.getBandwidth() < bandwidthDemand) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}else {\n\t\t\t\t\t\tlinkAggEdge2a = link;\n\t\t\t\t\t\tcount ++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if(link.getStartSwitch() == agg2 && link.getEndSwitch() == edge2) {\n\t\t\t\t\tif(link.getBandwidth() < bandwidthDemand) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}else {\n\t\t\t\t\t\tlinkAggEdge2b = link;\n\t\t\t\t\t\tcount ++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(count == 2) break AGG_EDGE_LOOP2;\n\t\t\t}\t\n\t\t} // end for loop 2\n\t\t//=== find link connect Agg to Core ======================================//\n\t\tlistCoreSort1 = sortListSwitch(listCoreConnectAggMap.get(agg1));\n\t\tlistCoreSort2 = sortListSwitch(listCoreConnectAggMap.get(agg2));\n\t\t\n\t\tif(!listCoreSort1.equals(listCoreSort2)) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tfor(int index = 0; index < listCoreSort1.size(); index++) {\n\t\t\tcore = listCoreSort1.get(index);\n\t\t\tfor (SubstrateLink link : listLinkBandwidth) {\n\t\t\t\tif(link.getStartSwitch() == agg1 && link.getEndSwitch() == core) {\n\t\t\t\t\tif(link.getBandwidth() < bandwidthDemand) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}else {\n\t\t\t\t\t\tlinkCoreAgg1a = link;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if(link.getStartSwitch() == core && link.getEndSwitch() == agg1) {\n\t\t\t\t\tif(link.getBandwidth() < bandwidthDemand) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}else {\n\t\t\t\t\t\tlinkCoreAgg1b = link;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if(link.getStartSwitch() == agg2 && link.getEndSwitch() == core) {\n\t\t\t\t\tif(link.getBandwidth() < bandwidthDemand) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}else {\n\t\t\t\t\t\tlinkCoreAgg2a = link;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if(link.getStartSwitch() == core && link.getEndSwitch() == agg2) {\n\t\t\t\t\tif(link.getBandwidth() < bandwidthDemand) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}else {\n\t\t\t\t\t\tlinkCoreAgg2b = link;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//===set up bandwidth for all found links above ========//\n\t\tlinkEdge1.setBandwidth(linkEdge1.getBandwidth() - bandwidthDemand);\n\t\tlinkEdge1.getEdgeSwitch().setPort(linkEdge1.getEdgeSwitch(), bandwidthDemand);\n\t\tlinkEdge2.setBandwidth(linkEdge2.getBandwidth() - bandwidthDemand);\n\t\tlinkEdge2.getEdgeSwitch().setPort(linkEdge2.getEdgeSwitch(), bandwidthDemand);\n\t\tvLink.getLinkPhyEdge().add(linkEdge1);\n\t\tvLink.getLinkPhyEdge().add(linkEdge2);\n\t\tlinkAggEdge1a.setBandwidth(linkAggEdge1a.getBandwidth() - bandwidthDemand);\n\t\tlinkAggEdge1a.getStartSwitch().setPort(linkAggEdge1a.getEndSwitch(), bandwidthDemand);\n\t\tlinkAggEdge1b.setBandwidth(linkAggEdge1b.getBandwidth() - bandwidthDemand);\n\t\tlinkAggEdge1b.getStartSwitch().setPort(linkAggEdge1b.getEndSwitch(), bandwidthDemand);\n\t\tlinkAggEdge2a.setBandwidth(linkAggEdge2a.getBandwidth() - bandwidthDemand);\n\t\tlinkAggEdge2a.getStartSwitch().setPort(linkAggEdge2a.getEndSwitch(), bandwidthDemand);\n\t\tlinkAggEdge2b.setBandwidth(linkAggEdge2b.getBandwidth() - bandwidthDemand);\n\t\tlinkAggEdge2b.getStartSwitch().setPort(linkAggEdge2b.getEndSwitch(), bandwidthDemand);\n\t\tlinkCoreAgg1a.setBandwidth(linkCoreAgg1a.getBandwidth() - bandwidthDemand);\n\t\tlinkCoreAgg1a.getStartSwitch().setPort(linkCoreAgg1a.getEndSwitch(), bandwidthDemand);\n\t\tlinkCoreAgg1b.setBandwidth(linkCoreAgg1b.getBandwidth() - bandwidthDemand);\n\t\tlinkCoreAgg1b.getStartSwitch().setPort(linkCoreAgg1b.getEndSwitch(), bandwidthDemand);\n\t\tlinkCoreAgg2a.setBandwidth(linkCoreAgg2a.getBandwidth() - bandwidthDemand);\n\t\tlinkCoreAgg2a.getStartSwitch().setPort(linkCoreAgg2a.getEndSwitch(), bandwidthDemand);\n\t\tlinkCoreAgg2b.setBandwidth(linkCoreAgg2b.getBandwidth() - bandwidthDemand);\n\t\tlinkCoreAgg2b.getStartSwitch().setPort(linkCoreAgg2b.getEndSwitch(), bandwidthDemand);\n\t\tvLink.getLinkSubstrate().add(linkAggEdge1a);\n\t\tvLink.getLinkSubstrate().add(linkAggEdge1b);\n\t\tvLink.getLinkSubstrate().add(linkAggEdge2a);\n\t\tvLink.getLinkSubstrate().add(linkAggEdge2b);\n\t\tvLink.getLinkSubstrate().add(linkCoreAgg1a);\n\t\tvLink.getLinkSubstrate().add(linkCoreAgg1b);\n\t\tvLink.getLinkSubstrate().add(linkCoreAgg2a);\n\t\tvLink.getLinkSubstrate().add(linkCoreAgg2b);\n\t\treturn true;\n\t}",
"@Override\n public boolean connected(Station station1, Station station2) {\n if (station1.id() >= links.length || station2.id() >= links.length) {\n return station1.id() == station2.id();\n }\n return links[station1.id()] == links[station2.id()];\n }",
"private boolean combine2DFA(DFA_State dfa1, DFA_State dfa2){\n\t\t\n\t\tif(dfa2.isFinal && !dfa1.isFinal){\n\t\t\tdfa1.isFinal=true;\n\t\t\tdfa1.value=dfa2.value;\n\t\t\tdfa1.type=dfa2.type;\n\t\t}\n\t\tSet<Character> ways_1=dfa1.dfa_edges.keySet();\n\t\tSet<Character> ways_2=dfa2.dfa_edges.keySet();\t\n\t\tfor(Character chr:ways_2){\n\t\t\tDFA_State dfa_tmp_2=dfa2.dfa_edges.get(chr);\n\t\t\tif(ways_1.contains(chr)){\t//Guarantee way_2 move on way_1 if way_1 existing \n\t\t\t\tdfa_combined.put(dfa2.dfa_edges.get(chr),dfa1.dfa_edges.get(chr));\n\t\t\t\tdfa_list_1.add(dfa1.dfa_edges.get(chr));\n\t\t\t\tdfa_list_2.add(dfa2.dfa_edges.get(chr));\n\t\t\t}else{\t\t\t\t\t\t//way_1 not existing, add new way to way_1 or connect it to old vertex\n\t\t\t\tif(dfa_combined.keySet().contains(dfa_tmp_2)){\n\t\t\t\t\tDFA_State dfa_tmp_1=dfa_combined.get(dfa_tmp_2);\n\t\t\t\t\tdfa1.dfa_edges.put(chr,dfa_tmp_1);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tdfa1.dfa_edges.put(chr,new DFA_State());\n\t\t\t\t\tdfa_combined.put(dfa2.dfa_edges.get(chr),dfa1.dfa_edges.get(chr));\n\t\t\t\t\tdfa_list_1.add(dfa1.dfa_edges.get(chr));\n\t\t\t\t\tdfa_list_2.add(dfa2.dfa_edges.get(chr));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t\t\n\t}",
"private boolean checkTwoPairs(Player player) {\n\t\t// first pair\n\t\tcheckPair(player);\n\n\t\t// doesn't qualify for 2 pairs\n\t\tif (!player.isPair()) {\n\t\t\tplayer.setPair(false);\n\t\t\treturn false;\n\t\t}\n\n\t\t// second pair\n\t\tfor (int j = 4; j > 0; j--) {\n\t\t\tif (player.getSevenCardsTempHand().get(j).getRank()\n\t\t\t\t\t.equals(player.getSevenCardsTempHand().get(j - 1).getRank())) {\n\t\t\t\tplayer.setTwoPairs(true);\n\t\t\t\tplayer.setHandRank(HandRank.TWO_PAIRS);\n\n\t\t\t\t// add second pair to the 5 cards hand\n\t\t\t\thand[2] = player.getSevenCardsTempHand().get(j);\n\t\t\t\thand[3] = player.getSevenCardsTempHand().get(j - 1);\n\t\t\t\tplayer.getSevenCardsTempHand().remove(j);\n\t\t\t\tplayer.getSevenCardsTempHand().remove(j - 1);\n\n\t\t\t\t// add kicker\n\t\t\t\thand[4] = player.getSevenCardsTempHand().get(2);\n\t\t\t\tplayer.setFiveCardsHand(hand);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// add 3 kickers for the single pair found\n\t\thand[2] = player.getSevenCardsTempHand().get(4);\n\t\thand[3] = player.getSevenCardsTempHand().get(3);\n\t\thand[4] = player.getSevenCardsTempHand().get(2);\n\t\tplayer.setFiveCardsHand(hand);\n\n\t\treturn false;\n\t}",
"public void addEdge(Entity entityFirst, Entity entitySecond) {\n\t\tIterator<Entity> iteratorObj1 = Processing.nodeSet.iterator();\t//Iterating list of questions\n\t\twhile (iteratorObj1.hasNext()) {\n\t\t\tif(iteratorObj1.next().getEmail().equals(entitySecond.getEmail())){\n\t\t\t\tif(Processing.friendMap.containsKey(entityFirst.getEmail())) {\n\t\t\t\t\tif(!Processing.friendMap.get(entityFirst.getEmail()).contains(entitySecond.getEmail())) {\n\t\t\t\t\t\tProcessing.friendMap.get(entityFirst.getEmail()).add(entitySecond.getEmail());\n\t\t\t\t\t\tSystem.out.println(entitySecond.getEmail()+\" is now friend of you\");\n\t\t\t\t\t}else if(Processing.friendMap.get(entityFirst.getEmail()).contains(entitySecond.getEmail())){\n\t\t\t\t\t\tSystem.out.println(entitySecond.getEmail()+\" is already friend of you\");\n\t\t\t\t\t}else {\n\t\t\t\t\t\tSystem.out.println(entitySecond.getEmail()+\" does not exist\");\n\t\t\t\t\t}\n\t\t\t\t} else{\n\t\t\t\t\tIterator<Entity> iteratorObj2 = Processing.nodeSet.iterator();\t//Iterating list of questions\n\t\t\t\t\twhile (iteratorObj2.hasNext()) {\n\t\t\t\t\t\tif(iteratorObj2.next().getEmail().equals(entityFirst.getEmail())){\n\t\t\t\t\t\t\tSet<String> set=new HashSet<String>();\n\t\t\t\t\t\t\tset.add(entitySecond.getEmail());\n\t\t\t\t\t\t\tProcessing.friendMap.put(entityFirst.getEmail(),set);\n\t\t\t\t\t\t\tSystem.out.println(entitySecond.getEmail()+\" is now friend of you\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void listDevices(final BluetoothAdapter bluetoothAdapter){\n Set<BluetoothDevice> pairedDevices = bluetoothAdapter.getBondedDevices();\n ArrayList pairedDeviceList = new ArrayList();\n String address = null;\n\n if (pairedDevices.size() > 0) {\n int i = 0;\n // There are paired devices. Get the name and address of each paired device.\n for (BluetoothDevice device : pairedDevices) {\n String deviceName = device.getName().trim();\n String deviceHardwareAddress = device.getAddress(); // MAC address\n if (deviceName.equals(DEVICE_NAME)){\n address = device.getAddress().trim();\n System.out.println(address +\"\\n\");\n }\n pairedDeviceList.add(\"Device Name: \" + deviceName + \" Device MAC Address: \" + deviceHardwareAddress);\n }\n\n System.out.println(pairedDeviceList.get(0) + \"\\n\");\n\n final String finalAddress = address;\n AsyncTask.execute(new Runnable(){\n @Override\n public void run(){\n bluetoothDevice = bluetoothAdapter.getRemoteDevice(finalAddress);\n BLEDevice = new BluetoothLeService(bluetoothDevice, quantifenUUID);\n BLEDevice.connect(BluetoothActivity.this, testUUID);\n }\n });\n\n\n }\n }",
"private void combineUids(@NonNull NetworkCapabilities nc) {\n if (null == nc.mUids || null == mUids) {\n mUids = null;\n return;\n }\n mUids.addAll(nc.mUids);\n }",
"public void markNextHopIpv4GwAddr2Merge() throws JNCException {\n markLeafMerge(\"nextHopIpv4GwAddr2\");\n }",
"private boolean linkMappingAggSeparate(VirtualLink vLink, SubstrateSwitch edgeSwitch1, SubstrateSwitch edgeSwitch2, \n\t\t\tLinkedList<SubstrateSwitch> listAggConnectStartEdge, Topology topo) {\n\t\tboolean success = false;\n\t\tboolean checkAgg = false;\n\t\tboolean checkEdge = false;\n\t\tdouble bandwidth = vLink.getBandwidthRequest();\n\t\t\n\t\tLinkedList<LinkPhyEdge> listPhyEdge = topo.getListLinkPhyEdge();\n\t\tLinkedList<SubstrateLink> listLinkBandwidth = topo.getLinkBandwidth();\n\t\t\n\t\tPhysicalServer phy1 = vLink.getsService().getBelongToServer();\n\t\tPhysicalServer phy2 = vLink.getdService().getBelongToServer();\n\t\t\n\t\tSubstrateLink linkAggEdge01 = new SubstrateLink();\n\t\tSubstrateLink linkAggEdge10 = new SubstrateLink();\n\t\tSubstrateLink linkAggEdge02 = new SubstrateLink();\n\t\tSubstrateLink linkAggEdge20 = new SubstrateLink();\n\t\t\n\t\tLinkPhyEdge linkPhyEdge1 = new LinkPhyEdge();\n\t\tLinkPhyEdge linkPhyEdge2 = new LinkPhyEdge();\n\t\t\n\t\tSubstrateSwitch aggSW = new SubstrateSwitch();\n\t\t\n\t\t\n\t\tfor(SubstrateSwitch sw : listAggConnectStartEdge) {\n\t\t\tint count = 0;\n\t\t\tfor(SubstrateLink link : listLinkBandwidth) {\n\t\t\t\tif(link.getStartSwitch().equals(sw) && link.getEndSwitch().equals(edgeSwitch1) && link.getBandwidth() >= bandwidth) {\n\t\t\t\t\tcount++;\n\t\t\t\t\tlinkAggEdge01 = link;\n\t\t\t\t} else if(link.getStartSwitch().equals(edgeSwitch1) && link.getEndSwitch().equals(sw) && link.getBandwidth() >= bandwidth) {\n\t\t\t\t\tcount++;\n\t\t\t\t\tlinkAggEdge10 = link;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(link.getStartSwitch().equals(sw) && link.getEndSwitch().equals(edgeSwitch2) && link.getBandwidth() >= bandwidth) {\n\t\t\t\t\tcount++;\n\t\t\t\t\tlinkAggEdge02 = link;\n\t\t\t\t} else if(link.getStartSwitch().equals(edgeSwitch2) && link.getEndSwitch().equals(sw) && link.getBandwidth() >= bandwidth) {\n\t\t\t\t\tcount++;\n\t\t\t\t\tlinkAggEdge20 = link;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(count == 4) {\n\t\t\t\t\taggSW = sw;\n\t\t\t\t\tcheckAgg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tint count = 0;\n\t\tfor(LinkPhyEdge link : listPhyEdge) {\n\t\t\tif(link.getEdgeSwitch().equals(edgeSwitch1) && link.getPhysicalServer().equals(phy1) && link.getBandwidth() >= bandwidth) {\n\t\t\t\tlinkPhyEdge1 = link;\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\t\n\t\t\tif(link.getEdgeSwitch().equals(edgeSwitch2) && link.getPhysicalServer().equals(phy2) && link.getBandwidth() >= bandwidth) {\n\t\t\t\tlinkPhyEdge2 = link;\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\t\n\t\t\tif(count == 2) {\n\t\t\t\tcheckEdge = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(checkAgg == true && checkEdge == true) {\n\t\t\t\n\t\t\tsuccess = true;\n\t\t\t\n\t\t\tLinkedList<SubstrateSwitch> listSWUsed = topo.getListSwitchUsed();\n\t\t\tboolean checkContain = false;\n\t\t\tfor(SubstrateSwitch sw : listSWUsed) {\n\t\t\t\tif(sw.getNameSubstrateSwitch().equals(aggSW.getNameSubstrateSwitch())) {\n\t\t\t\t\tcheckContain = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(checkContain == false) {\n\t\t\t\tlistSWUsed.add(aggSW);\n\t\t\t\ttopo.setListSwitchUsed(listSWUsed);\n\t\t\t}\n\t\t\t\n\t\t\tlinkAggEdge01.setBandwidth(linkAggEdge01.getBandwidth() - bandwidth);\n\t\t\tlinkAggEdge01.getStartSwitch().setPort(linkAggEdge01.getEndSwitch(), bandwidth);\n\t\t\tlinkAggEdge10.setBandwidth(linkAggEdge10.getBandwidth() - bandwidth);\n\t\t\tlinkAggEdge10.getStartSwitch().setPort(linkAggEdge10.getEndSwitch(), bandwidth);\n\t\t\tlinkAggEdge02.setBandwidth(linkAggEdge02.getBandwidth() - bandwidth);\n\t\t\tlinkAggEdge02.getStartSwitch().setPort(linkAggEdge02.getEndSwitch(), bandwidth);\n\t\t\tlinkAggEdge20.setBandwidth(linkAggEdge20.getBandwidth() - bandwidth);\n\t\t\tlinkAggEdge20.getStartSwitch().setPort(linkAggEdge20.getEndSwitch(), bandwidth);\n\t\t\tvLink.getLinkSubstrate().add(linkAggEdge01);\n\t\t\tvLink.getLinkSubstrate().add(linkAggEdge10);\n\t\t\tvLink.getLinkSubstrate().add(linkAggEdge02);\n\t\t\tvLink.getLinkSubstrate().add(linkAggEdge20);\n\t\t\t\n\t\t\tlinkPhyEdge1.setBandwidth(linkPhyEdge1.getBandwidth() - bandwidth);\n\t\t\tlinkPhyEdge1.getEdgeSwitch().setPort(linkPhyEdge1.getEdgeSwitch(), bandwidth);\n\t\t\tlinkPhyEdge2.setBandwidth(linkPhyEdge2.getBandwidth() - bandwidth);\n\t\t\tlinkPhyEdge2.getEdgeSwitch().setPort(linkPhyEdge2.getEdgeSwitch(), bandwidth);\t\t\t\n\t\t\tvLink.getLinkPhyEdge().add(linkPhyEdge1);\n\t\t\tvLink.getLinkPhyEdge().add(linkPhyEdge2);\n\t\t\t\n\t\t} else {\n\t\t\tsuccess = false;\n\t\t}\n\t\t\n\t\treturn success;\n\t}",
"public static void m5821c() {\n if (f4669a != null) {\n f4669a.m12578a(\"bluetooth_app_share\", null);\n }\n Answers.getInstance().logCustom(new CustomEvent(\"bluetooth_app_share\"));\n }",
"private void compressPairAll(final Pair<S, S> pair) {\n Function<Pair<S, S>, Consumer<GPairRecord<S, S>>> consumerFunction = p -> new ArrayList<>()::add;\n Predicate<S> leftPredicate = nonTerminal -> doLeftPop(nonTerminal, head -> head.isTerminal() && head.equals(pair.b));\n Predicate<S> rightPredicate = nonTerminal -> doRightPop(nonTerminal, tail -> tail.isTerminal() && tail.equals(pair.a));\n pop(phase + 1, leftPredicate, rightPredicate, consumerFunction);\n List<GPairRecord<S, S>> records = getPairs(p -> p.equals(pair));\n sortPairs(records);\n compressNonCrossingPairs(records);\n }",
"public void matchingcouple()\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Output :\");\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"Following are the matching pairs \");\r\n\t\t\t\t\r\n\t\t\t\tfor(int i=0;i<womenmatchinlist.size();i++)\r\n\t\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\t// print the matching pair from same index of men and women matching list\r\n\t\t\t\tSystem.out.println(menmatchinglist.get(i)+\" is engaged with \"+womenmatchinlist.get(i));\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t}",
"@Override\r\n\tpublic boolean sameIdentityAs(Device other) {\n\t\treturn false;\r\n\t}",
"private void clearAddFriendFromOtherRsp() {\n if (rspCase_ == 12) {\n rspCase_ = 0;\n rsp_ = null;\n }\n }",
"public void displayPairedDevices() {\n\t\tBluetoothAdapter mBluetoothAdapter = BluetoothAdapter\n\t\t\t\t.getDefaultAdapter();\n\t\tSet<BluetoothDevice> bondedDevices = mBluetoothAdapter\n\t\t\t\t.getBondedDevices();\n\n\t\tList<String> s = new ArrayList<String>();\n\t\tpairedDevices = new ArrayList<BluetoothDevice>();\n\t\tfor (BluetoothDevice bt : bondedDevices) {\n\t\t\ts.add(bt.getName());\n\t\t\tpairedDevices.add(bt);\n\t\t}\n\t\tListView List = (ListView) findViewById(R.id.paired_devices);\n\n\t\tList.setAdapter(new ArrayAdapter<String>(this, R.layout.device_row, s));\n\t}",
"private void bonded_devices_get()\n\t\t{\n\t\t\tmPairedDevList.clear();\n\t\t\tSet<BluetoothDevice> PairedDevices = btAdapter.getBondedDevices();\n\t\t\tif(PairedDevices.size() > 0)\n\t\t\t{\n\t\t\t\tmPairedTitle.setVisibility(View.VISIBLE);\n\t\t\t\tfor(BluetoothDevice device : PairedDevices)\n\t\t\t\t{\n\t\t\t\t\tString device_info = device.getName()+\"\\n\"+device.getAddress();\n\t\t\t\t\tmPairedDevList.add(device_info);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tmPairedTitle.setVisibility(View.GONE);\n\t\t\t\tmPairedDevList.add(\"No Bonded Devices\");\n\t\t\t}\n\t\t}",
"void addDeviceComplete(boolean hasOtherDevices);",
"public static void joinDelims (Map<Sort,Integer> delims1, Map<Sort,Integer> delims2) {\n delims2.keySet().forEach( key -> { setDelim(delims1, key, delims2.get(key)); });\n }",
"private void checkConnection( SquareNode a , SquareNode b ) {\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\tSquareEdge edgeA = a.edges[i];\n\t\t\tif( edgeA == null )\n\t\t\t\tcontinue;\n\n\t\t\tSquareNode common = edgeA.destination(a);\n\t\t\tint commonToA = edgeA.destinationSide(a);\n\t\t\tint commonToB = CircularIndex.addOffset(commonToA,1,4);\n\n\t\t\tSquareEdge edgeB = common.edges[commonToB];\n\t\t\tif( edgeB != null && edgeB.destination(common) == b ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tfail(\"Failed\");\n\t}",
"public void onItemClick(AdapterView av, View v, int arg2, long arg3) {\n\n if (myBluetooth.isDiscovering()) {\n myBluetooth.cancelDiscovery();\n }\n\n String info = ((TextView) v).getText().toString();\n if (info.contains(\":\")){\n chosenDeviceAdress = info.substring(info.length() - 17);\n\n isPairing = true;\n pairDevice(myBluetooth.getRemoteDevice(chosenDeviceAdress));\n\n //pairDevice2(myBluetooth.getRemoteDevice(chosenDeviceAdress));\n }\n }",
"public boolean isDeviceAlreadyConnected(IWifiP2pProxy.IFastConnectInfo info) {\n\t\tLog.d(TAG, \"mConnectedDevice = \" + mConnectedDevice.getDeviceAddress());\n\t\tLog.d(TAG, \"info = \" + info.getDeviceAddress());\n\t\tif (mConnectedDevice.getDeviceAddress().equalsIgnoreCase(info.getDeviceAddress())) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"private Object savePairs() {\n Hashtable<String, String> pairTable = new Hashtable<String, String>();\n for(UUID id : pairedPlayers.keySet()) {\n String owner = id.toString();\n String rec = pairedPlayers.get(id).toString();\n\n pairTable.put(owner, rec);\n }\n\n return pairTable;\n }",
"@Override\n public int hashCode() {\n return (first != null ? 41 * first.hashCode() : 0) + (second != null ? second.hashCode() : 0);\n }",
"public static ArrayList<String> joinArrayLists(ArrayList<String> EqList, ArrayList<String> sshList){\n\n\t\t\t\n\t\t\tArrayList<Integer> counteq = new ArrayList<Integer>();\n\t\t\tArrayList<Integer> countssh = new ArrayList<Integer>();\n\t\t\t\n\t\t\tList<String> split1 = new ArrayList<String>();\n\t\t\tList<String> split2 = new ArrayList<String>();\n\t\t\t\n\t\t\tArrayList<String> combine = new ArrayList<String>();\n\t\t\t\n\t\t\t//Checks how many object exist in arrayList and addes their index to a new list\n\t\t\tfor(int i = 0;i<EqList.size();i++){\n\t\t\t\tif(EqList.get(i) == \"Object\"){\n\t\t\t\t\tcounteq.add(i);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tfor(int j = 0;j<sshList.size();j++){\n\t\t\t\tif(sshList.get(j) == \"Object\"){\n\t\t\t\t\tcountssh.add(j);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//The size of the matrices must be equal. If it is 1, removes the ID and object index from the second matrix and addes it to the first arrayList\n\t\t\tif(counteq.size() == countssh.size()){\n\t\t\t\tif(counteq.size() == 1){\n\t\t\t\t\tif(EqList.get(1).equals(sshList.get(1))){\n\t\t\t\t\t\tEqList.remove(0);\n\t\t\t\t\t\tsshList.remove(0);\n\t\t\t\t\t\tsshList.remove(0);\n\t\t\t\t\t\tcombine.addAll(EqList);\n\t\t\t\t\t\tcombine.addAll(sshList);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t//Based on the IDs of both lists, it splits both lists on the specified index and addes the two parts to the new combined matrix\n\t\t\t\t\t//The indexes are taken from the specified matrices counteq and countssh\n\t\t\t\t\tcounteq.add(EqList.size());\n\t\t\t\t\tcountssh.add(sshList.size());\n\t\t\t\t\tfor(int i = 0;i<counteq.size()-1;i++){\n\t\t\t\t\t\tfor(int j = 0;j<countssh.size()-1;j++){\n\t\t\t\t\t\t\tif(EqList.get(counteq.get(i)+1).equals(sshList.get(countssh.get(j)+1))){\n\n\t\t\t\t\t\t\t\t\tsplit1 = EqList.subList(counteq.get(i),counteq.get(i+1));\n\t\t\t\t\t\t\t\t\tsplit2 = sshList.subList(countssh.get(j)+2,countssh.get(j+1));\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tcombine.addAll(split1);\n\t\t\t\t\t\t\t\t\tcombine.addAll(split2);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t\tSystem.out.println(\"Error! Arraylists size not the same. Please check the data\");\n\t\t\t\n\t\t\t//If any remaining object indexes are left, remove them\n\t\t\tfor(int i = 0;i<combine.size();i++){\n\t\t\t\tif(combine.get(i) == \"Object\"){\n\t\t\t\t\tcombine.remove(i);\n\t\t\t\t\ti=0;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn combine;\n\t\t}",
"public void addRelation(AS otherAS, int myRelationToThem) {\n if (myRelationToThem == AS.PROVIDER_CODE) {\n this.customers.add(otherAS);\n otherAS.providers.add(this);\n } else if (myRelationToThem == AS.PEER_CODE) {\n this.peers.add(otherAS);\n otherAS.peers.add(this);\n } else if (myRelationToThem == AS.CUSTOMER_CODE) {\n this.providers.add(otherAS);\n otherAS.customers.add(this);\n } else if (myRelationToThem == 3) {\n // ignore\n } else {\n System.err.println(\"WTF bad relation: \" + myRelationToThem);\n System.exit(-1);\n }\n this.trafficOverNeighbors.put(otherAS.asn, 0.0);\n otherAS.trafficOverNeighbors.put(this.asn, 0.0);\n this.volatileTraffic.put(otherAS.asn, 0.0);\n otherAS.volatileTraffic.put(this.asn, 0.0);\n this.botTraffic.put(otherAS.asn, 0.0);\n otherAS.botTraffic.put(this.asn, 0.0);\n this.currentVolatileTraffic.put(otherAS.asn, 0.0);\n otherAS.currentVolatileTraffic.put(this.asn, 0.0);\n this.linkCapacities.put(otherAS.asn, new HashMap<Double, Double>());\n otherAS.linkCapacities.put(this.asn, new HashMap<Double, Double>());\n }",
"private static List<PwPair> removeDuplicateGroupIds(List<PwPair> allPairs,\n Map<String, UrlGroup> outGroupMap) {\n List<PwPair> filteredPairs = new ArrayList<>();\n Map<String, UrlGroup> groupMap = outGroupMap;\n if (groupMap == null) {\n groupMap = new HashMap<>();\n } else {\n groupMap.clear();\n }\n\n for (PwPair pwPair : allPairs) {\n PwsResult pwsResult = pwPair.getPwsResult();\n String groupId = pwsResult.getGroupId();\n if (groupId == null || groupId.equals(\"\")) {\n // Pairs without a group are always included\n filteredPairs.add(pwPair);\n } else {\n // Create the group if it doesn't exist\n UrlGroup urlGroup = groupMap.get(groupId);\n if (urlGroup == null) {\n urlGroup = new UrlGroup(groupId);\n groupMap.put(groupId, urlGroup);\n }\n urlGroup.addPair(pwPair);\n }\n }\n\n for (UrlGroup urlGroup : groupMap.values()) {\n filteredPairs.add(urlGroup.getTopPair());\n }\n\n return filteredPairs;\n }",
"private static List<List<Integer[]>> getDIOCrossConnect() {\n List<List<Integer[]>> pairs = new ArrayList<List<Integer[]>>();\n List<Integer[]> setA =\n Arrays.asList(\n new Integer[][] {\n {DIOCrossConnectA1, DIOCrossConnectA2},\n {DIOCrossConnectA2, DIOCrossConnectA1}\n });\n pairs.add(setA);\n\n List<Integer[]> setB =\n Arrays.asList(\n new Integer[][] {\n {DIOCrossConnectB1, DIOCrossConnectB2},\n {DIOCrossConnectB2, DIOCrossConnectB1}\n });\n pairs.add(setB);\n // NOTE: IF MORE DIOCROSSCONNECT PAIRS ARE ADDED ADD THEM HERE\n return pairs;\n }",
"public void buildShimmersConnectedList(final List<ShimmerDevice> deviceList, final Context context,\n final ShimmerBluetoothManagerAndroid bluetoothManager) {\n //List<ShimmerDevice> deviceList = btManager.getListOfConnectedDevices();\n CharSequence[] nameList = new CharSequence[deviceList.size()];\n CharSequence[] macList = new CharSequence[deviceList.size()];\n CharSequence[] displayList = new CharSequence[deviceList.size()];\n\n for(int i=0; i<nameList.length; i++) {\n nameList[i] = deviceList.get(i).getShimmerUserAssignedName();\n macList[i] = deviceList.get(i).getMacId();\n displayList[i] = nameList[i] + \"\\n\" + macList[i];\n }\n\n AlertDialog.Builder builder = new AlertDialog.Builder(context);\n\n builder.setTitle(\"Connected Shimmers\");\n builder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n dialogInterface.cancel();\n }\n });\n builder.setItems(displayList, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ShimmerDevice shimmerDevice = deviceList.get(i);\n buildSensorOrConfigOptions(shimmerDevice, context, bluetoothManager);\n //dialogInterface.cancel();\n }\n });\n\n builder.create().show();\n }",
"public void t6_whenGetTwoAlarms_thenProvideTagOfNextAlarm() {\n\n // Create three alarms. (so in the log we have: 0, 1, 2)\n //\n for (int i = 0; i < TEST_KEYS.length; i++) {\n dao.createOrUpdateAlarm(EXISTING_ALARM.domain, EXISTING_ALARM.adapterName,\n TEST_KEYS[i], EXISTING_ALARM.json);\n }\n // Let's remove all.\n //\n for (int i = 0; i < TEST_KEYS.length; i++) {\n dao.removeAlarm(EXISTING_ALARM.domain, EXISTING_ALARM.adapterName,\n TEST_KEYS[i]);\n }\n // Create three alarms again.\n //\n for (int i = 0; i < TEST_KEYS.length; i++) {\n dao.createOrUpdateAlarm(EXISTING_ALARM.domain, EXISTING_ALARM.adapterName,\n TEST_KEYS[i], EXISTING_ALARM.json);\n }\n // (so in the log we have: 0, 1, 2, x, x, x, 0, 1, 2)\n //\n // We expect:\n // all results - three alarms are returned.\n // first pack - two alarms are returned.\n // second pack - three alarms are returned.\n //\n check_for_t6(TEST_KEYS,\n new String[] {TEST_KEYS[0], TEST_KEYS[1]},\n TEST_KEYS);\n\n // Update one alarm.\n // It should be returned in the first pack AND in the second pack.\n dao.createOrUpdateAlarm(EXISTING_ALARM.domain, EXISTING_ALARM.adapterName,\n TEST_KEYS[0], EXISTING_ALARM.json);\n // (so in the log we have: 0, 1, 2, x, x, x, 0, 1, 2, 0)\n //\n // We expect:\n // all results - three alarms are returned.\n // first pack - two alarms are returned. Exactly in the same order.\n // second pack - three alarms are returned.\n //\n check_for_t6(new String[] {TEST_KEYS[1], TEST_KEYS[2], TEST_KEYS[0]},\n new String[] {TEST_KEYS[0], TEST_KEYS[1]},\n new String[] {TEST_KEYS[1], TEST_KEYS[2], TEST_KEYS[0]});\n\n // Update another alarm.\n dao.createOrUpdateAlarm(EXISTING_ALARM.domain, EXISTING_ALARM.adapterName,\n TEST_KEYS[2], EXISTING_ALARM.json);\n // (so in the log we have: 0, 1, 2, x, x, x, 0, 1, 2, 0, 2)\n //\n // We expect:\n // all results - three alarms are returned.\n // first pack - two alarms are returned. Exactly in the same order.\n // second pack - three alarms are returned.\n //\n check_for_t6(new String[] {TEST_KEYS[1], TEST_KEYS[0], TEST_KEYS[2]},\n new String[] {TEST_KEYS[0], TEST_KEYS[1]},\n new String[] {TEST_KEYS[1], TEST_KEYS[0], TEST_KEYS[2]});\n }",
"@Override\n protected Void doInBackground(ScoutMap... maps) {\n ScoutMap data = maps[0];\n\n // Add the team and match numbers\n SuperScoutDB superScoutDB = new SuperScoutDB(SuperScouting.this, eventId);\n data.put(SuperScoutDB.KEY_MATCH_NUMBER, matchNumber);\n data.put(SuperScoutDB.KEY_BLUE1, arrayList.get(0));\n data.put(SuperScoutDB.KEY_BLUE2, arrayList.get(1));\n data.put(SuperScoutDB.KEY_BLUE3, arrayList.get(2));\n data.put(SuperScoutDB.KEY_RED1, arrayList.get(3));\n data.put(SuperScoutDB.KEY_RED2, arrayList.get(4));\n data.put(SuperScoutDB.KEY_RED3, arrayList.get(5));\n // Store values to the database\n superScoutDB.updateMatch(data);\n\n BluetoothAdapter bluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\n if (bluetoothAdapter != null && bluetoothAdapter.isEnabled()) {\n if(Looper.myLooper() == null) {\n Looper.prepare();\n }\n bluetoothSync = new BluetoothSync(new BluetoothHandler(), false);\n Set<BluetoothDevice> devices = bluetoothAdapter.getBondedDevices();\n BluetoothDevice server = null;\n for (BluetoothDevice device : devices) {\n String connectedName = device.getName();\n if (connectedName.equals(Constants.Bluetooth.SERVER_NAME)) {\n server = device;\n break;\n }\n }\n\n if (server == null) {\n publishProgress(\"Cannot find Server in Paired Devices List\");\n return null;\n }\n\n int i;\n for (i = 0; i < Constants.Bluetooth.NUM_ATTEMPTS; i++) {\n bluetoothSync.connect(server, false);\n if (timeout()) {\n break;\n }\n }\n if (i == Constants.Bluetooth.NUM_ATTEMPTS) {\n bluetoothSync.stop();\n publishProgress(\"Connection to Server Failed\");\n return null;\n }\n\n SyncDB syncDB = new SyncDB(SuperScouting.this, eventId);\n String connectedAddress = bluetoothSync.getConnectedAddress();\n String lastUpdated = syncDB.getSuperLastUpdated(connectedAddress);\n syncDB.updateSuperSync(connectedAddress);\n\n String superUpdatedText = Constants.Bluetooth.SUPER_HEADER + Utilities.CursorToJsonString(superScoutDB.getAllMatchesSince(lastUpdated));\n if (!superUpdatedText.equals(String.format(\"%c[]\", Constants.Bluetooth.SUPER_HEADER))) {\n for (i = 0; i < Constants.Bluetooth.NUM_ATTEMPTS; i++) {\n if (bluetoothSync.write(superUpdatedText.getBytes())) {\n break;\n } else {\n publishProgress(String.format(\"Attempt %d of %d failed\", i + 1, Constants.Bluetooth.NUM_ATTEMPTS));\n }\n }\n if (i == Constants.Bluetooth.NUM_ATTEMPTS) {\n Utilities.JsonToSuperDB(superScoutDB, superUpdatedText);\n publishProgress(\"Super Data Requeued\");\n } else {\n publishProgress(\"Super Data Sent\");\n }\n } else {\n publishProgress(\"No new Super Data to send\");\n }\n\n bluetoothSync.stop();\n }\n return null;\n }",
"public Pair<Outbox, Boolean> mergeAdjacent(Outbox new_ob, Outbox last_ob) {\n\n int dim = new_ob.adjacent(last_ob);\n if ((dim != -1) && (!new_ob.sameSize(last_ob, dim))) dim = -1;\n if (dim != -1) new_ob.merge(last_ob, dim); //merge the two objects\n// if (dim!=-1) System.out.println(\"after merge:\"+new_ob);\n\n return new Pair<>(new_ob, dim != -1);\n\n }",
"public void joinTwoArrayList(ArrayList<E> array1 , ArrayList<E> array2){\n\t\tint length2 = array2.size();\n\t\tfor(int i=0 ; i<length2 ; i++){\n\t\t\tarray1.add(array2.getElement(i));\n\t\t}\n\t}",
"private boolean attachMe (RoadInterface me, Direction attachAt) {\n\n // Can't do anything if the intersection or direction is null.\n if (me == null || attachAt == null) return (false);\n\n // If the intersection is already attached, that's fine.\n if (interOne == me && dirOne == attachAt) return (true);\n if (interTwo == me && dirTwo == attachAt) return (true);\n\n /*\n * We need to attempt to attach this intersection. You can't\n * attach the same intersection to both ends of a road.\n */\n boolean retval = true;\n if (interOne == null) {\n interOne = me;\n dirOne = attachAt;\n xOne = ((Intersection) me).getXPos();\n yOne = ((Intersection) me).getYPos();\n } else if (interTwo == null && interOne != me) {\n interTwo = me;\n dirTwo = attachAt;\n xTwo = ((Intersection) me).getXPos();\n yTwo = ((Intersection) me).getYPos();\n } else {\n retval = false;\n }\n return (retval);\n }",
"public void follow(int followerId, int followeeId) {\n if (followeeId != followerId) {\n Set<Integer> friendSet = friends.computeIfAbsent(followerId, e -> new HashSet<>());\n friendSet.add(followeeId);\n }\n }",
"private void notifyDevicesChanged() {\n runInAudioThread(new Runnable() {\n @Override\n public void run() {\n WritableArray data = Arguments.createArray();\n final boolean hasHeadphones = availableDevices.contains(DEVICE_HEADPHONES);\n for (String device : availableDevices) {\n if (hasHeadphones && device.equals(DEVICE_EARPIECE)) {\n // Skip earpiece when headphones are plugged in.\n continue;\n }\n WritableMap deviceInfo = Arguments.createMap();\n deviceInfo.putString(\"type\", device);\n deviceInfo.putBoolean(\"selected\", device.equals(selectedDevice));\n data.pushMap(deviceInfo);\n }\n getContext().getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class).emit(DEVICE_CHANGE_EVENT, data);\n JitsiMeetLogger.i(TAG + \" Updating audio device list\");\n }\n });\n }",
"private static void mergeNext() {\n\t\tString ids[] = getMinGeneIds();\n\t\tString minI = ids[0];\n\t\tString minJ = ids[1];\n\t\tString newEntry = createNewEntry(minI, minJ);\n\t\tTreeMap<String, Double> prevI = distanceMatrix.remove(minI);\n\t\tTreeMap<String, Double> prevJ = distanceMatrix.remove(minJ);\n\t\tminMatrix.remove(minI);minMatrix.remove(minJ);\n\t\tallClusters.remove(minI);allClusters.remove(minJ);\n\t\tTreeMap<String, Double> newTemp = new TreeMap<String, Double>(); \n\t\tfor(String c: allClusters) {\n\t\t\tTreeMap<String, Double> temp = distanceMatrix.get(c);\n\t\t\ttemp.remove(minI);temp.remove(minJ);\n\t\t\tdouble dist1 = prevI.get(c);\n\t\t\tdouble dist2 = prevJ.get(c);\n\t\t\tif(dist1 < dist2) {\n\t\t\t\tnewTemp.put(c,dist1);\n\t\t\t\tupdateMinMatrix(newEntry, c, dist1);\n\t\t\t\ttemp.put(newEntry, dist1);\n\t\t\t\tString minData[] = minMatrix.get(c).split(\";\");\n\t\t\t\tif(minData[0].equals(minI) || minData[0].equals(minJ)) {\n\t\t\t\t\tminMatrix.remove(c);\n\t\t\t\t\tcreateMinMatrixAfterRemoval(c);\n\t\t\t\t}\n\t\t\t\tupdateMinMatrix(c, newEntry, dist1);\n\t\t\t} else {\n\t\t\t\tnewTemp.put(c,dist2);\n\t\t\t\tupdateMinMatrix(newEntry, c, dist2);\n\t\t\t\ttemp.put(newEntry, dist2);\n\t\t\t\tString minData[] = minMatrix.get(c).split(\";\");\n\t\t\t\tif(minData[0].equals(minI) || minData[0].equals(minJ)) {\n\t\t\t\t\tminMatrix.remove(c);\n\t\t\t\t\tcreateMinMatrixAfterRemoval(c);\n\t\t\t\t}\n\t\t\t\tupdateMinMatrix(c, newEntry, dist2);\n\t\t\t}\n\t\t\tdistanceMatrix.put(c, temp);\n\t\t}\n\t\tdistanceMatrix.put(newEntry, newTemp);\n\t\tallClusters.add(newEntry);\n\t\ttotalCluster = allClusters.size();\n\t}",
"public void ondeviceConnected() {\n if(isAdded() && !isDetached()) {\n if (RELOAD_CARD_NUMBERS[0] == 1) {\n new DailyVerseFetcher(getActivity()).execute(true);\n }\n if (RELOAD_CARD_NUMBERS[1] == 1) {\n new HomeSermonFetcher(getActivity()).execute(true);\n }\n }\n }",
"public static void prefixMerge(Client [] list1, Client [] list2,\n Client[] result){\n\n int listOneIndex = 0;\n int listTwoIndex = 0;\n for (int i = 0; i < result.length; i++){\n if (list1[listOneIndex].compareClient(list2[listTwoIndex]) < 0){\n result[i] = list1[listOneIndex];\n listOneIndex++;\n } else if (list1[listOneIndex].compareClient(list2[listTwoIndex]) > 0) {\n result[i] = list2[listTwoIndex];\n listTwoIndex++;\n } else {\n result[i] = list2[listTwoIndex];\n listTwoIndex++;\n listOneIndex++;\n }\n }\n }",
"@Override\n\t\tpublic int compare(WritableComparable a, WritableComparable b) {\n\t\t\tSystem.out.println(\"comparision occur\");\n\t\t\tif (a instanceof IntPair && b instanceof IntPair) {\n\t\t\t\treturn ((IntPair) a).id.compareTo(((IntPair) b).id);\n\t\t\t}\n\t\t\treturn super.compare(a, b);\n\t\t}",
"public void mergeResponse(ToDeviceMsg response) {\n this.response = response;\n }",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof Biometric)) {\n return false;\n }\n Biometric other = (Biometric) object;\n if ((this.deviceId == null && other.deviceId != null) || (this.deviceId != null && !this.deviceId.equals(other.deviceId))) {\n return false;\n }\n return true;\n }",
"private List<Conference> allocateTrackTwoAm(List<Conference> listTemp) {\r\n\t\tint sum2 = 0;\r\n\t\tList<Conference> listTemp2 = new LinkedList<Conference>();\r\n\t\tlistTemp2.addAll(listTemp);\r\n\t\twhile (sum2 != AM_MINUTES) {\r\n\t\t\tInteger index = random.nextInt(listTemp2.size());\r\n\t\t\tConference ele = listTemp2.get(index);\r\n\t\t\tlistTemp2.remove((int)index);\r\n\t\t\tsuper.trackTwoAm.add(ele);\r\n\t\t\tif ((sum2 += ele.getTimeDuration()) > AM_MINUTES) {\r\n\t\t\t\tsum2 = 0;\r\n\t\t\t\tsuper.trackTwoAm.clear();\r\n\t\t\t\tlistTemp2.clear();\r\n\t\t\t\tlistTemp2.addAll(listTemp);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn listTemp2;\r\n\t}",
"private String combineIntoSandhi(String anta, String adi)\n {\n String apavada = apavada_vriddhi(anta, adi);\n if (!apavada.equals(\"UNAPPLICABLE\")) // implies that they apply,\n // hence go no furthur\n return apavada;\n return utsarga_sandhi(anta, adi);\n }",
"public void handleAdvertisement() {\n BGPUpdate nextUpdate = this.incUpdateQueue.poll();\n if (nextUpdate == null) {\n return;\n }\n\n /*\n * Fetch some fields in the correct form\n */\n int advPeer, dest;\n if (nextUpdate.isWithdrawal()) {\n advPeer = nextUpdate.getWithdrawer().asn;\n dest = nextUpdate.getWithdrawnDest();\n } else {\n advPeer = nextUpdate.getPath().getNextHop();\n dest = nextUpdate.getPath().getDest();\n }\n\n /*\n * Setup some objects if this the first time seeing a peer/dest\n */\n if (this.inRib.get(dest) == null) {\n this.inRib.put(dest, new ArrayList<BGPPath>());\n }\n\n /*\n * If there was a rotue to remove from the adjInRib, clean up the inRib\n * as well\n */\n List<BGPPath> destRibList = this.inRib.get(dest);\n for (int counter = 0; counter < destRibList.size(); counter++) {\n if (destRibList.get(counter).getNextHop() == advPeer) {\n destRibList.remove(counter);\n\n break;\n }\n }\n\n /*\n * Add the new route to the ribs, if it is a loop then DON'T add it to\n * ribs\n */\n if ((!nextUpdate.isWithdrawal()) && (!nextUpdate.getPath().containsLoop(this.asn))) {\n destRibList.add(nextUpdate.getPath());\n }\n\n recalcBestPath(dest);\n }",
"public void merge(Tuple tup) {\n\t\t\n\t}",
"private void updateExtendedId() {\r\n\t\tif (category != null && source != null && sink != null) {\r\n\t\t\tif (logger.isLoggable(Level.FINEST)) {\r\n\t\t\t\tlogger.log(Level.FINEST, \"ExtendedID updated\", TaskManager\r\n\t\t\t\t\t\t.getCurrentTick());\r\n\t\t\t}\r\n\t\t\textendedId = new ExtendedId(source.getId(), sink.getExtendedId(),\r\n\t\t\t\t\tcategory.getId());\r\n\t\t}\r\n\t}",
"public static void prefixMerge(Client [] list1, Client [] list2, Client[] result){\n int resultCount = 0;\n for (int i = 0; resultCount < result.length; i++) //goes through list1 up until the end of result\n {\n for (int j = 0; j < list2.length && resultCount < result.length; j++) //goes through list2 up until the end of list2\n {\n for (int k = 0; k < resultCount; k++) { //check if current element of list2 is already in result\n if (list2[j].compareClient(result[k]) == 0) { j++; } //without this there is an issue where the previous element of list1 is\n } //repeated in list2 but the current element of list1 is larger\n\n if (list2[j].compareClient(list1[i]) < 0) { //copies current element of list2 to result if it is smaller\n result[resultCount] = list2[j]; //than current element of list1\n resultCount++;\n }\n }\n if (resultCount < result.length) { //copies current element of list1 to result if there is room in result\n result[resultCount] = list1[i]; // needed if statement because of outOfBounds exception where all elements\n resultCount++; //in result were already filled by list2\n }\n }\n\n }",
"public List<AuctionItem> joinAH(IDRecord myRecord, int secretKey){\n IDRecord temp = new IDRecord(myRecord.getRecordType(),myRecord.getName()\n ,myRecord.getInitialBalance(),\n myRecord.getHostname(),myRecord.getPortNumber());\n temp.setNumericalID(secretKey);\n Message<IDRecord> message = new Message<>(Message.MessageIdentifier.\n JOIN_AUCTION_HOUSE,temp);\n Message<AuctionHouseInventory> reply = sendMSG(message);\n if(reply != null){\n if(reply.getMessageIdentifier() == Message.MessageIdentifier.\n LIST_OF_AUCTION_HOUSE_ITEMS){\n return reply.getMessageContent().getAuctions();\n }else if(reply.getMessageIdentifier() == Message.MessageIdentifier.\n CASE_NOT_FOUND){\n System.out.println(\"AuctionHouse missing list of items\");\n }\n }\n return null;\n\n }",
"public static Boolean getAppositivePrs(PairInstance inst) {\n if (inst.getAnaphor().getSentId()!=inst.getAntecedent().getSentId()) \n return false;\n\n// exclude pairs where anaphor is an NE -- this might be a bad idea though..\n if (inst.getAnaphor().isEnamex()) \n return false;\n\n\n if (inst.getAntecedent().isEnamex() &&\n inst.getAnaphor().isEnamex()) {\n\n// exclude pairs of NE that have different type\n\n if (!(inst.getAntecedent().getEnamexType().equals(\n inst.getAnaphor().getEnamexType())))\n return false;\n\n// exclude pairs of LOC-ne\n if (inst.getAntecedent().getEnamexType().toLowerCase().startsWith(\"gpe\"))\n return false;\n if (inst.getAntecedent().getEnamexType().toLowerCase().startsWith(\"loc\"))\n return false;\n }\n\n// should have not-null maxnp-trees (otherwise -- problematic mentions)\n\nTree sentenceTree=inst.getAnaphor().getSentenceTree();\nTree AnaTree=inst.getAnaphor().getMaxNPParseTree();\nTree AnteTree=inst.getAntecedent().getMaxNPParseTree();\nif (sentenceTree==null) return false;\nif (AnaTree==null) return false;\nif (AnteTree==null) return false;\n\n\n// the structure should be ( * (,) (ANA)) or ( * (,) (ANTE)) -- depends on the ordering, annotation, mention extraction etc\n\n if (AnteTree.parent(sentenceTree)==AnaTree) {\n Tree[] chlds=AnaTree.children();\n Boolean lastcomma=false;\n for (int i=0; i<chlds.length && chlds[i]!=AnteTree; i++) {\n lastcomma=false;\n if (chlds[i].value().equalsIgnoreCase(\",\")) lastcomma=true;\n }\n return lastcomma;\n }\n if (AnaTree.parent(sentenceTree)==AnteTree) {\n\n Tree[] chlds=AnteTree.children();\n Boolean lastcomma=false;\n for (int i=0; i<chlds.length && chlds[i]!=AnaTree; i++) {\n lastcomma=false;\n if (chlds[i].value().equalsIgnoreCase(\",\")) lastcomma=true;\n }\n return lastcomma;\n\n }\n\n return false;\n\n }",
"private void mergeAddFriendAToServer(AddFriend.AToServer value) {\n if (reqCase_ == 1 &&\n req_ != AddFriend.AToServer.getDefaultInstance()) {\n req_ = AddFriend.AToServer.newBuilder((AddFriend.AToServer) req_)\n .mergeFrom(value).buildPartial();\n } else {\n req_ = value;\n }\n reqCase_ = 1;\n }",
"public HashMap<Integer, String> getInterIDsStatus(ArrayList<Integer> interIDs, int networkID, int exporterNumber){\n \n HashMap<Integer, String> result = new HashMap();\n ArrayList<Integer> checkedInterIDs = new ArrayList();\n ArrayList<Integer> interIDsWithSameEventID;\n \n String query;\n String eventID;\n try{\n for(int interID : interIDs){\n \n if(!checkedInterIDs.contains(interID)){\n \n interIDsWithSameEventID = new ArrayList();\n \n query = \"Select eventID from Interactions where interID = \"+interID+\" and networkID = \"+networkID;\n System.out.println(query);\n rs = stmt.executeQuery(query);\n rs.next();\n eventID = rs.getString(1);\n \n query = \"Select interID from Interactions where eventID = '\"+eventID+\"' and networkID = \"+networkID;\n System.out.println(query);\n rs = stmt.executeQuery(query);\n while(rs.next()){\n interIDsWithSameEventID.add(rs.getInt(1));\n }\n \n for(int intID : interIDsWithSameEventID){\n query = \"Select name from ExportStates where exportStateID = (Select exportStateID from ExportHistory where interID = \"+\n intID+\" and exporterNum = \"+exporterNumber+\")\";\n System.out.println(query);\n rs = stmt.executeQuery(query);\n rs.next();\n \n result.put(intID, rs.getString(1));\n } \n }\n }\t\n }catch(Exception e){\n \tSystem.out.println(\"Error to find Skip Duplicate Interaction\");\n \te.printStackTrace();\n }\n return result;\n }",
"public void sendUserSwitchBroadcasts(int oldUserId, int newUserId) {\n int i = oldUserId;\n int i2 = newUserId;\n long ident = Binder.clearCallingIdentity();\n if (i >= 0) {\n try {\n List<UserInfo> profiles = this.mInjector.getUserManager().getProfiles(i, false);\n int count = profiles.size();\n for (int i3 = 0; i3 < count; i3++) {\n int profileUserId = profiles.get(i3).id;\n Intent intent = new Intent(\"android.intent.action.USER_BACKGROUND\");\n intent.addFlags(1342177280);\n intent.putExtra(\"android.intent.extra.user_handle\", profileUserId);\n Intent intent2 = intent;\n this.mInjector.broadcastIntent(intent, null, null, 0, null, null, null, -1, null, false, false, ActivityManagerService.MY_PID, 1000, profileUserId);\n }\n } catch (Throwable th) {\n Binder.restoreCallingIdentity(ident);\n throw th;\n }\n }\n if (i2 >= 0) {\n List<UserInfo> profiles2 = this.mInjector.getUserManager().getProfiles(i2, false);\n int count2 = profiles2.size();\n for (int i4 = 0; i4 < count2; i4++) {\n int profileUserId2 = profiles2.get(i4).id;\n Intent intent3 = new Intent(\"android.intent.action.USER_FOREGROUND\");\n intent3.addFlags(1342177280);\n intent3.putExtra(\"android.intent.extra.user_handle\", profileUserId2);\n Intent intent4 = intent3;\n this.mInjector.broadcastIntent(intent3, null, null, 0, null, null, null, -1, null, false, false, ActivityManagerService.MY_PID, 1000, profileUserId2);\n }\n Intent intent5 = new Intent(\"android.intent.action.USER_SWITCHED\");\n intent5.addFlags(1342177280);\n intent5.putExtra(\"android.intent.extra.user_handle\", i2);\n this.mInjector.broadcastIntent(intent5, null, null, 0, null, null, new String[]{\"android.permission.MANAGE_USERS\"}, -1, null, false, false, ActivityManagerService.MY_PID, 1000, -1);\n }\n Binder.restoreCallingIdentity(ident);\n }",
"@Override\n public boolean onCreate() {\n TelephonyManager tel = (TelephonyManager) getContext().getSystemService(Context.TELEPHONY_SERVICE);\n String portStr = tel.getLine1Number().substring(tel.getLine1Number().length() - 4);\n myPort = String.valueOf((Integer.parseInt(portStr) * 2));\n Log.d(TAG, myPort);\n\n Uri.Builder uriBuilder = new Uri.Builder();\n uriBuilder.authority(\"edu.buffalo.cse.cse486586.simpledht.provider\");\n uriBuilder.scheme(\"content\");\n uri = uriBuilder.build();\n\n try {\n avds = new TreeMap<String, String>();\n avdList = new String[5];\n avdList[0] = genHash(\"5554\");\n avdList[1] = genHash(\"5556\");\n avdList[2] = genHash(\"5558\");\n avdList[3] = genHash(\"5560\");\n avdList[4] = genHash(\"5562\");\n\n Log.d(TAG, \"onCreate avdList: \"+Arrays.toString(avdList));\n\n avds.put(avdList[0], \"11108\");\n avds.put(avdList[1], \"11112\");\n avds.put(avdList[2], \"11116\");\n avds.put(avdList[3], \"11120\");\n avds.put(avdList[4], \"11124\");\n\n Arrays.sort(avdList);\n Log.d(TAG, \"onCreate sorted avdList: \"+Arrays.toString(avdList));\n Log.d(TAG, \"onCreate avds: \"+avds.entrySet());\n\n ServerSocket serverSocket = new ServerSocket(SERVER_PORT);\n new ServerTask().executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, serverSocket);\n } catch (IOException e) {\n /*\n * Log is a good way to debug your code. LogCat prints out all the messages that\n * Log class writes.\n *\n * Please read http://developer.android.com/tools/debugging/debugging-projects.html\n * and http://developer.android.com/tools/debugging/debugging-log.html\n * for more information on debugging.\n */\n Log.e(TAG, \"Can't create a ServerSocket\");\n } catch (NoSuchAlgorithmException e) {\n Log.e(TAG, \"NoSuchAlgorithmException\"+e);\n }\n\n new RecoveryTask().executeOnExecutor(AsyncTask.SERIAL_EXECUTOR);\n\n return false;\n }",
"public void follow(int followerId, int followeeId) {\n if(!users.containsKey(followerId) && followerId != followeeId){ // If user is not in database\n HashSet<Integer> u_id = new HashSet<>();\n users.put(followerId, u_id);\n }\n users.get(followerId).add(followeeId); // Add the user and the followee to the hashmap\n }",
"@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\tif(resultCode==2){\n\t\t\tHashMap<String, Object> map=new HashMap<String, Object>();\n\t\t\tmap.put(\"id\",data.getLongExtra(\"id\", -1));\n\t\t\tmap.put(\"members\", RecordUtil.shareRecordUtil(this).idToName(data.getStringExtra(\"ids\")));\n\t\t\tlist.addFirst(map);\n\t\t\tadapter.notifyDataSetChanged();\n\t\t}\n\t}",
"private boolean compareChatUsers(ID id1, ID id2) {\n IChatID cid1 = (IChatID) id1.getAdapter(IChatID.class);\n IChatID cid2 = (IChatID) id2.getAdapter(IChatID.class);\n if (cid1 == null || cid2 == null)\n return false;\n return (cid1.getUsername().equals(cid2.getUsername()) && cid1.getHostname().equals(cid2.getHostname()));\n }",
"public static Boolean sync(Management management) {\n final List<Relay> relays = RelayConfigReader.getRelayList();\n if (!relays.isEmpty()) {\n for (Relay relay : relays) {\n final String appId = relay\n .getCustomPropertyByName(management.getAppType().toString().toLowerCase() + \"Id\");\n if (OpenHabRestApiClient.checkItemExists(management, appId)) {\n OpenHabRestApiClient.updateItemState(management, appId,\n translateOutputState(relay, Gpio.digitalRead(relay.getPin()) == 0));\n IoTLogger.getInstance().info(\"Item with id (\" + appId + \") exists in OpenHAB. Synced.\");\n } else {\n IoTLogger.getInstance().error(\"No item with id (\" + appId + \") in OpenHAB\");\n }\n }\n }\n // Sync contact states known to agent\n final List<ContactSensor> contactSensors = ContactsConfigReader.getContacts();\n if (!contactSensors.isEmpty()) {\n for (ContactSensor contactSensor : contactSensors) {\n final String appId = contactSensor\n .getCustomPropertyByName(management.getAppType().toString().toLowerCase() + \"Id\");\n if (OpenHabRestApiClient.checkItemExists(management, appId)) {\n OpenHabRestApiClient.updateItemState(management, appId,\n translateContactState(contactSensor, Gpio.digitalRead(contactSensor.getPin()) == 1));\n IoTLogger.getInstance().info(\"Item with id (\" + appId + \") exists in OpenHAB. Synced.\");\n } else {\n IoTLogger.getInstance().error(\"No item with id (\" + appId + \") in OpenHAB\");\n }\n }\n }\n // Sync temperature sensors known to agent\n final List<TemperatureSensor> tempSensors = TemperatureConfigReader.getTemperatureSesorList();\n if (!tempSensors.isEmpty()) {\n for (TemperatureSensor tempSensor : tempSensors) {\n final String appId = tempSensor\n .getCustomPropertyByName(management.getAppType().toString().toLowerCase() + \"Id\");\n if (OpenHabRestApiClient.checkItemExists(management, appId)) {\n try {\n OpenHabRestApiClient.updateItemState(management, appId,\n Float.toString(TemperatureSensorControllerFactory.getTemperatureSensorReader()\n .readTemperature(tempSensor)));\n } catch (ThingException e) {\n IoTLogger.getInstance().error(\"Failed to read temperature sensor value.\");\n }\n IoTLogger.getInstance().info(\"Item with id (\" + appId + \") exists in OpenHAB. Synced.\");\n } else {\n IoTLogger.getInstance().error(\"No item with id (\" + appId + \") in OpenHAB\");\n }\n }\n }\n return true;\n }",
"@GuardedBy(\"AudioDeviceBroker.mDeviceStateLock\")\n @VisibleForTesting\n public void onSetA2dpSinkConnectionState(@NonNull BtHelper.BluetoothA2dpDeviceInfo btInfo,\n @AudioService.BtProfileConnectionState int state) {\n final BluetoothDevice btDevice = btInfo.getBtDevice();\n int a2dpVolume = btInfo.getVolume();\n if (AudioService.DEBUG_DEVICES) {\n Log.d(TAG, \"onSetA2dpSinkConnectionState btDevice=\" + btDevice + \" state=\"\n + state + \" is dock=\" + btDevice.isBluetoothDock() + \" vol=\" + a2dpVolume);\n }\n String address = btDevice.getAddress();\n if (!BluetoothAdapter.checkBluetoothAddress(address)) {\n address = \"\";\n }\n\n final int a2dpCodec = btInfo.getCodec();\n\n AudioService.sDeviceLogger.log(new AudioEventLogger.StringEvent(\n \"A2DP sink connected: device addr=\" + address + \" state=\" + state\n + \" codec=\" + a2dpCodec\n + \" vol=\" + a2dpVolume));\n\n synchronized (mConnectedDevices) {\n final String key = DeviceInfo.makeDeviceListKey(AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP,\n btDevice.getAddress());\n final DeviceInfo di = mConnectedDevices.get(key);\n boolean isConnected = di != null;\n\n if (isConnected) {\n if (state == BluetoothProfile.STATE_CONNECTED) {\n // device is already connected, but we are receiving a connection again,\n // it could be for a codec change\n if (a2dpCodec != di.mDeviceCodecFormat) {\n mDeviceBroker.postBluetoothA2dpDeviceConfigChange(btDevice);\n }\n } else {\n if (btDevice.isBluetoothDock()) {\n if (state == BluetoothProfile.STATE_DISCONNECTED) {\n // introduction of a delay for transient disconnections of docks when\n // power is rapidly turned off/on, this message will be canceled if\n // we reconnect the dock under a preset delay\n makeA2dpDeviceUnavailableLater(address,\n AudioDeviceBroker.BTA2DP_DOCK_TIMEOUT_MS);\n // the next time isConnected is evaluated, it will be false for the dock\n }\n } else {\n makeA2dpDeviceUnavailableNow(address, di.mDeviceCodecFormat);\n }\n }\n } else if (!isConnected && state == BluetoothProfile.STATE_CONNECTED) {\n if (btDevice.isBluetoothDock()) {\n // this could be a reconnection after a transient disconnection\n mDeviceBroker.cancelA2dpDockTimeout();\n mDockAddress = address;\n } else {\n // this could be a connection of another A2DP device before the timeout of\n // a dock: cancel the dock timeout, and make the dock unavailable now\n if (mDeviceBroker.hasScheduledA2dpDockTimeout() && mDockAddress != null) {\n mDeviceBroker.cancelA2dpDockTimeout();\n makeA2dpDeviceUnavailableNow(mDockAddress,\n AudioSystem.AUDIO_FORMAT_DEFAULT);\n }\n }\n if (a2dpVolume != -1) {\n mDeviceBroker.postSetVolumeIndexOnDevice(AudioSystem.STREAM_MUSIC,\n // convert index to internal representation in VolumeStreamState\n a2dpVolume * 10,\n AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP, \"onSetA2dpSinkConnectionState\");\n }\n makeA2dpDeviceAvailable(address, BtHelper.getName(btDevice),\n \"onSetA2dpSinkConnectionState\", a2dpCodec);\n }\n }\n }",
"public void joinChannel() {\n String userId = AuthenticationSingleton.getAdaptedInstance().getUid();\n String token1 = generateToken(userId);\n mRtcEngine.setAudioProfile(Constants.AUDIO_SCENARIO_SHOWROOM, Constants.AUDIO_SCENARIO_GAME_STREAMING);\n int joinStatus = mRtcEngine.joinChannelWithUserAccount(token1, appointment.getId(), userId);\n if (joinStatus == SUCCESS_CODE) {\n appointment.addInCallUser(new DatabaseUser(userId));\n }\n }",
"private void mergeAddFriendFromSelfRsp(AddFriendFromSelf.Rsp value) {\n if (rspCase_ == 13 &&\n rsp_ != AddFriendFromSelf.Rsp.getDefaultInstance()) {\n rsp_ = AddFriendFromSelf.Rsp.newBuilder((AddFriendFromSelf.Rsp) rsp_)\n .mergeFrom(value).buildPartial();\n } else {\n rsp_ = value;\n }\n rspCase_ = 13;\n }",
"private void updateBluetoothList(){\n\t\tif(bluetoothAdapter == null){\n\t\t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n\t\t\tbuilder.setTitle(R.string.no_bt_error_dialog_title);\n\t\t\tbuilder.setMessage(R.string.no_bt_error_dialog_message);\n\t\t\tbuilder.setNeutralButton(R.string.no_bt_error_dialog_btn, new OnClickListener() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\tfinish();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\t\n\t\t//check if it is enabled\n//\t\tif (!bluetoothAdapter.isEnabled()) {\n//\t\t Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n//\t\t startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\n//\t\t}\n\t\t\n\t\tSet<BluetoothDevice> pairedDevices = bluetoothAdapter\n\t\t\t\t.getBondedDevices();\n\t\t\n\t\tpairedlist = new ArrayList<BluetoothDevice>();\n\t\t\n\t\tif (pairedDevices.size() > 0) {\n\t\t\tfor (BluetoothDevice device : pairedDevices) {\n\t\t\t\tif (isDeviceUsefulForSMS(device.getBluetoothClass()\n\t\t\t\t\t\t.getMajorDeviceClass())) {\n\t\t\t\t\tpairedlist.add(device);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(pairedlist.size() <= 0){\n\t\t\tshowBTPairedDialog();\n\t\t}\n\t\t\n\t\tupdateBTListView();\n\t}",
"private void onDevicesListUpdate(Map<String, Boolean> newValue, Map<String, Boolean> oldValue) {\n newValue = newValue == null ? Collections.<String, Boolean>emptyMap() : newValue;\n oldValue = oldValue == null ? Collections.<String, Boolean>emptyMap() : oldValue;\n\n for (Map.Entry<String, Boolean> entry : newValue.entrySet()) {\n String entryKey = entry.getKey();\n if (!oldValue.containsKey(entryKey) && !(entryKey).equals(getMyDeviceId())) {\n onDeviceConnected(entryKey, entry.getValue());\n }\n }\n\n for (Map.Entry<String, Boolean> entry : oldValue.entrySet()) {\n String entryKey = entry.getKey();\n if (!newValue.containsKey(entryKey) && !(entryKey).equals(getMyDeviceId())) {\n onDeviceDisconnected(entryKey, entry.getValue());\n }\n }\n }",
"private static List<WayNodeOSM> concatMetanodes(List<WayNodeOSM>metaNodes1, List<WayNodeOSM>metaNodes2, long duplicateNode) {\n \t\t// turn the lists the right way round\n \t\tif ( metaNodes1.get(0).getID() == duplicateNode){\n \t\t\tCollections.reverse(metaNodes1);\n \t\t}\n \t\tif (!( metaNodes2.get(0).getID() == duplicateNode)) {\n \t\t\tCollections.reverse(metaNodes2);\n \t\t}\n \t\t// remove the duplicate, then concat\n \t\tmetaNodes1.remove(metaNodes1.size() - 1);\n \t\tmetaNodes1.addAll(metaNodes2);\n \t\treturn metaNodes1;\n \t}",
"public void discoveryFinished(ArrayList<Device> wifiDevices, ArrayList<Device> bluetoothDevices) {\n if (willUpdateDeviceList) {\n this.wifiDevices = wifiDevices;\n this.bluetoothDevices = bluetoothDevices;\n if (combinedDeviceList.size() > 0)\n combinedDeviceList.clear();\n combinedDeviceList.addAll(this.bluetoothDevices);\n combinedDeviceList.addAll(this.wifiDevices);\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n deviceListAdapter.notifyDataSetChanged();\n }\n });\n if (!rssiRecorded) {\n if (Constants.EXP_NO == Constants.MAX_NO_OF_EXPS) {\n showToast(\"rssi recorded\", 1);\n Constants.EXP_NO = 0;\n rssiRecorded = true;\n writeResult(null, Constants.RSSI, Constants.BLUETOOTH_DEVICE);\n }\n else {\n rssiDevices.addAll(this.bluetoothDevices);\n Constants.EXP_NO++;\n }\n }\n }\n }",
"@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:59:45.475 -0500\", hash_original_method = \"E8061690950B5AC4037948D29BFD7764\", hash_generated_method = \"8302A676A8C20EDE123C534A387EF955\")\n \npublic int connectSync(Context srcContext, Handler srcHandler, Handler dstHandler) {\n return connectSync(srcContext, srcHandler, new Messenger(dstHandler));\n }"
] | [
"0.5310538",
"0.5026461",
"0.5003528",
"0.49743488",
"0.4945283",
"0.4926277",
"0.490404",
"0.4900265",
"0.48421112",
"0.48274633",
"0.48254246",
"0.47899294",
"0.47874257",
"0.47538438",
"0.47382563",
"0.46852738",
"0.46417284",
"0.46119857",
"0.4594828",
"0.45905855",
"0.45873383",
"0.45805618",
"0.45773193",
"0.45741487",
"0.45714632",
"0.45535123",
"0.45363337",
"0.45298976",
"0.45169145",
"0.4514381",
"0.4507327",
"0.4501186",
"0.44692665",
"0.4467006",
"0.4456602",
"0.44502613",
"0.44446585",
"0.44205308",
"0.44101712",
"0.43996483",
"0.4394887",
"0.43915904",
"0.4384602",
"0.4371282",
"0.43687662",
"0.43568107",
"0.4354144",
"0.43508378",
"0.43431878",
"0.43411317",
"0.4338222",
"0.4336593",
"0.4332443",
"0.4331287",
"0.43162793",
"0.43152422",
"0.43142337",
"0.4306776",
"0.4305965",
"0.42953458",
"0.42912388",
"0.429118",
"0.4283192",
"0.42764083",
"0.42670715",
"0.42495415",
"0.4234744",
"0.42302892",
"0.42286226",
"0.42197502",
"0.4216444",
"0.42164356",
"0.42084736",
"0.42031318",
"0.41976666",
"0.41823456",
"0.4181902",
"0.41760927",
"0.4174762",
"0.41712555",
"0.416699",
"0.4165405",
"0.41650584",
"0.416171",
"0.41533062",
"0.41468087",
"0.4146293",
"0.41462034",
"0.41449556",
"0.41433367",
"0.41432944",
"0.41412872",
"0.41402653",
"0.41369087",
"0.41367134",
"0.41298047",
"0.41239145",
"0.41220534",
"0.4120877",
"0.41186017",
"0.41183558"
] | 0.0 | -1 |
When bluetooth service connected update the UI | @Override
public void onServiceConnected() {
forceUpdate();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void updateUI() {\n Log.i(DEBUG.TAG, \"BTDevicesActivity - updateUI - start\");\n\n btnBTScan.setEnabled(btAdapter.isEnabled() && !btAdapter.isDiscovering());\n\n if (btAdapter.isDiscovering())\n btnBTScan.setText(R.string.btn_bt_devices_scan_running_text);\n else\n btnBTScan.setText(R.string.btn_bt_devices_scan_text);\n tglBTToggle.setChecked(btAdapter.isEnabled());\n\n // remove all found (if any) devices when BT is disabled\n if (!btAdapter.isEnabled())\n lvAdapter.clear();\n\n if (lvAdapter.getCount() > 0)\n tvHeader.setText(R.string.tv_bt_devices_header_text_devices_found);\n else\n tvHeader.setText(R.string.tv_bt_devices_header_text_no_devices);\n\n Log.i(DEBUG.TAG, \"BTDevicesActivity - updateUI - finish\");\n }",
"public void onServiceConnected(ComponentName className, IBinder service) {\n\t\t\tmBoundService = ((LocalService.LocalBinder) service).getService();\r\n\r\n\t\t\t// Wenn während des Setups der Service noch nicht fertig geladen\r\n\t\t\t// ist, wird solange Warte-Overlay angezeigt\r\n\t\t\t// Wenn der Service fertig ist wird das Overlay ausgeblendet\r\n\r\n\t\t\t// if (OverlayActivity.isCreated) {\r\n\t\t\t// OverlayActivity.getInstance().dismiss();\r\n\t\t\t// }\r\n\t\t\tSetupSearchDevicesFragment fragment = (SetupSearchDevicesFragment) getFragmentById(\"SetupSearchDevicesFragment\");\r\n\t\t\tif (fragment.isVisible()) {\r\n\t\t\t\tfragment.initViewBluetooth();\r\n\t\t\t}\r\n\r\n\t\t\t// Tell the user about this for our demo.\r\n\t\t\tLog.i(TAG, \"Service connected with app...\");\r\n\t\t\t// Toast.makeText(MainActivity.this, \"Service connected.\", Toast.LENGTH_SHORT).show();\r\n\r\n\t\t\t// Verbinde mit gespeichertem Device (falls noch keine Verbindung\r\n\t\t\t// besteht)\r\n\t\t\tif (mSharedPrefs.getConnectivityType() == 1) { // BEI BT\r\n\r\n\t\t\t\tfinal ConnectionInterface connection = mBoundService.getConnection();\r\n\t\t\t\tif (connection != null) {\r\n\t\t\t\t\tif (!connection.isConnected()) {\r\n\r\n\t\t\t\t\t\t// OnConnectedListener\r\n\t\t\t\t\t\tconnection.setOnConnectedListener(new OnConnectedListener() {\r\n\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\tpublic void onConnectedListener(String deviceName) {\r\n\r\n\t\t\t\t\t\t\t\tconnection.registerDisconnectHandler();\r\n\r\n\t\t\t\t\t\t\t\tif (mSharedPrefs.getDeviceMode() == 1) { // ELTERN\r\n\t\t\t\t\t\t\t\t\t// HELLO Nachricht senden\r\n\t\t\t\t\t\t\t\t\tString msg = mContext.getString(R.string.BABYFON_MSG_CONNECTION_HELLO) + \";\"\r\n\t\t\t\t\t\t\t\t\t\t\t+ mSharedPrefs.getHostAddress() + \";\" + mSharedPrefs.getPassword();\r\n\t\t\t\t\t\t\t\t\tconnection.sendMessage(msg);\r\n\r\n\t\t\t\t\t\t\t\t\tmSharedPrefs.setRemoteOnlineState(true);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\tif (mSharedPrefs.getDeviceMode() == 1) { // ELTERN\r\n\t\t\t\t\t\t\tif (mSharedPrefs.getRemoteAddress() != null) { // Gespeichertes Gerät\r\n\t\t\t\t\t\t\t\t// Verbinde\r\n\t\t\t\t\t\t\t\tmBoundService.connectTo(mSharedPrefs.getRemoteAddress());\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else if (mSharedPrefs.getDeviceMode() == 0) { // BABY\r\n\t\t\t\t\t\t\t// Warte auf Verbindung\r\n\t\t\t\t\t\t\tmBoundService.startServer();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}",
"public void onStart(){ \r\n\t\t//ensure bluetooth is enabled \r\n\t\tensureBluetoothIsEnabled();\r\n\t\tsuper.onStart(); \t\r\n\t}",
"private void execHandlerConnected( Message msg ) {\t\n\t\t// save Device Address\n\t\tif ( mBluetoothService != null ) {\n\t\t\tString address = mBluetoothService.getDeviceAddress();\n\t\t\tsetPrefAddress( address );\n\t\t}\t\n\t\tshowTitleConnected( getDeviceName() );\n\t\thideButtonConnect();\n\t}",
"private void updateBluetoothList(){\n\t\tif(bluetoothAdapter == null){\n\t\t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n\t\t\tbuilder.setTitle(R.string.no_bt_error_dialog_title);\n\t\t\tbuilder.setMessage(R.string.no_bt_error_dialog_message);\n\t\t\tbuilder.setNeutralButton(R.string.no_bt_error_dialog_btn, new OnClickListener() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\tfinish();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\t\n\t\t//check if it is enabled\n//\t\tif (!bluetoothAdapter.isEnabled()) {\n//\t\t Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n//\t\t startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\n//\t\t}\n\t\t\n\t\tSet<BluetoothDevice> pairedDevices = bluetoothAdapter\n\t\t\t\t.getBondedDevices();\n\t\t\n\t\tpairedlist = new ArrayList<BluetoothDevice>();\n\t\t\n\t\tif (pairedDevices.size() > 0) {\n\t\t\tfor (BluetoothDevice device : pairedDevices) {\n\t\t\t\tif (isDeviceUsefulForSMS(device.getBluetoothClass()\n\t\t\t\t\t\t.getMajorDeviceClass())) {\n\t\t\t\t\tpairedlist.add(device);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(pairedlist.size() <= 0){\n\t\t\tshowBTPairedDialog();\n\t\t}\n\t\t\n\t\tupdateBTListView();\n\t}",
"@Override\r\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\twait_time = 0;\r\n\t\t\t\t\t\t\twhile (true) {\r\n\t\t\t\t\t\t\t\tif (HomeView.ble_status == 0\r\n\t\t\t\t\t\t\t\t\t\t|| HomeView.ble_status == 1\r\n\t\t\t\t\t\t\t\t\t\t|| HomeView.ble_status == 2) {\r\n\r\n\t\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\t\tscanLeDevice(true);\r\n\t\t\t\t\t\t\t\t\t\tbluetoothSwitch = true;\r\n\t\t\t\t\t\t\t\t\t\tsetUI();\r\n\t\t\t\t\t\t\t\t\t\trunOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\t\t\t\tprogress.dismiss();\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\t} catch (IllegalArgumentException e) {\r\n\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\twait_time++;\r\n\t\t\t\t\t\t\t\tif (wait_time > 5) {\r\n\t\t\t\t\t\t\t\t\trunOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\t\t\tprogress.dismiss();\r\n\t\t\t\t\t\t\t\t\t\t\twait_time = 0;\r\n\t\t\t\t\t\t\t\t\t\t\tbluetoothSwitch = false;\r\n\t\t\t\t\t\t\t\t\t\t\tsetUI();\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\t\tThread.sleep(1000);\r\n\t\t\t\t\t\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}",
"public void onServiceConnected() {\r\n\t\tapiEnabled = true;\r\n\r\n\t\t// Display the list of calls\r\n\t\tupdateList();\r\n }",
"void setBluetoothService(BluetoothService bluetoothService);",
"private void connect() {\n // after 10 seconds its connected\n new Handler().postDelayed(\n new Runnable() {\n public void run() {\n Log.d(TAG, \"Bluetooth Low Energy device is connected!!\");\n // Toast.makeText(getApplicationContext(),\"Connected!\",Toast.LENGTH_SHORT).show();\n stateService = Constants.STATE_SERVICE.CONNECTED;\n startForeground(Constants.NOTIFICATION_ID_FOREGROUND_SERVICE, prepareNotification());\n }\n }, 10000);\n\n }",
"@SuppressLint(\"NewApi\")\n @Override\n public void onServiceConnected(ComponentName name, IBinder service) {\n bleService = ((BleService.LocalBinder) service).getService();\n if (!bleService.init()) {\n finish();\n }\n bleService.connect(Home_Fragment.Device_Address);\n mpd = ProgressDialog.show(Dialog_Activity.this, null, \"正在连接设备...\");\n Log.i(\"DeviceConnect\", \"onServiceConnected: \");\n }",
"@Override\n public void onServiceConnected(ComponentName componentName, IBinder service) {\n mNanoBLEService = ((NanoBLEService.LocalBinder) service).getService();\n\n //initialize bluetooth, if BLE is not available, then finish\n if (!mNanoBLEService.initialize()) {\n finish();\n }\n\n //Start scanning for devices that match DEVICE_NAME\n final BluetoothManager bluetoothManager =\n (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE);\n mBluetoothAdapter = bluetoothManager.getAdapter();\n mBluetoothLeScanner = mBluetoothAdapter.getBluetoothLeScanner();\n if(mBluetoothLeScanner == null){\n finish();\n Toast.makeText(NewScanActivity.this, \"Please ensure Bluetooth is enabled and try again\", Toast.LENGTH_SHORT).show();\n }\n mHandler = new Handler();\n if (SettingsManager.getStringPref(mContext, SettingsManager.SharedPreferencesKeys.preferredDevice, null) != null) {\n preferredDevice = SettingsManager.getStringPref(mContext, SettingsManager.SharedPreferencesKeys.preferredDevice, null);\n scanPreferredLeDevice(true);\n } else {\n scanLeDevice(true);\n }\n }",
"@Override\n\tpublic void completeDeviceConnectService(BTController cbtController) {\n\t\tsuper.completeDeviceConnectService(cbtController);\n\t\tsetDeviceName();\n\t\tsetShowHideConnAnimation();\n\t\tif(view != null){\n\t\t\timageView_to.setVisibility(View.VISIBLE);\n\t\t\timageView_phone.setVisibility(View.VISIBLE);\n\t\t}\n\t\t\n\t}",
"void onStateChange(BluetoothService.BTState state);",
"@Override\r\n\t\t\tpublic void run() {\n\t\t\t\twait_time = 0;\r\n\t\t\t\twhile (true) {\r\n\t\t\t\t\tif (HomeView.ble_status == 0 || HomeView.ble_status == 1\r\n\t\t\t\t\t\t\t|| HomeView.ble_status == 2) {\r\n\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tscanLeDevice(true);\r\n\r\n\t\t\t\t\t\t} catch (IllegalArgumentException e) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbluetoothSwitch = true;\r\n\t\t\t\t\t\tsetUI();\r\n\t\t\t\t\t\trunOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\tprogress.dismiss();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\twait_time++;\r\n\t\t\t\t\tif (wait_time > 5) {\r\n\t\t\t\t\t\trunOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\tprogress.dismiss();\r\n\t\t\t\t\t\t\t\twait_time = 0;\r\n\t\t\t\t\t\t\t\tbluetoothSwitch = false;\r\n\t\t\t\t\t\t\t\tsetUI();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tThread.sleep(1000);\r\n\t\t\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}",
"@Override\r\n\t\t\t\tpublic void run() {\n\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tThread.sleep(1000);\r\n\t\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\twait_time = 0;\r\n\t\t\t\t\twhile (true) {\r\n\t\t\t\t\t\tif (HomeView.ble_status == 0\r\n\t\t\t\t\t\t\t\t|| HomeView.ble_status == 1\r\n\t\t\t\t\t\t\t\t|| HomeView.ble_status == 2) {\r\n\t\t\t\t\t\t\twait_time = -10;\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tscanLeDevice(bluetoothSwitch);\r\n\t\t\t\t\t\t\t\trunOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\t\tprogress.dismiss();\r\n\t\t\t\t\t\t\t\t\t\tsetUI();\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t} catch (IllegalArgumentException e) {\r\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\twait_time++;\r\n\t\t\t\t\t\tif (wait_time > 5) {\r\n\t\t\t\t\t\t\trunOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\tprogress.dismiss();\r\n\t\t\t\t\t\t\t\t\twait_time = 0;\r\n\t\t\t\t\t\t\t\t\tbluetoothSwitch = false;\r\n\t\t\t\t\t\t\t\t\tsetUI();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tThread.sleep(1000);\r\n\t\t\t\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}",
"@Override\n public void onConnect(BluetoothDevice device) {\n Display(\"Vehicle Connected!\");\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n String car = \"DRIVING: \" + name;\n vehicle.setText(car);\n SharedPreferences wheels = getSharedPreferences(\"MyApp\", MODE_PRIVATE);\n wheels.edit().putString(\"vehicle\", name).apply();\n }\n });\n }",
"public void onServiceConnected() {\r\n \t// Display the list of sessions\r\n\t\tupdateList();\r\n }",
"public void setStatus(int status){\n Log.d(TAG, \"-- SET STATUS --\");\n switch(status){\n //connecting to remote device\n case BluetoothClientService.STATE_CONNECTING:{\n Toast.makeText(this, \"Connecting to remote bluetooth device...\", Toast.LENGTH_SHORT).show();\n ToggleButton statusButton = (ToggleButton) this.findViewById(R.id.status_button);\n statusButton.setBackgroundResource(R.drawable.connecting_button);\n break;\n }\n //not connected\n case BluetoothClientService.STATE_NONE:{\n Toast.makeText(this, \"Unable to connect to remote device\", Toast.LENGTH_SHORT).show();\n ToggleButton statusButton = (ToggleButton) this.findViewById(R.id.status_button);\n statusButton.setBackgroundResource(R.drawable.disconnect_button);\n statusButton.setTextOff(getString(R.string.disconnected));\n statusButton.setChecked(false);\n break;\n }\n //established connection to remote device\n case BluetoothClientService.STATE_CONNECTED:{\n Toast.makeText(this, \"Connection established with remote bluetooth device...\", Toast.LENGTH_SHORT).show();\n ToggleButton statusButton = (ToggleButton) this.findViewById(R.id.status_button);\n statusButton.setBackgroundResource(R.drawable.connect_button);\n statusButton.setTextOff(getString(R.string.connected));\n statusButton.setChecked(true);\n //start motion monitor\n motionMonitor = new MotionMonitor(this, mHandler);\n motionMonitor.start();\n break;\n }\n }\n }",
"public void initBT() {\n\n\t\tStatusBox.setText(\"Connecting...\");\n\t\tLog.e(TAG, \"Connecting...\");\n\t\t\n\t\tif (D) {\n\t\t\tLog.e(TAG, \"+ ON RESUME +\");\n\t\t\tLog.e(TAG, \"+ ABOUT TO ATTEMPT CLIENT CONNECT +\");\n\t\t}\n\t\t\n\t\t//If Mac Address is null then stop this process and display message\n\t\tif(MAC_ADDRESS == \"\"){\n\t\t\tLog.e(TAG,\"No MAC Address Found...\");\n\t\t\tToast.makeText(getApplicationContext(), \"No Mac Address found. Please Enter using button.\",Toast.LENGTH_SHORT );\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// When this returns, it will 'know' about the server,\n\t\t// via it's MAC address.\n\t\tBluetoothDevice device = null;\n\t\ttry {\n\t\t\tdevice = mBluetoothAdapter.getRemoteDevice(MAC_ADDRESS);\n\t\t} catch (Exception e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tToast.makeText(getApplicationContext(), \"NOT Valid BT MAC Address\", Toast.LENGTH_SHORT);\n\t\t\te1.printStackTrace();\n\t\t}\n\n\t\t// returns firefly e350\n\t\tLog.e(TAG, \"device name: \" + device.getName());\n\n\t\t// We need two things before we can successfully connect\n\t\t// (authentication issues aside): a MAC address, which we\n\t\t// already have, and an RFCOMM channel.\n\t\t// Because RFCOMM channels (aka ports) are limited in\n\t\t// number, Android doesn't allow you to use them directly;\n\t\t// instead you request a RFCOMM mapping based on a service\n\t\t// ID. In our case, we will use the well-known SPP Service\n\t\t// ID. This ID is in UUID (GUID to you Microsofties)\n\t\t// format. Given the UUID, Android will handle the\n\t\t// mapping for you. Generally, this will return RFCOMM 1,\n\t\t// but not always; it depends what other BlueTooth services\n\t\t// are in use on your Android device.\n\t\ttry {\n\t\t\t\n\t\t\tint currentapiVersion = android.os.Build.VERSION.SDK_INT;\n\t\t\t\n\t\t\t//RFCOMM connection varies depending on android version. Fixes bug in Gingerbread and newer where always asks for BT Pairing code.\n\t\t\tif (currentapiVersion >= android.os.Build.VERSION_CODES.GINGERBREAD_MR1){\n\t\t\t\t//used in android >= 2.3.3\n\t\t\t\tbtSocket = device.createInsecureRfcommSocketToServiceRecord(MY_UUID);\n\t\t\t} else if (currentapiVersion < android.os.Build.VERSION_CODES.GINGERBREAD_MR1){\n\t\t\t\t//used in android < 2.3.3\n\t\t\t\tbtSocket = device.createRfcommSocketToServiceRecord(MY_UUID);\n\t\t\t}\n\t\t\t\n\t\t\tLog.e(TAG, \"ON RESUME: Socket created!\");\n\t\t\n\t\t\n\t\t\t// Discovery may be going on, e.g., if you're running a\n\t\t\t// 'scan for devices' search from your handset's Bluetooth\n\t\t\t// settings, so we call cancelDiscovery(). It doesn't hurt\n\t\t\t// to call it, but it might hurt not to... discovery is a\n\t\t\t// heavyweight process; you don't want it in progress when\n\t\t\t// a connection attempt is made.\n\t\t\tmBluetoothAdapter.cancelDiscovery();\n\n\t\t\tmyBT = new ConnectedThread(btSocket);\n\t\t\t\n\t\t\t\n\t\t\t// don't write to the streams unless they are created\n\t\t\tif (myBT.BTconnStatus) {\n\t\t\t\t\n\t\t\t\tStatusBox.setText(\"CONNECTED\");\n\t\t\t\tLog.e(TAG, \"CONNECTED\");\n\t\t\t\t\n\t\t\t\t// ST,255 enables remote configuration forever...need this if\n\t\t\t\t// resetting\n\t\t\t\t// PIO4 is held high on powerup then toggled 3 times to reset\n\n\t\t\t\t// GPIO Commands to BT device page 15 of commands datasheet\n\t\t\t\tbyte[] cmdMode = { '$', '$', '$' };\n\t\t\t\tmyBT.write(cmdMode);\n\t\t\t\tmyBT.run();\n\n\t\t\t\t// S@,8080 temp sets GPIO-7 to an output\n\t\t\t\tbyte[] cmd1 = { 'S', '@', ',', '8', '0', '8', '0', 13 };\n\n\t\t\t\t// S%,8080 perm sets GPIO-7 to an output on powerup. only done once\n\t\t\t\t// byte [] cmd1 = {'S','%',',','8','0','8','0',13};\n\n\t\t\t\tmyBT.write(cmd1);\n\t\t\t\tmyBT.run();\n\n\t\t\t\t// S&,8000 drives GPIO-7 low\n\t\t\t\t// byte [] cmd2 = {'S','^',',','8','0','0','0',13};\n\n\t\t\t\t// make it so cmd mode won't timeout even after factory reset\n\t\t\t\tbyte[] cmd3 = { 'S', 'T', ',', '2', '5', '5', 13 };\n\t\t\t\tmyBT.write(cmd3);\n\t\t\t\tmyBT.run();\n\n\t\t\t} else {\n\t\t\t\t//StatusBox.setText(\"NOT Connected\");\t\n\t\t\t\tLog.e(TAG, \"NOT Connected\");\n\t\t\t}\n\t\t\n\t\t} catch (IOException e) {\n\t\t\t\n\t\t\tif (D)\n\t\t\t\tLog.e(TAG, \"ON RESUME: Socket creation failed.\", e);\n\t\t}\n\n\t\t\n\t\t\n\t}",
"public interface BluetoothListener {\n\t/**\n\t * Get a description of the game, to be displayed on the BluetoothFragment layout.\n\t * @return\n\t */\n\tString getHelpString();\n\t\n\t/**\n\t * @see #onConnectedAsServer(String)\n\t */\n\tvoid onConnectedAsClient(String deviceName);\n\t\n\t/**\n\t * The 2 devices have established a bluetooth connection.\n\t * The typical action at this point is to hide the bluetooth\n\t * fragment and show the game fragment. From now on the\n\t * communication between client and server is symmetrical:\n\t * both devices can equally send and receive messages.\n\t * \n\t * Sometimes it is useful to know which device requested the\n\t * connection (the client) and which side accepted that\n\t * connection (the server).\n\t * \n\t * @param deviceName the name of the remote device\n\t */\n\tvoid onConnectedAsServer(String deviceName);\n\t\n\t/**\n\t * Typically the Activity will hide the game fragment and show\n\t * the BluetoothFragment, to allow the user to re-connect.\n\t */\n\tvoid onConnectionLost();\n\t\n\tvoid onError(String message);\n\t\n\t/**\n\t * A data message has been received from the remote device.\n\t * This corresponds to the other device performing a write().\n\t * @see BluetoothService#write(byte[] data)\n\t * \n\t * @param data\n\t */\n\tvoid onMessageRead(byte[] data);\n\t\n\t/**\n\t * A status message sent by the bluetooth service to be displayed\n\t * by the activity using Toast.\n\t * @param string\n\t */\n\tvoid onMessageToast(String string);\n\t\n\t/**\n\t * Called when the state of the bluetooth service has changed.\n\t * @see class BluetoothService.BTState for possible values.\n\t * @param state\n\t */\n\tvoid onStateChange(BluetoothService.BTState state);\n\t\n\t/**\n\t * Pass the object that will handle bluetooth communication.\n\t * Null if bluetooth not available on this device.\n\t * The main method to use in communication is write(byte[] data)\n\t * \n\t * @see BluetoothService#write(byte[] data)\n\t * @param bluetoothService\n\t */\n\tvoid setBluetoothService(BluetoothService bluetoothService);\n\n\t/**\n\t * A status message sent by the bluetooth service to be displayed\n\t * somewhere.\n\t * @param message\n\t */\n\tvoid setStatusMessage(String message);\n}",
"@Override\n public void onBluetoothDeviceFound(BluetoothDevice btDevice) {\n }",
"void onConnected() {\n closeFab();\n\n if (pendingConnection != null) {\n // it'd be null for dummy connection\n historian.connect(pendingConnection);\n }\n\n connections.animate().alpha(1);\n ButterKnife.apply(allViews, ENABLED, true);\n startActivity(new Intent(this, ControlsActivity.class));\n }",
"public void onServiceConnected(ComponentName arg0, IBinder service) {\n\t\t\tLog.d(\"ShimmerService\", \"Service connected\");\n\t\t\tLocalBinder binder = (ShimmerService.LocalBinder) service;\n\t\t\tmService = binder.getService();\n\t\t\tmServiceBind = true;\n\t\t\tmService.setHandlerMain(mHandler);\n\t\t\t// update the view\n\t\t}",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n setContentView(R.layout.activity_main);\n btnOn = findViewById(R.id.bluetoothStart); // кнопка включения\n btnOff = findViewById(R.id.bluetoothStop); // кнопка выключения\n statusText = findViewById(R.id.statusBluetooth); // для вывода текста, полученного\n btState = findViewById(R.id.bluetoothIm);\n workState = findViewById(R.id.workStatIm);\n\n h = new Handler() {\n public void handleMessage(android.os.Message msg) {\n switch (msg.what) {\n case RECIEVE_MESSAGE:\n statusText.setText(\"msg\");// если приняли сообщение в Handler\n byte[] readBuf = (byte[]) msg.obj;\n String strIncom = new String(readBuf, 0, msg.arg1);\n sb.append(strIncom); // формируем строку\n int endOfLineIndex = sb.indexOf(\"\\r\\n\"); // определяем символы конца строки\n if (endOfLineIndex > 0) { // если встречаем конец строки,\n String sbprint = sb.substring(0, endOfLineIndex); // то извлекаем строку\n sb.delete(0, sb.length()); // и очищаем sb\n statusText.setText(\"Ответ от датчика: \" + sbprint); // обновляем TextView\n String[] step_data = sbprint.split(\" \");\n writeFile(step_data[0]);\n writeFile(\";\");\n writeFile(step_data[1]);\n writeFile(\";\");\n writeFile(step_data[2]);\n writeFile(\";\\n\");\n btnOff.setEnabled(true);\n btnOn.setEnabled(true);\n }\n //Log.d(TAG, \"...Строка:\"+ sb.toString() + \"Байт:\" + msg.arg1 + \"...\");\n break;\n }\n };\n };\n\n btAdapter = BluetoothAdapter.getDefaultAdapter(); // получаем локальный Bluetooth адаптер\n\n if (btAdapter.isEnabled()) {\n SharedPreferences prefs_btdev = getSharedPreferences(\"btdev\", 0);\n String btdevaddr=prefs_btdev.getString(\"btdevaddr\",\"?\");\n\n if (btdevaddr != \"?\") {\n BluetoothDevice device = btAdapter.getRemoteDevice(btdevaddr);\n UUID SERIAL_UUID = UUID.fromString(\"0000f00d-1212-afde-1523-785fef13d123\"); // bluetooth serial port service\n //UUID SERIAL_UUID = device.getUuids()[0].getUuid(); //if you don't know the UUID of the bluetooth device service, you can get it like this from android cache\n try {\n btSocket = device.createRfcommSocketToServiceRecord(SERIAL_UUID);\n } catch (Exception e) {\n Log.e(\"\",\"Error creating socket\");\n }\n\n try {\n btSocket.connect();\n Log.e(\"\",\"Connected\");\n } catch (IOException e) {\n Log.e(\"\",e.getMessage());\n try {\n Log.e(\"\",\"trying fallback...\");\n btSocket =(BluetoothSocket) device.getClass().getMethod(\"createRfcommSocket\", new Class[] {int.class}).invoke(device,1);\n btSocket.connect();\n Log.e(\"\",\"Connected\");\n } catch (Exception e2) {\n Log.e(\"\", \"Couldn't establish Bluetooth connection!\");\n }\n }\n } else {\n Log.e(\"\",\"BT device not selected\");\n }\n }\n\n checkBTState();\n\n btnOn.setOnClickListener(new OnClickListener() { // определяем обработчик при нажатии на кнопку\n public void onClick(View v) {\n //btnOn.setEnabled(false);\n workState.setImageResource(R.drawable.ic_action_work_on);\n mConnectedThread.run();\n // TODO start writing in file\n }\n });\n\n btnOff.setOnClickListener(new OnClickListener() {\n public void onClick(View v) {\n //btnOff.setEnabled(false);\n workState.setImageResource(R.drawable.ic_action_work_off);\n mConnectedThread.cancel();\n // TODO stop writing in file\n }\n });\n }",
"public void buttonClick_connect(View view)\n\t{\n\t\tAppSettings.showConnectionLost = false;\n\t\tLog.i(TAG, \"showConnectionLost = false\");\n\t\t\n\t\tAppSettings.bluetoothConnection = new BluetoothConnection(this.getApplicationContext(), this.btConnectionHandler);\n\t\tBluetoothAdapter btAdapter = AppSettings.bluetoothConnection.getBluetoothAdapter();\n\t\t\n\t\t// If the adapter is null, then Bluetooth is not supported\n if (btAdapter == null) {\n \tToast.makeText(getApplicationContext(), R.string.bt_not_available, Toast.LENGTH_LONG).show();\n }\n else {\n \t// If Bluetooth is not on, request that it be enabled.\n if (!btAdapter.isEnabled()) {\n Intent enableIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableIntent, REQUEST_ENABLE_BT);\n }\n else {\n \t// Launch the DeviceListActivity to see devices and do scan\n Intent serverIntent = new Intent(getApplicationContext(), DeviceListActivity.class);\n startActivityForResult(serverIntent, REQUEST_CONNECT_DEVICE);\n }\n }\n\t}",
"@Override\r\n public void onCreate() {\n intent = new Intent(BROADCAST_ACTION);\r\n startBTService();\r\n// try{\r\n// mConnectedThread.write(\"2\".getBytes());\r\n// }catch(Exception e){\r\n//\r\n// }\r\n }",
"public void bind(BluetoothDevice device){\n tv_blue_list_name.setText(device.getName());\n tv_blue_list_address.setText(device.getAddress());\n\n }",
"void bluetoothDeactivated();",
"private void setupBTService(){\n btService = new BluetoothService(this, mHandler);\n\n // Initialize the buffer for outgoing messages\n outStringBuffer = new StringBuffer(\"\");\n\t}",
"@Override\n\t\tpublic void onServiceConnected(ComponentName name, IBinder service) {\n\t\t\tib = service;\n\t\t\tSystem.out.println(\"DEBUG>>>ServiceConnection.\");\n\t\t}",
"public void onDeviceConnected(String name, String address) {\n btButton.setText(\"Connected\");\n }",
"@Override\n public void onConnectionStateChange(BluetoothGatt gatt, int status,\n int newState) {\n Log.i(\"onConnectionStateChange\", \"The connection status has changed. status:\" + status + \" newState:\" + newState + \"\");\n try {\n if(status == BluetoothGatt.GATT_SUCCESS) {\n switch (newState) {\n // Has been connected to the device\n case BluetoothProfile.STATE_CONNECTED:\n Log.i(\"onConnectionStateChange\", \"Has been connected to the device\");\n if(_ConnectionStatus == ConnectionStatus.Connecting) {\n _ConnectionStatus = ConnectionStatus.Connected;\n try {\n if (_PeripheryBluetoothServiceCallBack != null)\n _PeripheryBluetoothServiceCallBack.OnConnected();\n if (gatt.getDevice().getBondState() == BluetoothDevice.BOND_BONDED){\n //Url : https://github.com/NordicSemiconductor/Android-DFU-Library/blob/release/dfu/src/main/java/no/nordicsemi/android/dfu/DfuBaseService.java\n Log.i(\"onConnectionStateChange\",\"Waiting 1600 ms for a possible Service Changed indication...\");\n // Connection successfully sleep 1600ms, the connection success rate will increase\n Thread.sleep(1600);\n }\n } catch (Exception e){}\n // Discover service\n gatt.discoverServices();\n }\n break;\n // The connection has been disconnected\n case BluetoothProfile.STATE_DISCONNECTED:\n Log.i(\"onConnectionStateChange\", \"The connection has been disconnected\");\n if(_ConnectionStatus == ConnectionStatus.Connected) {\n if (_PeripheryBluetoothServiceCallBack != null)\n _PeripheryBluetoothServiceCallBack.OnDisConnected();\n }\n Close();\n _ConnectionStatus = ConnectionStatus.DisConnected;\n break;\n /*case BluetoothProfile.STATE_CONNECTING:\n Log.i(\"onConnectionStateChange\", \"Connecting ...\");\n _ConnectionStatus = ConnectionStatus.Connecting;\n break;\n case BluetoothProfile.STATE_DISCONNECTING:\n Log.i(\"onConnectionStateChange\", \"Disconnecting ...\");\n _ConnectionStatus = ConnectionStatus.DisConnecting;\n break;*/\n default:\n Log.e(\"onConnectionStateChange\", \"newState:\" + newState);\n break;\n }\n }else {\n Log.i(\"onConnectionStateChange\", \"GATT error\");\n Close();\n if(_ConnectionStatus == ConnectionStatus.Connecting\n && _Timeout - (new Date().getTime() - _ConnectStartTime.getTime()) > 0) {\n Log.i(\"Connect\", \"Gatt Error! Try to reconnect (\"+_ConnectIndex+\")...\");\n _ConnectionStatus = ConnectionStatus.DisConnected;\n Connect(); // Connect\n }else {\n _ConnectionStatus = ConnectionStatus.DisConnected;\n if (_PeripheryBluetoothServiceCallBack != null)\n _PeripheryBluetoothServiceCallBack.OnDisConnected();\n }\n }\n }catch (Exception ex){\n Log.e(\"onConnectionStateChange\", ex.toString());\n }\n super.onConnectionStateChange(gatt, status, newState);\n }",
"@Override\n\t\t\tpublic void onServiceConnected(ComponentName name, IBinder service) {\n\t\t\t}",
"public void connected() {\n \t\t\tLog.v(TAG, \"connected(): \"+currentId);\n \t\t\tif(mCallback != null){\n \t\t\t\tmCallback.onServiceConnected();\n \t\t\t}\n \t\t\tloadPage(false, null);\n \t\t}",
"public void onClick(View v) {\n mConnectedThread.write(\"1\"); // Send \"1\" via Bluetooth\n Toast.makeText(getBaseContext(), \"Turn on LED\", Toast.LENGTH_SHORT).show();\n }",
"@Override\n public void onServiceConnected(ComponentName name, IBinder service) {\n System.out.println(\"绑定成功\");\n }",
"public void connectService() {\n log_d( \"connectService()\" );\n\t\t// no action if debug\n if ( BT_DEBUG_SERVICE ) {\n\t\t\ttoast_short( \"No Action in debug\" );\n \treturn;\n }\n\t\t// connect the BT device at once\n\t\t// if there is a device address. \n\t\tString address = getPrefAddress();\n\t\tif ( isPrefUseDevice() && ( address != null) && !address.equals(\"\") ) {\n\t \tBluetoothDevice device = mBluetoothAdapter.getRemoteDevice( address );\n\t \tif ( mBluetoothService != null ) {\n\t \t log_d( \"connect \" + address );\n\t \tmBluetoothService.connect( device );\n\t }\n\t\t// otherwise\n\t\t// send message for the intent of the BT device list\n\t\t} else {\n\t\t\tnotifyDeviceList();\n\t\t}\n\t}",
"public void registerCallback() {\n if (mLocalManager == null) {\n Log.e(TAG, \"registerCallback() Bluetooth is not supported on this device\");\n return;\n }\n mLocalManager.setForegroundActivity(mFragment.getContext());\n mLocalManager.getEventManager().registerCallback(this);\n mLocalManager.getProfileManager().addServiceListener(this);\n forceUpdate();\n }",
"@Override\n\tprotected void handleServiceConnected()\n\t{\n\t\t\n\t}",
"@Override\n\t\tpublic void run() {\n\t\t\ttry{\n//\t\t\t\tdevAddr = devices.get(position).split(\"\\\\|\")[1];\n//\t\t\t\tbtAdapt.cancelDiscovery();\n//\t\t\t\t\n//\t\t\t\tbtSocket = btAdapt.getRemoteDevice(devAddr).createRfcommSocketToServiceRecord(uuid);\n//\t\t\t\tbtSocket.connect();Log.e(tag, \"connected\");\n\t\t\t\tInetAddress severInetAddr=InetAddress.getByName(\"120.105.129.108\");\n\t\t\t\tWifisocket = new Socket(severInetAddr, 8101);\n\t\t\t\t\n\t\t\t\tsynchronized (this) {\n//\t\t\t\t\tbtIn = btSocket.getInputStream();\n//\t\t\t\t\tbtOut = btSocket.getOutputStream();\n\t\t\t\t\tbtIn = Wifisocket.getInputStream();\n\t\t\t\t\tbtOut = Wifisocket.getOutputStream();\n\t\t\t\t\tLog.e(tag, \"connected\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tThread.sleep(100);\n\t\t\t\tsetUpAsForeground(\"Wifi已連線\");\n\t\t\t} catch( IOException | InterruptedException e ){\n\t\t\t\te.printStackTrace();\n\t\t\t\ttry{\n//\t\t\t\t\tbtSocket.close();\n//\t\t\t\t\tWifisocket.close();\n\t\t\t\t\tThread.sleep(1500);\n\t\t\t\t\tsetUpAsForeground(\"Wifi未連線\");\n\t\t\t\t\tLog.i(\"exiconne\", \"bluetoohservice bye!;\");\n\t\t\t\t} catch(InterruptedException e1){\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\tLog.i(\"exiconne\", \"bluetoohservice bye!;\");\n\t\t\t\t}\n//\t\t\t\tbtSocket = null;\n\t\t\t\tWifisocket = null;\n\t\t\t\tmBTState = BTState.stopped;\n\t\t\t\tBluetoothConnect.mBTstate = BTstate.opened;\n\t\t\t}\n\n\t\t}",
"private void getBluetoothState() {\r\n\r\n\t\t if (bluetoothAdapter == null) {\r\n\t\t\t bluetoothStatusSetup.setText(\"Bluetooth NOT supported\");\r\n\t\t } else if (!(bluetoothAdapter.isEnabled())) {\r\n\t\t\t bluetoothStatusSetup.setText(\"Bluetooth is NOT Enabled!\");\r\n\t\t\t Intent enableBtIntent = new Intent(\r\n\t\t\t\t\t BluetoothAdapter.ACTION_REQUEST_ENABLE);\r\n\t\t\t startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\r\n\t\t\t getBluetoothState();\r\n\t\t }\r\n\r\n\t\t if (bluetoothAdapter.isEnabled()) {\r\n\r\n\t\t\t if (bluetoothAdapter.isDiscovering()) {\r\n\t\t\t\t bluetoothStatusSetup.setText(\"Bluetooth is currently in device discovery process.\");\r\n\t\t\t } else {\r\n\t\t\t\t bluetoothStatusSetup.setText(\"Bluetooth is Enabled.\");\r\n\t\t\t }\r\n\t\t }\r\n\t }",
"public void onServiceConnected();",
"private void BTKies() {\n Set<BluetoothDevice> pairedDevices;\n ArrayAdapter<String> BTArrayAdapter;\n final Dialog dialog = new Dialog(this);\n dialog.setContentView(R.layout.devicedialog);\n dialog.setTitle(\"Kies een verbinding\");\n BTListView = (ListView) dialog.findViewById(R.id.listView1);\n BTListView.setVisibility(View.VISIBLE);\n\n BTArrayAdapter = new ArrayAdapter<String>(this,\n android.R.layout.simple_list_item_1);\n BTListView.setAdapter(BTArrayAdapter);\n pairedDevices = BT.getBondedDevices();\n for (BluetoothDevice device : pairedDevices)\n BTArrayAdapter.add(device.getName() + \"\\n\" + device.getAddress());\n\n dialog.show();\n\n // Pick het item uit de list\n BTListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n long arg3) {\n ListView lv = (ListView) arg0;\n TextView tv = (TextView) lv.getChildAt(arg2);\n String s = tv.getText().toString();\n\n Connect(s); // Make connection\n }\n\n private void Connect(String s) {\n int i = s.length();\n address = s.substring(i - 17);\n BluetoothDevice device = BT.getRemoteDevice(address);\n Log.d(TAG, \"Connecting to ... \" + device);\n BT.cancelDiscovery();\n try { // omgaan met exeptions\n btSocket = device\n .createRfcommSocketToServiceRecord(MY_UUID);\n btSocket.connect();\n // hier de comunicatie invullen ***********************************************\n writeData(\"c#\"); // vraag om een bevestiging van de verbinding\n BTListView.setVisibility(View.INVISIBLE);\n dialog.dismiss();\n beginListenForData();\n } catch (IOException e) {\n try {\n btSocket.close();\n } catch (IOException e2) {\n DisplayToast(\"Unable to end the connection\");\n }\n DisplayToast(\"Ontvanger niet beschikbaar. Kies opnieuw\");\n }\n }\t// einde connect\n\n });\t// einde onClick\n }",
"public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_bluetooth_handler);\n final Button back=(Button) findViewById(R.id.button_back);\n bluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\n checkBTState();\n\n try {\n serverSocket=bluetoothAdapter.listenUsingInsecureRfcommWithServiceRecord(label, MY_UUID);\n } catch (IOException e){}\n\n try{\n bluetoothSocket=serverSocket.accept();\n }catch (IOException e) {}\n\n try{\n outputStream=MainActivity1.bluetoothSocket.getOutputStream();\n }catch (IOException e){\n Log.d(MainActivity1.label,\"Output stream connection failed.\");\n }\n\n receiver=new BroadcastReceiver() {\n @Override\n public void onReceive(Context context, Intent intent)\n {\n String a=intent.getAction();\n\n if(BluetoothDevice.ACTION_FOUND.equals(a))\n {\n BluetoothDevice device=intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);\n\n bluetoothItems.add(device.getName());\n }\n }\n };\n IntentFilter filter=new IntentFilter(BluetoothDevice.ACTION_FOUND);\n registerReceiver(receiver, filter);\n\n //searching();\n\n ListView bluetoothList=(ListView) findViewById(R.id.listView_bluetoothItems);\n\n bluetoothList.setAdapter(new ArrayAdapter<String>(this,R.layout.abc_list_menu_item_layout));\n\n back.setOnClickListener(new OnClickListener() {\n @Override\n public void onClick(View v) {\n startActivity(new Intent(getApplicationContext(), ControllerHomeScreen.class));\n }\n });\n }",
"@Override\n\t\tpublic void onServiceConnected(ComponentName name, IBinder service) {\n\t\t\tLocalBinder binder = (LocalBinder)service;\n\t\t\tmService = binder.getService();\n\t\t\t//Toast.makeText(SyncServiceActivity.this, \"onServiceConnected=>\"+mService, Toast.LENGTH_SHORT).show();\n\t\t\t\n\t\t}",
"@Override\n public void connected() {\n jLabel5.setText(\"已连接\");\n }",
"@Override\n\t\t\t\tpublic void onServiceConnected(ComponentName p1, IBinder p2)\n\t\t\t\t{\n\t\t\t\t}",
"public void findBluetooth() {\n BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\n if (mBluetoothAdapter == null) {\n // Device does not support Bluetooth\n btStatusDisplay.setText(\"Device does not support Bluetooth\");\n }\n btStatusDisplay.setText(\"Trying to connect...\");\n\n /** Pops up request to enable if found not enabled */\n if (!mBluetoothAdapter.isEnabled()) {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\n }\n /** Get reference to scale as Bluetooth device \"mmDevice\" */\n Set<BluetoothDevice> pairedDevices = mBluetoothAdapter.getBondedDevices();\n if (pairedDevices.size() > 0) {\n for (BluetoothDevice device : pairedDevices) {\n if (device.getName().equals(\"BLUE\")) {\n mmDevice = device;\n btStatusDisplay.setText(\"Bluetooth device found\");\n break;\n }\n }\n }\n }",
"public void onServiceConnected(ComponentName className, IBinder service) {\n mService = new Messenger(service);\n mBound = true;\n }",
"public void onServiceConnected(ComponentName className, IBinder service) {\n mService = new Messenger(service);\n mBound = true;\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n\n Log.d(LOG_TAG, \"-=-=-=-=-=-=-=-= onCreate MainActivity -=-=-=-=-=-=-=-=-=\");\n\n if (!getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)) {\n Log.d(LOG_TAG, \"not supported ble\");\n finish();\n }\n\n final WatchViewStub stub = (WatchViewStub) findViewById(R.id.watch_view_stub);\n stub.setOnLayoutInflatedListener(new WatchViewStub.OnLayoutInflatedListener() {\n @Override\n public void onLayoutInflated(WatchViewStub stub) {\n mConnectionInfoLinearLayout = (LinearLayout) stub.findViewById(R.id.connectionInfoLinearLayout);\n mConnectionInfoTextView = (TextView) stub.findViewById(R.id.connectionInfoTextView);\n mConnectionInfoImageView = (ImageView) stub.findViewById(R.id.connectionInfoImageView);\n mBatteryInfoTextView = (TextView) stub.findViewById(R.id.batteryInfoTextView);\n\n mMediaLayout = (LinearLayout) stub.findViewById(R.id.mediaLayout);\n\n mServiceSwitch = (Switch) stub.findViewById(R.id.serviceSwitch);\n // mColorBackgroundsSwitch = (Switch) stub.findViewById(R.id.colorBackgroundsSwitch);\n // mBatteryUpdatesSwitch = (Switch) stub.findViewById(R.id.batteryUpdatesSwitch);\n // mCompleteBatteryInfoSwitch = (Switch) stub.findViewById(R.id.completeBatteryInfoSwitch);\n\n\n SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(MainActivity.this);\n final boolean colorBackgrounds = sp.getBoolean(Constants.SPK_COLOR_BACKGROUNDS, false);\n final boolean batteryUpdates = sp.getBoolean(Constants.SPK_BATTERY_UPDATES, true);\n final boolean completeBatteryInfo = sp.getBoolean(Constants.SPK_COMPLETE_BATTERY_INFO, false);\n final boolean serviceRunning = isServiceRunning();\n\n\n mConnectionInfoLinearLayout.setVisibility(serviceRunning ? View.VISIBLE : View.GONE);\n tryToConnect();\n\n mServiceSwitch.setChecked(serviceRunning);\n mServiceSwitch.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {\n @Override\n public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n if (isChecked) {\n mConnectionInfoLinearLayout.setVisibility(View.VISIBLE);\n\n startService();\n } else {\n mConnectionInfoLinearLayout.setVisibility(View.GONE);\n\n stopService();\n }\n }\n });\n\n/*\n\n mColorBackgroundsSwitch.setChecked(colorBackgrounds);\n mColorBackgroundsSwitch.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {\n @Override\n public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(MainActivity.this);\n sp.edit().putBoolean(Constants.SPK_COLOR_BACKGROUNDS, isChecked).apply();\n\n MainActivity.this.sendBroadcast(new Intent(Constants.IA_COLOR_BACKGROUNDS_CHANGED));\n }\n });\n\n\n mBatteryUpdatesSwitch.setChecked(batteryUpdates);\n mBatteryUpdatesSwitch.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {\n @Override\n public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(MainActivity.this);\n sp.edit().putBoolean(Constants.SPK_BATTERY_UPDATES, isChecked).apply();\n\n MainActivity.this.sendBroadcast(new Intent(Constants.IA_BATTERY_UPDATES_CHANGED));\n }\n });\n\n\n mBatteryUpdatesSwitch.setChecked(batteryUpdates);\n mBatteryUpdatesSwitch.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {\n @Override\n public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(MainActivity.this);\n SharedPreferences.Editor editor = sp.edit();\n editor.putBoolean(Constants.SPK_BATTERY_UPDATES, isChecked);\n\n if (!isChecked) {\n editor.putBoolean(Constants.SPK_COMPLETE_BATTERY_INFO, false);\n // mCompleteBatteryInfoSwitch.setChecked(false);\n }\n\n editor.apply();\n\n MainActivity.this.sendBroadcast(new Intent(Constants.IA_BATTERY_UPDATES_CHANGED));\n }\n });\n\n mCompleteBatteryInfoSwitch.setChecked(completeBatteryInfo);\n mCompleteBatteryInfoSwitch.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {\n @Override\n public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(MainActivity.this);\n SharedPreferences.Editor editor = sp.edit();\n editor.putBoolean(Constants.SPK_COMPLETE_BATTERY_INFO, isChecked);\n\n if (isChecked) {\n editor.putBoolean(Constants.SPK_BATTERY_UPDATES, true);\n mBatteryUpdatesSwitch.setChecked(true);\n }\n\n editor.apply();\n\n MainActivity.this.sendBroadcast(new Intent(Constants.IA_BATTERY_UPDATES_CHANGED));\n }\n });\n*/\n\n// TextView modelTextView = (TextView) stub.findViewById(R.id.modelTextView);\n// modelTextView.setText(Build.MODEL);\n }\n });\n }",
"public void setBluetoothService(BluetoothService bluetoothService) {\n this.bluetoothService = bluetoothService;\n }",
"@Override\n\t\tpublic void onServiceConnected(ComponentName name, IBinder service) {\n\t\t\tmsgService = ((MyService.MsgBinder) service).getService();\n\t\t\t// recieve callback progress\n\t\t\tmsgService.SetOnProgressListner(new OnProgressListner() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onProgress(int progress) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\tmProgressBar.setProgress(progress);\n\t\t\t\t}\n\t\t\t});\n\t\t}",
"@Override\n public void onServiceConnected(ComponentName className,\n IBinder service) {\n ConnectionService.ConnectionBinder binder = (ConnectionService.ConnectionBinder) service;\n mService = binder.getService();\n mBound = true;\n }",
"@Override\n public void onServicesDiscovered(BluetoothGatt gatt, int status) {\n Log.i(\"onServicesDiscovered\", \"Obtaining device service information ......\");\n if (status == BluetoothGatt.GATT_SUCCESS) {\n try{\n String messages = \"-------------- (\"+Periphery.getAddress()+\")Service Services information : --------------------\\n\";\n List<BluetoothGattService> serviceList = gatt.getServices();\n messages += \"Total:\"+serviceList.size()+\"\\n\";\n for (int i = 0; i < serviceList.size(); i++) {\n BluetoothGattService theService = serviceList.get(i);\n BLEGattServiceList.add(new BLEGattService(theService));\n\n String serviceName = theService.getUuid().toString();\n String msg = \"---- Service UUID:\"+serviceName+\" -----\\n\";\n // Each Service contains multiple features\n List<BluetoothGattCharacteristic> characterList = theService.getCharacteristics();\n msg += \"Characteristic UUID List:\\n\";\n for (int j = 0; j < characterList.size(); j++) {\n BluetoothGattCharacteristic theCharacter = characterList.get(j);\n msg += \"(\"+(j+1)+\"):\"+theCharacter.getUuid()+\"\\n\";\n //msg += \" --> Value:\"+ StringConvertUtil.bytesToHexString(theCharacter.getValue())+\"\\n\";\n }\n msg += \"\\n\\n\";\n messages += msg;\n }\n messages += \"-------------- (\"+Periphery.getAddress()+\")--------------------\\n\";\n Log.i(\"onServicesDiscovered\", messages);\n }catch (Exception ex){\n Log.e(\"onServicesDiscovered\", \"Exception:\" + ex.toString());\n }\n }\n if (_PeripheryBluetoothServiceCallBack!=null){\n _PeripheryBluetoothServiceCallBack.OnServicesed(BLEGattServiceList);\n }\n super.onServicesDiscovered(gatt, status);\n }",
"@Override\r\n public void onServiceConnected(ComponentName name, IBinder service) {\n mServiceHandle = ((RecorderService.RecorderBinder) service).getService();\r\n // The observable to observe to for each state change.\r\n mStateChangeHandler = ((RecorderService.RecorderBinder) service)\r\n .observeStateChanges() // Method we declared, returns an observable we can observe.\r\n .distinctUntilChanged() // Not needed, but if someone (in the future of course) requests the current state, we don't want to update the textview twice.\r\n .subscribe(recorderState -> {\r\n mStateText.setText(recorderState.toString());\r\n switch (recorderState) {\r\n case STARTED:\r\n mIsRunning = true;\r\n ((TextView) getContentView().findViewById(R.id.screen_recorder_record_button)).setText(\"Stop\");\r\n break;\r\n case STOPPED:\r\n mIsRunning = false;\r\n ((TextView) getContentView().findViewById(R.id.screen_recorder_record_button)).setText(\"Start\");\r\n }\r\n });\r\n }",
"@Override\n public void gattConnected() {\n mConnected = true;\n updateConnectionState(R.string.connected);\n getActivity().invalidateOptionsMenu();\n }",
"private void bluetooth_connect_device() throws IOException\n {\n try\n {\n myBluetooth = BluetoothAdapter.getDefaultAdapter();\n address = myBluetooth.getAddress();\n pairedDevices = myBluetooth.getBondedDevices();\n if (pairedDevices.size()>0)\n {\n for(BluetoothDevice bt : pairedDevices)\n {\n address=bt.getAddress().toString();name = bt.getName().toString();\n Toast.makeText(getApplicationContext(),\"Connected\", Toast.LENGTH_SHORT).show();\n\n }\n }\n\n }\n catch(Exception we){}\n myBluetooth = BluetoothAdapter.getDefaultAdapter();//get the mobile bluetooth device\n BluetoothDevice dispositivo = myBluetooth.getRemoteDevice(address);//connects to the device's address and checks if it's available\n btSocket = dispositivo.createInsecureRfcommSocketToServiceRecord(myUUID);//create a RFCOMM (SPP) connection\n btSocket.connect();\n try { t1.setText(\"BT Name: \"+name+\"\\nBT Address: \"+address); }\n catch(Exception e){}\n }",
"public void onServiceConnected(ComponentName className, IBinder binder) {\n\t\tLog.i(this.getClass().getSimpleName(), \"onServiceConnected: \"\n\t\t\t\t+ className.toShortString());\n\n\t\tBtBinder b = (BtBinder) binder;\n\t\tbtService = b.getService();\n\t\tboolean is_set = btService.setListener(getBtListener());\n\n\t\tif (is_set) {\n\t\t\t// Get state if listener wasn't already attached.\n\t\t\tIntent serviceIntent = new Intent(this, BTService.class)\n\t\t\t\t\t.setAction(BTService.ACTION_GET_STATE);\n\t\t\tstartService(serviceIntent);\n\t\t}\n\n\t\tToast.makeText(BaseAct.this, R.string.btservice_connected,\n\t\t\t\tToast.LENGTH_SHORT).show();\n\t}",
"@Override\n public void onClick(View v) {\n BluetoothAdapter myBleAdapter = BluetoothAdapter.getDefaultAdapter();\n myBleAdapter.enable();\n\n if (myBleWrapper.isBtEnabled() == true) {\n tV1.setTextColor(Color.parseColor(\"#000000\"));\n tV1.setText(\"Yo ble is on\");\n }\n// else\n// {\n// tV1.setText(\"ble is off\");\n// }\n }",
"public void connect()\n {\n \tLog.d(TAG, \"connect\");\n \t\n \tif(!this.isConnected ) {\n mContext.bindService(new Intent(\"com.google.tungsten.LedService\"), mServiceConnection, \n \t\tContext.BIND_AUTO_CREATE);\n \t}\n }",
"public void connect(View v) {\n turnOn(v);\n startActivity(new Intent(Settings.ACTION_BLUETOOTH_SETTINGS));\n Toast.makeText(getApplicationContext(), \"Select device\", Toast.LENGTH_LONG).show();\n System.err.println(bluetoothAdapter.getBondedDevices());\n }",
"public void onCreate() {\n\t\tSystem.out.println(\"This service is called!\");\n\t\tmyBluetoothAdapter= BluetoothAdapter.getDefaultAdapter();\n\t\tmyBluetoothAdapter.enable();\n\t\tSystemClock.sleep(5000);\n\t\tif (myBluetoothAdapter.isEnabled()){\n\t\t\tSystem.out.println(\"BT is enabled...\");\n\t\t\tdiscover = myBluetoothAdapter.startDiscovery();\n\t\t}\n\t\tSystem.out.println(myBluetoothAdapter.getScanMode());\n\t\t\n\t\tSystem.out.println(\"Discovering: \"+myBluetoothAdapter.isDiscovering());\n\t\t//registerReceiver(bReceiver, new IntentFilter(BluetoothDevice.ACTION_FOUND));\n\t\tIntentFilter filter1 = new IntentFilter(BluetoothDevice.ACTION_FOUND);\n\t\tIntentFilter filter2 = new IntentFilter(BluetoothAdapter.ACTION_DISCOVERY_FINISHED);\n\t\tthis.registerReceiver(bReceiver, filter1);\n\t\tthis.registerReceiver(bReceiver, filter2);\n\t\t//registerReceiver(bReceiver, new IntentFilter(BluetoothAdapter.ACTION_DISCOVERY_FINISHED));\n\t}",
"private void setScanButton() {\n if (!mConnected) {\n if (mAbleBLEService == null) {\n Toast.makeText(getActivity(), \"this should not happen, as this object is static\", Toast.LENGTH_SHORT).show();\n }\n mAbleBLEService.connect(mDeviceAddress);\n sConnectButton.setText(R.string.menu_disconnect);\n sConnectButton.setBackgroundColor(Color.rgb(237, 34, 34));\n } else {\n mAbleBLEService.disconnect();\n sConnectButton.setText(R.string.menu_connect);\n sConnectButton.setBackgroundColor(Color.rgb(42, 42, 42));\n }\n }",
"private void connected() {\n m_connectionLabel.setBackground(Color.GREEN);\n m_connectionLabel.setText(\"Connected\");\n }",
"public void onServiceConnected(ComponentName className, IBinder service) {\n\t mBoundAutopilotService = new Messenger(service);\n\t //mCallbackText.setText(\"Attached.\");\n\n\t // We want to monitor the service for as long as we are\n\t // connected to it.\n\t try {\n\t Message msg = Message.obtain(null, autopilotService.MSG_REGISTER_CLIENT);\n\t msg.replyTo = mMessenger;\n\t mBoundAutopilotService.send(msg);\n\n\t // Give it some value as an example.\n\t //msg = Message.obtain(null, autopilotService.MSG_ECHO, this.hashCode(), 0);\n\t //mBoundAutopilotService.send(msg);\n\t msg = Message.obtain(null, autopilotService.MSG_IS_SERVICE_RUNNING, 0, 0);\n\t mBoundAutopilotService.send(msg);\n\t Log.i(\"anemoi\", \"Here 0\");\n\t } catch (RemoteException e) {\n\t // In this case the service has crashed before we could even\n\t // do anything with it; we can count on soon being\n\t // disconnected (and then reconnected if it can be restarted)\n\t // so there is no need to do anything here.\n\t }\n\t Log.i(\"anemoi\", \"Buuu\");\n\t }",
"private void bluetoothConnect() {\n\n btDevice = btAdapter.getRemoteDevice(EDISON_ADDRESS);\n if (btDevice == null) {\n Log.d(TAG,\"get remote device fail!\");\n finish();\n }\n\n try {\n btSocket = btDevice.createRfcommSocketToServiceRecord(SSP_UUID);\n } catch (IOException e) {\n Log.d(TAG,\"bluetooth socket create fail.\");\n }\n //save resource by cancel discovery\n btAdapter.cancelDiscovery();\n\n //connect\n try {\n btSocket.connect();\n Log.d(TAG,\"Connection established.\");\n } catch ( IOException e) {\n try {\n btSocket.close();\n }catch (IOException e2) {\n Log.d(TAG,\"unable to close socket after connect fail.\");\n }\n }\n\n //prepare outStream to send message\n try {\n outStream = btSocket.getOutputStream();\n } catch (IOException e) {\n Log.d(TAG,\"output stream init fail!\");\n }\n\n }",
"@Override\n public void checkBluetoothInteface() {\n if (!isConnected) {\n checkForBluetooth();\n }\n }",
"@Override\r\n\t\tpublic void run() {\n\t\t\tLooper.prepare();\r\n\t\t\tbluetoothChat = new BluetoothChat(context);\r\n\t\t\tif (!BluetoothAdapter.checkBluetoothAddress(addr)) { // 检查蓝牙地址是否有效\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tBluetoothDevice device = bluetoothAdapter.getRemoteDevice(addr);\r\n\t\t\twhile (true) {\r\n\t\t\t\tif (count == LONG_TIME_CONNECTED) {\r\n\t\t\t\t\tLooper.loop();\r\n\t\t\t\t}\r\n\t\t\t\tif (device.getBondState() != BluetoothDevice.BOND_BONDED) {\r\n\t\t\t\t\t// 如果未匹配,则继续执行\r\n\t\t\t\t\t// handler.postDelayed(runnable, 5000);\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tClsUtils.setPin(device.getClass(), device, pin); // 手机和蓝牙采集器配对\r\n\t\t\t\t\t\tClsUtils.createBond(device.getClass(), device);\r\n\t\t\t\t\t\tremoteDevice = device; // 配对完毕就把这个设备对象传给全局的remoteDevice\r\n\t\t\t\t\t\tThread.sleep(5000);\r\n\t\t\t\t\t\tcount++;\r\n\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// 赋值至全局\r\n\t\t\t\t\tremoteDevice = device;\r\n\t\t\t\t\t// 移除线程后立即连接\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tbluetoothChat.goConnect(device);\r\n\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t// TODO: handle exception\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tLooper.loop();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}",
"@Override\r\n public void onStart() {\n super.onStart();\r\n Carteasy cs = new Carteasy();\r\n Map<String, String> data = cs.ViewData(String.valueOf(1), getApplicationContext());\r\n for (Map.Entry<String, String> entry : data.entrySet()) {\r\n //get the Id\r\n Log.d(\"Key: \",entry.getKey());\r\n Log.d(\"Value: \",entry.getValue());\r\n }\r\n if (!BTAdapter.isEnabled()) {\r\n // IT NEEDS BLUETOOTH PERMISSION\r\n // Intent to enable bluetooth, it will show the enable bluetooth\r\n // dialog\r\n Intent enableIntent = new Intent(\r\n BluetoothAdapter.ACTION_REQUEST_ENABLE);\r\n // this is to get a result if bluetooth was enabled or not\r\n startActivityForResult(enableIntent, REQUEST_ENABLE_BT);\r\n // It will call onActivityResult method to determine if Bluetooth\r\n // was enabled or not\r\n } else {\r\n // Bluetooth is enabled\r\n }\r\n }",
"@Override\n public void run() {\n super.run();\n Log.i(TAG, \"BlueTooth Start\");\n _BluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\n\n if (_BluetoothAdapter != null){\n if(!_BluetoothAdapter.isEnabled())\n _BluetoothAdapter.enable();\n else{\n _BluetoothDevice = _BluetoothAdapter.getRemoteDevice(strAddress_BT_UART);\n if (_BluetoothDevice != null){\n Log.i(TAG, \"Starting BtConnect\");\n BtConnect BC = new BtConnect(_BluetoothDevice);\n BC.start();\n }\n }\n }\n }",
"public void run() {\r\n BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();\r\n adapter.cancelDiscovery();\r\n try {\r\n btSocket.connect();\r\n Log.d(\"TAG\", \"Device connected\");\r\n isConnected = true;\r\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);\r\n SharedPreferences.Editor edit = preferences.edit();\r\n edit.putBoolean(\"Connection\", isConnected);\r\n edit.apply();\r\n handler.obtainMessage(CONNECTING_STATUS, 1, -1).sendToTarget();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n try {\r\n isConnected = false;\r\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);\r\n SharedPreferences.Editor edit = preferences.edit();\r\n edit.putBoolean(\"Connection\", isConnected);\r\n edit.apply();\r\n btSocket.close();\r\n handler.obtainMessage(CONNECTING_STATUS, -1,-1).sendToTarget();\r\n } catch (IOException f) {\r\n f.printStackTrace();\r\n }\r\n return;\r\n }\r\n //Perform work from connection in a separate thread\r\n connectedThread = new ConnectedThread(btSocket);\r\n connectedThread.run();\r\n }",
"@Override\n public void onServiceConnected(ComponentName name, IBinder service) {\n mSecondService = ISecondary.Stub.asInterface(service);\n mKillBtn.setEnabled(true);\n }",
"@Override\n public void onScannedBleDeviceAdded(BluetoothDevice device) {\n Log.d(TAG, \"onScannedBleDeviceAdded enter\");\n// Message msg = mHandler.obtainMessage();\n// msg.what = SCAN_DEVICE_ADD_FLAG;\n// msg.obj = device;\n// mHandler.sendMessage(msg);\n updateScanDialog(SCAN_DEVICE_ADD_FLAG, device);\n }",
"@Override\r\n\t\t\tpublic void onServiceConnected(ComponentName name, IBinder service)\r\n\t\t\t{\n\t\t\t\tSystem.out.println(\"connect\");\r\n\t\t\t\tService_DealCloseReport mService = ((myBinder)service).getService();\r\n\t\t\t}",
"public synchronized BluetoothService getBluetoothService(){\n\t\treturn bluetoothService;\n\t}",
"@Override\n public IBinder onBind(Intent intent) {\n\n AppConstants.RebootHF_reader = false;\n if (mBluetoothLeService != null) {\n final boolean result = mBluetoothLeService.connect(mDeviceAddress);\n Log.d(TAG, \"Connect request result=\" + result);\n }\n\n\n throw new UnsupportedOperationException(\"Not yet implemented\");\n }",
"@Override\n public void onServiceConnected(ComponentName className,\n IBinder service) {\n LocalBinder binder = (LocalBinder) service;\n mService = binder.getService();\n mBound = true;\n }",
"@Override\n public void onClick(View v) {\n if (mBluetoothConnection.isConnected()) {\n mBluetoothConnection.changeState(BluetoothConnection.STATE_IMAGE_RECEIVING);\n mBluetoothConnection.write(\"open_settings\");\n buttonSettings.setEnabled(false);\n } else {\n Toast.makeText(getBaseContext(), \"Device not connected\", Toast.LENGTH_SHORT).show();\n }\n }",
"public void handleConnectedState() {\n\n setProgressBarVisible(false);\n setGreenCheckMarkVisible(true);\n setMessageText(\"Connected to \" + tallyDeviceName);\n\n // Waits for 2 seconds so that the user\n // can see the message and then exits the\n // activity\n timerHandler.postDelayed(new Runnable() {\n\n @Override\n public void run() {\n\n exitActivity();\n\n }\n\n }, 2000);\n\n }",
"@Override\n public void onServiceConnected(ComponentName className,\n IBinder service) {\n TranscriptDownService.LocalBinder binder = (TranscriptDownService.LocalBinder) service;\n mService = binder.getService();\n mBound = true;\n }",
"@Override\n public void gattServicesDiscovered() {\n BluetoothGattService mService = BLEService.mBluetoothGatt.getService(CapLEDConstants.CAPLED_SERVICE_UUID);\n\n mLedCharacteristic = mService.getCharacteristic(CapLEDConstants.CAPLED_LED_CHARACTERISTIC_UUID);\n mCapsenseCharacteristic = mService.getCharacteristic(CapLEDConstants.CAPLED_CAP_CHARACTERISTIC_UUID);\n mCapsenseNotification = mCapsenseCharacteristic.getDescriptor(CapLEDConstants.CAPLED_CAP_NOTIFICATION);\n\n readLedCharacteristic();\n sCapSwitch.setEnabled(true);\n }",
"public void connectButtonListener()\n {\n final Context context = Monitoring.this;\n btnConnectDisconnect = (Button) findViewById(R.id.btn_select);\n\n btnConnectDisconnect.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View arg0)\n {\n if (!mBtAdapter.isEnabled())\n {\n Log.i(TAG, \"onClick - Bluetooth not enabled yet\");\n Intent enableIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableIntent, REQUEST_ENABLE_BT);\n }\n else\n {\n if (btnConnectDisconnect.getText().toString().equals(\"Connect\"))\n {\n //Connect button pressed, open DeviceListActivity class,\n // with popup windows that scan for devices...\n Intent newIntent = new Intent(context, Scanner.class);\n startActivityForResult(newIntent, REQUEST_SELECT_DEVICE);\n }\n else\n {\n //Disconnect button pressed\n if (mDevice != null)\n {\n mService.disconnect();\n }\n }\n }\n }\n });\n }",
"@Override\n\t\tpublic void onServiceConnected(ComponentName className, IBinder service) {\n\t\t\tMediaPlayerService.LocalMPBinder binder = (MediaPlayerService.LocalMPBinder) service;\n\t\t\tmService = binder.getService();\n\t\t\tmBound = true;\n\t\t\tif (mService.isAutoPlayCase() && getBooleanPreference(getString(R.string.autoplay_switch), false) && mSavedStationDefinition != null)\n\t\t\t\tdoClickOnStopPlayButton(/*getPlayStopButton(), */false);\n\t\t\tsynchronizePlayPauseButton();\n\t\t\tFragmentManager fm = getSupportFragmentManager();\n\t\t\tif (fm != null) {\n\t\t\t\tList<Fragment> fragments = fm.getFragments();\n\t\t\t\tif(fragments != null) {\n\t\t\t\t\tfor (Fragment fragment : fragments) {\n\t\t\t\t\t\tif (fragment != null) {\n\t\t\t\t\t\t\tif (fragment instanceof FavoriteStationsFrame) {\n\t\t\t\t\t\t\t\t((FavoriteStationsFrame) fragment).synchronizeOnServiceConnected(mService);// do something\n\t\t\t\t\t\t\t\tLog.e(\"MTA:onServ.Conn.\", \"FSF:synchronizeOnServiceConnected\");\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tLog.e(\"MTA:onServ.Conn.\", className.toString());\n\t\t}",
"@Override\r\n\tprotected void onHandleIntent(Intent intent) {\n\t\tfinal BluetoothManager bluetoothManager = (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE);\r\n\t\tmBluetoothAdapter = bluetoothManager.getAdapter();\r\n\r\n\t\t// Checks if Bluetooth is supported on the device.\r\n\t\tif (mBluetoothAdapter == null) {\r\n\t\t\tLog.i(TAG, \"Bluetooth is not supported\");\r\n\t\t\treturn;\r\n\t\t} else {\r\n\t\t\tLog.i(TAG, \"mBluetoothAdapter = \" + mBluetoothAdapter);\r\n\t\t}\r\n\r\n\t\t//启用蓝牙\r\n\t\t//mBluetoothAdapter.enable();\r\n\t\t//Log.i(TAG, \"mBluetoothAdapter.enable\");\r\n\t\t\r\n\t\tmBLE = new BluetoothLeClass(this);\r\n\t\t\r\n\t\tif (!mBLE.initialize()) {\r\n\t\t\tLog.e(TAG, \"Unable to initialize Bluetooth\");\r\n\t\t}\r\n\t\tLog.i(TAG, \"mBLE = e\" + mBLE);\r\n\r\n\t\t// 发现BLE终端的Service时回调\r\n\t\tmBLE.setOnServiceDiscoverListener(mOnServiceDiscover);\r\n\r\n\t\t// 收到BLE终端数据交互的事件\r\n\t\tmBLE.setOnDataAvailableListener(mOnDataAvailable);\r\n\t\t\r\n\t\t//开始扫描\r\n\t\tmBLE.scanLeDevice(true);\r\n\t\t\r\n\t\t/*\r\n\t\tMRBluetoothManage.Init(this, new MRBluetoothEvent() {\r\n\t\t\t@Override\r\n\t\t\tpublic void ResultStatus(int result) {\r\n\t\t\t\tswitch (result) {\r\n\t\t\t\tcase MRBluetoothManage.MRBLUETOOTHSTATUS_NOT_OPEN:\r\n\t\t\t\t\t//Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\r\n\t\t\t\t\t//startActivityForResult(enableBtIntent, 100);\r\n\t\t\t\t\tLog.d(TAG, \"MRBLUETOOTHSTATUS_NOT_OPEN\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase MRBluetoothManage.MRBLUETOOTHSTATUS_INIT_OK:\r\n\t\t\t\t\tMRBluetoothManage.scanAndConnect();\r\n\t\t\t\t\tLog.d(TAG, \"MRBLUETOOTHSTATUS_INIT_OK\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase MRBluetoothManage.MRBLUETOOTHSTATUS_SCAN_START:\r\n\t\t\t\t\tLog.d(TAG, \"MRBLUETOOTHSTATUS_SCAN_START\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase MRBluetoothManage.MRBLUETOOTHSTATUS_SCAN_END:\r\n\t\t\t\t\tLog.d(TAG, \"MRBLUETOOTHSTATUS_SCAN_END\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase MRBluetoothManage.MRBLUETOOTHSTATUS_CONNECT_START:\r\n\t\t\t\t\tLog.d(TAG, \"MRBLUETOOTHSTATUS_CONNECT_START\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase MRBluetoothManage.MRBLUETOOTHSTATUS_CONNECT_OK:\r\n\t\t\t\t\tLog.d(TAG, \"MRBLUETOOTHSTATUS_CONNECT_OK\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase MRBluetoothManage.MRBLUETOOTHSTATUS_CONNECT_CLOSE:\r\n\t\t\t\t\tLog.d(TAG, \"MRBLUETOOTHSTATUS_CONNECT_CLOSE\");\r\n\t\t\t\t\tMRBluetoothManage.stop();\r\n\t\t\t\t\tMRBluetoothManage.scanAndConnect();\r\n\t\t\t\t\t//MRBluetoothManage.Init(BluetoothService.this, this);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void ResultDevice(ArrayList<BluetoothDevice> deviceList) {\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void ResultData(byte[] data) {\r\n\t\t\t\tLog.i(TAG, data.toString());\r\n\t\t\t\tbyte[] wenDuByte = new byte[2];\r\n\t\t\t\tbyte[] shiDuByte = new byte[2];\r\n\t\t\t\tbyte[] shuiFenByte = new byte[2];\r\n\t\t\t\tbyte[] ziWaiXianByte = new byte[2];\r\n\t\t\t\tSystem.arraycopy(data, 4, wenDuByte, 0, 2);\r\n\t\t\t\tSystem.arraycopy(data, 6, shiDuByte, 0, 2);\r\n\t\t\t\tSystem.arraycopy(data, 8, shuiFenByte, 0, 2);\r\n\t\t\t\tSystem.arraycopy(data, 10, ziWaiXianByte, 0, 2);\r\n\t\t\t\tTestModel model = new TestModel();\r\n\t\t\t\tmodel.wenDu = BitConverter.toShort(wenDuByte);\r\n\t\t\t\tmodel.shiDu = BitConverter.toShort(shiDuByte);\r\n\t\t\t\tmodel.shuiFen = BitConverter.toShort(shuiFenByte);\r\n\t\t\t\tmodel.ziWaiXian = BitConverter.toShort(ziWaiXianByte);\r\n\t\t\t\t//Log.d(TAG, model.toString());\r\n\t\t\t\tsendData(model);\r\n\t\t\t}\r\n\t\t});\r\n\t\t*/\r\n\t}",
"@Override\n\t\tpublic void onServiceConnected(ComponentName name, IBinder service) {\n\t\t\tConfig.HisiSettingService = ServiceSettingsInfoAidl.Stub.asInterface(service);\n\t\t}",
"@Override\n public void onServiceConnected(ComponentName name, IBinder service) {\n\n messengerService = new Messenger(service);\n messengerServiceBound = true;\n }",
"private void initPlugin() {\n if (bluetoothAdapter == null) {\n Log.e(LOG_TAG, \"Bluetooth is not supported\");\n } else {\n Log.e(LOG_TAG, \"Bluetooth is supported\");\n\n sendJS(\"javascript:cordova.plugins.BluetoothStatus.hasBT = true;\");\n\n //test if BLE supported\n if (!mcordova.getActivity().getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)) {\n Log.e(LOG_TAG, \"BluetoothLE is not supported\");\n } else {\n Log.e(LOG_TAG, \"BluetoothLE is supported\");\n sendJS(\"javascript:cordova.plugins.BluetoothStatus.hasBTLE = true;\");\n }\n \n // test if BT is connected to a headset\n \n if (bluetoothAdapter.getProfileConnectionState(BluetoothProfile.HEADSET) == BluetoothProfile.STATE_CONNECTED ) {\n Log.e(LOG_TAG, \" Bluetooth connected to headset\");\n sendJS(\"javascript:cordova.fireWindowEvent('BluetoothStatus.connected');\");\n } else {\n Log.e(LOG_TAG, \"Bluetooth is not connected to a headset \" + bluetoothAdapter.getProfileConnectionState(BluetoothProfile.HEADSET));\n }\n\n //test if BT enabled\n if (bluetoothAdapter.isEnabled()) {\n Log.e(LOG_TAG, \"Bluetooth is enabled\");\n\n sendJS(\"javascript:cordova.plugins.BluetoothStatus.BTenabled = true;\");\n sendJS(\"javascript:cordova.fireWindowEvent('BluetoothStatus.enabled');\");\n } else {\n Log.e(LOG_TAG, \"Bluetooth is not enabled\");\n }\n }\n }",
"@Override\n\tpublic void onServiceConnected(ComponentName name, IBinder service) {\n\t\tserviceMessenger = new Messenger(service);\n\t\tsendMessageToService(ConnectionService.GET_MESSENGER);\n\t\tsendMessageToService(ConnectionService.CONNECT, host, port, key,\n\t\t\t\tinterval);\n\t}",
"private void turnOn(View v) {\n bluetoothAdapter.enable();\n }",
"public void listBT() {\n Log.d(\"Main Activity\", \"Listing BT elements\");\n if (searchBt) {\n //Discover bluetooth devices\n final List<String> list = new ArrayList<>();\n list.add(\"\");\n pairedDevices.addAll(mBluetoothAdapter.getBondedDevices());\n // If there are paired devices\n if (pairedDevices.size() > 0) {\n // Loop through paired devices\n for (BluetoothDevice device : pairedDevices) {\n // Add the name and address to an array adapter to show in a ListView\n list.add(device.getName() + \"\\n\" + device.getAddress());\n }\n }\n if (!h7) {\n Log.d(\"Main Activity\", \"Listing BTLE elements\");\n final BluetoothAdapter.LeScanCallback leScanCallback = new BluetoothAdapter.LeScanCallback() {\n public void onLeScan(final BluetoothDevice device, final int rssi, final byte[] scanRecord) {\n if (!list.contains(device.getName() + \"\\n\" + device.getAddress())) {\n Log.d(\"Main Activity\", \"Adding \" + device.getName());\n list.add(device.getName() + \"\\n\" + device.getAddress());\n pairedDevices.add(device);\n }\n }\n };\n\n\n Thread scannerBTLE = new Thread() {\n public void run() {\n Log.d(\"Main Activity\", \"Starting scanning for BTLE\");\n mBluetoothAdapter.startLeScan(leScanCallback);\n try {\n Thread.sleep(5000);\n Log.d(\"Main Activity\", \"Stoping scanning for BTLE\");\n mBluetoothAdapter.stopLeScan(leScanCallback);\n } catch (InterruptedException e) {\n Log.e(\"Main Activity\", \"ERROR: on scanning\");\n }\n }\n };\n\n scannerBTLE.start();\n }\n\n //Populate drop down\n spinner1 = (Spinner) findViewById(R.id.spinner1);\n ArrayAdapter<String> dataAdapter = new ArrayAdapter<>(this,\n android.R.layout.simple_spinner_item, list);\n dataAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n spinner1.setOnItemSelectedListener(this);\n spinner1.setAdapter(dataAdapter);\n\n for (int i = 0; i < dataAdapter.getCount(); i++) {\n if (dataAdapter.getItem(i).contains(\"Polar H7\")) spinner1.setSelection(i);\n }\n\n if (DataHandler.getInstance().getID() != 0 && DataHandler.getInstance().getID() < spinner1.getCount())\n spinner1.setSelection(DataHandler.getInstance().getID());\n }\n }",
"public void onServiceConnected(ComponentName className,\n\t\t\t\tIBinder service) {\n\t\t\tLocalBinder binder = (LocalBinder) service;\n\t\t\tconnService = binder.getService();\n\t\t\tconnServiceBound = true;\n\t\t}",
"public void onDeviceDisconnected() {\n btButton.setText(\"Disconnnected\");\n }",
"private void manageConnectedSocket(BluetoothSocket acceptSocket) {\n\n }",
"public void ondeviceConnected() {\n if(isAdded() && !isDetached()) {\n if (RELOAD_CARD_NUMBERS[0] == 1) {\n new DailyVerseFetcher(getActivity()).execute(true);\n }\n if (RELOAD_CARD_NUMBERS[1] == 1) {\n new HomeSermonFetcher(getActivity()).execute(true);\n }\n }\n }",
"private void setupBluetooth() {\n if (!getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)) {\n Toast.makeText(this, R.string.ble_not_supported, Toast.LENGTH_SHORT).show();\n finish();\n }\n\n // Initializes Bluetooth adapter.\n final BluetoothManager bluetoothManager =\n (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE);\n bluetoothAdapter = bluetoothManager.getAdapter();\n\n // Ensures Bluetooth is available on the device and it is enabled. If not,\n // displays a dialog requesting user permission to enable Bluetooth.\n if (bluetoothAdapter == null || !bluetoothAdapter.isEnabled()) {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, 1);\n }\n\n Set<BluetoothDevice> pairedDevices = bluetoothAdapter.getBondedDevices();\n\n if (pairedDevices.size() > 0) {\n // There are paired devices. Get the name and address of each paired device.\n for (BluetoothDevice device : pairedDevices) {\n String deviceName = device.getName();\n String deviceHardwareAddress = device.getAddress(); // MAC address\n String deviceType = device.getBluetoothClass().getDeviceClass() + \"\";\n\n Movie movie = new Movie(deviceName, deviceHardwareAddress, deviceType);\n movieList.add(movie);\n\n }\n\n mAdapter.notifyDataSetChanged();\n }\n }",
"private void displayGattServices(List<BluetoothGattService> gattServices) {\n if (gattServices == null) return;\n String uuid = null;\n String unknownServiceString = getResources().getString(R.string.unknown_service);\n String unknownCharaString = getResources().getString(R.string.unknown_characteristic);\n ArrayList<HashMap<String, String>> gattServiceData = new ArrayList<HashMap<String, String>>();\n ArrayList<ArrayList<HashMap<String, String>>> gattCharacteristicData\n = new ArrayList<ArrayList<HashMap<String, String>>>();\n mGattCharacteristics = new ArrayList<ArrayList<BluetoothGattCharacteristic>>();\n\n // final String action = intent.getAction();\n // if (BluetoothLeService.ACTION_GATT_SERVICES_DISCOVERED\n // .equals(action)) {\n // Logger.e(\"Service discovered\");\n // if(mTimer!=null)\n // mTimer.cancel();\n // prepareGattServices(BluetoothLeService.getSupportedGattServices());\n\n /*\n / Changes the MTU size to 512 in case LOLLIPOP and above devices\n */\n // if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n // BluetoothLeService.exchangeGattMtu(512);\n // }\n // } //else if (BluetoothLeService.ACTION_GATT_SERVICE_DISCOVERY_UNSUCCESSFUL\n // .equals(action)) {\n // mProgressDialog.dismiss();\n // if(mTimer!=null)\n // mTimer.cancel();\n // showNoServiceDiscoverAlert();\n // }\n // Loops through available GATT Services.\n for (BluetoothGattService gattService : gattServices) {\n HashMap<String, String> currentServiceData = new HashMap<String, String>();\n uuid = gattService.getUuid().toString();\n currentServiceData.put(LIST_NAME,SampleGattAttributes.lookup(uuid, unknownServiceString));\n currentServiceData.put(LIST_UUID, uuid);\n gattServiceData.add(currentServiceData);\n\n ArrayList<HashMap<String, String>> gattCharacteristicGroupData =\n new ArrayList<HashMap<String, String>>();\n List<BluetoothGattCharacteristic> gattCharacteristics =\n gattService.getCharacteristics();\n ArrayList<BluetoothGattCharacteristic> charas =\n new ArrayList<BluetoothGattCharacteristic>();\n\n if (uuid.equals(SampleGattAttributes.SERVER_UART)) {\n for (BluetoothGattCharacteristic gattCharacteristic : gattCharacteristics) {\n String uuidchara = gattCharacteristic.getUuid().toString();\n mReadCharacteristic = gattCharacteristic;\n if (uuidchara.equalsIgnoreCase(SampleGattAttributes.SERVER_UART_tx)) {\n Log.e(TAG,\"gatt- \"+gattCharacteristic);\n mNotifyCharacteristic = gattCharacteristic;\n prepareBroadcastDataNotify(mNotifyCharacteristic);\n }\n }\n }\n // Loops through available Characteristics.\n for (BluetoothGattCharacteristic gattCharacteristic : gattCharacteristics) {\n charas.add(gattCharacteristic);\n HashMap<String, String> currentCharaData = new HashMap<String, String>();\n uuid = gattCharacteristic.getUuid().toString();\n currentCharaData.put(LIST_NAME, SampleGattAttributes.lookup(uuid, unknownCharaString));\n currentCharaData.put(LIST_UUID, uuid);\n gattCharacteristicGroupData.add(currentCharaData);\n\n }\n mGattCharacteristics.add(charas);\n gattCharacteristicData.add(gattCharacteristicGroupData);\n }\n }",
"private void CheckBtIsOn() {\n mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\n\n if (!mBluetoothAdapter.isEnabled()) {\n Toast.makeText(getApplicationContext(), \"Bluetooth Disabled!\",\n Toast.LENGTH_SHORT).show();\n\n // Start activity to show bluetooth options\n Intent enableBtIntent = new Intent(mBluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\n }\n }",
"@Override\n public void onServiceConnected(ComponentName className,\n IBinder service) {\n BinderService.LocalBinder binder = (BinderService.LocalBinder) service;\n mService = binder.getService();\n mBound = true;\n }",
"private void updateUi(final BluetoothReader bluetoothReader) {\n\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n if (bluetoothReader instanceof Acr3901us1Reader) {\n /* The connected reader is ACR3901U-S1 reader. */\n if (mEditMasterKey.getText().length() == 0) {\n mEditMasterKey.setText(DEFAULT_3901_MASTER_KEY);\n }\n if (mEditApdu.getText().length() == 0) {\n mEditApdu.setText(DEFAULT_3901_APDU_COMMAND);\n }\n if (mEditEscape.getText().length() == 0) {\n mEditEscape.setText(DEFAULT_3901_ESCAPE_COMMAND);\n }\n mClear.setEnabled(true);\n mAuthentication.setEnabled(true);\n mStartPolling.setEnabled(false);\n mStopPolling.setEnabled(false);\n btn_connect.setEnabled(true);\n// mPowerOn.setEnabled(true);\n// mPowerOff.setEnabled(true);\n mTransmitApdu.setEnabled(true);\n mTransmitEscape.setEnabled(true);\n// mGetDeviceInfo.setEnabled(true);\n// mGetBatteryLevel.setEnabled(false);\n// mGetBatteryStatus.setEnabled(true);\n// mGetCardStatus.setEnabled(true);\n// mSetTxPower.setEnabled(false);\n mEditMasterKey.setEnabled(true);\n mEditApdu.setEnabled(true);\n mEditEscape.setEnabled(true);\n } else if (bluetoothReader instanceof Acr1255uj1Reader) {\n /* The connected reader is ACR1255U-J1 reader. */\n if (mEditMasterKey.getText().length() == 0) {\n try {\n mEditMasterKey.setText(Utils\n .toHexString(DEFAULT_1255_MASTER_KEY\n .getBytes(\"UTF-8\")));\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n }\n if (mEditApdu.getText().length() == 0) {\n mEditApdu.setText(DEFAULT_1255_APDU_COMMAND);\n }\n if (mEditEscape.getText().length() == 0) {\n mEditEscape.setText(DEFAULT_1255_ESCAPE_COMMAND);\n }\n mClear.setEnabled(true);\n mAuthentication.setEnabled(true);\n mStartPolling.setEnabled(true);\n mStopPolling.setEnabled(true);\n btn_connect.setEnabled(false);\n// mPowerOn.setEnabled(true);\n// mPowerOff.setEnabled(true);\n mTransmitApdu.setEnabled(true);\n mTransmitEscape.setEnabled(true);\n// mGetDeviceInfo.setEnabled(true);\n// mGetBatteryLevel.setEnabled(true);\n// mGetBatteryStatus.setEnabled(false);\n// mGetCardStatus.setEnabled(true);\n// mSetTxPower.setEnabled(true);\n mEditMasterKey.setEnabled(true);\n mEditApdu.setEnabled(true);\n mEditEscape.setEnabled(true);\n } else {\n mEditApdu.setText(R.string.noData);\n mEditEscape.setText(R.string.noData);\n mClear.setEnabled(true);\n mAuthentication.setEnabled(false);\n mStartPolling.setEnabled(false);\n mStopPolling.setEnabled(false);\n btn_connect.setEnabled(true);\n// mPowerOn.setEnabled(false);\n// mPowerOff.setEnabled(false);\n mTransmitApdu.setEnabled(false);\n mTransmitEscape.setEnabled(false);\n// mGetDeviceInfo.setEnabled(false);\n// mGetBatteryLevel.setEnabled(false);\n// mGetBatteryStatus.setEnabled(false);\n// mGetCardStatus.setEnabled(false);\n// mSetTxPower.setEnabled(false);\n mEditMasterKey.setEnabled(false);\n mEditApdu.setEnabled(false);\n mEditEscape.setEnabled(false);\n }\n }\n });\n }"
] | [
"0.7115134",
"0.7026102",
"0.69210315",
"0.68907905",
"0.6884813",
"0.68577766",
"0.6854716",
"0.6821886",
"0.681882",
"0.68008024",
"0.6795364",
"0.6764075",
"0.6763801",
"0.67170036",
"0.66933054",
"0.6692633",
"0.6618187",
"0.6605585",
"0.65958196",
"0.6555286",
"0.6516839",
"0.6508077",
"0.6499024",
"0.64947164",
"0.6478725",
"0.64749056",
"0.6469928",
"0.6469343",
"0.64621454",
"0.6457688",
"0.6452354",
"0.6440478",
"0.64390594",
"0.6433607",
"0.64319307",
"0.6417642",
"0.6406075",
"0.64027303",
"0.6369454",
"0.6360932",
"0.63375217",
"0.63284373",
"0.6328006",
"0.632681",
"0.63091296",
"0.6280687",
"0.62684053",
"0.6263307",
"0.6262159",
"0.6262159",
"0.6240563",
"0.6240453",
"0.62338936",
"0.62259233",
"0.6223364",
"0.6213578",
"0.6212533",
"0.62088716",
"0.6204006",
"0.6190554",
"0.6177353",
"0.6166839",
"0.6161853",
"0.6159933",
"0.615545",
"0.6149776",
"0.6134979",
"0.6134968",
"0.61334956",
"0.6124924",
"0.61201745",
"0.611704",
"0.61046886",
"0.61002463",
"0.6079866",
"0.6077894",
"0.607527",
"0.6054586",
"0.6039818",
"0.60382295",
"0.60359305",
"0.60351354",
"0.6025594",
"0.6018395",
"0.601731",
"0.6014337",
"0.60122174",
"0.6009206",
"0.6008364",
"0.6003134",
"0.5995811",
"0.59917986",
"0.59886676",
"0.5984212",
"0.59836173",
"0.5977065",
"0.5970333",
"0.59648573",
"0.5962704",
"0.5961247"
] | 0.65481406 | 20 |
Returns the value of the 'Name' attribute. If the meaning of the 'Name' attribute isn't clear, there really should be more of a description here... | String getName(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic String getName() {\n\t\treturn (String) attributes.get(\"name\");\n\t}",
"public String getName() {\n\t\treturn (String) get_Value(\"Name\");\n\t}",
"public String getName() {\n\t\treturn (String) get_Value(\"Name\");\n\t}",
"public String getName() {\n\t\treturn (String) get_Value(\"Name\");\n\t}",
"public final String getNameAttribute() {\n return getAttributeValue(\"name\");\n }",
"public String getName()\n {\n return (String)getAttributeInternal(NAME);\n }",
"public String getName() { \n\t\treturn getNameElement().getValue();\n\t}",
"public String getName() { \n\t\treturn getNameElement().getValue();\n\t}",
"public String getName() { \n\t\treturn getNameElement().getValue();\n\t}",
"public String getName() { return (String)get(\"Name\"); }",
"public String getName(){\n\n //returns the value of the name field\n return this.name;\n }",
"public String getName() {\n return (String) getValue(NAME);\n }",
"public String getName() { return this.Name; }",
"public String getName()\n {\n return this.aName;\n }",
"public AXValue getName() {\n return name;\n }",
"public String getName() { return Name; }",
"public String getName()\r\n\t{\r\n\t\treturn name;\r\n\t}",
"public String getName()\r\n\t{\r\n\t\treturn name;\r\n\t}",
"public String getName()\r\n\t{\r\n\t\treturn name;\r\n\t}",
"public String getName()\r\n\t{\r\n\t\treturn name;\r\n\t}",
"public String getName()\n \t{\n \t\treturn name;\n \t}",
"public String getName() {\r\n \t\t\treturn name;\r\n \t\t}",
"public String getName() {\r\n return Name;\r\n }",
"public String getName()\n\t{ return name; }",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"@Override\n\t\tfinal public String getName() {\n\t\t\treturn this.Name;\n\t\t}",
"public String getName() {\r\n \treturn name;\r\n }",
"private String getName() {\n\t\treturn name;\n\t}",
"public String getName()\r\n\t{\r\n\t\treturn this._name;\r\n\t}",
"public YangString getNameValue() throws JNCException {\n return (YangString)getValue(\"name\");\n }",
"public YangString getNameValue() throws JNCException {\n return (YangString)getValue(\"name\");\n }",
"@Basic @Raw\r\n\tpublic String getName() {\r\n\t\treturn name;\r\n\t}",
"public String getName()\r\n {\r\n\treturn name;\r\n }",
"public String getName() {\r\n\t\t\treturn Name;\r\n\t\t}",
"public String getName() \n {\n \treturn name;\n }",
"public String getName() throws SdpParseException {\n\t\tNameValue nameValue = getAttribute();\n\t\tif (nameValue == null)\n\t\t\treturn null;\n\t\telse {\n\t\t\tString name = nameValue.getName();\n\t\t\tif (name == null)\n\t\t\t\treturn null;\n\t\t\telse\n\t\t\t\treturn name;\n\t\t}\n\t}",
"public String getName()\r\n\t{\r\n\t\treturn this.name;\r\n\t}",
"public String getName()\r\n\t{\r\n\t\treturn this.name;\r\n\t}",
"public String getName()\r\n {\r\n return name;\r\n }",
"public String getName()\r\n {\r\n return name;\r\n }",
"public String GetName() {\n\t\treturn this.name;\n\t}",
"public String getName() \n\t{\n\t\treturn name;\n\t}",
"public String getName() {\n return this.Name;\n }",
"public String getName() {\n return this.Name;\n }",
"public java.lang.String getName()\n {\n return name;\n }",
"public java.lang.String getName()\n {\n return name;\n }",
"public String getName() {\r\n\t\treturn name.get();\r\n\t}",
"public String getName() {\n\t\treturn Name;\n\t}",
"public String getName() {\n\t\treturn this.Name;\n\t}",
"public Name getName(){\r\n\t\treturn name;\r\n\t}"
] | [
"0.8552948",
"0.8311485",
"0.8311485",
"0.8311485",
"0.8164286",
"0.81468123",
"0.7994057",
"0.7994057",
"0.7994057",
"0.7955556",
"0.791245",
"0.7835615",
"0.78243345",
"0.78141195",
"0.780532",
"0.77809924",
"0.7779097",
"0.7779097",
"0.7779097",
"0.7779097",
"0.7777842",
"0.77698326",
"0.7769603",
"0.7769187",
"0.77674395",
"0.77674395",
"0.77674395",
"0.77674395",
"0.77674395",
"0.77674395",
"0.77674395",
"0.77674395",
"0.77674395",
"0.77674395",
"0.77674395",
"0.77674395",
"0.77674395",
"0.77674395",
"0.77674395",
"0.77674395",
"0.77674395",
"0.77674395",
"0.77674395",
"0.77674395",
"0.77674395",
"0.77674395",
"0.77674395",
"0.77674395",
"0.77674395",
"0.77674395",
"0.77674395",
"0.77674395",
"0.77674395",
"0.77674395",
"0.77674395",
"0.77674395",
"0.77674395",
"0.77674395",
"0.77674395",
"0.77674395",
"0.77674395",
"0.77674395",
"0.77674395",
"0.77674395",
"0.77674395",
"0.77674395",
"0.77674395",
"0.77674395",
"0.77674395",
"0.77674395",
"0.77674395",
"0.77674395",
"0.77674395",
"0.77674395",
"0.77674395",
"0.77674395",
"0.77666014",
"0.776086",
"0.7759771",
"0.7752436",
"0.77514213",
"0.77514213",
"0.7745829",
"0.77383506",
"0.77374166",
"0.7734015",
"0.77339584",
"0.77318406",
"0.77318406",
"0.7728476",
"0.7728476",
"0.77267",
"0.7719518",
"0.7716477",
"0.7716477",
"0.77149165",
"0.77149165",
"0.77130806",
"0.77125084",
"0.7710699",
"0.77084565"
] | 0.0 | -1 |
TODO Autogenerated method stub / startP = e.getPoint(); endP = e.getPoint(); vs.add(startP); ve.add(endP); repaint(); | @Override
public void mouseClicked(MouseEvent e) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n public void mouseDragged(MouseEvent event)\r\n {\r\n points.add(event.getPoint());\r\n repaint(); // repaint JFrame\r\n }",
"@Override\r\n\tpublic void mousePressed(MouseEvent e) {\n\t\tpoints.add(new Point(e.getX(),e.getY()));\r\n\t\trepaint();\r\n\t}",
"@Override\n public void mousePressed(MouseEvent e) {\n startDrag = new Point(e.getX(), e.getY());\n points.add(startDrag);\n repaint();\n }",
"@Override\r\n\tpublic void mousePressed(MouseEvent e) {\n\t\tPoint point = new Point();\r\n\t\tpoint.x = e.getX();\r\n\t\tpoint.y = e.getY();\r\n\r\n\t switch (shape) {\r\n\t \r\n\t case LINE :\r\n\r\n\t \tthis.clicksforLine.add(point);\r\n\t \tbreak;\r\n\t case CIRCLE:\r\n\r\n\t \tthis.clicksforCircle.add(point);\r\n\t \tbreak;\r\n\t case POLYGON:\r\n\r\n\t \tthis.clicksforPoly.add(point);\r\n\t \tbreak;\r\n\t case CURVE:\r\n\r\n\t \tthis.clicksforCurve.add(point);\r\n\t \tbreak;\r\n\t case CLEAR:\r\n\t {\r\n\t }\r\n\t \tbreak;\r\n\t default:\r\n\t \tbreak;\r\n\t }\r\n \r\n\t\tSystem.out.println(point.x+ \",\"+point.y);\r\n repaint();\r\n\t\t\r\n\t}",
"public void mouseDragged(MouseEvent event) {\n\t\t\t\t\t\t\tif (pointCount < points.length) {\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tpoints[pointCount] = event.getPoint(); // localiza o ponto\r\n\t\t\t\t\t\t\t\tpointCount++; \r\n\t\t\t\t\t\t\t\trepaint(); // repinta JFrame\t\r\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}",
"@Override \n\t\t\tpublic void mousePressed(MouseEvent e) \n\t\t\t{\n\t\t\t\tbubblePosition.add(e.getPoint());//마우스를 누루면 누룬위치를 리스트에 저장 \n\t\t\t}",
"@Override\r\n public void mousePressed(MouseEvent e) {\n startDrag = new Point(e.getX(), e.getY());\r\n endDrag = startDrag;\r\n repaint();\r\n\r\n }",
"public void mousePressed(MouseEvent e) {\n if(e.isPopupTrigger()){\n Point2DSerializable checkRange=new Point2DSerializable(e.getPoint(),true);\n if(checkRange.checkInsideFrame()==false){\n return;\n }\n }\n maybeShowPopup(e);\n if((e.getModifiers() & MouseEvent.BUTTON1_MASK)!=0 ){\n if(addRoad==true){\n SelectedObject.setNoBlink();\n //firstSelected.setAlwaysRepaint();\n addJunctionAndRoad(new Point2DSerializable(e.getPoint(),true));//////***\n addRoad=false;\n ctrlOnLine=true;\n PSRender.allwaysRepaintOn();\n }else if(ctrlOnLine==true){\n ////////////////////////////////\n PSRender.allwaysRepaintOff();\n firstSelected.removeLastCtrl();\n firstSelected.addPointCtrl2End(new Point2DSerializable(e.getPoint(),true));\n /**/\n PSRender.repaint();\n //firstSelected.resetAlwaysRepaint();\n firstSelected=null;\n secondSelected=null;\n firstSelectedPointType=NO_SELECTED_TYPE;\n secondSelectedPointType=NO_SELECTED_TYPE;\n\n SelectedObject.setBlink();\n ctrlOnLine=false;\n }else if(addOOPath==true){\n addOOPath=false;\n if(selectedOtherObject!=null){\n selectedOtherObject.addP2(new Point2DSerializable(e.getPoint(),true));\n }else{\n System.out.println(\"Other object == null\");\n }\n PSRender.repaint();\n }\n }\n //System.out.println(\"\\tout method: mousePressed()\");\n }",
"public void mousePressed(MouseEvent e) {\n e.getComponent().requestFocus();\n \n if (e.getSource() instanceof MapBean) {\n // mouse has now been pressed\n mousePressed = true;\n // erase the old circle if any\n eraseCircle();\n \n if (theMap == null) {\n theMap = (MapBean) e.getSource();\n }\n \n // anchor the new first point of the line\n rPoint1 = theMap.getProjection().inverse(e.getPoint());\n // ensure the second point is not yet set.\n rPoint2 = null;\n // add the anchor point to the list of line segments\n segments.addElement(rPoint1);\n // add the distance to the total distance\n totalDistance = totalDistance + distance;\n }\n }",
"public void mouseMoved(MouseEvent e) {\n ptDragStart = e.getPoint();\r\n\r\n }",
"public void mouseDragged( MouseEvent e )\n {\n x = e.getX(); y = e.getY();\n \n theShape.ends[0].x = x;\n theShape.ends[0].y = y;\n /*\n if ( mode==0 ) // Line\n {\n theLine.ends[0].x = x; \n theLine.ends[0].y = y; \n }\n else if ( mode==1 ) // Box\n {\n theBox.ends[0].x = x;\n theBox.ends[0].y = y;\n }\n */\n \n System.out.println(\"dragged to x=\"+x+\" y=\"+y);\n repaint();\n }",
"@Override\n\tpublic void drawPoint(MouseEvent e, int state) {\n\n\t}",
"public PaintPanel()\r\n {\r\n // handle frame mouse motion event\r\n addMouseMotionListener(\r\n new MouseMotionAdapter()\r\n {\r\n // store drag points and repaint\r\n @Override\r\n public void mouseDragged(MouseEvent event)\r\n {\r\n points.add(event.getPoint());\r\n repaint(); // repaint JFrame\r\n }\r\n }\r\n );\r\n }",
"void touch_move_draw(float event_x, float event_y) {\n path.lineTo(event_x,event_y);\n cur_x = event_x;\n cur_y = event_y;\n\n // Add point to list\n addPoint();\n }",
"@Override\n\tpublic void mousePressed(MouseEvent e) {\n\t\tpvo3 = getPosition(e.getPoint());\n\t\t// System.out.println(pvo1.getX()+\",\"+pvo1.getY());\n\t}",
"@Override\n\tpublic void paint(Graphics g) {\n\t\tsuper.paint(g);\n\t\tif (startDragginPoint!=null && currentDragPoint != null){\n\t\t\t\n\t\t\tg.setColor(Color.black);\n\t\t\tAuxiliar.sortPoint((p,q) -> {\n\t\t\t\tg.drawRect(p.x, p.y, q.x-p.x, q.y-p.y);\t\n\t\t\t}, startDragginPoint, currentDragPoint);\n\n\t\t}\n\t}",
"public void mousePressed(MouseEvent e)\n {\n points.setX(e.getX());\n points.setY(e.getY());\n }",
"public void paintComponent(Graphics g) {\n\t\tDate end = new Date();\n\t\tlong points = end.getTime() - start.getTime();\n\t\t\n\t\tsuper.paintComponent(g);\n\t\tthis.setBackground(new Color(164, 242, 245));\n\t\tg.setColor(new Color(54, 140, 22));\n\t\tg.fill3DRect(0, 400, 500, 100, true); //\n\t\tfor (int i = 0; i < elements.length; i++) {\n\t\t\telements[i].draw(g);\n//\t\t\t elements[i].jump();\n\t\t\tif (player.checkCollision(elements[i])){\n\t\t\t\tanimation.stop();\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Izgubio si\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tplayer.draw(g);\n\t\tg.drawString(Long.toString(points), 50, 50);\n\t}",
"private void finishLine(MouseEvent e) {\n\t\txEnd = e.getX();\n\t\tyEnd = e.getY();\n\t}",
"public void mouseClicked(MouseEvent e) {\n p.x = e.getX();\n p.y = e.getY();\n repaint();\n }",
"@Action\n public void addPoint() { \n Point2D pt = randomPoint();\n PrimitiveGraphic bp = JGraphics.point(pt, RandomStyles.point());\n bp.setDefaultTooltip(\"<html><b>Point</b>: <i> \" + pt + \"</i>\");\n bp.setDragEnabled(true);\n root1.addGraphic(bp);\n }",
"synchronized protected int addPoint(int x_p, int y_p, long layer_id, double magnification) {\n \t\tif (-1 == n_points) setupForDisplay(); //reload\n \t\t//lookup closest point and then get the closest clicked point to it\n\t\tint index = 0;\n\t\tif (n_points > 1) index = findClosestSegment(x_p, y_p, layer_id, magnification);\n \t\t//check array size\n \t\tif (p[0].length == n_points) {\n \t\t\tenlargeArrays();\n \t\t}\n \t\t//decide:\n \t\tif (0 == n_points || 1 == n_points || index + 1 == n_points) {\n \t\t\t//append at the end\n \t\t\tp[0][n_points] = x_p;\n \t\t\tp[1][n_points] = y_p;\n \t\t\tp_layer[n_points] = layer_id;\n \t\t\tindex = n_points;\n \n \t\t\tlast_autotrace_start = -1;\n \t\t} else if (-1 == index) {\n \t\t\t// decide whether to append at the end or prepend at the beginning\n \t\t\t// compute distance in the 3D space to the first and last points\n \t\t\tfinal double[] sqd0N = sqDistanceToEndPoints(x_p, y_p, layer_id);\n \t\t\t//final double sqdist0 = sqd0N[0];\n \t\t\t//final double sqdistN = sqd0N[1];\n \n \t\t\t//if (sqdistN < sqdist0)\n \t\t\tif (sqd0N[1] < sqd0N[0]) {\n \t\t\t\t//append at the end\n \t\t\t\tp[0][n_points] = x_p;\n \t\t\t\tp[1][n_points] = y_p;\n \t\t\t\tp_layer[n_points] = layer_id;\n \t\t\t\tindex = n_points;\n \n \t\t\t\tlast_autotrace_start = -1;\n \t\t\t} else {\n \t\t\t\t// prepend at the beginning\n \t\t\t\tfor (int i=n_points-1; i>-1; i--) {\n \t\t\t\t\tp[0][i+1] = p[0][i];\n \t\t\t\t\tp[1][i+1] = p[1][i];\n \t\t\t\t\tp_layer[i+1] = p_layer[i];\n \t\t\t\t}\n \t\t\t\tp[0][0] = x_p;\n \t\t\t\tp[1][0] = y_p;\n \t\t\t\tp_layer[0] = layer_id;\n \t\t\t\tindex = 0;\n \n \t\t\t\tif (-1 != last_autotrace_start) last_autotrace_start++;\n \t\t\t}\n \t\t} else {\n \t\t\t//insert at index:\n \t\t\tindex++; //so it is added after the closest point;\n \t\t\t// 1 - copy second half of array\n \t\t\tint sh_length = n_points -index;\n \t\t\tdouble[][] p_copy = new double[2][sh_length];\n \t\t\tlong[] p_layer_copy = new long[sh_length];\n \t\t\tSystem.arraycopy(p[0], index, p_copy[0], 0, sh_length);\n \t\t\tSystem.arraycopy(p[1], index, p_copy[1], 0, sh_length);\n \t\t\tSystem.arraycopy(p_layer, index, p_layer_copy, 0, sh_length);\n \t\t\t// 2 - insert value into 'p' (the two control arrays get the same value)\n \t\t\tp[0][index] = x_p;\n \t\t\tp[1][index] = y_p;\n \t\t\tp_layer[index] = layer_id;\n \t\t\t// 3 - copy second half into the array\n \t\t\tSystem.arraycopy(p_copy[0], 0, p[0], index+1, sh_length);\n \t\t\tSystem.arraycopy(p_copy[1], 0, p[1], index+1, sh_length);\n \t\t\tSystem.arraycopy(p_layer_copy, 0, p_layer, index+1, sh_length);\n \n \t\t\t// Reset autotracing records\n \t\t\tif (index < last_autotrace_start) {\n \t\t\t\tlast_autotrace_start++;\n \t\t\t}\n \t\t}\n \t\t//add one up\n \t\tthis.n_points++;\n \n \t\treturn index;\n \t}",
"public void mouseDragged(MouseEvent e) {\n currX = e.getX();\r\n currY = e.getY();\r\n\r\n if(g2 != null) {\r\n // Draw line if g2 context is not null\r\n g2.drawLine(oldX, oldY, currX, currY);\r\n // Refresh draw area to repaint\r\n repaint();\r\n // Stores current coordinates x,y as old x,y\r\n oldX = currX;\r\n oldY = currY;\r\n }\r\n }",
"@Override\n\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\tif(gui.getMapPointSelectMode() == MapPointSelectMode.START){\n\t\t\t\t\t\tSPath path = SPath.getCurrentPath();\n\t\t\t\t\t\tif(path != null){\n\t\t\t\t\t\t\t//Set the start point.\n\t\t\t\t\t\t\tpath.setStartPoint(e.getPoint(), width, height);\n\t\t\t\t\t\t\t//Reset select mode.\n\t\t\t\t\t\t\tgui.resetSelectMode();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t//If current mode is finish.\n\t\t\t\t\telse if(gui.getMapPointSelectMode() == MapPointSelectMode.FINISH){\n\t\t\t\t\t\tSPath path = SPath.getCurrentPath();\n\t\t\t\t\t\tif(path != null){\n\t\t\t\t\t\t\t//Set the finish point.\n\t\t\t\t\t\t\tpath.setFinishPoint(e.getPoint(), width, height);\n\t\t\t\t\t\t\t//Reset select mode.\n\t\t\t\t\t\t\tgui.resetSelectMode();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}",
"@Override\n public void mouseDragged(MapEventMouse e) {\n if (isDragging) {\n end = e.getPoint();\n e.getMap().repaint();\n }\n }",
"public void mousePressed(MouseEvent e) {\n int i = 0;\n // Koordinaten des Mauszeigers sind relativ zum sichtbaren Bereich der\n // Zeichenflaeche. Also linke obere Ecke des sichtb. Bereichs holen\n // und beruecksichtigen.\n Rectangle r = ((JScrollPane) e.getSource()).getViewport().getViewRect();\n int f = model.getFactor(); // Zoomfaktor beachten\n int x = r.x + e.getX();\n x = x / f;\n int y = r.y + e.getY();\n y = y / f;\n\n moveP = model.getInterpolPoint(new Point(x, y, f));\n // Hilfspunkt erzeugen\n }",
"@Override\n\tprotected void paint2d(Graphics2D g) {\n\t\tdouble x = 0;//getX();\n\t\tdouble y = 0;//getY();\n\t\tfor (int i = 0; i < size() - 1; i++) {\n\t\t\tGPoint p1 = points.get(i);\n\t\t\tGPoint p2 = points.get(i + 1);\n\t\t\tdouble x0 = p1.getX() - x;\n\t\t\tdouble y0 = p1.getY() - y;\n\t\t\tdouble x1 = p2.getX() - x;\n\t\t\tdouble y1 = p2.getY() - y;\n\t\t\tg.drawLine(GMath.round(x0), GMath.round(y0),\n\t\t\t\t\tGMath.round(x1), GMath.round(y1));\n\t\t}\n\t}",
"public void mousePressed(MouseEvent e) {\n\n if(Objects.equals(ToolSelect.GetTool(), \"zoom/pan\")){\n released = false;\n sPoint = MouseInfo.getPointerInfo().getLocation();\n }else {\n\n startPoint = e.getPoint();\n shape = new ColoredRectangle(ToolSelect.GetBorderColor(), ToolSelect.GetFillColor(), new Rectangle(), ToolSelect.GetTool(), null);\n if (Objects.equals(ToolSelect.GetTool(), \"plot\") || Objects.equals(ToolSelect.GetTool(), \"line\")) {\n shape.shape.setBounds(e.getX(), e.getY(), 1, 1);\n }\n }\n\n }",
"@Override\n\tpublic void mousePressed(MouseEvent me) {\n\t\tstartPoint = new Point(me.getX(),me.getY());\n\t}",
"@Override\n public void mouseEntered(MouseEvent e) {\n if (GlobalVariable.draggingUnit != null) {\n // if you are dragging a unit into WorkPanel from the unitPanel\n Point point = e.getPoint();\n Component newCom = EventUtil.copyUnitFrom(GlobalVariable.draggingUnit, false);\n newCom.setLocation(point);\n GlobalVariable.workPanel.add(newCom);\n GlobalVariable.workPanel.updateUI();\n // Store the unitOfWorkPanel for future handle(Add listener if release at workPanel, or remove if not)\n GlobalVariable.newUnitForWork= (BaseUnitUI) newCom;\n // Clear the draggingUnit.\n GlobalVariable.draggingUnit = null;\n }\n }",
"public void mousePressed(MouseEvent e) {\n ptDragStart = e.getPoint();\r\n mouseDragged = true;\r\n }",
"private void setStartOrEnd(MouseEvent e) {\n\t\tif (startX == null) {\n\t\t\tstartX = e.getX();\n\t\t\tstartY = e.getY();\n\t\t} else if (endX == null) {\n\t\t\tendX = e.getX();\n\t\t\tendY = e.getY();\n\t\t\tsetData();\n\t\t}\n\t}",
"public void mouseDragged(MouseEvent e) {\n if (moveP != null) {\n // Koordinaten des Mauszeigers sind relativ zum sichtbaren Bereich der\n // Zeichenflaeche. Also linke obere Ecke des sichtb. Bereichs holen\n // und beruecksichtigen.\n Rectangle r = ((JScrollPane) e.getSource()).getViewport().getViewRect();\n int f = model.getFactor(); // Zoomfaktor beachten\n int x = r.x + e.getX();\n x = x / f;\n int y = r.y + e.getY();\n y = y / f;\n\n moveP.movePoint(x, y);\n model.notifyChanged();\n }\n }",
"private void addPoint(PointF p) {\n final long t = System.currentTimeMillis();\n final int size;\n synchronized (lastSegment) {\n size = lastSegment.size();\n final PointF sheetPoint = sheet.toSheet(p);\n lastSegment.add(sheetPoint);\n lastSegmentTimes.add(t);\n lastSegmentCurve.setThickness(currentThickness);\n lastSegmentCurve.addPoint(sheetPoint);\n }\n if (size >= maxPoints - 1) {\n finishSegment();\n mode = IDLE_MODE;\n }\n }",
"public void addPoint(Point p) {\r\n line.add(p);\r\n }",
"@Override\n public void mousePressed(MapEventMouse e) {\n if (SwingUtilities.isLeftMouseButton(e)) {\n start = e.getPoint();\n startCoordinate = e.getLocation();\n isDragging = true;\n end = null;\n }\n }",
"@Override\n public void paintComponent(Graphics g) {\n super.paintComponent(g);\n if(selected != null)currentPage.drawIsDroppable(g, selected);\n pa.draw(g, selected);\n g.setColor(Color.BLACK);\n \tg.drawLine(0, currentPage.getBounds().height, currentPage.getBounds().width, currentPage.getBounds().height);\n }",
"protected void addPoint(Point a) throws InvalidArgumentException {\n\t\tif (a == null)\n\t\t\tthrow new InvalidArgumentException(\n\t\t\t\t\t\"Editor.java - addPoint(Point): Invalid Argument.\");\n\t\telse {\n\t\t\tif (selectedCurves.size() == 0)\n\t\t\t\t// Er is nog geen geselecteerde curve -> ééntje aanmaken.\n\t\t\t\tstartNewCurve();\n\n\t\t\tfor (int i = 0; i < selectedCurves.size(); ++i) {\n\t\t\t\tif (i == 0)\n\t\t\t\t\tpush();\n\n\t\t\t\tCurve c = selectedCurves.elementAt(i);\n\n\t\t\t\tc.addInput(a); // Punt toevoegen.\n\t\t\t\tAlgorithm temp = getAlgorithm(c.getType());\n\n\t\t\t\t// Bij Hermite ( type == 'H' ) is het 2de ingegeven punt\n\t\t\t\t// telkens de tangens. Dus er moet niet getekend worden voordat\n\t\t\t\t// deze is ingegeven.\n\t\t\t\tif (temp != null && c.getType() != 'H'\n\t\t\t\t\t\t|| c.getInput().size() % 2 == 0) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tselectionTool.deleteCurve(c);\n\t\t\t\t\t\ttemp.calculate(c);\n\t\t\t\t\t\tselectionTool.addCurve(c);\n\t\t\t\t\t} catch (InvalidArgumentException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (i == selectedCurves.size() - 1)\n\t\t\t\t\tpushNew();\n\t\t\t}\n\t\t}\n\t}",
"@Override\r\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\tclickPoint = e.getPoint();\r\n\t\t\t\tselectionBounds = null;\r\n//\t\t\t\tSystem.out.println(\"Bac dau\" + e.getPoint().toString());\r\n\t\t\t\tbacdauX = (int) e.getPoint().getX();\r\n\t\t\t\tbacdauY = (int) e.getPoint().getY();\r\n\t\t\t}",
"void addEvent(IShape shape, IEvent event, int eventBegin, int eventEnd);",
"@Override\r\n public void mouseReleased(MouseEvent e) {\n if(endDrag!=null && startDrag!=null) {\r\n try \r\n {\r\n\r\n selectedArea = makeRectangle(startDrag.x, startDrag.y, e.getX(), e.getY()); \r\n startDrag = null;\r\n endDrag = null;\r\n repaint();\r\n } catch (Exception e1) {\r\n e1.printStackTrace();\r\n } \r\n }\r\n\r\n }",
"public void mouseDragged(MouseEvent e) {\n\t\tif(currentShape != null){\n\t\t\tif(e.getModifiers() == MouseEvent.BUTTON1_MASK) {\n\t\t\t\tcurrentShape.setOrigin(e.getPoint());\n\t\t\t\tdrawing.repaint();\n\t\t\t} else {\n\t\t\t\tif(e.getModifiers() == MouseEvent.BUTTON3_MASK) {\n\t\t\t\t\tfor(Shape s : drawing.groupedShapes){\n\t\t\t\t\t\tif(s.isOn(e.getPoint())){\n\t\t\t\t\t\t\tfor(Shape sh : drawing.groupedShapes){\n\t\t\t\t\t\t\t\t//int px = (int) e.getPoint().getX();\n\t\t\t\t\t\t\t\t//int py = (int) e.getPoint().getY();\n\t\t\t\t\t\t\t\t//int sx = (int) sh.getOrigin().getX();\n\t\t\t\t\t\t\t\t//int sy = (int) sh.getOrigin().getY();\n\t\t\t\t\t\t\t\tPoint p = new Point(e.getPoint());\n\t\t\t\t\t\t\t\tsh.setOrigin(p);\n\t\t\t\t\t\t\t\tdrawing.repaint();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void paintComponent(Graphics g) {\r\n\t\tsuper.paintComponent(g);\r\n\t\t\r\n\t\t// Setting drawings the global color.\r\n\t\tg.setColor( this.model.defaultV.movingColor ); \r\n\r\n\t\t//Painting all of the particles.\r\n\t\tfor(int i = 0; i < this.model.particleArray.size(); i++) {\r\n\t\t\tParticle p = (Particle) this.model.particleArray.get(i);\r\n\t\t\tint x = (int) p.x;\r\n\t\t\tint y = (int) p.y;\r\n\t\t\t\r\n\t\t\t// Changing the color accordingly.\r\n\t\t\tif( p.isMoving ) {\r\n\t\t\t\tg.setColor( p.color );\r\n\t\t\t} else {\r\n\t\t\t\tg.setColor( this.model.defaultV.stuckColor );\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Painting each particle.\r\n\t\t\tg.fillRect(x, y, this.model.defaultV.particleSize, this.model.defaultV.particleSize);\r\n\t\t\t\r\n\t\t\tif (p.isTracking && p.trackingPath.size() > 1) {\r\n\t\t\t\tParticle firstPos = p.trackingPath.get(0); // Our very first particle position.\r\n\t\t\t\tfor(int j = 1; j < p.trackingPath.size() - 1; j++) {\r\n\t\t\t\t\tParticle secondPos = p.trackingPath.get(j);\r\n\t\t\t\t\t// draw line from first to second.\r\n\t\t\t\t\tGraphics2D g2 = (Graphics2D) g;\r\n\t\t\t\t\tLine2D lin = new Line2D.Float((int) firstPos.x, (int) firstPos.y, (int) secondPos.x, (int) secondPos.y);\r\n\t\t\t\t\tg.setColor( p.color );\r\n\t\t\t\t\tg2.draw(lin);\r\n\t\t\t\t\t// Set our first to the next.\r\n\t\t\t\t\tfirstPos = secondPos;\r\n\t\t\t\t}\r\n\t\t\t}\r\n }\r\n\t}",
"@Override\n\tpublic void mouseReleased(MouseEvent e) {\n\t\tif (this.currentShape instanceof Edge) {\n\t\t\tPoint2D point = new Point2D.Double(e.getX(), e.getY());\n\t\t\tfor (Shape shape: shapes) {\n\t\t\t\tif (shape.verifyShapeExists(point)){\n\t\t\t\t\t/**\n\t\t\t\t\t * Ignore if current shape is JoinPoint or EdgeLabel\n\t\t\t\t\t */\n\t\t\t\t\tif (shape instanceof JoinPoint || shape instanceof EdgeLabel) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t/**\n\t\t\t\t\t * Otherwise, set current edge point to this shape\n\t\t\t\t\t */\n\t\t\t\t\t((Edge) currentShape).setDest(shape);\n\t\t\t\t\tcurrentShape.setDrawing(false);\n\t\t\t\t\tcurrentShape = null;\n\t\t\t\t\tvalidate();\n\t\t\t\t\trepaint();\n\t\t\t\t\t/**\n\t\t\t\t\t * Notify to automata that it have changes\n\t\t\t\t\t */\n\t\t\t\t\tsetAutomataChanges();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\t/**\n\t\t\t * If it doesn't have any shape, create a new one\n\t\t\t */\n\t\t\tShape shape = shapeFactory.getShape(shapeType);\n\t\t\tshape.setPosition(point);\n\t\t\taddShape(shape);\n\t\t\t((Edge) currentShape).setDest(shape);\n\t\t\tsetAutomataChanges();\n\t\t}\n\t\tif (currentShape != null) {\n\t\t\tcurrentShape.setDrawing(false);\n\t\t\tcurrentShape = null;\n\t\t}\n\t\tvalidate();\n\t\trepaint();\n\t}",
"public void mouseReleased(MouseEvent e)\n {\n //add a null ColorPoint to the points\n //to signify the end of a continuous\n //section when redrawing the image\n points.add(null);\n }",
"public void mouseDragged(MouseEvent e) {\n\n try {\n dragEndScreen = e.getPoint();\n //Create a point2d.float with the\n Point2D.Float dragStart = transformPoint(dragStartScreen);\n Point2D.Float dragEnd = transformPoint(dragEndScreen);\n //calculate how far the screen is dragged from its start position.\n double dx = dragEnd.getX() - dragStart.getX();\n double dy = dragEnd.getY() - dragStart.getY();\n transform.translate(dx, dy);\n\n //remember to reposition points to avoid unstable dragging.\n dragStartScreen = dragEndScreen;\n dragEndScreen = null;\n repaint();\n } catch (NoninvertibleTransformException ex) {\n ex.printStackTrace();\n }\n\n }",
"@Override\n\tpublic void mouseDragged(MouseEvent me) {\n\t\tcurrentPoint = new Point(me.getX(),me.getY());\n\t\tthis.repaint();\n\t}",
"public void mousePressed(MouseEvent e)\n { \n this.startX=e.getX();\n this.startY=e.getY();\n\n }",
"public void mouseDragged(MouseEvent e) \n {\n recordLabel(e.getPoint()); \n }",
"private void formMouseDragged(java.awt.event.MouseEvent evt) {\n int x = evt.getXOnScreen();\n int y = evt.getYOnScreen();\n setLocation(x-xMouse , y-yMouse);\n }",
"public void mousePressed(MouseEvent e) // When mouse is pressed:\n {\n Location pt = new Location(e.getX(),e.getY());\n origPress = pt;\n\n if(hLine.contains(pt)) // If press is on hLine:\n {\n hLineGrabbed = true; // hLine is grabbed\n }\n\n if(vLine.contains(pt)) // If press is on vLine:\n {\n vLineGrabbed = true; // vLine is grabbed\n }\n\n lastPt = pt; // Set the point to lastPt\n }",
"public void start(Point p);",
"@SuppressWarnings(\"unchecked\")\r\n public void mouseDragged(MouseEvent e) {\r\n // test if the mouse drags on a node, and make sure the node is in the displaying area(r=40)\r\n if(mode == InputMode.ADD_NODES && nodeUnderMouse != null\r\n && e.getX()>=40 && e.getY()>=40\r\n && e.getX()<=1460 && e.getY()<=860) {\r\n nodeUnderMouse.getData().setPosition(e.getPoint());\r\n canvas.repaint();\r\n }\r\n }",
"@Override\r\n\t\t\tpublic void mouseDragged(MouseEvent e) {\n\t\t\t\tPoint point=getLocation();\r\n\t\t\t\tsetLocation(point.x + (e.getX() - origin.x), point.y + (e.getY() - origin.y));\r\n\t\t\t}",
"public void mousePressed(MouseEvent event)\n\t\t{\n\t\t\ttempPoint1 = event.getPoint();\n\t\t}",
"@Override\n\tpublic void mouseMoved(MouseEvent e) {\n\t\tif(clicks % 2 != 0) {\n\t\t\tend = new Point2D(e.getX(), e.getY());\n\t\t\tline.setEndPoint(end);\n\t\t}\n\t}",
"void dragPoint() {\n\t\toffsetP = PVector.sub(P, beginOffsetP); // calculate the offset made by\n\t\t\t\t\t\t\t\t\t\t\t\t// mouseDrag -- subtract\n\t\t\t\t\t\t\t\t\t\t\t\t// beginOffsetP from P\n\t\tfor (int i = 0; i < amount; i++)\n\t\t\tpoint[i].drag();\n\t}",
"private void paintCourbePoints() {\n\t\tfloat x, y;\n\t\tint i, j;\n\t\t\n\t\tfor(x=xMin; x<=xMax; x++) {\n\t\t\ty = parent.getY(x);\n\t\t\t\n\t\t\tif(y>yMin && y<yMax) {\n\t\t\t\ti = convertX(x);\n\t\t\t\tj = convertY(y);\n\t\t\t\t\n\t\t\t\t//Utilisation d'un carre/losange pour simuler un point \n\t\t\t\t//de taille superieur a un pixel car celui-ci est peu visible.\n\t\t\t\tpaintPointInColor(i-2, j);\n\t\t\t\tpaintPointInColor(i-1, j-1);\t\t\t\t\n\t\t\t\tpaintPointInColor(i-1, j);\n\t\t\t\tpaintPointInColor(i-1, j+1);\n\t\t\t\tpaintPointInColor(i, j-2);\t//\t *\n\t\t\t\tpaintPointInColor(i, j-1);\t//\t * * *\n\t\t\t\tpaintPointInColor(i, j);\t//\t* * * * *\n\t\t\t\tpaintPointInColor(i, j+1);\t//\t * * *\n\t\t\t\tpaintPointInColor(i, j+2);\t//\t *\n\t\t\t\tpaintPointInColor(i+1, j-1);\n\t\t\t\tpaintPointInColor(i+1, j);\n\t\t\t\tpaintPointInColor(i+1, j+1);\n\t\t\t\tpaintPointInColor(i+2, j);\n\t\t\t}\n\t\t}\t\t\n\t}",
"public void mapCalculations(MouseEvent e) {\n\t\tif(SwingUtilities.isLeftMouseButton(e)) {\r\n\t\t\t//if s key is pressed create start node\r\n\t\t\t\r\n\t\t\tif(currKey == 'e' || currKey == 'E') {\r\n\t\t\t\tint xRollover = e.getX() % size;\r\n\t\t\t\tint yRollover = e.getY() % size;\r\n\t\t\t\t\r\n\t\t\t\tif(endNode == null) {\r\n\t\t\t\t\tendNode = new Node(e.getX() - xRollover, e.getY() - yRollover);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tendNode.setXY(e.getX() - xRollover, e.getY() - yRollover);\r\n\t\t\t\t}\r\n\t\t\t\trepaint();\r\n\t\t\t} \r\n\t\t\t//if e is pressed create end node\r\n\t\t\telse if(currKey == 's' || currKey == 'S') {\r\n\t\t\t\tint xRollover = e.getX() % size;\r\n\t\t\t\tint yRollover = e.getY() % size;\r\n\t\t\t\t\r\n\t\t\t\tif(startNode == null) {\r\n\t\t\t\t\tstartNode = new Node(e.getX() - xRollover, e.getY() - yRollover);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tstartNode.setXY(e.getX() - xRollover, e.getY() - yRollover);\r\n\t\t\t\t}\r\n\t\t\t\trepaint();\r\n\t\t\t}\r\n\t\t\t//else create wall\r\n\t\t\telse {\r\n\t\t\t\tint xBorder = e.getX() - (e.getX() % size);\r\n\t\t\t\tint yBorder = e.getY() - (e.getY() % size);\r\n\t\t\t\t\t\r\n\t\t\t\tNode newBorder = new Node(xBorder, yBorder);\r\n\t\t\t\tpathfinding.addBorder(newBorder);\r\n\t\t\t\t\t\r\n\t\t\t\trepaint();\r\n\t\t\t}\r\n\t\t} \r\n\t\t//if right mouse button is clicked\r\n\t\telse if(SwingUtilities.isRightMouseButton(e)) {\r\n\t\t\tint mouseX = e.getX() - (e.getX() % size);\r\n\t\t\tint mouseY = e.getY() - (e.getY() % size);\r\n\t\t\t//if s is pressed remove start node\r\n\t\t\tif(currKey == 's' || currKey == 'S') {\r\n\t\t\t\tif(startNode != null && mouseX == startNode.getX() && startNode.getY() == mouseY);\r\n\t\t\t\tstartNode = null;\r\n\t\t\t\trepaint();\r\n\t\t\t} \r\n\t\t\t//if e is pressed remove end node\r\n\t\t\telse if(currKey == 'e' || currKey == 'E') {\r\n\t\t\t\tif(endNode != null && mouseX == endNode.getX() && endNode.getY() == mouseY);\r\n\t\t\t\tendNode = null;\r\n\t\t\t\trepaint();\r\n\t\t\t}\r\n\t\t\t//else remove wall\r\n\t\t\telse {\r\n\t\t\t\tint location = pathfinding.searchBorder(mouseX, mouseY);\r\n\t\t\t\tif(location != -1) {\r\n\t\t\t\t\tpathfinding.removeBorder(location);\r\n\t\t\t\t}\r\n\t\t\t\trepaint();\t\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\n public void mouseDragged(MouseEvent e) {\n switch (GlobalVariable.dragState) {\n case init:\n Point abPoint = EventUtil.getAbsolutePointBy(e);\n // the component that the mouse at (as it's not e.getComponent if you move far away.\n Component componentOfMouse = e.getComponent().getParent().getComponentAt(abPoint);\n if (componentOfMouse instanceof BaseUnitUI) {\n if (!(EventUtil.isPointInComponents(e, \"In\"))\n && !(EventUtil.isPointInComponents(e, \"Out\"))) {\n // You are attempt to relocate the Unit\n e.getComponent().setLocation(abPoint);\n GlobalVariable.dragState = GlobalVariable.DragState.forRelocate;\n } else {\n // You drag a In or Out, so it is to Link Unit\n GlobalVariable.dragState = GlobalVariable.DragState.forLink;\n // get the line you create during mousePress and update its endPoint\n Line line = GlobalVariable.lastLine;\n if (line != null) {\n line.updateEndPoint(abPoint);\n GlobalVariable.workPanel.updateUI();\n }\n }\n }\n break;\n case forRelocate:\n // if it is called during dragging label around\n Point newLoc = EventUtil.getAbsolutePointBy(e);\n e.getComponent().setLocation(newLoc);\n // get the unit which this UI belong to.\n int unitIndex = GlobalVariable.componentArray.indexOf(e.getComponent());\n SuperUnit unit = GlobalVariable.unitArray.get(unitIndex);\n // update the line linked with the unit you want to relocate.\n Line[] lines = unit.getOutLine();\n for (int iLine = 0; iLine < lines.length; iLine ++) {\n if (lines[iLine] != null) {\n // get the label center location\n Point origin = unit.unitUI.getComponent(unit.getInLines().length).getLocation();\n origin = EventUtil.transformToSuperLoca(origin, unit.unitUI);\n origin.x += GlobalVariable.actionWidth / 2;\n lines[iLine].updateStartPoint(origin);\n }\n }\n for (int iIn = 0; iIn < unit.getInLines().length; iIn ++) {\n if (unit.getInLines()[iIn] != null) {\n // get the label center location\n Point origin = unit.unitUI.getComponent(iIn).getLocation();\n origin = EventUtil.transformToSuperLoca(origin, unit.unitUI);\n origin.x += GlobalVariable.actionWidth / 2;\n unit.getInLines()[iIn].updateEndPoint(origin);\n }\n }\n break;\n case forLink:\n Point endPoint = EventUtil.getAbsolutePointBy(e);\n Line line = GlobalVariable.lastLine;\n if (line != null) {\n line.updateEndPoint(endPoint);\n GlobalVariable.workPanel.updateUI();\n }\n break;\n }\n }",
"@Override\r\n public void mouseDragged(MouseEvent e) {\n int thisX = getLocation().x;\r\n int thisY = getLocation().y;\r\n\r\n //determina el desplazamiento\r\n int xMoved = (thisX + e.getX()) - (thisX + initialClick.x);\r\n int yMoved = (thisY + e.getY()) - (thisY + initialClick.y);\r\n\r\n //mueve la ventana a su nueva posicion\r\n int X = thisX + xMoved;\r\n int Y = thisY + yMoved;\r\n this.setLocation(X, Y);\r\n }",
"@Override\r\n public void mouseDragged(final MouseEvent e) {\n if (startPoint != null) {\r\n // Fetch Graphics from Graph\r\n Graphics g = GraphComponent.this.getGraphics();\r\n // Reset Remembered Port\r\n PortView newPort = getTargetPortAt(e.getPoint());\r\n // Do not flicker (repaint only on real changes)\r\n if (newPort == null || newPort != port) {\r\n // Xor-Paint the old Connector (Hide old Connector)\r\n paintConnector(Color.black, GraphComponent.this.getBackground(), g);\r\n // If Port was found then Point to Port Location\r\n port = newPort;\r\n if (port != null) {\r\n current = GraphComponent.this.toScreen(port.getLocation());\r\n } else {\r\n current = GraphComponent.this.snap(e.getPoint());\r\n }\r\n // Xor-Paint the new Connector\r\n paintConnector(GraphComponent.this.getBackground(), Color.black, g);\r\n }\r\n }\r\n super.mouseDragged(e);\r\n }",
"public void mouseClicked(MouseEvent e) {\n if (e.getSource() instanceof MapBean) {\n // if double (or more) mouse clicked\n if (e.getClickCount() >= 2) {\n // end of distance path\n mousePressed = false;\n // add the last point to the line segments\n segments.addElement(rPoint2);\n if (!repaintToClean) {\n // erase all line segments\n eraseLines();\n // erase the last circle\n eraseCircle();\n } else {\n ((MapBean) e.getSource()).repaint();\n }\n // cleanup\n cleanUp();\n }\n }\n }",
"@Override\r\n\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\tif (e.isShiftDown() && getCurrentShape()==\"Line\") {\r\n\t\t\t\tmyLine = new Line(startPoint, endPoint, outline);\r\n\t\t\t\tstartPoint = null;\r\n\t\t\t\tendPoint = null;\r\n\t\t\t\trepaint();\r\n\t\t\t}\r\n\t\t\tif (e.isShiftDown() && getCurrentShape()==\"Oval\") {\t\r\n\t\t\t\tmyOval = new Oval(startPoint, width, height, outline, fill);\r\n\t\t\t\tstartPoint = null;\r\n\t\t\t\tendPoint = null;\r\n\t\t\t\twidth = 0;\r\n\t\t\t\theight = 0;\r\n\t\t\t\trepaint();\r\n\t\t\t}\r\n\t\t\tif (e.isControlDown()) {\r\n\t\t\t\trepaint();\r\n\t\t\t\tShapes.remove(Shapes.get(Shapes.size() - 1));\r\n\t\t\t}\r\n\t\t}",
"@Override\n public void mouseDragged(ViewEvent anEvent)\n {\n super.mouseDragged(anEvent);\n\n // Add segment\n _path.lineTo(anEvent.getX(), anEvent.getY());\n }",
"public void paintComponent(Graphics g) {\n\t\t\tsuper.paintComponent(g);\n\t\t\t\n\t\t\t// First 2 arguments (X, Y) -> start, Last 2 arguments (X, Y) -> end\n\t\t\tg.drawLine(0, 3, 200, 200);\n\t\t\tg.drawLine(200, 200, 0, 400);\n\t\t\t\n\t\t}",
"@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\tif(secondClick == false) {\n\t\t\tx1 = arg0.getX();\n\t\t\ty1 = arg0.getY();\n\t\t\tsecondClick = true;\n\t\t}else {\n\t\t\tx2 = arg0.getX();\n\t\t\ty2 = arg0.getY();\n\t\t\tsecondClick = false;\n\t\t\tboundaryList.add(new Boundary(x1, y1, x2, y2));\n\t\t\trepaint();\n\t\t}\n\t}",
"public void startDraw(Vector2 point){\n path.add(point);\n }",
"public void mouseMoved( MouseEvent event )\n\t {\n\t \t /*\n\t \t * Change one unit into pixels sx = width/(b-a)\n\t \t * X = (x-a)*sx\n\t \t * \n\t \t * sy = height/(ymax - ymin)\n\t \t * Y1 = height - (y-ymin)*sy\n\t \t * Y2 = (ymax-y)*sy\n\t \t * Y1=Y2(same expression)\n\t \t */\n\t \t double b = InputView.getEnd();\n\t \t\t double a = InputView.getStart();\n\t \t DecimalFormat df = new DecimalFormat(\"#.##\");\n\t \t double sx = 594/(b-a);\n\t \t double sy = 572/(PlotPoints.getMax()-PlotPoints.getMin());\n\t \t coords.setText( \"(\"+ df.format((event.getX()/sx)+a-.02) + \", \" + df.format((.17 + PlotPoints.getMax()) - (event.getY()/sy)) + \")\" );\n\t }",
"public void add(DrawEvent currentEvent) {\n DrawShape shape = currentEvent.getShape();\n if (size() > 0) {\n if (shape.getX() < bounds.x) {\n bounds.x = shape.getX();\n bounds.width += bounds.x - shape.getX();\n }\n if (shape.getY() < bounds.y) {\n bounds.y = shape.getY();\n bounds.height += bounds.y - shape.getY();\n }\n } else {\n bounds.x = shape.getX();\n bounds.y = shape.getY();\n bounds.width = shape.getWidth();\n bounds.height = shape.getHeight();\n }\n super.addElement(currentEvent);\n }",
"@Override\n\tpublic void mousePressed(MouseEvent arg0) {\n\t\tint x = arg0.getX();\n\t\tint y = arg0.getY();\n\t\tcurrentPoint = getPoint(x, y);\n\t\tif (currentPoint == null) {\n\t\t\tcurrentPoint = createPoint(x, y);\n\t\t\trepaint();\n\t\t}\n\t}",
"@Override\n public void onDrag(MouseEvent e, GraphicsContext g) {\n g.lineTo(e.getX(), e.getY());\n g.stroke();\n }",
"public void addPoint(Point p) {\n\t\tpoints.add(p);\n\t\tnotifyListeners();\n\t}",
"@Override\n\tpublic void addPoint(Point point) {\n\t\tif (size==0){\n\t\t\tcurrent = new Container(point,null,null,null,null);\n\t\t\tthis.minx=current;\n\t\t\tthis.maxx=current;\n\t\t\tthis.miny=current;\n\t\t\tthis.maxy=current;\n\t\t\tthis.size=1;\n\t\t}\n\t\telse{\n\t\t\tint counter=0;\n\t\t\tContainer toAdd;\n\t\t\t//---------------------find the right place in order,axis x---------------//\n\t\t\tthis.current = this.minx;\n\t\t\tPoint currentData = this.current.getData();\n\t\t\twhile (counter<this.size-1 && currentData.getX() < point.getX()){ // counter<=this.size => this.current.getNext()!=null\n\t\t\t\tthis.current = this.current.getNextX();\n\t\t\t\tcurrentData = this.current.getData();\n\t\t\t\tcounter++;\n\t\t\t}\n\t\t\tif (currentData.getX() < point.getX()){\n\t\t\t\ttoAdd = new Container(point,this.current,this.current.getNextX(),null,null);\n\t\t\t\tif (this.current.getNextX()!=null)\n\t\t\t\t\tthis.current.getNextX().setPrevX(toAdd);\n\t\t\t\tthis.current.setNextX(toAdd);\n\t\t\t\tcounter++; \n\t\t\t}\n\t\t\telse { \n\t\t\t\ttoAdd = new Container(point,this.current.getPrevX(),this.current,null,null);\n\t\t\t\tif (this.current.getPrevX()!=null)\n\t\t\t\t\tthis.current.getPrevX().setNextX(toAdd);\n\t\t\t\tthis.current.setPrevX(toAdd); \t\n\t\t\t}\n\t\n\t\t\tif (counter==0)\n\t\t\t\tthis.minx=toAdd;\n\t\t\tif (counter==this.size) \n\t\t\t\tthis.maxx=toAdd;\n\t\t\t//----------------------find the right place in order,axis y----------------//\n\t\t\tcounter=0;\n\t\t\tcurrentData = this.miny.getData();\n\t\t\tthis.current = this.miny;\n\t\t\twhile (counter<this.size-1 && currentData.getY() < point.getY()){\n\t\t\t\tthis.current = this.current.getNextY();\n\t\t\t\tcurrentData = this.current.getData();\n\t\t\t\tcounter++;\n\t\t\t}\n\t\t\tif (currentData.getY() < point.getY()){\n\t\t\t\ttoAdd.setY(this.current, this.current.getNextY());\n\t\t\t\tif (this.current.getNextY()!=null)\n\t\t\t\t\tthis.current.getNextY().setPrevY(toAdd);\n\t\t\t\tthis.current.setNextY(toAdd);\n\t\t\t\tcounter++; \n\t\t\t}else { \n\t\t\t\ttoAdd.setY(this.current.getPrevY(), this.current);\n\t\t\t\tif (this.current.getPrevY()!=null)\n\t\t\t\t\tthis.current.getPrevY().setNextY(toAdd);\n\t\t\t\tthis.current.setPrevY(toAdd); \n\t\t\t}\n\t\t\tif (counter==0)\n\t\t\t\tthis.miny=toAdd;\n\t\t\tif (counter==this.size) \n\t\t\t\tthis.maxy=toAdd;\t\t\n\t\t\tthis.size++;\t\n\t\t}\n\t}",
"@Override\n public void mouseDragged(MouseEvent e){\n newLabel.setLocation(e.getXOnScreen() - x_pressed, e.getYOnScreen() - y_pressed);\n \n }",
"private void drawPanelMousePressed(java.awt.event.MouseEvent evt) {\n \n clicks = evt.getPoint();\n \n clicks = getClosedPoint(clicks);\n //System.out.print(ClickSX + \", \" + ClickSY + \",\\n \" );\n \n }",
"public void paint(Graphics g) {\r\n\t\tsuper.paint(g);\r\n\t\t// add code below\r\n\t\tGraphics g1 = drawingPanel.getGraphics();\r\n\t\tif (myLine != null && myLine.getIsAPerpendicular() == false) {\r\n\t\t\tShapes.add(myLine);\r\n\t\t\tfor (int i = 0; i < Shapes.size(); i++) {\r\n\t\t\t\tShapes.get(i).draw(g1);\r\n\t\t\t}\r\n\t\t}// End If to prevent null pointer exception\r\n\t\tif (myOval != null) {\r\n\t\t\tShapes.add(myOval);\r\n\t\t\tfor (int i = 0; i < Shapes.size(); i++) {\r\n\t\t\t\tShapes.get(i).draw(g1); // To make this legal an abstract method named draw which accepted graphics g need to be added to the shapes class\r\n\t\t\t}\r\n\t\t}// End If to prevent null pointer exception\r\n\t}",
"public void mouseDragged(java.awt.event.MouseEvent evt) {\n tmp.setLocation(cuadroSeleccionado.getLocation().x + evt.getX() - 18, cuadroSeleccionado.getLocation().y + evt.getY() - 28);\n }",
"private void painterJPanelMouseDragged(MouseEvent event) {\n // Circle to add to the ArrayList\n Circle newCircle;\n if (event.isMetaDown()) {\n // erase circle if right mouse button is pressed\n newCircle = new Circle(circleDiameter, event.getPoint(),\n this.getBackground());\n } else {\n // draw circle if left mouse button is pressed\n newCircle = new Circle(circleDiameter, event.getPoint(),\n circleColor);\n }\n\n circleArrayList.add(newCircle);\n\n repaint(); // repaint this PainterJPanel\n\n }",
"@Override\n public boolean onTouchEvent(MotionEvent event) {\n float eventX = event.getX();\n float eventY = event.getY();\n\n switch (event.getAction()) {\n case MotionEvent.ACTION_DOWN:\n // Set a new starting point\n path.moveTo(eventX, eventY);\n return true;\n case MotionEvent.ACTION_MOVE:\n // Connect the points\n path.lineTo(eventX, eventY);\n break;\n default:\n return false;\n }\n\n // Makes our view repaint and call onDraw\n invalidate();\n return true;\n }",
"private void formMouseDragged(java.awt.event.MouseEvent evt) {\n this.setLocation(this.getX()+evt.getX()-mouseX, this.getY()+evt.getY()-mouseY);\n }",
"public void mouseClicked(MouseEvent e) {\n\t\t\t\tpunto1.setFilled(true);\n\t\t\t\tpunto1.setColor(Color.red);\n\t\t\t\t\tif(numClicks == 0) {\n\t\t\t\t\t\tadd(punto1, e.getX(),e.getY());\n\t\t\t\t\t\tnumClicks++;\n\t\t\t\t\t\taprox.setStartPoint(e.getX(), e.getY());\n\t\t\t\t\t\tadd(engorgio1, e.getX(),e.getY());\n\n\t\t\t\t\t}\n\t\t//final\n\t\t\t\t\telse if(numClicks == 1) {\n\t\t\t\t\t\tpunto2.setFilled(true);\n\t\t\t\t\t\tpunto2.setColor(Color.blue);\n\t\t\t\t\t\tadd(punto2, e.getX(),e.getY());\n\t\t\t\t\t\tnumClicks++;\n\t\t\t\t\t\taprox.setEndPoint(e.getX(), e.getY());\n\t\t\t\t\t\tadd(aprox);\n\t\t\t\t\t\tadd(engorgio2, e.getX(),e.getY());\n\t\t\t\t\t}\n\t\t}",
"public void mousePressed(MouseEvent e){\n\t\t\t t.bullets.add(new Bullet(t.theta, t.lx, t.ly));\t\n\t\t}",
"@Override\n public void mouseDragged(MouseEvent evt) {\n setLocation(evt.getXOnScreen() - posX, evt.getYOnScreen() - posY);\n }",
"protected synchronized void paintComponent(Graphics g) {\n /*Call the paintComponent of the super class*/\n super.paintComponent(g);\n\n /*Cast the object to a Graphics2D object*/\n Graphics2D g2 = (Graphics2D) g;\n\n /*Enable rendering Antialiasing and other rendering optimizations*/\n g2.setRenderingHint (RenderingHints.KEY_ANTIALIASING,\n RenderingHints.VALUE_ANTIALIAS_ON);\n\n g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,\n\t\t\t\t\tRenderingHints.VALUE_TEXT_ANTIALIAS_ON);\n\n\n /***\n * Loop through the List that holds all the shapes.\n * shapesBuffer list and Draw them on screen\n */\n for (int i=0; i<labelBuffer.size(); i++)\n {\n /*Get the Concept for each index i*/\n ShapesInterface currentConcept = (ShapesInterface) labelBuffer.get(i);\n\n \n /*Pass from the connected List*/\n if (currentConcept instanceof ShapeConcept || currentConcept instanceof ShapeLinking) {\n for (int k=0; k<currentConcept.getConnComponenetsList().size(); k++) {\n /*Get the center point of this Concept*/\n Point p1 = currentConcept.getCenter();\n Point p2 = ((ShapesInterface) currentConcept.getConnComponenetsList().get(k)).getCenter();\n \n //Point p2 = ((ShapeConcept) currentConcept.getConnComponenetsList().get(k)).getCenter();\n\n g2.draw(new Line2D.Double(p1.x, p1.y, p2.x, p2.y));\n }//end for\n }//end if check\n }//end for\n\n}",
"public void paintComponent(Graphics g, int xBeginMap, int yBeginMap, int xEndMap, int yEndMap,\n int xBeginSrc, int yBeginSrc, int xEndSrc, int yEndSrc)\n {\n if(isSelected==true) {\n g.setColor(new Color(0,255,0,125));\n Graphics2D g2d = (Graphics2D)g;\n Ellipse2D.Double circle = new Ellipse2D.Double(xBeginMap+15,yBeginMap+35, abs(xEndMap - xBeginMap)-30, abs(yEndMap - yBeginMap)-30);\n g2d.fill(circle);\n }\n g.drawImage(mainTexture,xBeginMap,yBeginMap,xEndMap,yEndMap,\n xBeginSrc,yBeginSrc,xEndSrc,yEndSrc,null);\n\n\n\n }",
"public void paint (Graphics g)\n {\n g.setColor(color);\n for(Point pellet : pellets)\n {\n g.fillOval(5+MunchGame.SEGMENT_SIZE*pellet.x+2,\n 15+MunchGame.SEGMENT_SIZE*pellet.y+2, \n MunchGame.SEGMENT_SIZE-4,\n MunchGame.SEGMENT_SIZE-4);\n }\n }",
"private void formMouseDragged(java.awt.event.MouseEvent evt) {\n if (getParent() != null) {\n //seta a localiza__o do estado enquanto _ arrastado\n int x = (int) getParent().getMousePosition().getX() - getWidth() / 2;\n int y = (int) getParent().getMousePosition().getY() - getHeight() / 2;\n\n //limite direito (x mais do que o painel)\n if (getX() + getWidth() > getParent().getWidth()) {\n x = getParent().getWidth() - getWidth() - 10;\n }\n //limite esquerdo x negativo\n if (getX() < 0) {\n x = 0; \n }\n //limite inferior (y mais do que o painel)\n if (getY() + getHeight() > getParent().getHeight()) {\n y = getParent().getHeight() - getHeight() - 2;\n }\n //limite superior y negativo\n if (getY() < 0) {\n y = 0; \n }\n estado.setXCentral(x);\n estado.setYCentral(y);\n setLocation(x, y);\n\n // coordenadas para desenho das transi__es enquanto ele _ arrastado\n if (isInicial) {\n estado.setXCentral(x + (larguraFlecha / 2) + (getWidth() / 2));\n estado.setYCentral(y + (getHeight() / 2));\n } else {\n estado.setXCentral(x + (getWidth() / 2));\n estado.setYCentral(y + (getHeight() / 2));\n }\n\n\n\n // repinta o container pai, fazendo com as transi__es sejam desenhadas\n getParent().repaint();\n\n }\n }",
"public void actionPerformed(ActionEvent event) {\n\n\t\t\tfor (Point spot : pointList) { // assigns a random X&Y values\n\n\t\t\t\tspot.x += randomXY[pointList.indexOf(spot)][0];\n\t\t\t\tspot.y += randomXY[pointList.indexOf(spot)][1];\n\n\t\t\t\tif (spot.x <= 0 + SIZE || spot.x >= WIDTH - SIZE)\n\t\t\t\t\trandomXY[pointList.indexOf(spot)][0] *= -1; // Boundary Checker\n\n\t\t\t\tif (spot.y <= 0 + SIZE || spot.y >= HEIGHT - (SIZE + dotSpeedPanel.getHeight()))\n\t\t\t\t\trandomXY[pointList.indexOf(spot)][1] *= -1;\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\t * \n\t\t\t\t * if(spot.x > WIDTH || spot.y > HEIGHT || spot.x < -5 || spot.y < -5)\n\t\t\t\t * spot.setLocation(HEIGHT/2, WIDTH/2);\n\t\t\t\t * \n\t\t\t\t */\n\n\n\t\t\t\trepaint();\n\t\t\t}\n\t\t}",
"public void checkPoints(MouseEvent e) {\n\t\tfor (ConnectablePanel box : boxes) {\n\t\t\t\n\t\t\t// If we already are selecting this connector, ignore it\n\t\t\tif (box == originPanel)\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\t// Check if we're hovering over a connector\n\t\t\tboolean currentHover = box.checkPointHover(e);\n\n\t\t\tif (currentHover) {\n\t\t\t\t// Keep track that this is the connector we found\n\t\t\t\tcurrentPanel = box;\n\t\t\t\t\n\t\t\t\t// If we're dragging, we found a destinationb ox\n\t\t\t\tif (dragging) {\n\t\t\t\t\tdestinationPanel = box;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t// We aren't hovering over anything, make sure there's no destination panel\n\t\t\t\tif (currentPanel == box) {\n\t\t\t\t\tdestinationPanel = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Only repaint if we've changed hovering states \n\t\t\t// ** looks like I'm repainting anyway...find out why\n\t\t\tif (box == currentPanel && (currentHover != pointHovering)) {\n\t\t\t\tpointHovering = currentHover;\n\t\t\t\t\n\t\t\t\trepaint();\n\t\t\t}\n\n\t\t\trepaint();\n\t\t}\n\t}",
"public void mouseReleased(MouseEvent e) {\n\t\t// It's true that the mouse is released now\n\t\tmouseRelease = true;\n\t\t// Record the point user releases as end point\n\t\tendTrunk = new Point2D.Double(e.getX(), e.getY());\n\t\t// Pain the tree\n\t\trepaint();\n\t}",
"public void paintComponent(Graphics g)\n {\n\t Graphics2D g2 = (Graphics2D) g;\n\t // draw start point and end point\n\t g2.setColor(START_COLOR);\n\t Rectangle myStart = new Rectangle(START_X + maze.getEntryLoc().getCol()*BOX_WIDTH+INSET, START_Y + maze.getEntryLoc().getRow()*BOX_HEIGHT+INSET, BOX_WIDTH-INSET*TWO_SIDE, BOX_HEIGHT-INSET*TWO_SIDE);\n\t g2.fill(myStart);\n\t g2.setColor(END_COLOR);\n\t Rectangle myEnd = new Rectangle(START_X + maze.getExitLoc().getCol()*BOX_WIDTH+INSET, START_Y + maze.getExitLoc().getRow()*BOX_HEIGHT+INSET, BOX_WIDTH-INSET*TWO_SIDE, BOX_HEIGHT-INSET*TWO_SIDE);\n\t g2.fill(myEnd);\n\t //draw walls and borders\n\t g2.setColor(WALL_COLOR);\n\t Rectangle myWall;\n\t for (int i = FOR_INIT; i < maze.numRows(); i++){\n\t\t for (int j = FOR_INIT; j < maze.numCols(); j++){\n\t\t\t if (maze.hasWallAt(new MazeCoord(i,j))){\n\t\t\t\t myWall= new Rectangle(START_X + j*BOX_WIDTH, START_Y + i*BOX_HEIGHT, BOX_WIDTH, BOX_HEIGHT);\n\t\t\t\t g2.fill(myWall);\n\t\t\t }\n\t\t }\n\t }\n\t myWall = new Rectangle(START_X,START_Y,maze.numCols()*BOX_WIDTH,maze.numRows()*BOX_HEIGHT);\n\t g2.draw(myWall);\n\t //draw path use linkedlist \n\t g2.setColor(PATH_COLOR);\n\t double x1,y1,x2,y2;\n\t ListIterator<MazeCoord> iter = maze.getPath().listIterator(); \n\t MazeCoord temp = null;\n\t if (iter.hasNext()){\n\t\t temp = iter.next();\n\t }\n\t //use iteration to get the value\n\t while (iter.hasNext()){\n\t\t x1 = START_X + temp.getCol() * BOX_WIDTH + BOX_WIDTH / TWO_SIDE;\n\t\t y1 = START_Y + temp.getRow() * BOX_HEIGHT + BOX_HEIGHT / TWO_SIDE;\n\t\t temp = iter.next();\n\t\t x2 = START_X + temp.getCol() * BOX_WIDTH + BOX_WIDTH / TWO_SIDE;\n\t\t y2 = START_Y + temp.getRow() * BOX_HEIGHT + BOX_HEIGHT / TWO_SIDE;\n\t\t Line2D.Double myPath = new Line2D.Double(x1, y1, x2, y2);\t \n\t\t g2.draw(myPath);\n\t }\t\t\t \n }",
"public void mousePressed(MouseEvent e) {\n pX = e.getX();\n pY = e.getY();\n }",
"private void panelMouseDragged(java.awt.event.MouseEvent evt)\n throws Exception{\n \n /*Store the point where the mouse is dragged*/\n Point dragPoint = null;\n\n if (this.selectedShape != null)\n {\n /*Change mouse was dragged to true*/\n mouseIsDragged = true;\n\n /*Store the dragged point*/\n dragPoint = evt.getPoint();\n\n /*Now translate the Shape by calling the method*/\n /*Both ShapeConcept and ShapeLinking use the same method*/\n selectedShape.translateShape(dragPoint.x - offsetX, dragPoint.y - offsetY);\n repaint();\n }//end if\n}",
"@Override\n\tpublic void mouseDragged(MouseEvent e) {\n\t\tdx=dx+(e.getX()-x);\n\t\tdy=dy+(e.getY()-y);\n\t\t\n\t\tx=e.getX();\n\t\ty=e.getY();\n\t}",
"@Override\r\n\tpublic void mouseDragged(MouseEvent e) {\n\t\tChessPiece p = (ChessPiece)e.getSource();\r\n\t\tint newX = e.getX() - p.draggedAtX + p.getLocation().x;\r\n\t\tint newY = e.getY() - p.draggedAtY + p.getLocation().y;\r\n\t\tp.setLocation(newX, newY);\r\n\t}",
"@Override\n\tpublic void mousePressed(MouseEvent e) throws NullPointerException {\n\t\tif (!enabler2) {\n\t\t\treturn;\n\t\t}\n\t\tx = e.getX();\n\t\ty = e.getY();\n\t\tedg = new GraphDrawComponent(x, y, \"Edge\");\n\t\tAssignment.frame.add(edg);\n\t\tedg.revalidate();\n\t\tenabler2 = false;\n\n\t}",
"private void drawPanelMouseClicked(java.awt.event.MouseEvent evt) {\n System.out.println(evt.getX() + \", \" + evt.getY());\n \n out:\n for (int i = 0; i < xcount; i++) {\n for (int j = 0; j < ycount; j++) {\n RectangularShape shape = Shapes[i][j];\n if (shape.contains(evt.getPoint())) {\n changeState(Shapes, States, i, j);\n \n shapesList.set(Slidercnt, Shapes);\n statesList.set(Slidercnt, States);\n \n break out;\n }\n }\n }\n \n this.repaint();\n \n }",
"@Override\r\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\torigin.x=e.getX();\r\n\t\t\t\torigin.y=e.getY();\r\n\t\t\t}",
"public void mousePressed(MouseEvent e) {\r\n rectangle = new Rectangle(e.getX(), e.getY(), 0, 0);\r\n view.getViewJComponent().invalidate();\r\n view.getViewJComponent().repaint();\r\n }",
"public void paintComponent(Graphics g) {\r\n\tsuper.paintComponent(g);\r\n\r\n\tif(hasEulerCircuit) {\r\n\t g.setFont(new Font(g.getFont().getName(), Font.BOLD, 12));\r\n\t g.drawString(\"Euler Circuit\", 48, 10);\r\n\t g.setFont(new Font(g.getFont().getName(), Font.PLAIN, 12));\r\n\t g.drawString(\"Starting Vertex\", 160, 28);\r\n\t \r\n\t for (int i=0; i < numVertices; i++){\r\n\t\tg.fillOval(getXCoor(i)-3, getYCoor(i)-3, 7, 7);\r\n\t\tpaintLabel(g,i);\r\n\t }\r\n\t \r\n\t this.setLayout(new AbsoluteLayout());\r\n\t nextButton = new JButton();\r\n\t nextButton.addMouseListener(new java.awt.event.MouseAdapter() {\r\n\t\t public void mouseClicked(java.awt.event.MouseEvent evt) {\r\n\t\t\tif(currentEdge < treeEdges[currentStartVertex]\r\n\t\t\t .length-1) {\r\n\t\t\t if(!badEdgeIncurred) {\r\n\t\t\t\tcurrentEdge ++;\r\n\t\t\t }\r\n\t\t\t repaint();\r\n\t\t\t}\r\n\t\t }\r\n\t\t});\t \r\n\t \r\n\t nextButton.setFont(new Font(\"sansserif\",Font.BOLD,10));\r\n\t nextButton.setText(\"Next\");\r\n\t nextButton.setBounds(175,68,70,20);\r\n\t \r\n\t combo = new JComboBox();\r\n\t combo.setFont(new Font(\"Tahoma\",Font.BOLD,10));\r\n\t combo.addActionListener(this);\r\n\t for(int i = 0; i < numVertices; i++) {\r\n\t\tcombo.addItem(new Integer(i));\r\n\t }\r\n\t combo.setBounds(203,35,30,30);\r\n\t \r\n\t this.add(combo, new AbsoluteConstraints(203,35,30,30)); \r\n\t this.add(nextButton, new AbsoluteConstraints(180,35,70,20));\r\n\t \r\n\t \r\n\t Stroke drawingStroke = new BasicStroke(1,\r\n\t\t\t\t\t\t BasicStroke.CAP_BUTT,\r\n\t\t\t\t\t\t BasicStroke.JOIN_BEVEL, \r\n\t\t\t\t\t\t 0, new float[]{9}, 0);\r\n\t \r\n\t Graphics2D g2d = (Graphics2D) g;\r\n\t for(int i = 0; i < edges.length; i ++) {\r\n\t\tLine2D line = new Line2D.Double(getXCoor(edges[i][0]),\r\n\t\t\t\t\t\tgetYCoor(edges[i][0]),\r\n\t\t\t\t\t\tgetXCoor(edges[i][1]),\r\n\t\t\t\t\t\tgetYCoor(edges[i][1]));\r\n\t\t\r\n\t\tg2d.setStroke(drawingStroke);\r\n\t\tg2d.draw(line);\r\n\t\tg2d.setStroke(new BasicStroke(1));\r\n\t }\r\n\t \r\n\t if(currentEdge < treeEdges[currentStartVertex].length && \r\n\t currentEdge >= 0) {\r\n\t\tfor(int i = 0; i <= currentEdge; i ++) {\r\n\t\t drawingStroke = new \r\n\t\t\tBasicStroke(1,BasicStroke.CAP_BUTT,\r\n\t\t\t\t BasicStroke.JOIN_BEVEL, \r\n\t\t\t\t 0, new float[]{9}, 0);\r\n\t\t \r\n\t\t g2d = (Graphics2D) g;\t\r\n\t\t \r\n\t\t g2d.setStroke(new BasicStroke(2));\t\t\r\n\t\t g.drawLine(getXCoor(treeEdges[currentStartVertex]\r\n\t\t\t\t\t[i][0]),\r\n\t\t\t getYCoor(treeEdges[currentStartVertex]\r\n\t\t\t\t\t[i][0]),\r\n\t\t\t getXCoor(treeEdges[currentStartVertex]\r\n\t\t\t\t\t[i][1]),\r\n\t\t\t getYCoor(treeEdges[currentStartVertex]\r\n\t\t\t\t\t[i][1]));\t\t\r\n\t\t}\r\n\t\t\r\n\t\tif(currentEdge != (treeEdges[currentStartVertex].length-1)) {\r\n\t\t if(treeEdges[currentStartVertex][currentEdge][2] != -1) {\r\n\t\t\tif(!badEdgeIncurred) {\r\n\t\t\t \r\n\t\t\t g.setColor(Color.red);\r\n\t\t\t g.drawLine(getXCoor(treeEdges[currentStartVertex]\r\n\t\t\t\t\t\t[currentEdge][1]),\r\n\t\t\t\t getYCoor(treeEdges[currentStartVertex]\r\n\t\t\t\t\t\t[currentEdge][1]),\r\n\t\t\t\t getXCoor(treeEdges[currentStartVertex]\r\n\t\t\t\t\t\t[currentEdge][2]),\r\n\t\t\t\t getYCoor(treeEdges[currentStartVertex]\r\n\t\t\t\t\t\t[currentEdge][2])); \r\n\t\t\t \r\n\t\t\t badEdgeIncurred = true;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t \r\n\t\t\t g.setColor(Color.green);\r\n\t\t\t g.drawLine(getXCoor(treeEdges[currentStartVertex]\r\n\t\t\t\t\t\t[currentEdge+1][0]),\r\n\t\t\t\t getYCoor(treeEdges[currentStartVertex]\r\n\t\t\t\t\t\t[currentEdge+1][0]),\r\n\t\t\t\t getXCoor(treeEdges[currentStartVertex]\r\n\t\t\t\t\t\t[currentEdge+1][1]),\r\n\t\t\t\t getYCoor(treeEdges[currentStartVertex]\r\n\t\t\t\t\t\t[currentEdge+1][1])); \r\n\r\n\t\t\t badEdgeIncurred = false;\r\n\t\t\t}\r\n\r\n\t\t }\r\n\t\t else {\r\n\t\t\tg.setColor(Color.green);\r\n\t\t\tg.drawLine(getXCoor(treeEdges[currentStartVertex]\r\n\t\t\t\t\t [currentEdge+1][0]),\r\n\t\t\t\t getYCoor(treeEdges[currentStartVertex]\r\n\t\t\t\t\t [currentEdge+1][0]),\r\n\t\t\t\t getXCoor(treeEdges[currentStartVertex]\r\n\t\t\t\t\t [currentEdge+1][1]),\r\n\t\t\t\t getYCoor(treeEdges[currentStartVertex]\r\n\t\t\t\t\t [currentEdge+1][1])); \r\n\t\t }\r\n\r\n\t\t}\r\n\t }\r\n\t g.setColor(Color.black);\t \t \r\n\t}\r\n\telse {\r\n\t g.setFont(new Font(g.getFont().getName(), Font.BOLD, 12));\r\n\t g.drawString(\"This graph has no Euler Circuit!\", 30, 80);\r\n\t g.setFont(new Font(g.getFont().getName(), Font.PLAIN, 12));\r\n\t}\r\n }"
] | [
"0.6956849",
"0.691513",
"0.6736",
"0.6472929",
"0.6315233",
"0.6296336",
"0.6287569",
"0.6282974",
"0.6252134",
"0.6244395",
"0.6151015",
"0.61338115",
"0.6062205",
"0.6061981",
"0.6059",
"0.597508",
"0.5956075",
"0.5935985",
"0.59217274",
"0.59102243",
"0.58828676",
"0.5872809",
"0.5826181",
"0.5819494",
"0.58166784",
"0.5809329",
"0.5798866",
"0.57856435",
"0.57538563",
"0.5742433",
"0.5735128",
"0.5721509",
"0.57115304",
"0.5691744",
"0.5690613",
"0.5680664",
"0.5678409",
"0.5666226",
"0.5665062",
"0.56636506",
"0.56626946",
"0.5660681",
"0.56601334",
"0.5655542",
"0.56493247",
"0.5641359",
"0.56403446",
"0.5635879",
"0.5634914",
"0.56176823",
"0.5611738",
"0.5610265",
"0.56016624",
"0.5600968",
"0.5600029",
"0.5577739",
"0.55765426",
"0.55722576",
"0.5548847",
"0.554737",
"0.55467856",
"0.55450916",
"0.5538069",
"0.5534931",
"0.5533192",
"0.55327004",
"0.55318177",
"0.55309457",
"0.55286866",
"0.5524811",
"0.5511201",
"0.5506438",
"0.55030286",
"0.5494267",
"0.54930854",
"0.5491114",
"0.54910976",
"0.5486296",
"0.5484735",
"0.5484046",
"0.5470618",
"0.5463377",
"0.5454085",
"0.54518455",
"0.54516476",
"0.54490936",
"0.54432756",
"0.5441857",
"0.54392165",
"0.5437552",
"0.5436288",
"0.54339784",
"0.54269725",
"0.54175705",
"0.5414578",
"0.5413301",
"0.54099333",
"0.5400836",
"0.5400792",
"0.5396592",
"0.53940946"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void mouseEntered(MouseEvent e) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void mouseExited(MouseEvent e) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
connect bluetooth and init write stream | private void bluetoothConnect() {
btDevice = btAdapter.getRemoteDevice(EDISON_ADDRESS);
if (btDevice == null) {
Log.d(TAG,"get remote device fail!");
finish();
}
try {
btSocket = btDevice.createRfcommSocketToServiceRecord(SSP_UUID);
} catch (IOException e) {
Log.d(TAG,"bluetooth socket create fail.");
}
//save resource by cancel discovery
btAdapter.cancelDiscovery();
//connect
try {
btSocket.connect();
Log.d(TAG,"Connection established.");
} catch ( IOException e) {
try {
btSocket.close();
}catch (IOException e2) {
Log.d(TAG,"unable to close socket after connect fail.");
}
}
//prepare outStream to send message
try {
outStream = btSocket.getOutputStream();
} catch (IOException e) {
Log.d(TAG,"output stream init fail!");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void connect()\n\t{\n\t\tUUID uuid = UUID.fromString(\"00001101-0000-1000-8000-00805f9b34fb\"); //Standard SerialPortService ID\n\t\ttry\n\t\t{\n\t sock = dev.createRfcommSocketToServiceRecord(uuid); \n\t sock.connect();\n\t connected = true;\n\t dev_out = sock.getOutputStream();\n\t dev_in = sock.getInputStream();\n\t write(0);\n\t write(0);\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\t\n\t\t}\n\t}",
"private void bluetooth_connect_device() throws IOException\n {\n try\n {\n myBluetooth = BluetoothAdapter.getDefaultAdapter();\n address = myBluetooth.getAddress();\n pairedDevices = myBluetooth.getBondedDevices();\n if (pairedDevices.size()>0)\n {\n for(BluetoothDevice bt : pairedDevices)\n {\n address=bt.getAddress().toString();name = bt.getName().toString();\n Toast.makeText(getApplicationContext(),\"Connected\", Toast.LENGTH_SHORT).show();\n\n }\n }\n\n }\n catch(Exception we){}\n myBluetooth = BluetoothAdapter.getDefaultAdapter();//get the mobile bluetooth device\n BluetoothDevice dispositivo = myBluetooth.getRemoteDevice(address);//connects to the device's address and checks if it's available\n btSocket = dispositivo.createInsecureRfcommSocketToServiceRecord(myUUID);//create a RFCOMM (SPP) connection\n btSocket.connect();\n try { t1.setText(\"BT Name: \"+name+\"\\nBT Address: \"+address); }\n catch(Exception e){}\n }",
"public void openBluetooth() throws IOException {\n UUID uuid = UUID.fromString(\"00001101-0000-1000-8000-00805f9b34fb\"); //Standard SerialPortService ID\n mmSocket = mmDevice.createRfcommSocketToServiceRecord(uuid);\n mmSocket.connect();\n mmOutputStream = mmSocket.getOutputStream();\n mmInputStream = mmSocket.getInputStream();\n\n beginListenForData();\n\n btStatusDisplay.setText(\"Bluetooth Connection Opened\");\n }",
"private Bluetooth() {}",
"@Override\r\n public void onCreate() {\n intent = new Intent(BROADCAST_ACTION);\r\n startBTService();\r\n// try{\r\n// mConnectedThread.write(\"2\".getBytes());\r\n// }catch(Exception e){\r\n//\r\n// }\r\n }",
"private void connectBluetooth() {\n try {\n if (blueTooth == null && macSet) {\n Log.d(\"lol\", \"macSet connect bluetooootooththoth\");\n blueTooth = new BluetoothConnection(macAddress, this, listener);\n blueTooth.connect();\n }\n } catch (Exception e) {\n Log.d(\"lol\", \"Failed connection: \" + e.getMessage() + \" \" + e.getClass());\n }\n }",
"public void initBT() {\n\n\t\tStatusBox.setText(\"Connecting...\");\n\t\tLog.e(TAG, \"Connecting...\");\n\t\t\n\t\tif (D) {\n\t\t\tLog.e(TAG, \"+ ON RESUME +\");\n\t\t\tLog.e(TAG, \"+ ABOUT TO ATTEMPT CLIENT CONNECT +\");\n\t\t}\n\t\t\n\t\t//If Mac Address is null then stop this process and display message\n\t\tif(MAC_ADDRESS == \"\"){\n\t\t\tLog.e(TAG,\"No MAC Address Found...\");\n\t\t\tToast.makeText(getApplicationContext(), \"No Mac Address found. Please Enter using button.\",Toast.LENGTH_SHORT );\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// When this returns, it will 'know' about the server,\n\t\t// via it's MAC address.\n\t\tBluetoothDevice device = null;\n\t\ttry {\n\t\t\tdevice = mBluetoothAdapter.getRemoteDevice(MAC_ADDRESS);\n\t\t} catch (Exception e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tToast.makeText(getApplicationContext(), \"NOT Valid BT MAC Address\", Toast.LENGTH_SHORT);\n\t\t\te1.printStackTrace();\n\t\t}\n\n\t\t// returns firefly e350\n\t\tLog.e(TAG, \"device name: \" + device.getName());\n\n\t\t// We need two things before we can successfully connect\n\t\t// (authentication issues aside): a MAC address, which we\n\t\t// already have, and an RFCOMM channel.\n\t\t// Because RFCOMM channels (aka ports) are limited in\n\t\t// number, Android doesn't allow you to use them directly;\n\t\t// instead you request a RFCOMM mapping based on a service\n\t\t// ID. In our case, we will use the well-known SPP Service\n\t\t// ID. This ID is in UUID (GUID to you Microsofties)\n\t\t// format. Given the UUID, Android will handle the\n\t\t// mapping for you. Generally, this will return RFCOMM 1,\n\t\t// but not always; it depends what other BlueTooth services\n\t\t// are in use on your Android device.\n\t\ttry {\n\t\t\t\n\t\t\tint currentapiVersion = android.os.Build.VERSION.SDK_INT;\n\t\t\t\n\t\t\t//RFCOMM connection varies depending on android version. Fixes bug in Gingerbread and newer where always asks for BT Pairing code.\n\t\t\tif (currentapiVersion >= android.os.Build.VERSION_CODES.GINGERBREAD_MR1){\n\t\t\t\t//used in android >= 2.3.3\n\t\t\t\tbtSocket = device.createInsecureRfcommSocketToServiceRecord(MY_UUID);\n\t\t\t} else if (currentapiVersion < android.os.Build.VERSION_CODES.GINGERBREAD_MR1){\n\t\t\t\t//used in android < 2.3.3\n\t\t\t\tbtSocket = device.createRfcommSocketToServiceRecord(MY_UUID);\n\t\t\t}\n\t\t\t\n\t\t\tLog.e(TAG, \"ON RESUME: Socket created!\");\n\t\t\n\t\t\n\t\t\t// Discovery may be going on, e.g., if you're running a\n\t\t\t// 'scan for devices' search from your handset's Bluetooth\n\t\t\t// settings, so we call cancelDiscovery(). It doesn't hurt\n\t\t\t// to call it, but it might hurt not to... discovery is a\n\t\t\t// heavyweight process; you don't want it in progress when\n\t\t\t// a connection attempt is made.\n\t\t\tmBluetoothAdapter.cancelDiscovery();\n\n\t\t\tmyBT = new ConnectedThread(btSocket);\n\t\t\t\n\t\t\t\n\t\t\t// don't write to the streams unless they are created\n\t\t\tif (myBT.BTconnStatus) {\n\t\t\t\t\n\t\t\t\tStatusBox.setText(\"CONNECTED\");\n\t\t\t\tLog.e(TAG, \"CONNECTED\");\n\t\t\t\t\n\t\t\t\t// ST,255 enables remote configuration forever...need this if\n\t\t\t\t// resetting\n\t\t\t\t// PIO4 is held high on powerup then toggled 3 times to reset\n\n\t\t\t\t// GPIO Commands to BT device page 15 of commands datasheet\n\t\t\t\tbyte[] cmdMode = { '$', '$', '$' };\n\t\t\t\tmyBT.write(cmdMode);\n\t\t\t\tmyBT.run();\n\n\t\t\t\t// S@,8080 temp sets GPIO-7 to an output\n\t\t\t\tbyte[] cmd1 = { 'S', '@', ',', '8', '0', '8', '0', 13 };\n\n\t\t\t\t// S%,8080 perm sets GPIO-7 to an output on powerup. only done once\n\t\t\t\t// byte [] cmd1 = {'S','%',',','8','0','8','0',13};\n\n\t\t\t\tmyBT.write(cmd1);\n\t\t\t\tmyBT.run();\n\n\t\t\t\t// S&,8000 drives GPIO-7 low\n\t\t\t\t// byte [] cmd2 = {'S','^',',','8','0','0','0',13};\n\n\t\t\t\t// make it so cmd mode won't timeout even after factory reset\n\t\t\t\tbyte[] cmd3 = { 'S', 'T', ',', '2', '5', '5', 13 };\n\t\t\t\tmyBT.write(cmd3);\n\t\t\t\tmyBT.run();\n\n\t\t\t} else {\n\t\t\t\t//StatusBox.setText(\"NOT Connected\");\t\n\t\t\t\tLog.e(TAG, \"NOT Connected\");\n\t\t\t}\n\t\t\n\t\t} catch (IOException e) {\n\t\t\t\n\t\t\tif (D)\n\t\t\t\tLog.e(TAG, \"ON RESUME: Socket creation failed.\", e);\n\t\t}\n\n\t\t\n\t\t\n\t}",
"public void startConnection(){\n startBTConnection(mBTDevice,MY_UUID_INSECURE);\n }",
"private void setupBTService(){\n btService = new BluetoothService(this, mHandler);\n\n // Initialize the buffer for outgoing messages\n outStringBuffer = new StringBuffer(\"\");\n\t}",
"private void setupBluetooth() throws NullPointerException{\n if( Utils.isOS( Utils.OS.ANDROID ) ){\n \t\n // Gets bluetooth hardware from phone and makes sure that it is\n // non-null;\n BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();\n \n // If bluetooth hardware does not exist...\n if (adapter == null) {\n Log.d(TAG, \"BluetoothAdapter is is null\");\n throw new NullPointerException(\"BluetoothAdapter is null\");\n } else {\n Log.d(TAG, \"BluetoothAdapter is is non-null\");\n }\n \n bluetoothName = adapter.getName();\n \n //TODO: restart bluetooth?\n \t\n try {\n bluetoothConnectionThreads.add( new ServerThread(adapter, router, uuid) );\n } catch (NullPointerException e) {\n throw e;\n }\n if (Constants.DEBUG)\n Log.d(TAG, \"Sever Thread Created\");\n // Create a new clientThread\n bluetoothConnectionThreads.add( new ClientThread(adapter, router, uuid) );\n if (Constants.DEBUG)\n Log.d(TAG, \"Client Thread Created\");\n }\n else if( Utils.isOS( Utils.OS.WINDOWS ) ){\n //TODO: implement this\n }\n else if( Utils.isOS( Utils.OS.LINUX ) ){\n //TODO: implement this\n }\n else if( Utils.isOS( Utils.OS.OSX ) ){\n //TODO: implement this\n }\n else{\n //TODO: throw exception?\n }\n \n }",
"public void sendBtMsg(final String msg2send) {\n UUID uuid = UUID.fromString(\"94f39d29-7d6d-437d-973b-fba39e49d4ee\"); //Standard SerialPortService ID\n try {\n\n if (mmDevice != null) {\n mmSocket = mmDevice.createRfcommSocketToServiceRecord(uuid);\n if (!mmSocket.isConnected()) {\n try {\n mmSocket.connect();\n Handler handler = new Handler(Looper.getMainLooper());\n handler.post(new Runnable() {\n @Override\n public void run() {\n\n toastMsg(\"Connection Established\");\n\n String msg = msg2send;\n //msg += \"\\n\";\n OutputStream mmOutputStream = null;\n try {\n mmOutputStream = mmSocket.getOutputStream();\n mmOutputStream.write(msg.getBytes());\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }\n });\n\n } catch (IOException e) {\n Log.e(\"\", e.getMessage());\n mmSocket.close();\n Handler handler = new Handler(Looper.getMainLooper());\n handler.post(new Runnable() {\n @Override\n public void run() {\n toastMsg(\"Connection not Established\");\n\n\n }\n });\n\n /*try {\n Log.e(\"\", \"trying fallback\");\n mmSocket =(BluetoothSocket) mmDevice.getClass().getMethod(\"createRfcommSocket\", new Class[] {int.class}).invoke(mmDevice,1);\n mmSocket.connect();\n Log.e(\"\", \"Connected\");\n }\n catch (Exception e2){\n Log.e(\"\", \"Couldn't establish Bluetooth connection!\");\n toastMsg(\"Couldn't establish Bluetooth connection!\");\n }*/\n }\n }\n\n\n/*\n if (mmOutputStream == null)\n try {\n mmOutputStream = mmSocket.getOutputStream();\n } catch (IOException e) {\n errorExit(\"Fatal Error\", \"In onResume(), input and output stream creation failed:\" + e.getMessage() + \".\");\n }*/\n\n } else {\n if (mBluetoothAdapter != null) {\n\n\n Set<BluetoothDevice> pairedDevices = mBluetoothAdapter.getBondedDevices();\n if (pairedDevices.size() > 0) {\n for (BluetoothDevice device : pairedDevices) {\n if (device.getName().matches(\".*\")) //Note, you will need to change this to match the name of your device\n {\n Log.e(\"Aquarium\", device.getName());\n mmDevice = device;\n sendBtMsg(msg2send);\n break;\n }\n }\n }\n }\n }\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n }",
"private void connectToSocket() throws IOException {\n // This is a blocking call and will only return on a exception\n bluetoothSocket.connect();// Create a connection to the BluetoothSocket\n\n }",
"@Override\n\t\tpublic void run() {\n\t\t\ttry{\n//\t\t\t\tdevAddr = devices.get(position).split(\"\\\\|\")[1];\n//\t\t\t\tbtAdapt.cancelDiscovery();\n//\t\t\t\t\n//\t\t\t\tbtSocket = btAdapt.getRemoteDevice(devAddr).createRfcommSocketToServiceRecord(uuid);\n//\t\t\t\tbtSocket.connect();Log.e(tag, \"connected\");\n\t\t\t\tInetAddress severInetAddr=InetAddress.getByName(\"120.105.129.108\");\n\t\t\t\tWifisocket = new Socket(severInetAddr, 8101);\n\t\t\t\t\n\t\t\t\tsynchronized (this) {\n//\t\t\t\t\tbtIn = btSocket.getInputStream();\n//\t\t\t\t\tbtOut = btSocket.getOutputStream();\n\t\t\t\t\tbtIn = Wifisocket.getInputStream();\n\t\t\t\t\tbtOut = Wifisocket.getOutputStream();\n\t\t\t\t\tLog.e(tag, \"connected\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tThread.sleep(100);\n\t\t\t\tsetUpAsForeground(\"Wifi已連線\");\n\t\t\t} catch( IOException | InterruptedException e ){\n\t\t\t\te.printStackTrace();\n\t\t\t\ttry{\n//\t\t\t\t\tbtSocket.close();\n//\t\t\t\t\tWifisocket.close();\n\t\t\t\t\tThread.sleep(1500);\n\t\t\t\t\tsetUpAsForeground(\"Wifi未連線\");\n\t\t\t\t\tLog.i(\"exiconne\", \"bluetoohservice bye!;\");\n\t\t\t\t} catch(InterruptedException e1){\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\tLog.i(\"exiconne\", \"bluetoohservice bye!;\");\n\t\t\t\t}\n//\t\t\t\tbtSocket = null;\n\t\t\t\tWifisocket = null;\n\t\t\t\tmBTState = BTState.stopped;\n\t\t\t\tBluetoothConnect.mBTstate = BTstate.opened;\n\t\t\t}\n\n\t\t}",
"private BluetoothSocket createBluetoothSocket(BluetoothDevice device) throws IOException {\n\n return device.createRfcommSocketToServiceRecord(BTMODULEUUID);\n //creates secure outgoing connection with BT device using UUID\n }",
"private void connect() throws Exception {\n\n Log.i(TAG, \"Attempting connection to \" + address + \"...\");\n\n // Get this device's Bluetooth adapter\n BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();\n if ((adapter == null) || (!adapter.isEnabled())){\n throw new Exception(\"Bluetooth adapter not found or not enabled!\");\n }\n\n // Find the remote device\n BluetoothDevice remoteDevice = adapter.getRemoteDevice(address);\n\n // Create a socket with the remote device using this protocol\n socket = remoteDevice.createRfcommSocketToServiceRecord(uuid);\n\n // Make sure Bluetooth adapter is not in discovery mode\n adapter.cancelDiscovery();\n\n // Connect to the socket\n socket.connect();\n\n\n // Get input and output streams from the socket\n outStream = socket.getOutputStream();\n inStream = socket.getInputStream();\n\n Log.i(TAG, \"Connected successfully to \" + address + \".\");\n }",
"public void connect_bt(String deviceAddress) {\n Intent intent = new Intent(\"OBDStatus\");\n intent.putExtra(\"message\", \"Trying to connect with device\");\n context.sendBroadcast(intent);\n disconnect();\n BluetoothAdapter btAdapter = BluetoothAdapter.getDefaultAdapter();\n btAdapter.cancelDiscovery();\n if (deviceAddress == null || deviceAddress.isEmpty()) {\n intent.putExtra(\"message\", \"Device not found\");\n context.sendBroadcast(intent);\n return;\n }\n\n if (!btAdapter.isEnabled()) {\n intent.putExtra(\"message\", \"Bluetooth is disabled\");\n context.sendBroadcast(intent);\n return;\n }\n\n BluetoothDevice device = btAdapter.getRemoteDevice(deviceAddress);\n\n UUID uuid = UUID.fromString(\"00001101-0000-1000-8000-00805F9B34FB\");\n\n try {\n socket = device.createInsecureRfcommSocketToServiceRecord(uuid);\n socket.connect();\n isConnected = true;\n intent.putExtra(\"message\", \"OBD connected\");\n context.sendBroadcast(intent);\n } catch (IOException e) {\n Log.e(\"gping2\", \"There was an error while establishing Bluetooth connection. Falling back..\", e);\n Class<?> clazz = socket.getRemoteDevice().getClass();\n Class<?>[] paramTypes = new Class<?>[]{Integer.TYPE};\n BluetoothSocket sockFallback = null;\n try {\n Method m = clazz.getMethod(\"createInsecureRfcommSocket\", paramTypes);\n Object[] params = new Object[]{Integer.valueOf(1)};\n sockFallback = (BluetoothSocket) m.invoke(socket.getRemoteDevice(), params);\n sockFallback.connect();\n isConnected = true;\n socket = sockFallback;\n intent.putExtra(\"message\", \"OBD connected\");\n context.sendBroadcast(intent);\n } catch (Exception e2) {\n intent.putExtra(\"message\", \"OBD Connection error\");\n context.sendBroadcast(intent);\n Log.e(\"gping2\", \"BT connect error\");\n }\n }\n this.deviceAddress = deviceAddress;\n saveNewAddress();\n }",
"public void run() {\r\n BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();\r\n adapter.cancelDiscovery();\r\n try {\r\n btSocket.connect();\r\n Log.d(\"TAG\", \"Device connected\");\r\n isConnected = true;\r\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);\r\n SharedPreferences.Editor edit = preferences.edit();\r\n edit.putBoolean(\"Connection\", isConnected);\r\n edit.apply();\r\n handler.obtainMessage(CONNECTING_STATUS, 1, -1).sendToTarget();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n try {\r\n isConnected = false;\r\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);\r\n SharedPreferences.Editor edit = preferences.edit();\r\n edit.putBoolean(\"Connection\", isConnected);\r\n edit.apply();\r\n btSocket.close();\r\n handler.obtainMessage(CONNECTING_STATUS, -1,-1).sendToTarget();\r\n } catch (IOException f) {\r\n f.printStackTrace();\r\n }\r\n return;\r\n }\r\n //Perform work from connection in a separate thread\r\n connectedThread = new ConnectedThread(btSocket);\r\n connectedThread.run();\r\n }",
"public void write(byte[] buffer) {\n try {\n String bufferstring=\"a5550100a2\";\n // byte [] buffer03=new byte[]{(byte) 0xa5, Byte.parseByte(\"ffaa\"),0x01,0x00, (byte) 0xa2};\n byte buffer01[]=bufferstring.getBytes();\n byte [] buffer02=new byte[]{(byte) 0xa5,0x55,0x01,0x00, (byte) 0xa2};\n\n\n //for(int i=0;i<100000;i++) {\n mmOutStream.write(buffer);\n // Thread.sleep(1000);\n //}\n //\n //Share the sent message back to the UI Activity\n// mHandler.obtainMessage(BluetoothChat.MESSAGE_WRITE, -1, -1, buffer)\n// .sendToTarget();\n } catch (Exception e) {\n Log.e(TAG, \"Exception during write\", e);\n }\n }",
"public void onClick(View v) {\n mConnectedThread.write(\"1\"); // Send \"1\" via Bluetooth\n Toast.makeText(getBaseContext(), \"Turn on LED\", Toast.LENGTH_SHORT).show();\n }",
"@Override\n public void run() {\n super.run();\n Log.i(TAG, \"BlueTooth Start\");\n _BluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\n\n if (_BluetoothAdapter != null){\n if(!_BluetoothAdapter.isEnabled())\n _BluetoothAdapter.enable();\n else{\n _BluetoothDevice = _BluetoothAdapter.getRemoteDevice(strAddress_BT_UART);\n if (_BluetoothDevice != null){\n Log.i(TAG, \"Starting BtConnect\");\n BtConnect BC = new BtConnect(_BluetoothDevice);\n BC.start();\n }\n }\n }\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n setContentView(R.layout.activity_main);\n btnOn = findViewById(R.id.bluetoothStart); // кнопка включения\n btnOff = findViewById(R.id.bluetoothStop); // кнопка выключения\n statusText = findViewById(R.id.statusBluetooth); // для вывода текста, полученного\n btState = findViewById(R.id.bluetoothIm);\n workState = findViewById(R.id.workStatIm);\n\n h = new Handler() {\n public void handleMessage(android.os.Message msg) {\n switch (msg.what) {\n case RECIEVE_MESSAGE:\n statusText.setText(\"msg\");// если приняли сообщение в Handler\n byte[] readBuf = (byte[]) msg.obj;\n String strIncom = new String(readBuf, 0, msg.arg1);\n sb.append(strIncom); // формируем строку\n int endOfLineIndex = sb.indexOf(\"\\r\\n\"); // определяем символы конца строки\n if (endOfLineIndex > 0) { // если встречаем конец строки,\n String sbprint = sb.substring(0, endOfLineIndex); // то извлекаем строку\n sb.delete(0, sb.length()); // и очищаем sb\n statusText.setText(\"Ответ от датчика: \" + sbprint); // обновляем TextView\n String[] step_data = sbprint.split(\" \");\n writeFile(step_data[0]);\n writeFile(\";\");\n writeFile(step_data[1]);\n writeFile(\";\");\n writeFile(step_data[2]);\n writeFile(\";\\n\");\n btnOff.setEnabled(true);\n btnOn.setEnabled(true);\n }\n //Log.d(TAG, \"...Строка:\"+ sb.toString() + \"Байт:\" + msg.arg1 + \"...\");\n break;\n }\n };\n };\n\n btAdapter = BluetoothAdapter.getDefaultAdapter(); // получаем локальный Bluetooth адаптер\n\n if (btAdapter.isEnabled()) {\n SharedPreferences prefs_btdev = getSharedPreferences(\"btdev\", 0);\n String btdevaddr=prefs_btdev.getString(\"btdevaddr\",\"?\");\n\n if (btdevaddr != \"?\") {\n BluetoothDevice device = btAdapter.getRemoteDevice(btdevaddr);\n UUID SERIAL_UUID = UUID.fromString(\"0000f00d-1212-afde-1523-785fef13d123\"); // bluetooth serial port service\n //UUID SERIAL_UUID = device.getUuids()[0].getUuid(); //if you don't know the UUID of the bluetooth device service, you can get it like this from android cache\n try {\n btSocket = device.createRfcommSocketToServiceRecord(SERIAL_UUID);\n } catch (Exception e) {\n Log.e(\"\",\"Error creating socket\");\n }\n\n try {\n btSocket.connect();\n Log.e(\"\",\"Connected\");\n } catch (IOException e) {\n Log.e(\"\",e.getMessage());\n try {\n Log.e(\"\",\"trying fallback...\");\n btSocket =(BluetoothSocket) device.getClass().getMethod(\"createRfcommSocket\", new Class[] {int.class}).invoke(device,1);\n btSocket.connect();\n Log.e(\"\",\"Connected\");\n } catch (Exception e2) {\n Log.e(\"\", \"Couldn't establish Bluetooth connection!\");\n }\n }\n } else {\n Log.e(\"\",\"BT device not selected\");\n }\n }\n\n checkBTState();\n\n btnOn.setOnClickListener(new OnClickListener() { // определяем обработчик при нажатии на кнопку\n public void onClick(View v) {\n //btnOn.setEnabled(false);\n workState.setImageResource(R.drawable.ic_action_work_on);\n mConnectedThread.run();\n // TODO start writing in file\n }\n });\n\n btnOff.setOnClickListener(new OnClickListener() {\n public void onClick(View v) {\n //btnOff.setEnabled(false);\n workState.setImageResource(R.drawable.ic_action_work_off);\n mConnectedThread.cancel();\n // TODO stop writing in file\n }\n });\n }",
"@Override\n public boolean connect(BluetoothDevice bluetoothDevice) throws RemoteException {\n Parcel parcel = Parcel.obtain();\n Parcel parcel2 = Parcel.obtain();\n try {\n parcel.writeInterfaceToken(Stub.DESCRIPTOR);\n boolean bl = true;\n if (bluetoothDevice != null) {\n parcel.writeInt(1);\n bluetoothDevice.writeToParcel(parcel, 0);\n } else {\n parcel.writeInt(0);\n }\n if (!this.mRemote.transact(8, parcel, parcel2, 0) && Stub.getDefaultImpl() != null) {\n bl = Stub.getDefaultImpl().connect(bluetoothDevice);\n parcel2.recycle();\n parcel.recycle();\n return bl;\n }\n parcel2.readException();\n int n = parcel2.readInt();\n if (n == 0) {\n bl = false;\n }\n parcel2.recycle();\n parcel.recycle();\n return bl;\n }\n catch (Throwable throwable) {\n parcel2.recycle();\n parcel.recycle();\n throw throwable;\n }\n }",
"public BluetoothDeviceSocketConnection(BluetoothDevice device) {\n this.device = device;\n }",
"private void connectToAdapter() {\n if (chosen) {\n BluetoothAdapter btAdapter = BluetoothAdapter.getDefaultAdapter();\n BluetoothDevice device = btAdapter.getRemoteDevice(deviceAddress);\n UUID uuid = UUID.fromString(\"00001101-0000-1000-8000-00805F9B34FB\");\n // creation and connection of a bluetooth socket\n try {\n BluetoothSocket socket = device.createInsecureRfcommSocketToServiceRecord(uuid);\n socket.connect();\n setBluetoothSocket(socket);\n connected = true;\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n connect.setText(\"Disconnect\");\n connect.setTextColor(Color.RED);\n }\n });\n } catch (IOException e) {\n Log.d(\"Exception\", \"Bluetooth IO Exception c\");\n connected = false;\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(currContext, R.string.cannotConnect, Toast.LENGTH_SHORT).show();\n connect.setText(\"Connect\");\n connect.setTextColor(Color.BLACK);\n mode.setEnabled(true);\n }\n });\n }\n }\n if (bluetoothSocket.getRemoteDevice().getAddress() != null)\n Log.d(TAG, \"Bluetooth connected\");\n Log.d(TAG, \"Device address: \" + bluetoothSocket.getRemoteDevice().getAddress());\n initializeCom();\n }",
"private void setupBluetooth() {\n if (!getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)) {\n Toast.makeText(this, R.string.ble_not_supported, Toast.LENGTH_SHORT).show();\n finish();\n }\n\n // Initializes Bluetooth adapter.\n final BluetoothManager bluetoothManager =\n (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE);\n bluetoothAdapter = bluetoothManager.getAdapter();\n\n // Ensures Bluetooth is available on the device and it is enabled. If not,\n // displays a dialog requesting user permission to enable Bluetooth.\n if (bluetoothAdapter == null || !bluetoothAdapter.isEnabled()) {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, 1);\n }\n\n Set<BluetoothDevice> pairedDevices = bluetoothAdapter.getBondedDevices();\n\n if (pairedDevices.size() > 0) {\n // There are paired devices. Get the name and address of each paired device.\n for (BluetoothDevice device : pairedDevices) {\n String deviceName = device.getName();\n String deviceHardwareAddress = device.getAddress(); // MAC address\n String deviceType = device.getBluetoothClass().getDeviceClass() + \"\";\n\n Movie movie = new Movie(deviceName, deviceHardwareAddress, deviceType);\n movieList.add(movie);\n\n }\n\n mAdapter.notifyDataSetChanged();\n }\n }",
"@GuardedBy(\"AudioDeviceBroker.mDeviceStateLock\")\n @VisibleForTesting\n public void onSetA2dpSinkConnectionState(@NonNull BtHelper.BluetoothA2dpDeviceInfo btInfo,\n @AudioService.BtProfileConnectionState int state) {\n final BluetoothDevice btDevice = btInfo.getBtDevice();\n int a2dpVolume = btInfo.getVolume();\n if (AudioService.DEBUG_DEVICES) {\n Log.d(TAG, \"onSetA2dpSinkConnectionState btDevice=\" + btDevice + \" state=\"\n + state + \" is dock=\" + btDevice.isBluetoothDock() + \" vol=\" + a2dpVolume);\n }\n String address = btDevice.getAddress();\n if (!BluetoothAdapter.checkBluetoothAddress(address)) {\n address = \"\";\n }\n\n final int a2dpCodec = btInfo.getCodec();\n\n AudioService.sDeviceLogger.log(new AudioEventLogger.StringEvent(\n \"A2DP sink connected: device addr=\" + address + \" state=\" + state\n + \" codec=\" + a2dpCodec\n + \" vol=\" + a2dpVolume));\n\n synchronized (mConnectedDevices) {\n final String key = DeviceInfo.makeDeviceListKey(AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP,\n btDevice.getAddress());\n final DeviceInfo di = mConnectedDevices.get(key);\n boolean isConnected = di != null;\n\n if (isConnected) {\n if (state == BluetoothProfile.STATE_CONNECTED) {\n // device is already connected, but we are receiving a connection again,\n // it could be for a codec change\n if (a2dpCodec != di.mDeviceCodecFormat) {\n mDeviceBroker.postBluetoothA2dpDeviceConfigChange(btDevice);\n }\n } else {\n if (btDevice.isBluetoothDock()) {\n if (state == BluetoothProfile.STATE_DISCONNECTED) {\n // introduction of a delay for transient disconnections of docks when\n // power is rapidly turned off/on, this message will be canceled if\n // we reconnect the dock under a preset delay\n makeA2dpDeviceUnavailableLater(address,\n AudioDeviceBroker.BTA2DP_DOCK_TIMEOUT_MS);\n // the next time isConnected is evaluated, it will be false for the dock\n }\n } else {\n makeA2dpDeviceUnavailableNow(address, di.mDeviceCodecFormat);\n }\n }\n } else if (!isConnected && state == BluetoothProfile.STATE_CONNECTED) {\n if (btDevice.isBluetoothDock()) {\n // this could be a reconnection after a transient disconnection\n mDeviceBroker.cancelA2dpDockTimeout();\n mDockAddress = address;\n } else {\n // this could be a connection of another A2DP device before the timeout of\n // a dock: cancel the dock timeout, and make the dock unavailable now\n if (mDeviceBroker.hasScheduledA2dpDockTimeout() && mDockAddress != null) {\n mDeviceBroker.cancelA2dpDockTimeout();\n makeA2dpDeviceUnavailableNow(mDockAddress,\n AudioSystem.AUDIO_FORMAT_DEFAULT);\n }\n }\n if (a2dpVolume != -1) {\n mDeviceBroker.postSetVolumeIndexOnDevice(AudioSystem.STREAM_MUSIC,\n // convert index to internal representation in VolumeStreamState\n a2dpVolume * 10,\n AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP, \"onSetA2dpSinkConnectionState\");\n }\n makeA2dpDeviceAvailable(address, BtHelper.getName(btDevice),\n \"onSetA2dpSinkConnectionState\", a2dpCodec);\n }\n }\n }",
"public void connectToAccessory() {\n\t\tif (mConnection != null)\n\t\t\treturn;\n\n\t\tif (getIntent().hasExtra(BTDeviceListActivity.EXTRA_DEVICE_ADDRESS)) {\n\t\t\tString address = getIntent().getStringExtra(\n\t\t\t\t\tBTDeviceListActivity.EXTRA_DEVICE_ADDRESS);\n\t\t\tLog.i(ADK.TAG, \"want to connect to \" + address);\n\t\t\tmConnection = new BTConnection(address);\n\t\t\tperformPostConnectionTasks();\n\t\t} else {\n\t\t\t// assume only one accessory (currently safe assumption)\n\t\t\tUsbAccessory[] accessories = mUSBManager.getAccessoryList();\n\t\t\tUsbAccessory accessory = (accessories == null ? null\n\t\t\t\t\t: accessories[0]);\n\t\t\tif (accessory != null) {\n\t\t\t\tif (mUSBManager.hasPermission(accessory)) {\n\t\t\t\t\topenAccessory(accessory);\n\t\t\t\t} else {\n\t\t\t\t\t// synchronized (mUsbReceiver) {\n\t\t\t\t\t// if (!mPermissionRequestPending) {\n\t\t\t\t\t// mUsbManager.requestPermission(accessory,\n\t\t\t\t\t// mPermissionIntent);\n\t\t\t\t\t// mPermissionRequestPending = true;\n\t\t\t\t\t// }\n\t\t\t\t\t// }\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Log.d(TAG, \"mAccessory is null\");\n\t\t\t}\n\t\t}\n\n\t}",
"public void connect(View v) {\n turnOn(v);\n startActivity(new Intent(Settings.ACTION_BLUETOOTH_SETTINGS));\n Toast.makeText(getApplicationContext(), \"Select device\", Toast.LENGTH_LONG).show();\n System.err.println(bluetoothAdapter.getBondedDevices());\n }",
"private void startConnection() throws IOException {\n bos = new BufferedOutputStream(socket.getOutputStream(), 65536);\n\n byte[] key = new byte[16];\n Random random = new Random();\n random.nextBytes(key);\n String base64Key = Base64.encodeBase64String(key);\n\n byte[] handshake = createHandshake(base64Key);\n bos.write(handshake);\n bos.flush();\n\n InputStream inputStream = socket.getInputStream();\n verifyServerHandshake(inputStream, base64Key);\n\n writerThread.start();\n\n notifyOnOpen();\n\n bis = new BufferedInputStream(socket.getInputStream(), 65536);\n read();\n }",
"@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\trequestWindowFeature(Window.FEATURE_CUSTOM_TITLE);\n\t\tsetContentView(R.layout.activity_main);\n\t\tgetWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE,\n\t\t\t\tR.layout.actionbar);\n\t\tname = (EditText) (findViewById(R.id.bluetoothName));\n\t\tButton ok = (Button) (findViewById(R.id.button1));\n\t\tButton connect = (Button) findViewById(R.id.button2);\n\n\t\tok.setOnClickListener(new View.OnClickListener() {\n\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tIntent openList = new Intent(MainActivity.this,\n\t\t\t\t\t\tListDivices.class);\n\t\t\t\tstartActivityForResult(openList, APPLY_CONNECTION);\n\t\t\t}\n\t\t});\n\t\tconnect.setOnClickListener(new View.OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tnameb = name.getText();\n\t\t\t\tblname = nameb.toString();\n\t\t\t\ttry {\n\t\t\t\t\tfindBT();\n\t\t\t\t\tstat = 1;\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tstat = 0;\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\n\t\t\t}\n\t\t});\n\n\t\tfinal ToggleButton fan = (ToggleButton) findViewById(R.id.toggleButton1);\n\t\tfan.setOnClickListener(new View.OnClickListener() {\n\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tif (fan.isChecked()) {\n\t\t\t\t\tif (stat == 1) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tmmOutputStream.write('1');\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\tMainActivity.this,\n\t\t\t\t\t\t\t\t\t\"Connection not established with your home\",\n\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else\n\t\t\t\t\t\tToast.makeText(MainActivity.this,\n\t\t\t\t\t\t\t\t\"Connection not established with your home\",\n\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t} else {\n\t\t\t\t\tif (stat == 1) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tmmOutputStream.write('2');\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\tMainActivity.this,\n\t\t\t\t\t\t\t\t\t\"Connection not established with your home\",\n\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else\n\t\t\t\t\t\tToast.makeText(MainActivity.this,\n\t\t\t\t\t\t\t\t\"Connection not established with your home\",\n\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tfinal ToggleButton light1 = (ToggleButton) findViewById(R.id.toggleButton2);\n\t\tlight1.setOnClickListener(new View.OnClickListener() {\n\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tif (light1.isChecked()) {\n\t\t\t\t\tif (stat == 1) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tmmOutputStream.write('3');\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\tMainActivity.this,\n\t\t\t\t\t\t\t\t\t\"Connection not established with your home\",\n\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else\n\t\t\t\t\t\tToast.makeText(MainActivity.this,\n\t\t\t\t\t\t\t\t\"Connection not established with your home\",\n\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t} else {\n\t\t\t\t\tif (stat == 1) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tmmOutputStream.write('4');\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\tMainActivity.this,\n\t\t\t\t\t\t\t\t\t\"Connection not established with your home\",\n\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else\n\t\t\t\t\t\tToast.makeText(MainActivity.this,\n\t\t\t\t\t\t\t\t\"Connection not established with your home\",\n\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tfinal ToggleButton light2 = (ToggleButton) findViewById(R.id.toggleButton3);\n\t\tlight2.setOnClickListener(new View.OnClickListener() {\n\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tif (light2.isChecked()) {\n\t\t\t\t\tif (stat == 1) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tmmOutputStream.write('5');\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\tMainActivity.this,\n\t\t\t\t\t\t\t\t\t\"Connection not established with your home\",\n\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else\n\t\t\t\t\t\tToast.makeText(MainActivity.this,\n\t\t\t\t\t\t\t\t\"Connection not established with your home\",\n\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t} else {\n\t\t\t\t\tif (stat == 1) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tmmOutputStream.write('6');\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\tMainActivity.this,\n\t\t\t\t\t\t\t\t\t\"Connection not established with your home\",\n\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else\n\t\t\t\t\t\tToast.makeText(MainActivity.this,\n\t\t\t\t\t\t\t\t\"Connection not established with your home\",\n\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tfinal ToggleButton light3 = (ToggleButton) findViewById(R.id.toggleButton4);\n\t\tlight3.setOnClickListener(new View.OnClickListener() {\n\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tif (light3.isChecked()) {\n\t\t\t\t\tif (stat == 1) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tmmOutputStream.write('7');\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\tMainActivity.this,\n\t\t\t\t\t\t\t\t\t\"Connection not established with your home\",\n\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else\n\t\t\t\t\t\tToast.makeText(MainActivity.this,\n\t\t\t\t\t\t\t\t\"Connection not established with your home\",\n\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t} else {\n\t\t\t\t\tif (stat == 1) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tmmOutputStream.write('8');\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\tMainActivity.this,\n\t\t\t\t\t\t\t\t\t\"Connection not established with your home\",\n\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else\n\t\t\t\t\t\tToast.makeText(MainActivity.this,\n\t\t\t\t\t\t\t\t\"Connection not established with your home\",\n\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tfinal ToggleButton tv = (ToggleButton) findViewById(R.id.toggleButton5);\n\t\ttv.setOnClickListener(new View.OnClickListener() {\n\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tif (tv.isChecked()) {\n\t\t\t\t\tif (stat == 1) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tmmOutputStream.write('9');\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\tMainActivity.this,\n\t\t\t\t\t\t\t\t\t\"Connection not established with your home\",\n\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else\n\t\t\t\t\t\tToast.makeText(MainActivity.this,\n\t\t\t\t\t\t\t\t\"Connection not established with your home\",\n\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t} else {\n\t\t\t\t\tif (stat == 1) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tmmOutputStream.write('0');\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\tMainActivity.this,\n\t\t\t\t\t\t\t\t\t\"Connection not established with your home\",\n\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else\n\t\t\t\t\t\tToast.makeText(MainActivity.this,\n\t\t\t\t\t\t\t\t\"Connection not established with your home\",\n\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t}",
"private void setupApp() {\n Log.d(TAG, \"setupApp()\");\n\n // Initialize the BluetoothService to perform bluetooth connections\n mBTService = new BTService(getActivity(), mHandler);\n\n // Initialize the buffer for outgoing messages\n mOutStringBuffer = new StringBuffer(\"\");\n }",
"public ConnectedThread(BluetoothSocket socket) {\n InputStream tmpIn = null;\n OutputStream tmpOut = null;\n\n try {\n //Create I/O streams for connection\n tmpIn = socket.getInputStream();\n tmpOut = socket.getOutputStream();\n } catch (IOException e) {\n }\n\n mmInStream = tmpIn;\n mmOutStream = tmpOut;\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState)\n {\n super.onCreate(savedInstanceState);\n m_tts = new TextToSpeech(this, this);\n\n Intent newint = getIntent();\n //receive the address of the bluetooth device\n address = newint.getStringExtra(MainActivity.EXTRA_ADDRESS);\n\n //view of the ledControl\n setContentView(R.layout.activity_game_play);\n\n btnEnd = (Button)findViewById(R.id.btnEnd);\n\n new ConnectBT().execute(); //Call the class to connect\n\n btnEnd.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Disconnect(); //close connection\n }\n });\n\n }",
"public ConnectedThread(BluetoothSocket socket) {\n InputStream tmpIn = null;\n OutputStream tmpOut = null;\n\n try {\n //Create I/O streams for connection\n tmpIn = socket.getInputStream();\n tmpOut = socket.getOutputStream();\n } catch (IOException e) { }\n\n mmInStream = tmpIn;\n mmOutStream = tmpOut;\n }",
"public void buttonClick_connect(View view)\n\t{\n\t\tAppSettings.showConnectionLost = false;\n\t\tLog.i(TAG, \"showConnectionLost = false\");\n\t\t\n\t\tAppSettings.bluetoothConnection = new BluetoothConnection(this.getApplicationContext(), this.btConnectionHandler);\n\t\tBluetoothAdapter btAdapter = AppSettings.bluetoothConnection.getBluetoothAdapter();\n\t\t\n\t\t// If the adapter is null, then Bluetooth is not supported\n if (btAdapter == null) {\n \tToast.makeText(getApplicationContext(), R.string.bt_not_available, Toast.LENGTH_LONG).show();\n }\n else {\n \t// If Bluetooth is not on, request that it be enabled.\n if (!btAdapter.isEnabled()) {\n Intent enableIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableIntent, REQUEST_ENABLE_BT);\n }\n else {\n \t// Launch the DeviceListActivity to see devices and do scan\n Intent serverIntent = new Intent(getApplicationContext(), DeviceListActivity.class);\n startActivityForResult(serverIntent, REQUEST_CONNECT_DEVICE);\n }\n }\n\t}",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n final BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\n if (mBluetoothAdapter == null) {\n // Device does not support Bluetooth\n }\n\n if (!mBluetoothAdapter.isEnabled()) {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\n }\n\n BluetoothDevice mmDevice = null;\n\n List<String> mArray = new ArrayList<String>();\n Set<BluetoothDevice> pairedDevices = mBluetoothAdapter.getBondedDevices();\n // If there are paired devices\n if (pairedDevices.size() > 0) {\n // Loop through paired devices\n for (BluetoothDevice device : pairedDevices) {\n // Add the name and address to an array adapter to show in a ListView\n if(device.getName().equals(deviceName))\n mmDevice = device;\n mArray.add(device.getName() + \"\\n\" + device.getAddress());\n }\n }\n\n //Creating the socket.\n BluetoothSocket mmSocket;\n BluetoothSocket tmp = null;\n\n UUID myUUID = UUID.fromString(mUUID);\n try {\n // MY_UUID is the app's UUID string, also used by the server code\n tmp = mmDevice.createRfcommSocketToServiceRecord(myUUID);\n } catch (IOException e) { }\n mmSocket = tmp;\n\n //socket created, try to connect\n\n try {\n mmSocket.connect();\n } catch (IOException e) {\n e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.\n }\n\n // Run the example\n JArduino arduino = new BlinkAndAnalog(mmSocket);\n arduino.runArduinoProcess();\n\n Log.i(TAG, \"onCreate\");\n setContentView(R.layout.main);\n }",
"public void write(String input) {\n byte[] msgBuffer = input.getBytes(); //converts entered String into bytes\n try {\n mmOutStream.write(msgBuffer); //write bytes over BT connection via outstream\n } catch (IOException e) {\n //if you cannot write, close the application\n Toast.makeText(getBaseContext(), \"Connection Failure\", Toast.LENGTH_LONG).show();\n finish();\n }\n }",
"private void connectDevice(String address) {\n// // Get the device MAC address\n BluetoothDevice device = mBtAdapter.getRemoteDevice(address);\n// // Attempt to connect to the device\n mChatService.connect(device, true);\n }",
"public void initDevice() {\n myBluetoothAdapter = android.bluetooth.BluetoothAdapter.getDefaultAdapter();\n pairedDevices = myBluetoothAdapter.getBondedDevices();\n }",
"public boolean connect() {\n try {\n this.bluetoothSocket = this.device.createRfcommSocketToServiceRecord(this.device.getUuids()[0].getUuid());\n this.bluetoothSocket.connect();\n return true;\n } catch (IOException ex) {\n try {\n this.bluetoothSocket.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n this.bluetoothSocket = null;\n }\n return false;\n }",
"@Override\r\n\t\tpublic void run() {\n\t\t\tLooper.prepare();\r\n\t\t\tbluetoothChat = new BluetoothChat(context);\r\n\t\t\tif (!BluetoothAdapter.checkBluetoothAddress(addr)) { // 检查蓝牙地址是否有效\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tBluetoothDevice device = bluetoothAdapter.getRemoteDevice(addr);\r\n\t\t\twhile (true) {\r\n\t\t\t\tif (count == LONG_TIME_CONNECTED) {\r\n\t\t\t\t\tLooper.loop();\r\n\t\t\t\t}\r\n\t\t\t\tif (device.getBondState() != BluetoothDevice.BOND_BONDED) {\r\n\t\t\t\t\t// 如果未匹配,则继续执行\r\n\t\t\t\t\t// handler.postDelayed(runnable, 5000);\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tClsUtils.setPin(device.getClass(), device, pin); // 手机和蓝牙采集器配对\r\n\t\t\t\t\t\tClsUtils.createBond(device.getClass(), device);\r\n\t\t\t\t\t\tremoteDevice = device; // 配对完毕就把这个设备对象传给全局的remoteDevice\r\n\t\t\t\t\t\tThread.sleep(5000);\r\n\t\t\t\t\t\tcount++;\r\n\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// 赋值至全局\r\n\t\t\t\t\tremoteDevice = device;\r\n\t\t\t\t\t// 移除线程后立即连接\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tbluetoothChat.goConnect(device);\r\n\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t// TODO: handle exception\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tLooper.loop();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}",
"void initCommand() {\n try {\n stream = adbTerminalConnection.open(\"shell:\");\n } catch (IOException | InterruptedException e) {\n e.printStackTrace();\n return;\n }\n runOnUiThread(() -> {\n channel.invokeMethod(\"output\", \"OTG已连接\\r\\n\");\n });\n // Start the receiving thread\n new Thread(() -> {\n while (!stream.isClosed()) {\n // Print each thing we read from the shell stream\n String data = null;\n try {\n data = new String(stream.read());\n } catch (InterruptedException | IOException e) {\n e.printStackTrace();\n }\n Log.d(\"Nightmare\", \"data -> \" + data);\n if (data == null) {\n runOnUiThread(() -> {\n channel.invokeMethod(\"output\", \"OTG断开\\r\\n\");\n });\n continue;\n }\n String finalData = data;\n runOnUiThread(() -> {\n channel.invokeMethod(\"output\", finalData);\n });\n }\n }).start();\n }",
"public Bluetooth(Context context, Logger logger)\n\t{\n\t\tthis.context = context;\n\t\tthis.logger = logger;\n\t\t//this.type = SensorType.Bluetooth;\n\t\tthis.isEnabled = false;\n\t\tthis.scanIntervalInSec = 0;\n\t\tthis.debugStatus = \"no status\";\n\t\tthis.bluetoothHandler = new Handler();\n\t\tthis.originalState = -1;\n\t\t\n // default setting\n changeSettings(type + FieldDelimiter + \"1\" + FieldDelimiter + \"10\");\n\t}",
"private void initBluetooth() {\n IntentFilter filter = new IntentFilter(BluetoothDevice.ACTION_FOUND);\n this.registerReceiver(mReceiver, filter);\n\n // Register for broadcasts when discovery has finished\n filter = new IntentFilter(BluetoothAdapter.ACTION_DISCOVERY_FINISHED);\n this.registerReceiver(mReceiver, filter);\n\n // Get the local Bluetooth adapter\n mBtAdapter = BluetoothAdapter.getDefaultAdapter();\n\n // Get a set of currently paired devices\n Set<BluetoothDevice> pairedDevices = mBtAdapter.getBondedDevices();\n\n // Initialize the BluetoothChatService to perform bluetooth connections\n mChatService = new BluetoothChatService(this, mHandler);\n }",
"private void sendConfiguration() {\r\n if (currentBluetoothGatt == null) {\r\n Toast.makeText(this, \"Non Connecté\", Toast.LENGTH_SHORT).show();\r\n return;\r\n }\r\n\r\n /*EditText ledGPIOPin = findViewById(R.id.editTextPin);\r\n EditText buttonGPIOPin = findViewById(R.id.editTextPin);\r\n final String pinLed = ledGPIOPin.getText().toString();\r\n final String pinButton = buttonGPIOPin.getText().toString();\r\n\r\n final BluetoothGattService service = currentBluetoothGatt.getService(BluetoothLEManager.DEVICE_UUID);\r\n if (service == null) {\r\n Toast.makeText(this, \"UUID Introuvable\", Toast.LENGTH_SHORT).show();\r\n return;\r\n }\r\n\r\n final BluetoothGattCharacteristic buttonCharact = service.getCharacteristic(BluetoothLEManager.CHARACTERISTIC_BUTTON_PIN_UUID);\r\n final BluetoothGattCharacteristic ledCharact = service.getCharacteristic(BluetoothLEManager.CHARACTERISTIC_LED_PIN_UUID);\r\n\r\n buttonCharact.setValue(pinButton);\r\n ledCharact.setValue(pinLed);\r\n\r\n currentBluetoothGatt.writeCharacteristic(buttonCharact); // async code, you cannot send 2 characteristics at the same time!\r\n charsStack.add(ledCharact); // stack the next write*/\r\n }",
"public void connect(String id) {\n // Android bluetooth API code\n BluetoothDevice device = null;\n try {\n device = mBluetoothAdapter.getRemoteDevice(id);\n mBluetoothAdapter.cancelDiscovery();\n }\n catch (Exception e) {\n // Show user error message\n // i.e. \"333 is not a valid bluetooth address\"\n Toast.makeText(getApplicationContext(), e.getMessage(),\n Toast.LENGTH_SHORT).show();\n }\n\n // If getRemoteDevice did not throw and device was set, connect to client\n // getRemoteDevice throws if its parameter is not a valid bluetooth address\n if (device != null) {\n try {\n btSocket = device.createRfcommSocketToServiceRecord(MY_UUID);\n btSocket.connect();\n Toast.makeText(getApplicationContext(), \"Connection made\",\n Toast.LENGTH_SHORT).show();\n connectedStatus.setText(R.string.connection_connected);\n } catch (IOException e) {\n try {\n btSocket.close();\n } catch (IOException e2) {\n Log.d(TAG, \"Unable to end the connection\");\n }\n Log.d(TAG, \"Socket creation failed\");\n }\n }\n }",
"public void ArduinoConnection() \n {\n //variables para la identificacion del puerto y poder hacer la conexion\n CommPortIdentifier portId = null;\n Enumeration portEnum = CommPortIdentifier.getPortIdentifiers();\n\n //Ciclo para mandar todos los elementos, es decir, aqui se mandara por el puerto los caracteres del mensaje\n while (portEnum.hasMoreElements()) \n {\n CommPortIdentifier currPortId = (CommPortIdentifier) portEnum.nextElement();\n \n //comprobamos si hay algo\n if (PORT_NAME.equals(currPortId.getName())) \n {\n portId = currPortId;\n break;\n }\n }\n\n if (portId == null) \n {\n\n System.exit(ERROR);\n return;\n }\n\n try \n {\n \n serialPort = (SerialPort) portId.open(this.getClass().getName(), TIME_OUT);\n\n serialPort.setSerialPortParams(DATA_RATE,\n SerialPort.DATABITS_8,\n SerialPort.STOPBITS_1,\n SerialPort.PARITY_NONE);\n\n Output = serialPort.getOutputStream();\n\n } catch (Exception e) {\n\n System.exit(ERROR);\n }\n\n }",
"private void establishConnection() throws IOException {\n\t\tthis.inReader = new BufferedReader(new InputStreamReader(this.conn.getInputStream()));\n\t\tthis.outWriter = new BufferedWriter(new OutputStreamWriter(this.conn.getOutputStream()));\n\t}",
"public void connect()\n {\n \tLog.d(TAG, \"connect\");\n \t\n \tif(!this.isConnected ) {\n mContext.bindService(new Intent(\"com.google.tungsten.LedService\"), mServiceConnection, \n \t\tContext.BIND_AUTO_CREATE);\n \t}\n }",
"@Override\n\t\tpublic void onClick(View v) {\n\t\t\tmsgText.setText(null);\n\t\t\tsendEdit.setText(null);\n\t\t\tif(sppConnected || devAddr == null)\n\t\t\t\treturn;\n\t\t\ttry{\n\t\t\t btSocket = btAdapt.getRemoteDevice(devAddr).createRfcommSocketToServiceRecord(uuid);\n\t\t\t btSocket.connect();\n\t\t\t Log.d(tag,\"BT_Socket connect\");\n\t\t\t synchronized (MainActivity.this) {\n\t\t\t\tif(sppConnected)\n\t\t\t\t\treturn;\n\t\t\t\tbtServerSocket.close();\n\t\t\t\tbtIn = btSocket.getInputStream();\n\t\t\t\tbtOut = btSocket.getOutputStream();\n\t\t\t\tconected();\n\t\t\t}\n\t\t\t Toast.makeText(MainActivity.this,\"藍牙裝置已開啟:\" + devAddr, Toast.LENGTH_LONG).show();\n\t\t\t}catch(IOException e){\n\t\t\t\te.printStackTrace();\n\t\t\t\tsppConnected =false;\n\t\t\t\ttry{\n\t\t\t\t\tbtSocket.close();\n\t\t\t\t}catch(IOException e1){\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\tbtSocket = null;\n\t\t\t\tToast.makeText(MainActivity.this, \"連接異常\", Toast.LENGTH_SHORT).show();\n\t\t\t}\n\t\t}",
"private boolean connect() {\n\t\tif (this.logging) {\n\t\t\tlogger.debug(\"trying to connect to \" + this.remoteName);\n\t\t}\n\n\t\tboolean connected = this.btc.connectTo(this.remoteName, null,\n\t\t\t\tNXTCommFactory.BLUETOOTH, NXTComm.PACKET);\n\t\tif (!connected) {\n\t\t\tif (this.logging) {\n\t\t\t\tlogger.info(\"not connected to \" + this.remoteName);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tthis.dis = new ExtendedDataInputStream(this.btc.getDataIn());\n\t\t\tthis.dos = this.btc.getDataOut();\n\t\t\tif (this.logging) {\n\t\t\t\tlogger.info(\"connected to \" + this.remoteName);\n\t\t\t}\n\t\t}\n\n\t\treturn connected;\n\t}",
"public void connect() {}",
"void tryConnection(String mac)\n {\n if (outstanding_connect != null || open_connection != null) {\n return;\n }\n \n Log.d(Constants.LOG_TAG, \"Attempting to connect to \" + mac);\n \n BluetoothDevice dev = bt_adapter.getRemoteDevice(mac);\n outstanding_connect = new ConnectThread(dev, handler);\n outstanding_connect.start();\n \n }",
"public void startBTConnection(BluetoothDevice device, UUID uuid){\n Log.d(TAG, \"startBTConnection: Initializing RFCOM Bluetooth Connection.\");\n mBluetoothConnection.startClient(device,uuid);\n }",
"private void manageConnectedSocket(BluetoothSocket acceptSocket) {\n\n }",
"public void ArduinoConnection() {\n\n CommPortIdentifier portId = null;\n Enumeration portEnum = CommPortIdentifier.getPortIdentifiers();\n\n while (portEnum.hasMoreElements()) {\n CommPortIdentifier currPortId = (CommPortIdentifier) portEnum.nextElement();\n\n if (PORT_NAME.equals(currPortId.getName())) {\n portId = currPortId;\n break;\n }\n }\n\n if (portId == null) {\n\n System.exit(ERROR);\n return;\n }\n\n try {\n\n serialPort = (SerialPort) portId.open(this.getClass().getName(), TIME_OUT);\n\n serialPort.setSerialPortParams(DATA_RATE,\n SerialPort.DATABITS_8,\n SerialPort.STOPBITS_1,\n SerialPort.PARITY_NONE);\n\n Output = serialPort.getOutputStream();\n\n } catch (Exception e) {\n\n System.exit(ERROR);\n }\n\n }",
"private Subscriber<BluetoothDevice> prepareConnectionSubscriber() {\n Subscriber<BluetoothDevice> subscriber = new Subscriber<BluetoothDevice>() {\n @Override\n public void onCompleted() {\n mProgressDialog.dismiss();\n finish();\n }\n\n @Override\n public void onError(Throwable e) {\n mProgressDialog.dismiss();\n Toast.makeText(SearchDevicesActivity.this, R.string.error_unable_to_connect, Toast.LENGTH_LONG).show();\n }\n\n @Override\n public void onNext(BluetoothDevice device) {\n Log.d(BtApplication.TAG, \"Connection Subscriber: \" + device.getName());\n AppSettings.putDeviceMacAddress(device.getAddress());\n }\n };\n return subscriber;\n }",
"public void onStart(){ \r\n\t\t//ensure bluetooth is enabled \r\n\t\tensureBluetoothIsEnabled();\r\n\t\tsuper.onStart(); \t\r\n\t}",
"private void initWirelessCommunication() {\n if (!getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)) {\n showToast(\"BLE is not supported\");\n finish();\n } else {\n showToast(\"BLE is supported\");\n // Access Location is a \"dangerous\" permission\n int hasAccessLocation = ContextCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_COARSE_LOCATION);\n if (hasAccessLocation != PackageManager.PERMISSION_GRANTED) {\n // ask the user for permission\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_COARSE_LOCATION},\n REQUEST_ACCESS_LOCATION);\n // the callback method onRequestPermissionsResult gets the result of this request\n }\n }\n // enable wireless communication alternative\n if (communicationAdapter == null || !communicationAdapter.isReadyToBeUsed()) {\n assert communicationAdapter != null;\n Intent enableWirelessCommunicationIntent = new Intent(communicationAdapter.actionRequestEnable());\n startActivityForResult(enableWirelessCommunicationIntent, REQUEST_ENABLE_BT);\n }\n }",
"void setBluetoothService(BluetoothService bluetoothService);",
"public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_bluetooth_handler);\n final Button back=(Button) findViewById(R.id.button_back);\n bluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\n checkBTState();\n\n try {\n serverSocket=bluetoothAdapter.listenUsingInsecureRfcommWithServiceRecord(label, MY_UUID);\n } catch (IOException e){}\n\n try{\n bluetoothSocket=serverSocket.accept();\n }catch (IOException e) {}\n\n try{\n outputStream=MainActivity1.bluetoothSocket.getOutputStream();\n }catch (IOException e){\n Log.d(MainActivity1.label,\"Output stream connection failed.\");\n }\n\n receiver=new BroadcastReceiver() {\n @Override\n public void onReceive(Context context, Intent intent)\n {\n String a=intent.getAction();\n\n if(BluetoothDevice.ACTION_FOUND.equals(a))\n {\n BluetoothDevice device=intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);\n\n bluetoothItems.add(device.getName());\n }\n }\n };\n IntentFilter filter=new IntentFilter(BluetoothDevice.ACTION_FOUND);\n registerReceiver(receiver, filter);\n\n //searching();\n\n ListView bluetoothList=(ListView) findViewById(R.id.listView_bluetoothItems);\n\n bluetoothList.setAdapter(new ArrayAdapter<String>(this,R.layout.abc_list_menu_item_layout));\n\n back.setOnClickListener(new OnClickListener() {\n @Override\n public void onClick(View v) {\n startActivity(new Intent(getApplicationContext(), ControllerHomeScreen.class));\n }\n });\n }",
"public boolean mConnect(String s) { //Find and mConnect to the bluetooth\n if (isBtOpen()==false)\n return false;\n if (isConnected(s))\n return true;\n if (bDevicePickerActive) return false; //Don't connect while picking device\n if (oDevice!=mBTDeviceByName(s)) mDisconnect();\n mDisconnect();\n oDevice=mBTDeviceByName(s);\n sDeviceName = s; //Set new device name\n oParent.mDeviceNameSet(s);\n if (mConnect2Device1(oDevice))\n return true;\n\n mStateSet(kBT_ConnectReq1);\n if (mBTOpen1()==false) { //If BT cannot be opened\n mStateSet(kBT_InvalidBT1);\n mErrMsg(\"No bluetooth port available\");\n return false;\n }\n if (mIsState(kBT_Connecting)) {\n mSleep(1000);\n if (oInput!=null)\n mStateSet(kBT_Connected1);\n else\n mStateSet(kBT_InvalidDevice1);\n return false;\n }\n if (oDevice==null) { //Device not found,\n oDevice=mBTDeviceByName(sDeviceName);\n if (oDevice==null){\n mStateSet(kBT_InvalidDevice1);\n mSleep(2000);\n }\n return false;\n }\n //set by mConnectDeviceWithName, mRequestConnection\n if (mIsState(kBT_ConnectReq1)) { //Try to connect first time\n if (mConnect2Device1(oDevice)==false) //mConnect sets mStateSet(kBT_DeviceConnected);\n mSleep(10);\n } else if (mIsState(cKonst.eSerial.kBT_BrokenConnection)) { //Try to reconnect\n mSleep(2000);\n bDoRedraw=true;\n return false;\n } else if (mIsState(kOverflow)){ //Fatal, overflow, donno what to do\n mConnectionStateClear();\n return false;\n } else {\n mSleep(2000); //Do nothing while connection was interrupted\n }\n return false;\n }",
"public void sendBluetooth()\n {\n Intent startBluetooth = new Intent(this, Main2Activity.class);\n startActivity(startBluetooth);\n }",
"@Override\n protected Void doInBackground(Void... devices){\n try {\n if (btSocket == null || !isBtConnected) {\n //get the mobile bluetooth device\n m_Bluetooth = BluetoothAdapter.getDefaultAdapter();\n //connects to the device's address and checks if it's available\n BluetoothDevice bluetoothDevice = m_Bluetooth.getRemoteDevice(address);\n //create a RFCOMM (SPP) connection\n btSocket = bluetoothDevice.createInsecureRfcommSocketToServiceRecord(myUUID);\n BluetoothAdapter.getDefaultAdapter().cancelDiscovery();\n btSocket.connect();//start connection\n }\n }\n catch (IOException e) {\n ConnectSuccess = false;//if the try failed, you can check the exception here\n }\n return null;\n }",
"@Override\n\tpublic void connect() throws IOException {\n\n\t}",
"public void startBTConnection(BluetoothDevice device, UUID uuid){\n Log.d(TAG, \"startBTConnection: Initializing RFCOM Bluetooth Connection.\");\n\n mBluetoothConnection.startClient(device,uuid);\n }",
"@Override\n public void onConnected(BluetoothLeUart uart) {\n // Called when UART device is connected and ready to send/receive data.\n writeLine(\"Connected!\");\n }",
"private void connect() {\n // after 10 seconds its connected\n new Handler().postDelayed(\n new Runnable() {\n public void run() {\n Log.d(TAG, \"Bluetooth Low Energy device is connected!!\");\n // Toast.makeText(getApplicationContext(),\"Connected!\",Toast.LENGTH_SHORT).show();\n stateService = Constants.STATE_SERVICE.CONNECTED;\n startForeground(Constants.NOTIFICATION_ID_FOREGROUND_SERVICE, prepareNotification());\n }\n }, 10000);\n\n }",
"public interface IBluetoothHeadset\n extends IInterface {\n public static abstract class Stub extends Binder\n implements IBluetoothHeadset {\n private static class Proxy\n implements IBluetoothHeadset {\n\n public boolean acceptIncomingConnect(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(13, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public IBinder asBinder() {\n return mRemote;\n }\n\n public boolean cancelConnectThread() throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = false;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n int i;\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n mRemote.transact(15, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n if(i != 0)\n flag = true;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean connect(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_75;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(1, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean connectHeadsetInternal(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(16, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean createIncomingConnect(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(12, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean disconnect(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_75;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(2, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean disconnectHeadsetInternal(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(17, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public int getAudioState(BluetoothDevice bluetoothdevice) throws RemoteException {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_65;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(19, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n parcel1.recycle();\n parcel.recycle();\n return i;\n parcel.writeInt(0);\n goto _L1\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public int getBatteryUsageHint(BluetoothDevice bluetoothdevice) throws RemoteException {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_65;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(11, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n parcel1.recycle();\n parcel.recycle();\n return i;\n parcel.writeInt(0);\n goto _L1\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public List getConnectedDevices() throws RemoteException {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n java.util.ArrayList arraylist;\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n mRemote.transact(3, parcel, parcel1, 0);\n parcel1.readException();\n arraylist = parcel1.createTypedArrayList(BluetoothDevice.CREATOR);\n parcel1.recycle();\n parcel.recycle();\n return arraylist;\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public int getConnectionState(BluetoothDevice bluetoothdevice) throws RemoteException {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_64;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(5, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n parcel1.recycle();\n parcel.recycle();\n return i;\n parcel.writeInt(0);\n goto _L1\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public List getDevicesMatchingConnectionStates(int ai[]) throws RemoteException {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n java.util.ArrayList arraylist;\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n parcel.writeIntArray(ai);\n mRemote.transact(4, parcel, parcel1, 0);\n parcel1.readException();\n arraylist = parcel1.createTypedArrayList(BluetoothDevice.CREATOR);\n parcel1.recycle();\n parcel.recycle();\n return arraylist;\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public String getInterfaceDescriptor() {\n return \"android.bluetooth.IBluetoothHeadset\";\n }\n\n public int getPriority(BluetoothDevice bluetoothdevice) throws RemoteException {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_65;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(7, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n parcel1.recycle();\n parcel.recycle();\n return i;\n parcel.writeInt(0);\n goto _L1\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean isAudioConnected(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(10, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean rejectIncomingConnect(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(14, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean setAudioState(BluetoothDevice bluetoothdevice, int i) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_88;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int j;\n parcel.writeInt(i);\n mRemote.transact(18, parcel, parcel1, 0);\n parcel1.readException();\n j = parcel1.readInt();\n Exception exception;\n if(j == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean setPriority(BluetoothDevice bluetoothdevice, int i) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_88;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int j;\n parcel.writeInt(i);\n mRemote.transact(6, parcel, parcel1, 0);\n parcel1.readException();\n j = parcel1.readInt();\n Exception exception;\n if(j == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean startScoUsingVirtualVoiceCall(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(20, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean startVoiceRecognition(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(8, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean stopScoUsingVirtualVoiceCall(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(21, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean stopVoiceRecognition(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(9, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n private IBinder mRemote;\n\n Proxy(IBinder ibinder) {\n mRemote = ibinder;\n }\n }\n\n\n public static IBluetoothHeadset asInterface(IBinder ibinder) {\n Object obj;\n if(ibinder == null) {\n obj = null;\n } else {\n IInterface iinterface = ibinder.queryLocalInterface(\"android.bluetooth.IBluetoothHeadset\");\n if(iinterface != null && (iinterface instanceof IBluetoothHeadset))\n obj = (IBluetoothHeadset)iinterface;\n else\n obj = new Proxy(ibinder);\n }\n return ((IBluetoothHeadset) (obj));\n }\n\n public IBinder asBinder() {\n return this;\n }\n\n public boolean onTransact(int i, Parcel parcel, Parcel parcel1, int j) throws RemoteException {\n int k;\n boolean flag;\n k = 0;\n flag = true;\n i;\n JVM INSTR lookupswitch 22: default 192\n // 1: 215\n // 2: 278\n // 3: 341\n // 4: 366\n // 5: 395\n // 6: 449\n // 7: 516\n // 8: 570\n // 9: 633\n // 10: 696\n // 11: 759\n // 12: 813\n // 13: 876\n // 14: 939\n // 15: 1002\n // 16: 1036\n // 17: 1099\n // 18: 1162\n // 19: 1229\n // 20: 1283\n // 21: 1346\n // 1598968902: 206;\n goto _L1 _L2 _L3 _L4 _L5 _L6 _L7 _L8 _L9 _L10 _L11 _L12 _L13 _L14 _L15 _L16 _L17 _L18 _L19 _L20 _L21 _L22 _L23\n_L1:\n flag = super.onTransact(i, parcel, parcel1, j);\n_L25:\n return flag;\n_L23:\n parcel1.writeString(\"android.bluetooth.IBluetoothHeadset\");\n continue; /* Loop/switch isn't completed */\n_L2:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice17;\n boolean flag15;\n if(parcel.readInt() != 0)\n bluetoothdevice17 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice17 = null;\n flag15 = connect(bluetoothdevice17);\n parcel1.writeNoException();\n if(flag15)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L3:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice16;\n boolean flag14;\n if(parcel.readInt() != 0)\n bluetoothdevice16 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice16 = null;\n flag14 = disconnect(bluetoothdevice16);\n parcel1.writeNoException();\n if(flag14)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L4:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n List list1 = getConnectedDevices();\n parcel1.writeNoException();\n parcel1.writeTypedList(list1);\n continue; /* Loop/switch isn't completed */\n_L5:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n List list = getDevicesMatchingConnectionStates(parcel.createIntArray());\n parcel1.writeNoException();\n parcel1.writeTypedList(list);\n continue; /* Loop/switch isn't completed */\n_L6:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice15;\n int k1;\n if(parcel.readInt() != 0)\n bluetoothdevice15 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice15 = null;\n k1 = getConnectionState(bluetoothdevice15);\n parcel1.writeNoException();\n parcel1.writeInt(k1);\n continue; /* Loop/switch isn't completed */\n_L7:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice14;\n boolean flag13;\n if(parcel.readInt() != 0)\n bluetoothdevice14 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice14 = null;\n flag13 = setPriority(bluetoothdevice14, parcel.readInt());\n parcel1.writeNoException();\n if(flag13)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L8:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice13;\n int j1;\n if(parcel.readInt() != 0)\n bluetoothdevice13 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice13 = null;\n j1 = getPriority(bluetoothdevice13);\n parcel1.writeNoException();\n parcel1.writeInt(j1);\n continue; /* Loop/switch isn't completed */\n_L9:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice12;\n boolean flag12;\n if(parcel.readInt() != 0)\n bluetoothdevice12 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice12 = null;\n flag12 = startVoiceRecognition(bluetoothdevice12);\n parcel1.writeNoException();\n if(flag12)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L10:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice11;\n boolean flag11;\n if(parcel.readInt() != 0)\n bluetoothdevice11 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice11 = null;\n flag11 = stopVoiceRecognition(bluetoothdevice11);\n parcel1.writeNoException();\n if(flag11)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L11:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice10;\n boolean flag10;\n if(parcel.readInt() != 0)\n bluetoothdevice10 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice10 = null;\n flag10 = isAudioConnected(bluetoothdevice10);\n parcel1.writeNoException();\n if(flag10)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L12:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice9;\n int i1;\n if(parcel.readInt() != 0)\n bluetoothdevice9 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice9 = null;\n i1 = getBatteryUsageHint(bluetoothdevice9);\n parcel1.writeNoException();\n parcel1.writeInt(i1);\n continue; /* Loop/switch isn't completed */\n_L13:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice8;\n boolean flag9;\n if(parcel.readInt() != 0)\n bluetoothdevice8 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice8 = null;\n flag9 = createIncomingConnect(bluetoothdevice8);\n parcel1.writeNoException();\n if(flag9)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L14:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice7;\n boolean flag8;\n if(parcel.readInt() != 0)\n bluetoothdevice7 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice7 = null;\n flag8 = acceptIncomingConnect(bluetoothdevice7);\n parcel1.writeNoException();\n if(flag8)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L15:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice6;\n boolean flag7;\n if(parcel.readInt() != 0)\n bluetoothdevice6 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice6 = null;\n flag7 = rejectIncomingConnect(bluetoothdevice6);\n parcel1.writeNoException();\n if(flag7)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L16:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n boolean flag6 = cancelConnectThread();\n parcel1.writeNoException();\n if(flag6)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L17:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice5;\n boolean flag5;\n if(parcel.readInt() != 0)\n bluetoothdevice5 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice5 = null;\n flag5 = connectHeadsetInternal(bluetoothdevice5);\n parcel1.writeNoException();\n if(flag5)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L18:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice4;\n boolean flag4;\n if(parcel.readInt() != 0)\n bluetoothdevice4 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice4 = null;\n flag4 = disconnectHeadsetInternal(bluetoothdevice4);\n parcel1.writeNoException();\n if(flag4)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L19:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice3;\n boolean flag3;\n if(parcel.readInt() != 0)\n bluetoothdevice3 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice3 = null;\n flag3 = setAudioState(bluetoothdevice3, parcel.readInt());\n parcel1.writeNoException();\n if(flag3)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L20:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice2;\n int l;\n if(parcel.readInt() != 0)\n bluetoothdevice2 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice2 = null;\n l = getAudioState(bluetoothdevice2);\n parcel1.writeNoException();\n parcel1.writeInt(l);\n continue; /* Loop/switch isn't completed */\n_L21:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice1;\n boolean flag2;\n if(parcel.readInt() != 0)\n bluetoothdevice1 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice1 = null;\n flag2 = startScoUsingVirtualVoiceCall(bluetoothdevice1);\n parcel1.writeNoException();\n if(flag2)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L22:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice;\n boolean flag1;\n if(parcel.readInt() != 0)\n bluetoothdevice = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice = null;\n flag1 = stopScoUsingVirtualVoiceCall(bluetoothdevice);\n parcel1.writeNoException();\n if(flag1)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n if(true) goto _L25; else goto _L24\n_L24:\n }\n\n private static final String DESCRIPTOR = \"android.bluetooth.IBluetoothHeadset\";\n static final int TRANSACTION_acceptIncomingConnect = 13;\n static final int TRANSACTION_cancelConnectThread = 15;\n static final int TRANSACTION_connect = 1;\n static final int TRANSACTION_connectHeadsetInternal = 16;\n static final int TRANSACTION_createIncomingConnect = 12;\n static final int TRANSACTION_disconnect = 2;\n static final int TRANSACTION_disconnectHeadsetInternal = 17;\n static final int TRANSACTION_getAudioState = 19;\n static final int TRANSACTION_getBatteryUsageHint = 11;\n static final int TRANSACTION_getConnectedDevices = 3;\n static final int TRANSACTION_getConnectionState = 5;\n static final int TRANSACTION_getDevicesMatchingConnectionStates = 4;\n static final int TRANSACTION_getPriority = 7;\n static final int TRANSACTION_isAudioConnected = 10;\n static final int TRANSACTION_rejectIncomingConnect = 14;\n static final int TRANSACTION_setAudioState = 18;\n static final int TRANSACTION_setPriority = 6;\n static final int TRANSACTION_startScoUsingVirtualVoiceCall = 20;\n static final int TRANSACTION_startVoiceRecognition = 8;\n static final int TRANSACTION_stopScoUsingVirtualVoiceCall = 21;\n static final int TRANSACTION_stopVoiceRecognition = 9;\n\n public Stub() {\n attachInterface(this, \"android.bluetooth.IBluetoothHeadset\");\n }\n }\n\n\n public abstract boolean acceptIncomingConnect(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean cancelConnectThread() throws RemoteException;\n\n public abstract boolean connect(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean connectHeadsetInternal(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean createIncomingConnect(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean disconnect(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean disconnectHeadsetInternal(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract int getAudioState(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract int getBatteryUsageHint(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract List getConnectedDevices() throws RemoteException;\n\n public abstract int getConnectionState(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract List getDevicesMatchingConnectionStates(int ai[]) throws RemoteException;\n\n public abstract int getPriority(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean isAudioConnected(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean rejectIncomingConnect(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean setAudioState(BluetoothDevice bluetoothdevice, int i) throws RemoteException;\n\n public abstract boolean setPriority(BluetoothDevice bluetoothdevice, int i) throws RemoteException;\n\n public abstract boolean startScoUsingVirtualVoiceCall(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean startVoiceRecognition(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean stopScoUsingVirtualVoiceCall(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean stopVoiceRecognition(BluetoothDevice bluetoothdevice) throws RemoteException;\n}",
"public void initialisation() throws Exception{\n\t\t\t\tSystem.out.println(\"Wow much wait...\");\n\t\t\t\tBTConnection connection = Bluetooth.waitForConnection();\n\t\t\t\tif (connection == null)\n\t\t\t\t\tthrow new IOException(\"Epic fail connexion\");\n\t\t\t\tSystem.out.println(\"Wow very connexion !\");\n\t\t\t\t\n\t\t\t\t//si pas d'échec, on active les I/O bluetooth\n\t\t\t\tthis.recepteur.setInput(connection.openDataInputStream());\n\t\t\t\tthis.recepteur.setOutput(connection.openDataOutputStream());\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tthis.recepteur.getOutput().writeByte((byte)0);\n\t\t\t\t\tthis.recepteur.getOutput().flush();\n\t\t\t\t} catch (IOException e3) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te3.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t}",
"protected void setup(){\n setupRouter();\n \n if( bluetoothEnabled ){\n setupBluetooth();\n }\n }",
"public void run() {\n Log.d(\"bluetooth\", \"entrou na thread bluetoothconnect\");\n while (true) {\n try {if(mmServerSocket != null)\n socket = mmServerSocket.accept();\n\n\n } catch (IOException e) {\n break;\n }\n // If a connection was accepted\n if (socket != null) {\n // Do work to manage the connection (in a separate thread)\n //Server server = new Server(socket);\n Log.d(\"bluetooth\", \"socket não está mais null oba\");\n\n if(socket.isConnected()){\n tts.speak(\"Device connected\");\n\n }\n // Server server = new Server(socket);\n //server.initialize(handler);\n //mmServerSocket.close();\n\n\n break;\n }\n }\n }",
"public void onEncodeSerialData(StreamWriter streamWriter) {\n }",
"public boolean createConn(String sMac){\n if (null == this.mBTcomm)\n {\n this.mBTcomm = new BluetoothComm(sMac);\n if (this.mBTcomm.createConn()){\n connection = true;\n return true;\n }\n else{\n this.mBTcomm = null;\n connection = false;\n return false;\n }\n }\n else\n return true;\n }",
"private void connectToBluetoothDevice(String mac) {\n if (BluetoothAdapter.checkBluetoothAddress(mac)) {\n BluetoothDevice mBluetoothDevice = mBluetoothAdapter\n .getRemoteDevice(mac);\n mConnectThread = new ConnectThread(mBluetoothDevice);\n mConnectThread.start();\n }\n }",
"@Override\n\tpublic void connect() throws IOException {\n\t}",
"public void connectService() {\n log_d( \"connectService()\" );\n\t\t// no action if debug\n if ( BT_DEBUG_SERVICE ) {\n\t\t\ttoast_short( \"No Action in debug\" );\n \treturn;\n }\n\t\t// connect the BT device at once\n\t\t// if there is a device address. \n\t\tString address = getPrefAddress();\n\t\tif ( isPrefUseDevice() && ( address != null) && !address.equals(\"\") ) {\n\t \tBluetoothDevice device = mBluetoothAdapter.getRemoteDevice( address );\n\t \tif ( mBluetoothService != null ) {\n\t \t log_d( \"connect \" + address );\n\t \tmBluetoothService.connect( device );\n\t }\n\t\t// otherwise\n\t\t// send message for the intent of the BT device list\n\t\t} else {\n\t\t\tnotifyDeviceList();\n\t\t}\n\t}",
"public synchronized void connect(java.io.PipedReader snk) throws java.io.IOException { throw new RuntimeException(\"Stub!\"); }",
"@Override\n public void onClick(View v) {\n if (mBluetoothConnection.isConnected()) {\n mBluetoothConnection.changeState(BluetoothConnection.STATE_IMAGE_RECEIVING);\n mBluetoothConnection.write(\"open_settings\");\n buttonSettings.setEnabled(false);\n } else {\n Toast.makeText(getBaseContext(), \"Device not connected\", Toast.LENGTH_SHORT).show();\n }\n }",
"@Override\n\t\tpublic void handleMessage(Message msg) {\n\t\t\tint channel;\n\t\t\tdouble data;\n\t\t\tsuper.handleMessage(msg);\n\t\t\tswitch (msg.what) {\n\t\t\t\tcase Bluetooth.SUCCESS_CONNECT:\n\t\t\t\t\tBluetooth.connectedThread = new Bluetooth.ConnectedThread((BluetoothSocket) msg.obj);\n\t\t\t\t\tToast.makeText(getApplicationContext(), \"Conectado!\", 0).show();\n\t\t\t\t\tString s = \"successfully connected\";\n\t\t\t\t\tBluetooth.connectedThread.start();\n\t\t\t\t\tbreak;\n\t\t\t\tcase Bluetooth.MESSAGE_READ:\n\t\t\t\t\tif (!Record_Dialog_On) {\n\t\t\t\t\t\tbyte[] readBuf = (byte[]) msg.obj;\n\t\t\t\t\t\tfor (int i = 0; i < readBuf.length + cont ; i++) { //[LL]: Barrido del buffer de 1024 byte\n\t\t\t\t\t\t//\tLog.d(\"Cont.\", Integer.toString(cont));\n\t\t\t\t\t\t\tif (cont==3) {\n\t\t\t\t\t\t\t\tdata_aux[3]= (int) readBuf[i] & 0xff;\n\t\t\t\t\t\t\t\tcont=0;\n\n\t\t\t\t\t\t\tif ((data_aux[0] & 0x80) == 0x80 && (data_aux[1] & 0x80) == 0 && (data_aux[2] & 0x80) == 0 && (data_aux[3] & 0x80) == 0) {\n\t\t\t\t\t\t\t\tdata = ProcessData(data_aux); //Obtengo el valor a graficar segun el formato de los datos\n\t\t\t\t\t\t\t\tchannel = (data_aux[0] & 0x38) >> 3; //Obtengo el canal a graficar. Mascara= 0x38= 111000b\n\t\t\t\t\t\t\t\t//i = i + 3;\n\t\t\t\t\t\t\t\tif (Record == true && j < (1024 - 4)) {\n\t\t\t\t\t\t\t\t\trecording = true;\n\t\t\t\t\t\t\t\t\tif(canal_ant==-1)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif(channel==0)\n\t\t\t\t\t\t\t\t\t\t\tcanal_ant= 1;\n\t\t\t\t\t\t\t\t\t\telse if(channel==1) {\n\t\t\t\t\t\t\t\t\t\t\tcanal_ant = 0;\n\t\t\t\t\t\t\t\t\t\t\tDataWrite = DataWrite.concat(Double.toString(data_channel_0_prev) + \",\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tswitch(canal_ant) {\n\t\t\t\t\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\t\t\t\t\tif(channel==1) {\n\t\t\t\t\t\t\t\t\t\t\t\tDataWrite = DataWrite.concat(Double.toString(data) + \"\\n\");\n\t\t\t\t\t\t\t\t\t\t\t\tcanal_ant=1;\n\t\t\t\t\t\t\t\t\t\t\t\tdata_channel_1_prev= data;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\telse if(channel==0) {\n\t\t\t\t\t\t\t\t\t\t\t\tDataWrite = DataWrite.concat(Double.toString(data_channel_1_prev) + \"\\n\" + data + \",\");\n\t\t\t\t\t\t\t\t\t\t\t\tdata_channel_0_prev = data;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t\t\t\t\tif(channel==0) {\n\t\t\t\t\t\t\t\t\t\t\t\tDataWrite = DataWrite.concat(Double.toString(data) + \",\");\n\t\t\t\t\t\t\t\t\t\t\t\tcanal_ant = 0;\n\t\t\t\t\t\t\t\t\t\t\t\t//DataWrite = DataWrite.concat(Double.toString(data_channel_1_prev) + \"\\n\" + data + \",\");\n\t\t\t\t\t\t\t\t\t\t\t\tdata_channel_0_prev = data;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\telse if(channel==1) {\n\t\t\t\t\t\t\t\t\t\t\t\tDataWrite = DataWrite.concat(Double.toString(data_channel_0_prev) + \",\" + data + \"\\n\");\n\t\t\t\t\t\t\t\t\t\t\t\t//DataWrite = DataWrite.concat(Double.toString(data_channel_1_prev) + \"\\n\" + data + \",\");\n\t\t\t\t\t\t\t\t\t\t\t\tdata_channel_1_prev = data;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tj++;\n\n\t\t\t\t\t\t\t\t} else if (recording == true) {\n\t\t\t\t\t\t\t\t\tLog.d(\"com.gibio.bt_graph\", \"grabando...\");\n\t\t\t\t\t\t\t\t\tString DirToSaveType;\n\t\t\t\t\t\t\t\t\tif (FileSaveDialog.Get_m_dir().equals(\"\") == false)\n\t\t\t\t\t\t\t\t\t\tDirToSaveType = FileSaveDialog.Get_m_dir();\n\t\t\t\t\t\t\t\t\telse DirToSaveType = FileSaveDialog.Get_m_sdcardDirectory();\n\t\t\t\t\t\t\t\t\tSaveData(DataWrite, DirToSaveType, FileSaveDialog.Get_Selected_File_Name()); //Guardo los datos en un archivo\n\t\t\t\t\t\t\t\t\tDataWrite = (String) \"\";\n\t\t\t\t\t\t\t\t\t//canal_ant = -1; // -1 == ningún canal\n\n\t\t\t\t\t\t\t\t\tif (Record == false) { //[LL]: si se presionó STOP dejo de grabar\n\t\t\t\t\t\t\t\t\t\trecording = false;\n\t\t\t\t\t\t\t\t\t\tToast.makeText(getApplicationContext(), \"Grabación detenida!\", 0).show();j = 0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tj = 0;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tswitch (channel) {\n\t\t\t\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\t\t\t\tif (Sereies_0_index < 10000){ //[LL]:Esto lo puse para evitar picos en la memoria\n\t\t\t\t\t\t\t\t\t\t\tif(data!=-2097152.0 && data!=0.0 && data!=409600.0 && data!=393216.0) { //[LL]:Por un error (picos) ver como resolver\n\t\t\t\t\t\t\t\t\t\t//Notar que todos los valores que dan error son multiplos de 1024\n\t\t\t\t\t\t\t\t\t\t//393216= 0x060000 = 0000 0110 00000000 00000000\n\t\t\t\t\t\t\t\t\t\t//409600= 0x064000 = 0000 0110 01000000 00000000\n\t\t\t\t\t\t\t\t\t\t//con el protocolo: 10001000 00110010 00000000 00000000\n\n\t\t\t\t\t\t\t\t\t\t// -2097152= 0xE00000 = 1110 0000 00000000 00000000\n\n\t\t\t\t\t\t\t\t\t\tSeries_0.appendData(new GraphViewData(graph2LastXValue_0, data), AutoScrollX);\n\t\t\t\t\t\t\t\t\t\tSereies_0_index++;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tSeries_0.resetData(new GraphViewData[]{});\n\t\t\t\t\t\t\t\t\t\t\tSereies_0_index = 0;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t//X-axis control\n\t\t\t\t\t\t\t\t\t\tif (graph2LastXValue_0 >= Xview && Lock == true) {\n\t\t\t\t\t\t\t\t\t\t\tSeries_0.resetData(new GraphViewData[]{});\n\t\t\t\t\t\t\t\t\t\t\tgraph2LastXValue_0 = 0;\n\t\t\t\t\t\t\t\t\t\t} else graph2LastXValue_0 += 0.1;\n\n\t\t\t\t\t\t\t\t\t\tif (Lock == true) {\n\t\t\t\t\t\t\t\t\t\t\tgraphView_0.setViewPort(0, Xview);\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tgraphView_0.setViewPort(graph2LastXValue_0 - Xview, Xview);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t//refresh\n\t\t\t\t\t\t\t\t\t\tGraphView_0.removeView(graphView_0);\n\t\t\t\t\t\t\t\t\t\tGraphView_0.addView(graphView_0);\n\t\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t\t\t\tif (Sereies_1_index < 10000) {\n\t\t\t\t\t\t\t\t\t\tif(data!=-2097152.0 && data!=0.0 && data!=409600.0 && data!=393216.0 ) {\n\t\t\t\t\t\t\t\t\t\t//if(data!=-2097152.0 ) {\n\t\t\t\t\t\t\t\t\t\t\tSeries_1.appendData(new GraphViewData(graph2LastXValue_1, data), AutoScrollX);\n\t\t\t\t\t\t\t\t\t\t\t//Log.d(\"com.gibio.bt_graph\", \"data:\" + Double.toString(data));\n\t\t\t\t\t\t\t\t\t\t\tSereies_1_index++;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tSeries_1.resetData(new GraphViewData[]{});\n\t\t\t\t\t\t\t\t\t\t\tSereies_1_index = 0;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t//X-axis control\n\t\t\t\t\t\t\t\t\t\tif (graph2LastXValue_1 >= Xview && Lock == true) {\n\t\t\t\t\t\t\t\t\t\t\tSeries_1.resetData(new GraphViewData[]{});\n\t\t\t\t\t\t\t\t\t\t\tgraph2LastXValue_1 = 0;\n\t\t\t\t\t\t\t\t\t\t} else graph2LastXValue_1 += 0.1;\n\n\t\t\t\t\t\t\t\t\t\tif (Lock == true) {\n\t\t\t\t\t\t\t\t\t\t\tgraphView_1.setViewPort(0, Xview);\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tgraphView_1.setViewPort(graph2LastXValue_1 - Xview, Xview);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t//refresh\n\t\t\t\t\t\t\t\t\t\tGraphView_1.removeView(graphView_1);\n\t\t\t\t\t\t\t\t\t\tGraphView_1.addView(graphView_1);\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tdata_aux[cont] = (int) readBuf[i] & 0xff;\n\t\t\t\t\t\t\t\tcont++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\t\t}",
"@Override\n public void onClick(View v) {\n byte[] bytes = command.getBytes();\n\n if (sPort != null) {\n\n try {\n sPort.write(bytes, 100000);\n Log.e(LOG_TAG, \"inside write\");\n// mExecutor.submit(mSerialIoManager);\n } catch (IOException e) {\n e.printStackTrace();\n Log.e(LOG_TAG, \"Exception \" + e);\n }\n } else {\n Log.e(LOG_TAG, \"UsbSerialPort is null\");\n }\n }",
"private void setupChat() {\n chatService = new BluetoothChatService(NavigationDrawerActivity.this, mHandler);\n\n }",
"public void connect() throws IOException;",
"@Override\n public IBinder onBind(Intent intent) {\n\n AppConstants.RebootHF_reader = false;\n if (mBluetoothLeService != null) {\n final boolean result = mBluetoothLeService.connect(mDeviceAddress);\n Log.d(TAG, \"Connect request result=\" + result);\n }\n\n\n throw new UnsupportedOperationException(\"Not yet implemented\");\n }",
"@Override\n\tpublic void connect() {\n\t\t\n\t}",
"@Override\n\tpublic void connect() {\n\t\t\n\t}",
"private void setupStreams() throws IOException {\n\t\toutput = new ObjectOutputStream(Connection.getOutputStream());\n\t\toutput.flush();\n\t\tinput = new ObjectInputStream(Connection.getInputStream()); \n\t\tshowMessage(\"\\n Streams have successfully connected.\");\n\t}",
"private boolean connectReader() {\n BluetoothManager bluetoothManager = (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE);\n if (bluetoothManager == null) {\n Log.w(TAG, \"Unable to initialize BluetoothManager.\");\n updateConnectionState(BluetoothReader.STATE_DISCONNECTED);\n return false;\n }\n\n BluetoothAdapter bluetoothAdapter = bluetoothManager.getAdapter();\n if (bluetoothAdapter == null) {\n Log.w(TAG, \"Unable to obtain a BluetoothAdapter.\");\n updateConnectionState(BluetoothReader.STATE_DISCONNECTED);\n return false;\n }\n\n /*\n * Connect Device.\n */\n /* Clear old GATT connection. */\n if (mBluetoothGatt != null) {\n Log.i(TAG, \"Clear old GATT connection\");\n mBluetoothGatt.disconnect();\n mBluetoothGatt.close();\n mBluetoothGatt = null;\n }\n\n /* Create a new connection. */\n final BluetoothDevice device = bluetoothAdapter\n .getRemoteDevice(mDeviceAddress);\n\n if (device == null) {\n Log.w(TAG, \"Device not found. Unable to connect.\");\n return false;\n }\n\n /* Connect to GATT server. */\n updateConnectionState(BluetoothReader.STATE_CONNECTING);\n mBluetoothGatt = device.connectGatt(this, false, mGattCallback);\n return true;\n }",
"@Override\n\t\t\t\t\t\t\t\tpublic void onFinish() {\n\t\t\t\t\t\t\t\t\tmDelegateConnected.onConnect(false);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif (mBluetoothGatt != null) {\n\t\t\t\t\t\t\t\t\t\tmBluetoothGatt.close();\n\t\t\t\t\t\t\t\t\t\tmBluetoothGatt = null;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// Let the user launch a new connection request\n\t\t\t\t\t\t\t\t\twaitingForConnResp = false;\n\t\t\t\t\t\t\t\t}",
"public ConnectedThread(BluetoothSocket socket) {\n mmSocket = socket;\n InputStream tmpIn = null;\n OutputStream tmpOut = null;\n\n // Get the input and output streams; using temp objects because\n // member streams are final.\n try {\n tmpIn = socket.getInputStream();\n } catch (IOException e) {\n Log.e(TAG, \"Error occurred when creating input stream\", e);\n }\n try {\n tmpOut = socket.getOutputStream();\n } catch (IOException e) {\n Log.e(TAG, \"Error occurred when creating output stream\", e);\n }\n\n mmInStream = tmpIn;\n mmOutStream = tmpOut;\n }",
"private void initPairBluetoothDevice(BluetoothDevice btDevice) {\n Log.i(DEBUG.TAG, \"BTDevicesActivity - initPairBluetoothDevice - start\");\n\n try {\n Method method = btDevice.getClass().getMethod(\"createBond\", (Class[]) null);\n method.invoke(btDevice, (Object[]) null);\n } catch (Exception e) {\n }\n\n Log.i(DEBUG.TAG, \"BTDevicesActivity - initPairBluetoothDevice - start\");\n }",
"private void initPlugin() {\n if (bluetoothAdapter == null) {\n Log.e(LOG_TAG, \"Bluetooth is not supported\");\n } else {\n Log.e(LOG_TAG, \"Bluetooth is supported\");\n\n sendJS(\"javascript:cordova.plugins.BluetoothStatus.hasBT = true;\");\n\n //test if BLE supported\n if (!mcordova.getActivity().getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)) {\n Log.e(LOG_TAG, \"BluetoothLE is not supported\");\n } else {\n Log.e(LOG_TAG, \"BluetoothLE is supported\");\n sendJS(\"javascript:cordova.plugins.BluetoothStatus.hasBTLE = true;\");\n }\n \n // test if BT is connected to a headset\n \n if (bluetoothAdapter.getProfileConnectionState(BluetoothProfile.HEADSET) == BluetoothProfile.STATE_CONNECTED ) {\n Log.e(LOG_TAG, \" Bluetooth connected to headset\");\n sendJS(\"javascript:cordova.fireWindowEvent('BluetoothStatus.connected');\");\n } else {\n Log.e(LOG_TAG, \"Bluetooth is not connected to a headset \" + bluetoothAdapter.getProfileConnectionState(BluetoothProfile.HEADSET));\n }\n\n //test if BT enabled\n if (bluetoothAdapter.isEnabled()) {\n Log.e(LOG_TAG, \"Bluetooth is enabled\");\n\n sendJS(\"javascript:cordova.plugins.BluetoothStatus.BTenabled = true;\");\n sendJS(\"javascript:cordova.fireWindowEvent('BluetoothStatus.enabled');\");\n } else {\n Log.e(LOG_TAG, \"Bluetooth is not enabled\");\n }\n }\n }",
"protected void connectBluetooth(int i) {\n Intent intent = new Intent(this, MainActivity.class);\n // Try top 3 devices\n ArrayList<BluetoothDevice> devices = new ArrayList<>();\n// for (int i = 0; i < mScanResults.size() && i < 3; i++) {\n ScanInfo info = mScanResults.get(i);\n devices.add(mBtAdapter.getRemoteDevice(info.address)); //getRemoteDevice()返回相应的被指定蓝牙连接的远端设备。\n// }\n intent.putParcelableArrayListExtra(BluetoothDevice.EXTRA_DEVICE, devices);\n Log.i(TAG, \"Devices : \" + intent.putParcelableArrayListExtra(BluetoothDevice.EXTRA_DEVICE, devices));\n\n this.startActivity(intent);\n }",
"private void ensureBluetoothEnabled() {\n if (!mBluetoothAdapter.isEnabled()) {\n Intent enableBtIntent = new Intent(\n BluetoothAdapter.ACTION_REQUEST_ENABLE);\n main.startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\n } else {\n connectToBluetoothDevice(\"00:06:66:64:42:97\"); // Hard coded MAC of the BT-device.\n Log.i(tag, \"Connected to device!\");\n }\n }",
"private boolean mConnect2Device1(BluetoothDevice oDevice1){\n mStateSet(kBT_Connecting); //Connecting to a server\n if (mIsAndroidDevice(oDevice1)) {\n if (mConnect2Device_Sub(UUID_ANDROID_INSECURE, oDevice1)) {\n mStateSet(kBT_Connected1);\n mMsgLog(\"ANDROID Connected: \" +oDevice1.getName());\n oDevice=oDevice1;\n return true;\n }\n } else if (mIsClassic(oDevice1)) { // Classic bluetoot device\n if ( mConnect2Device_Sub(UUID_LMDEVICE_INSECURE, oDevice1)) {\n mStateSet(kBT_Connected1);\n mMsgLog(9,\"Classic bluetooth Connected: \" +oDevice1.getName() );\n oDevice=oDevice1;\n return true;\n }\n }\n mMsgDebug(\"Could not connect\");\n // mBTClose1();\n return false;\n}",
"public void createConnection() throws UsbGateException {\n mUsbConnection = mUsbManager.openDevice(mUsbDevice);\n if (mUsbConnection != null)\n connected = true;\n else\n throw new UsbGateException(\"Cannot get connection\");\n }",
"public synchronized void connect(PipedInputStream snk) throws IOException {\n if (snk == null) {\n throw new NullPointerException();\n } else if (sink != null || snk.connected) {\n throw new IOException(\"conn\");\n }\n sink = snk;\n snk.in = -1;\n snk.out = 0;\n snk.connected = true;\n }",
"private void openOutputStream() throws IOException {\n writer=new PrintWriter(this.sock.getOutputStream());\n }",
"public void initializeBuffers(){\r\n\t\ttry {\r\n\t\t\tif(_socket == null) {\r\n\t\t\t\t_connectedSocket = false;\r\n\t\t\t\tthrow(new IOException(\"Cannot initialize connections before socket has been initialized.\"));\r\n\t\t\t}\r\n\t\t\t// Obter printer e reader para o socket\r\n\t\t\t_out = new PrintWriter(_socket.getOutputStream(), true);\r\n\t\t\t_in = new BufferedReader(new InputStreamReader(_socket.getInputStream()));\r\n\t\t\t_outputStream = _socket.getOutputStream();\r\n\t\t\t_connected = true;\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.err.println(\"Nao se conseguiram inicializar os buffers para ler da conexao: \" + e.toString());\r\n\t\t\t_connected = false;\r\n\t\t\t//System.exit(1);\r\n\t\t}\r\n\t\r\n\r\n\t}",
"public void connect();"
] | [
"0.66810995",
"0.66583514",
"0.6359833",
"0.63234943",
"0.6301343",
"0.62944704",
"0.62620014",
"0.61716926",
"0.61547387",
"0.612556",
"0.6096746",
"0.60615903",
"0.6040675",
"0.60005844",
"0.59529746",
"0.5928129",
"0.59227383",
"0.59211767",
"0.5894187",
"0.5848558",
"0.58312225",
"0.58225167",
"0.57800716",
"0.57752377",
"0.57640535",
"0.57516986",
"0.5742517",
"0.5735055",
"0.57155573",
"0.5705755",
"0.5671328",
"0.56687117",
"0.5640306",
"0.56355625",
"0.5634568",
"0.56147605",
"0.5601759",
"0.55932385",
"0.5593138",
"0.5578832",
"0.5570667",
"0.55640256",
"0.5555508",
"0.55512303",
"0.5532788",
"0.5517744",
"0.5514176",
"0.55080557",
"0.5505275",
"0.5490959",
"0.54826254",
"0.5482048",
"0.5455194",
"0.5450008",
"0.5442696",
"0.54250824",
"0.54206866",
"0.5419791",
"0.5415885",
"0.54139423",
"0.54086715",
"0.53853047",
"0.5383369",
"0.53831035",
"0.537976",
"0.5371393",
"0.53681576",
"0.53595936",
"0.5357117",
"0.53563064",
"0.53374076",
"0.5329297",
"0.53156",
"0.5315485",
"0.53153116",
"0.53118455",
"0.529934",
"0.5298991",
"0.5298099",
"0.52776617",
"0.52768844",
"0.52706003",
"0.5264053",
"0.52599573",
"0.5257053",
"0.5257053",
"0.5247654",
"0.5246659",
"0.52308065",
"0.52241963",
"0.5221658",
"0.52155364",
"0.5213568",
"0.5197005",
"0.5184884",
"0.5184092",
"0.5174093",
"0.5172232",
"0.5167573",
"0.5160307"
] | 0.74307954 | 0 |
bluetooth send serial message | private void bluetoothSendMsg(String s) {
byte [] msgOnBuf;
msgOnBuf = s.getBytes();
try {
outStream.write(msgOnBuf);
} catch (IOException e) {
Log.d(TAG,"send message fail!");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void sendBtMsg(final String msg2send) {\n UUID uuid = UUID.fromString(\"94f39d29-7d6d-437d-973b-fba39e49d4ee\"); //Standard SerialPortService ID\n try {\n\n if (mmDevice != null) {\n mmSocket = mmDevice.createRfcommSocketToServiceRecord(uuid);\n if (!mmSocket.isConnected()) {\n try {\n mmSocket.connect();\n Handler handler = new Handler(Looper.getMainLooper());\n handler.post(new Runnable() {\n @Override\n public void run() {\n\n toastMsg(\"Connection Established\");\n\n String msg = msg2send;\n //msg += \"\\n\";\n OutputStream mmOutputStream = null;\n try {\n mmOutputStream = mmSocket.getOutputStream();\n mmOutputStream.write(msg.getBytes());\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }\n });\n\n } catch (IOException e) {\n Log.e(\"\", e.getMessage());\n mmSocket.close();\n Handler handler = new Handler(Looper.getMainLooper());\n handler.post(new Runnable() {\n @Override\n public void run() {\n toastMsg(\"Connection not Established\");\n\n\n }\n });\n\n /*try {\n Log.e(\"\", \"trying fallback\");\n mmSocket =(BluetoothSocket) mmDevice.getClass().getMethod(\"createRfcommSocket\", new Class[] {int.class}).invoke(mmDevice,1);\n mmSocket.connect();\n Log.e(\"\", \"Connected\");\n }\n catch (Exception e2){\n Log.e(\"\", \"Couldn't establish Bluetooth connection!\");\n toastMsg(\"Couldn't establish Bluetooth connection!\");\n }*/\n }\n }\n\n\n/*\n if (mmOutputStream == null)\n try {\n mmOutputStream = mmSocket.getOutputStream();\n } catch (IOException e) {\n errorExit(\"Fatal Error\", \"In onResume(), input and output stream creation failed:\" + e.getMessage() + \".\");\n }*/\n\n } else {\n if (mBluetoothAdapter != null) {\n\n\n Set<BluetoothDevice> pairedDevices = mBluetoothAdapter.getBondedDevices();\n if (pairedDevices.size() > 0) {\n for (BluetoothDevice device : pairedDevices) {\n if (device.getName().matches(\".*\")) //Note, you will need to change this to match the name of your device\n {\n Log.e(\"Aquarium\", device.getName());\n mmDevice = device;\n sendBtMsg(msg2send);\n break;\n }\n }\n }\n }\n }\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n }",
"@Override\n public void onClick(View v) {\n byte[] bytes = command.getBytes();\n\n if (sPort != null) {\n\n try {\n sPort.write(bytes, 100000);\n Log.e(LOG_TAG, \"inside write\");\n// mExecutor.submit(mSerialIoManager);\n } catch (IOException e) {\n e.printStackTrace();\n Log.e(LOG_TAG, \"Exception \" + e);\n }\n } else {\n Log.e(LOG_TAG, \"UsbSerialPort is null\");\n }\n }",
"public void write(byte[] buffer) {\n try {\n String bufferstring=\"a5550100a2\";\n // byte [] buffer03=new byte[]{(byte) 0xa5, Byte.parseByte(\"ffaa\"),0x01,0x00, (byte) 0xa2};\n byte buffer01[]=bufferstring.getBytes();\n byte [] buffer02=new byte[]{(byte) 0xa5,0x55,0x01,0x00, (byte) 0xa2};\n\n\n //for(int i=0;i<100000;i++) {\n mmOutStream.write(buffer);\n // Thread.sleep(1000);\n //}\n //\n //Share the sent message back to the UI Activity\n// mHandler.obtainMessage(BluetoothChat.MESSAGE_WRITE, -1, -1, buffer)\n// .sendToTarget();\n } catch (Exception e) {\n Log.e(TAG, \"Exception during write\", e);\n }\n }",
"public void onClickSend(View view) {\n //String string = editText.getText().toString();\n //serialPort.write(string.getBytes());\n //tvAppend(txtResponse, \"\\nData Sent : \" + string + \"\\n\");\n }",
"public void onClickSend(View view) {\n String string = editText.getText().toString();\n serialPort.write(string.getBytes());\n tvAppend(textView, \"\\nData Sent : \" + string + \"\\n\");\n\n }",
"@Override\n protected void sendBuffer(byte[] buffer) {\n final UsbSerialDriver serialDriver = serialDriverRef.get();\n if (serialDriver != null) {\n try {\n serialDriver.write(buffer, 500);\n } catch (IOException e) {\n Log.e(TAG, \"Error Sending: \" + e.getMessage(), e);\n }\n }\n }",
"private void bluetoothConnect() {\n\n btDevice = btAdapter.getRemoteDevice(EDISON_ADDRESS);\n if (btDevice == null) {\n Log.d(TAG,\"get remote device fail!\");\n finish();\n }\n\n try {\n btSocket = btDevice.createRfcommSocketToServiceRecord(SSP_UUID);\n } catch (IOException e) {\n Log.d(TAG,\"bluetooth socket create fail.\");\n }\n //save resource by cancel discovery\n btAdapter.cancelDiscovery();\n\n //connect\n try {\n btSocket.connect();\n Log.d(TAG,\"Connection established.\");\n } catch ( IOException e) {\n try {\n btSocket.close();\n }catch (IOException e2) {\n Log.d(TAG,\"unable to close socket after connect fail.\");\n }\n }\n\n //prepare outStream to send message\n try {\n outStream = btSocket.getOutputStream();\n } catch (IOException e) {\n Log.d(TAG,\"output stream init fail!\");\n }\n\n }",
"@Override\n\t\tpublic void handleMessage(Message msg) {\n\t\t\tint channel;\n\t\t\tdouble data;\n\t\t\tsuper.handleMessage(msg);\n\t\t\tswitch (msg.what) {\n\t\t\t\tcase Bluetooth.SUCCESS_CONNECT:\n\t\t\t\t\tBluetooth.connectedThread = new Bluetooth.ConnectedThread((BluetoothSocket) msg.obj);\n\t\t\t\t\tToast.makeText(getApplicationContext(), \"Conectado!\", 0).show();\n\t\t\t\t\tString s = \"successfully connected\";\n\t\t\t\t\tBluetooth.connectedThread.start();\n\t\t\t\t\tbreak;\n\t\t\t\tcase Bluetooth.MESSAGE_READ:\n\t\t\t\t\tif (!Record_Dialog_On) {\n\t\t\t\t\t\tbyte[] readBuf = (byte[]) msg.obj;\n\t\t\t\t\t\tfor (int i = 0; i < readBuf.length + cont ; i++) { //[LL]: Barrido del buffer de 1024 byte\n\t\t\t\t\t\t//\tLog.d(\"Cont.\", Integer.toString(cont));\n\t\t\t\t\t\t\tif (cont==3) {\n\t\t\t\t\t\t\t\tdata_aux[3]= (int) readBuf[i] & 0xff;\n\t\t\t\t\t\t\t\tcont=0;\n\n\t\t\t\t\t\t\tif ((data_aux[0] & 0x80) == 0x80 && (data_aux[1] & 0x80) == 0 && (data_aux[2] & 0x80) == 0 && (data_aux[3] & 0x80) == 0) {\n\t\t\t\t\t\t\t\tdata = ProcessData(data_aux); //Obtengo el valor a graficar segun el formato de los datos\n\t\t\t\t\t\t\t\tchannel = (data_aux[0] & 0x38) >> 3; //Obtengo el canal a graficar. Mascara= 0x38= 111000b\n\t\t\t\t\t\t\t\t//i = i + 3;\n\t\t\t\t\t\t\t\tif (Record == true && j < (1024 - 4)) {\n\t\t\t\t\t\t\t\t\trecording = true;\n\t\t\t\t\t\t\t\t\tif(canal_ant==-1)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif(channel==0)\n\t\t\t\t\t\t\t\t\t\t\tcanal_ant= 1;\n\t\t\t\t\t\t\t\t\t\telse if(channel==1) {\n\t\t\t\t\t\t\t\t\t\t\tcanal_ant = 0;\n\t\t\t\t\t\t\t\t\t\t\tDataWrite = DataWrite.concat(Double.toString(data_channel_0_prev) + \",\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tswitch(canal_ant) {\n\t\t\t\t\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\t\t\t\t\tif(channel==1) {\n\t\t\t\t\t\t\t\t\t\t\t\tDataWrite = DataWrite.concat(Double.toString(data) + \"\\n\");\n\t\t\t\t\t\t\t\t\t\t\t\tcanal_ant=1;\n\t\t\t\t\t\t\t\t\t\t\t\tdata_channel_1_prev= data;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\telse if(channel==0) {\n\t\t\t\t\t\t\t\t\t\t\t\tDataWrite = DataWrite.concat(Double.toString(data_channel_1_prev) + \"\\n\" + data + \",\");\n\t\t\t\t\t\t\t\t\t\t\t\tdata_channel_0_prev = data;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t\t\t\t\tif(channel==0) {\n\t\t\t\t\t\t\t\t\t\t\t\tDataWrite = DataWrite.concat(Double.toString(data) + \",\");\n\t\t\t\t\t\t\t\t\t\t\t\tcanal_ant = 0;\n\t\t\t\t\t\t\t\t\t\t\t\t//DataWrite = DataWrite.concat(Double.toString(data_channel_1_prev) + \"\\n\" + data + \",\");\n\t\t\t\t\t\t\t\t\t\t\t\tdata_channel_0_prev = data;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\telse if(channel==1) {\n\t\t\t\t\t\t\t\t\t\t\t\tDataWrite = DataWrite.concat(Double.toString(data_channel_0_prev) + \",\" + data + \"\\n\");\n\t\t\t\t\t\t\t\t\t\t\t\t//DataWrite = DataWrite.concat(Double.toString(data_channel_1_prev) + \"\\n\" + data + \",\");\n\t\t\t\t\t\t\t\t\t\t\t\tdata_channel_1_prev = data;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tj++;\n\n\t\t\t\t\t\t\t\t} else if (recording == true) {\n\t\t\t\t\t\t\t\t\tLog.d(\"com.gibio.bt_graph\", \"grabando...\");\n\t\t\t\t\t\t\t\t\tString DirToSaveType;\n\t\t\t\t\t\t\t\t\tif (FileSaveDialog.Get_m_dir().equals(\"\") == false)\n\t\t\t\t\t\t\t\t\t\tDirToSaveType = FileSaveDialog.Get_m_dir();\n\t\t\t\t\t\t\t\t\telse DirToSaveType = FileSaveDialog.Get_m_sdcardDirectory();\n\t\t\t\t\t\t\t\t\tSaveData(DataWrite, DirToSaveType, FileSaveDialog.Get_Selected_File_Name()); //Guardo los datos en un archivo\n\t\t\t\t\t\t\t\t\tDataWrite = (String) \"\";\n\t\t\t\t\t\t\t\t\t//canal_ant = -1; // -1 == ningún canal\n\n\t\t\t\t\t\t\t\t\tif (Record == false) { //[LL]: si se presionó STOP dejo de grabar\n\t\t\t\t\t\t\t\t\t\trecording = false;\n\t\t\t\t\t\t\t\t\t\tToast.makeText(getApplicationContext(), \"Grabación detenida!\", 0).show();j = 0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tj = 0;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tswitch (channel) {\n\t\t\t\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\t\t\t\tif (Sereies_0_index < 10000){ //[LL]:Esto lo puse para evitar picos en la memoria\n\t\t\t\t\t\t\t\t\t\t\tif(data!=-2097152.0 && data!=0.0 && data!=409600.0 && data!=393216.0) { //[LL]:Por un error (picos) ver como resolver\n\t\t\t\t\t\t\t\t\t\t//Notar que todos los valores que dan error son multiplos de 1024\n\t\t\t\t\t\t\t\t\t\t//393216= 0x060000 = 0000 0110 00000000 00000000\n\t\t\t\t\t\t\t\t\t\t//409600= 0x064000 = 0000 0110 01000000 00000000\n\t\t\t\t\t\t\t\t\t\t//con el protocolo: 10001000 00110010 00000000 00000000\n\n\t\t\t\t\t\t\t\t\t\t// -2097152= 0xE00000 = 1110 0000 00000000 00000000\n\n\t\t\t\t\t\t\t\t\t\tSeries_0.appendData(new GraphViewData(graph2LastXValue_0, data), AutoScrollX);\n\t\t\t\t\t\t\t\t\t\tSereies_0_index++;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tSeries_0.resetData(new GraphViewData[]{});\n\t\t\t\t\t\t\t\t\t\t\tSereies_0_index = 0;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t//X-axis control\n\t\t\t\t\t\t\t\t\t\tif (graph2LastXValue_0 >= Xview && Lock == true) {\n\t\t\t\t\t\t\t\t\t\t\tSeries_0.resetData(new GraphViewData[]{});\n\t\t\t\t\t\t\t\t\t\t\tgraph2LastXValue_0 = 0;\n\t\t\t\t\t\t\t\t\t\t} else graph2LastXValue_0 += 0.1;\n\n\t\t\t\t\t\t\t\t\t\tif (Lock == true) {\n\t\t\t\t\t\t\t\t\t\t\tgraphView_0.setViewPort(0, Xview);\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tgraphView_0.setViewPort(graph2LastXValue_0 - Xview, Xview);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t//refresh\n\t\t\t\t\t\t\t\t\t\tGraphView_0.removeView(graphView_0);\n\t\t\t\t\t\t\t\t\t\tGraphView_0.addView(graphView_0);\n\t\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t\t\t\tif (Sereies_1_index < 10000) {\n\t\t\t\t\t\t\t\t\t\tif(data!=-2097152.0 && data!=0.0 && data!=409600.0 && data!=393216.0 ) {\n\t\t\t\t\t\t\t\t\t\t//if(data!=-2097152.0 ) {\n\t\t\t\t\t\t\t\t\t\t\tSeries_1.appendData(new GraphViewData(graph2LastXValue_1, data), AutoScrollX);\n\t\t\t\t\t\t\t\t\t\t\t//Log.d(\"com.gibio.bt_graph\", \"data:\" + Double.toString(data));\n\t\t\t\t\t\t\t\t\t\t\tSereies_1_index++;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tSeries_1.resetData(new GraphViewData[]{});\n\t\t\t\t\t\t\t\t\t\t\tSereies_1_index = 0;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t//X-axis control\n\t\t\t\t\t\t\t\t\t\tif (graph2LastXValue_1 >= Xview && Lock == true) {\n\t\t\t\t\t\t\t\t\t\t\tSeries_1.resetData(new GraphViewData[]{});\n\t\t\t\t\t\t\t\t\t\t\tgraph2LastXValue_1 = 0;\n\t\t\t\t\t\t\t\t\t\t} else graph2LastXValue_1 += 0.1;\n\n\t\t\t\t\t\t\t\t\t\tif (Lock == true) {\n\t\t\t\t\t\t\t\t\t\t\tgraphView_1.setViewPort(0, Xview);\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tgraphView_1.setViewPort(graph2LastXValue_1 - Xview, Xview);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t//refresh\n\t\t\t\t\t\t\t\t\t\tGraphView_1.removeView(graphView_1);\n\t\t\t\t\t\t\t\t\t\tGraphView_1.addView(graphView_1);\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tdata_aux[cont] = (int) readBuf[i] & 0xff;\n\t\t\t\t\t\t\t\tcont++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\t\t}",
"public void onClick(View v) {\n mConnectedThread.write(\"1\"); // Send \"1\" via Bluetooth\n Toast.makeText(getBaseContext(), \"Turn on LED\", Toast.LENGTH_SHORT).show();\n }",
"public synchronized void writeToSocket(String msg) {\n try {\n bluetoothSocket.getOutputStream().println(msg);\n } catch (Exception e) {\n Log.e(TAG, General.OnWriteToSocketFailed, e);\n }\n }",
"private void bluetooth_connect_device() throws IOException\n {\n try\n {\n myBluetooth = BluetoothAdapter.getDefaultAdapter();\n address = myBluetooth.getAddress();\n pairedDevices = myBluetooth.getBondedDevices();\n if (pairedDevices.size()>0)\n {\n for(BluetoothDevice bt : pairedDevices)\n {\n address=bt.getAddress().toString();name = bt.getName().toString();\n Toast.makeText(getApplicationContext(),\"Connected\", Toast.LENGTH_SHORT).show();\n\n }\n }\n\n }\n catch(Exception we){}\n myBluetooth = BluetoothAdapter.getDefaultAdapter();//get the mobile bluetooth device\n BluetoothDevice dispositivo = myBluetooth.getRemoteDevice(address);//connects to the device's address and checks if it's available\n btSocket = dispositivo.createInsecureRfcommSocketToServiceRecord(myUUID);//create a RFCOMM (SPP) connection\n btSocket.connect();\n try { t1.setText(\"BT Name: \"+name+\"\\nBT Address: \"+address); }\n catch(Exception e){}\n }",
"public void sendBluetooth()\n {\n Intent startBluetooth = new Intent(this, Main2Activity.class);\n startActivity(startBluetooth);\n }",
"private void sendMessage(String message) {\n if (mBtService.getState() != BluetoothService.STATE_CONNECTED) {\n Toast.makeText(this, R.string.not_connected, Toast.LENGTH_SHORT).show();\n return;\n }\n\n // Check that there's actually something to send\n if (message.length() > 0) {\n // Get the message bytes and tell the BluetoothChatService to write\n byte[] send = message.getBytes();\n mBtService.write(send);\n\n // Reset out string buffer to zero and clear the edit text field\n mOutStringBuffer.setLength(0);\n }\n }",
"void bytetest() {\n byte[] myByteArray = new byte[256];\n for (int i = 0; i < 256; ++i) {\n myByteArray[i] = (byte)i;\n }\n\n Intent writeIntent = new Intent(BGXpressService.ACTION_WRITE_SERIAL_BIN_DATA);\n writeIntent.putExtra(\"value\", myByteArray);\n writeIntent.setClass(mContext, BGXpressService.class);\n writeIntent.putExtra(\"DeviceAddress\", mDeviceAddress);\n startService(writeIntent);\n }",
"public void transmit_flags(){\n BluetoothGattCharacteristic txChar = mBleService.getCharacteristic(deviceAddress, GattServices.UART_SERVICE, GattCharacteristics.TX_CHARACTERISTIC);/**---------------------------------------------------------------------------------------------------------*/\n /**\n * added to sent 1 or 2 or 3 to the bluetooth device\n */\n if(ExerciseInstructionFragment.flag==1)\n {mBleService.writeCharacteristic(deviceAddress, txChar, new byte[] {0x01});\n Log.d(TAG, \"Data sent via flex\");}\n else if(ExerciseInstructionFragment.flag==2)\n {mBleService.writeCharacteristic(deviceAddress, txChar, new byte[] {0x02});\n Log.d(TAG, \"Data sent via imu\");}\n else if(ExerciseInstructionFragment.flag==3)\n {mBleService.writeCharacteristic(deviceAddress, txChar, new byte[] {0x03});}\n\n }",
"public void connect()\n\t{\n\t\tUUID uuid = UUID.fromString(\"00001101-0000-1000-8000-00805f9b34fb\"); //Standard SerialPortService ID\n\t\ttry\n\t\t{\n\t sock = dev.createRfcommSocketToServiceRecord(uuid); \n\t sock.connect();\n\t connected = true;\n\t dev_out = sock.getOutputStream();\n\t dev_in = sock.getInputStream();\n\t write(0);\n\t write(0);\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\t\n\t\t}\n\t}",
"@Override\r\n\tpublic void onClick(View v) {\n\t\tswitch (v.getId()) {\r\n case R.id.sendd:\r\n buffer = new byte[]{'d'};\r\n if (sendMessage(buffer) == -1) {\r\n Toast.makeText(getActivity(), \"失败,请检查连接!\", Toast.LENGTH_SHORT).show();\r\n } else {\r\n Toast.makeText(getActivity(), \"正在关闭,请稍后...\", Toast.LENGTH_SHORT).show();\r\n }\r\n break;\r\n case R.id.sendz:\r\n buffer = new byte[]{'z'};\r\n if (sendMessage(buffer) == -1) {\r\n Toast.makeText(getActivity(), \"失败,请检查连接!\", Toast.LENGTH_SHORT).show();\r\n } else {\r\n Toast.makeText(getActivity(), \"正在关闭,请稍后...\", Toast.LENGTH_SHORT).show();\r\n }\r\n break;\r\n case R.id.sendrclear:\r\n byte[] a = new byte[]{60,0,0};\r\n sendR(a);\r\n break;\r\n case R.id.sendrcloud:\r\n byte[] b = new byte[]{0,2,0};\r\n sendR(b);\r\n break;\r\n\r\n case R.id.sendrcloud2:\r\n byte[] c = new byte[]{127,2,0};\r\n sendR(c);\r\n break;\r\n\r\n case R.id.sendrrain:\r\n byte[] d = new byte[]{60,1,1};\r\n sendR(d);\r\n break;\r\n\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t}",
"@Override\n public void onClick(View arg0) {\n byte[]bb= new byte[]{(byte)1,2,3};\n String sendstr = \"group1:\"+seekbartime1 + \",\" + seekbaramp1 +\"\\r\\n\";\n Boolean boolean1 = mBluetoothLeService.write(mNotifyCharacteristic,sendstr);\n\n sendstr = \"group2:\"+seekbartime2 + \",\" + seekbaramp2 +\"\\r\\n\";\n boolean1 = mBluetoothLeService.write(mNotifyCharacteristic,sendstr);\n\n sendstr = \"group3:\"+seekbartime3 + \",\" + seekbaramp3 +\"\\r\\n\";\n boolean1 = mBluetoothLeService.write(mNotifyCharacteristic,sendstr);\n\n sendstr = \"group4:\"+seekbartime4 + \",\" + seekbaramp4 +\"\\r\\n\";\n boolean1 = mBluetoothLeService.write(mNotifyCharacteristic,sendstr);\n\n\n\n SeekBaramp_1.setProgress(0);\n SeekBartime_01.setProgress(0);\n\n\n SeekBaramp_2.setProgress(0);\n SeekBartime_02.setProgress(0);\n\n SeekBaramp_3.setProgress(0);\n SeekBartime_03.setProgress(0);\n\n SeekBaramp_4.setProgress(0);\n SeekBartime_04.setProgress(0);\n\n Log.e(\"a\", \"发送UUID\"+mNotifyCharacteristic.getUuid().toString()+\"是否发送成功::\"+\"\");\n }",
"@Override\n\t\tpublic void onClick(View v) {\n\t\t\tmsgText.setText(null);\n\t\t\tsendEdit.setText(null);\n\t\t\tif(sppConnected || devAddr == null)\n\t\t\t\treturn;\n\t\t\ttry{\n\t\t\t btSocket = btAdapt.getRemoteDevice(devAddr).createRfcommSocketToServiceRecord(uuid);\n\t\t\t btSocket.connect();\n\t\t\t Log.d(tag,\"BT_Socket connect\");\n\t\t\t synchronized (MainActivity.this) {\n\t\t\t\tif(sppConnected)\n\t\t\t\t\treturn;\n\t\t\t\tbtServerSocket.close();\n\t\t\t\tbtIn = btSocket.getInputStream();\n\t\t\t\tbtOut = btSocket.getOutputStream();\n\t\t\t\tconected();\n\t\t\t}\n\t\t\t Toast.makeText(MainActivity.this,\"藍牙裝置已開啟:\" + devAddr, Toast.LENGTH_LONG).show();\n\t\t\t}catch(IOException e){\n\t\t\t\te.printStackTrace();\n\t\t\t\tsppConnected =false;\n\t\t\t\ttry{\n\t\t\t\t\tbtSocket.close();\n\t\t\t\t}catch(IOException e1){\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\tbtSocket = null;\n\t\t\t\tToast.makeText(MainActivity.this, \"連接異常\", Toast.LENGTH_SHORT).show();\n\t\t\t}\n\t\t}",
"public void sendClick(View view) {\n String message = input.getText().toString();\n uart.send(message);\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n setContentView(R.layout.activity_main);\n btnOn = findViewById(R.id.bluetoothStart); // кнопка включения\n btnOff = findViewById(R.id.bluetoothStop); // кнопка выключения\n statusText = findViewById(R.id.statusBluetooth); // для вывода текста, полученного\n btState = findViewById(R.id.bluetoothIm);\n workState = findViewById(R.id.workStatIm);\n\n h = new Handler() {\n public void handleMessage(android.os.Message msg) {\n switch (msg.what) {\n case RECIEVE_MESSAGE:\n statusText.setText(\"msg\");// если приняли сообщение в Handler\n byte[] readBuf = (byte[]) msg.obj;\n String strIncom = new String(readBuf, 0, msg.arg1);\n sb.append(strIncom); // формируем строку\n int endOfLineIndex = sb.indexOf(\"\\r\\n\"); // определяем символы конца строки\n if (endOfLineIndex > 0) { // если встречаем конец строки,\n String sbprint = sb.substring(0, endOfLineIndex); // то извлекаем строку\n sb.delete(0, sb.length()); // и очищаем sb\n statusText.setText(\"Ответ от датчика: \" + sbprint); // обновляем TextView\n String[] step_data = sbprint.split(\" \");\n writeFile(step_data[0]);\n writeFile(\";\");\n writeFile(step_data[1]);\n writeFile(\";\");\n writeFile(step_data[2]);\n writeFile(\";\\n\");\n btnOff.setEnabled(true);\n btnOn.setEnabled(true);\n }\n //Log.d(TAG, \"...Строка:\"+ sb.toString() + \"Байт:\" + msg.arg1 + \"...\");\n break;\n }\n };\n };\n\n btAdapter = BluetoothAdapter.getDefaultAdapter(); // получаем локальный Bluetooth адаптер\n\n if (btAdapter.isEnabled()) {\n SharedPreferences prefs_btdev = getSharedPreferences(\"btdev\", 0);\n String btdevaddr=prefs_btdev.getString(\"btdevaddr\",\"?\");\n\n if (btdevaddr != \"?\") {\n BluetoothDevice device = btAdapter.getRemoteDevice(btdevaddr);\n UUID SERIAL_UUID = UUID.fromString(\"0000f00d-1212-afde-1523-785fef13d123\"); // bluetooth serial port service\n //UUID SERIAL_UUID = device.getUuids()[0].getUuid(); //if you don't know the UUID of the bluetooth device service, you can get it like this from android cache\n try {\n btSocket = device.createRfcommSocketToServiceRecord(SERIAL_UUID);\n } catch (Exception e) {\n Log.e(\"\",\"Error creating socket\");\n }\n\n try {\n btSocket.connect();\n Log.e(\"\",\"Connected\");\n } catch (IOException e) {\n Log.e(\"\",e.getMessage());\n try {\n Log.e(\"\",\"trying fallback...\");\n btSocket =(BluetoothSocket) device.getClass().getMethod(\"createRfcommSocket\", new Class[] {int.class}).invoke(device,1);\n btSocket.connect();\n Log.e(\"\",\"Connected\");\n } catch (Exception e2) {\n Log.e(\"\", \"Couldn't establish Bluetooth connection!\");\n }\n }\n } else {\n Log.e(\"\",\"BT device not selected\");\n }\n }\n\n checkBTState();\n\n btnOn.setOnClickListener(new OnClickListener() { // определяем обработчик при нажатии на кнопку\n public void onClick(View v) {\n //btnOn.setEnabled(false);\n workState.setImageResource(R.drawable.ic_action_work_on);\n mConnectedThread.run();\n // TODO start writing in file\n }\n });\n\n btnOff.setOnClickListener(new OnClickListener() {\n public void onClick(View v) {\n //btnOff.setEnabled(false);\n workState.setImageResource(R.drawable.ic_action_work_off);\n mConnectedThread.cancel();\n // TODO stop writing in file\n }\n });\n }",
"static public void startSending(String add,int port,byte[] data,int mode){\n }",
"native int _writeSerialPort(int port, byte data[]);",
"@Override\r\n public void onCreate() {\n intent = new Intent(BROADCAST_ACTION);\r\n startBTService();\r\n// try{\r\n// mConnectedThread.write(\"2\".getBytes());\r\n// }catch(Exception e){\r\n//\r\n// }\r\n }",
"@Override\n\t\tpublic void handleMessage(Message msg) {\n\t\t\tsuper.handleMessage(msg);\n\t\t\tswitch(msg.what){\n\t\t\tcase Bluetooth.SUCCESS_CONNECT:\n\t\t\t\tBluetooth.connectedThread = new Bluetooth.ConnectedThread((BluetoothSocket)msg.obj);\n\t\t\t\tToast.makeText(getApplicationContext(), \"Connected!\", Toast.LENGTH_SHORT).show();\n\t\t\t\tString s = \"successfully connected\";\n\t\t\t\tBluetooth.connectedThread.start();\n\t\t\t\tbreak;\n\t\t\tcase Bluetooth.MESSAGE_READ:\n\n\t\t\t\tbyte[] readBuf = (byte[]) msg.obj;\n\t\t\t\tString strIncom = new String(readBuf, 0, 5); // create string from bytes array\n\n\t\t\t\tLog.d(\"strIncom\", strIncom);\n\t\t\t\tif (strIncom.indexOf('.')==2 && strIncom.indexOf('s')==0){\n\t\t\t\t\tstrIncom = strIncom.replace(\"s\", \"\");\n\t\t\t\t\tif (isFloatNumber(strIncom)){\n\t\t\t\t\t\tSeries.appendData(new GraphViewData(graph2LastXValue, Double.parseDouble(strIncom)), AutoScrollX);\n\n\n Count++;//算次數\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n Date dt=new Date();\n String dts=sdf.format(dt);\n DBdata+=\"(' \" + dts + \" ' , ' \" + Double.parseDouble(strIncom)*512 + \" ' ),\";\n\n\n if(Count==20)\n {\n\t\t\t\t\t\t\t//Bluetooth.connectedThread.write(\"Q\");\n Count=0;\n String i = \"\";\n //DBdata = DBdata.substring(0,DBdata.length()-1);\n //DBdata += \";\";\n //i = DBconnect.db(DBdata);\n //Bluetooth.connectedThread.write(\"E\");\n //DBdata = \"INSERT INTO light VALUES\" ;\n }\n\n\n\t\t\t\t\t\t//X-axis control\n\t\t\t\t\t\tif (graph2LastXValue >= Xview && Lock == true){\n\t\t\t\t\t\t\tSeries.resetData(new GraphViewData[] {});\n\t\t\t\t\t\t\tgraph2LastXValue = 0;\n\t\t\t\t\t\t}else graph2LastXValue += 0.1;\n\n\t\t\t\t\t\tif(Lock == true)\n\t\t\t\t\t\t\tgraphView.setViewPort(0, Xview);\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tgraphView.setViewPort(graph2LastXValue-Xview, Xview);\n\n\t\t\t\t\t\t//refresh\n\t\t\t\t\t\tGraphView.removeView(graphView);\n\t\t\t\t\t\tGraphView.addView(graphView);\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"void beginSendData(){\n stopSendThread = false;\n final Thread thread = new Thread(new Runnable() {\n\n public void run() {\n while(!Thread.currentThread().isInterrupted() && !stopSendThread){\n try{\n try {\n Thread.currentThread().sleep(100);\n\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n String string = \":1\" + (char)speedLeft + (char)speedRight + \"@\";\n try {\n os.write(string.getBytes());\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n } catch (Exception e){\n e.printStackTrace();\n stopSendThread = true;\n }\n\n\n }\n\n }\n });\n thread.start();\n System.out.println(\"koniec funkcji startsend\");\n }",
"private void sendConfiguration() {\r\n if (currentBluetoothGatt == null) {\r\n Toast.makeText(this, \"Non Connecté\", Toast.LENGTH_SHORT).show();\r\n return;\r\n }\r\n\r\n /*EditText ledGPIOPin = findViewById(R.id.editTextPin);\r\n EditText buttonGPIOPin = findViewById(R.id.editTextPin);\r\n final String pinLed = ledGPIOPin.getText().toString();\r\n final String pinButton = buttonGPIOPin.getText().toString();\r\n\r\n final BluetoothGattService service = currentBluetoothGatt.getService(BluetoothLEManager.DEVICE_UUID);\r\n if (service == null) {\r\n Toast.makeText(this, \"UUID Introuvable\", Toast.LENGTH_SHORT).show();\r\n return;\r\n }\r\n\r\n final BluetoothGattCharacteristic buttonCharact = service.getCharacteristic(BluetoothLEManager.CHARACTERISTIC_BUTTON_PIN_UUID);\r\n final BluetoothGattCharacteristic ledCharact = service.getCharacteristic(BluetoothLEManager.CHARACTERISTIC_LED_PIN_UUID);\r\n\r\n buttonCharact.setValue(pinButton);\r\n ledCharact.setValue(pinLed);\r\n\r\n currentBluetoothGatt.writeCharacteristic(buttonCharact); // async code, you cannot send 2 characteristics at the same time!\r\n charsStack.add(ledCharact); // stack the next write*/\r\n }",
"public void openBluetooth() throws IOException {\n UUID uuid = UUID.fromString(\"00001101-0000-1000-8000-00805f9b34fb\"); //Standard SerialPortService ID\n mmSocket = mmDevice.createRfcommSocketToServiceRecord(uuid);\n mmSocket.connect();\n mmOutputStream = mmSocket.getOutputStream();\n mmInputStream = mmSocket.getInputStream();\n\n beginListenForData();\n\n btStatusDisplay.setText(\"Bluetooth Connection Opened\");\n }",
"public void onClick(DialogInterface dialog, int whichButton) {\n userNameEditTextValue = edittext.getText().toString() + \"\\n\";\n\n byte[] bytes = userNameEditTextValue.getBytes();\n\n if (sPort != null) {\n\n try {\n sPort.write(bytes, 1000);\n Log.e(LOG_TAG, \"inside write\");\n// mExecutor.submit(mSerialIoManager);\n } catch (IOException e) {\n e.printStackTrace();\n Log.e(LOG_TAG, \"Exception \" + e);\n }\n } else {\n Log.e(LOG_TAG, \"UsbSerialPort is null\");\n }\n\n }",
"public void Send_To_Arduino()\n{\n float[] toSend = new float[6];\n\n toSend[0] = PApplet.parseFloat(SPField.getText());\n toSend[1] = PApplet.parseFloat(InField.getText());\n toSend[2] = PApplet.parseFloat(OutField.getText());\n toSend[3] = PApplet.parseFloat(PField.getText());\n toSend[4] = PApplet.parseFloat(IField.getText());\n toSend[5] = PApplet.parseFloat(DField.getText());\n Byte a = (AMLabel.valueLabel().getText()==\"Manual\")?(byte)0:(byte)1;\n Byte d = (DRLabel.valueLabel().getText()==\"Direct\")?(byte)0:(byte)1;\n myPort.write(a);\n myPort.write(d);\n myPort.write(floatArrayToByteArray(toSend));\n justSent=true;\n}",
"private void sendMessage(String message) {\n\t\t// Check that we're actually connected before trying anything\n\t\tif (mChatService.getState() != BluetoothCommService.STATE_CONNECTED) {\n\t\t\tToast.makeText(this, R.string.not_connected, Toast.LENGTH_SHORT)\n\t\t\t\t\t.show();\n\t\t\treturn;\n\t\t}\n\n\t\t// Check that there's actually something to send\n\t\tif (message.length() > 0) {\n\t\t\t// Get the message bytes and tell the BluetoothCommService to write\n\t\t\tbyte[] send = message.getBytes();\n\t\t\tmChatService.write(send);\n\n\t\t\t// Reset out string buffer to zero and clear the edit text field\n\t\t\tmOutStringBuffer.setLength(0);\n\t\t\t// mOutEditText.setText(mOutStringBuffer);\n\t\t}\n\t}",
"private void writeKeyPressed(String key){\r\n if(btSocket == null || isBtConnected){\r\n\r\n try {\r\n OutputStream btSocketOutputStream = btSocket.getOutputStream();\r\n char charToWrite='0';\r\n switch (key){\r\n case \"txt_1\":\r\n charToWrite='A';\r\n break;\r\n case \"txt_2\":\r\n charToWrite='B';\r\n break;\r\n case \"txt_3\":\r\n charToWrite='C';\r\n break;\r\n case \"txt_4\":\r\n charToWrite='D';\r\n break;\r\n\r\n }\r\n btSocketOutputStream.write((byte)charToWrite);\r\n btSocketOutputStream.flush();\r\n Log.e(\"Output\",key);\r\n\r\n } catch (IOException e) {\r\n Log.e(\"ERROR\",e.getMessage(),e);\r\n }\r\n\r\n }\r\n\r\n }",
"@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tmConnectedThread.write(\"send\");\n\t\t\t\t\tmConnectedThread.writeFile();\n\t\t\t\t}",
"public void send0(){\n digitalWrite(data0, LOW);\n delayMicroseconds(34);\n digitalWrite(data0, HIGH);\n}",
"private void sendMessage(String message) {\n if (mChatService.getState() != BluetoothChatService.STATE_CONNECTED) {\n // Toast.makeText(this, R.string.not_connected, Toast.LENGTH_SHORT).show();\n return;\n }\n\n if (message.length() > 0) {\n byte[] send = message.getBytes();\n mChatService.write(send);\n mOutStringBuffer.setLength(0);\n\n }\n }",
"public void sendSignal (String signal, String message ){\r\n if (btSocket != null)\r\n {\r\n try{\r\n btSocket.getOutputStream().write(signal.getBytes());\r\n msg(message,0);\r\n } catch (IOException e) {\r\n msg(\"Error\", 0);\r\n }\r\n }\r\n\r\n }",
"public void onClick(DialogInterface dialog, int whichButton) {\n passwordEditTextValue = edittext.getText().toString() + \"\\n\";\n\n byte[] bytes = passwordEditTextValue.getBytes();\n\n if (sPort != null) {\n\n try {\n sPort.write(bytes, 1000);\n Log.e(LOG_TAG, \"inside write\");\n// mExecutor.submit(mSerialIoManager);\n } catch (IOException e) {\n e.printStackTrace();\n Log.e(LOG_TAG, \"Exception \" + e);\n }\n } else {\n Log.e(LOG_TAG, \"UsbSerialPort is null\");\n }\n }",
"public void connect_bt(String deviceAddress) {\n Intent intent = new Intent(\"OBDStatus\");\n intent.putExtra(\"message\", \"Trying to connect with device\");\n context.sendBroadcast(intent);\n disconnect();\n BluetoothAdapter btAdapter = BluetoothAdapter.getDefaultAdapter();\n btAdapter.cancelDiscovery();\n if (deviceAddress == null || deviceAddress.isEmpty()) {\n intent.putExtra(\"message\", \"Device not found\");\n context.sendBroadcast(intent);\n return;\n }\n\n if (!btAdapter.isEnabled()) {\n intent.putExtra(\"message\", \"Bluetooth is disabled\");\n context.sendBroadcast(intent);\n return;\n }\n\n BluetoothDevice device = btAdapter.getRemoteDevice(deviceAddress);\n\n UUID uuid = UUID.fromString(\"00001101-0000-1000-8000-00805F9B34FB\");\n\n try {\n socket = device.createInsecureRfcommSocketToServiceRecord(uuid);\n socket.connect();\n isConnected = true;\n intent.putExtra(\"message\", \"OBD connected\");\n context.sendBroadcast(intent);\n } catch (IOException e) {\n Log.e(\"gping2\", \"There was an error while establishing Bluetooth connection. Falling back..\", e);\n Class<?> clazz = socket.getRemoteDevice().getClass();\n Class<?>[] paramTypes = new Class<?>[]{Integer.TYPE};\n BluetoothSocket sockFallback = null;\n try {\n Method m = clazz.getMethod(\"createInsecureRfcommSocket\", paramTypes);\n Object[] params = new Object[]{Integer.valueOf(1)};\n sockFallback = (BluetoothSocket) m.invoke(socket.getRemoteDevice(), params);\n sockFallback.connect();\n isConnected = true;\n socket = sockFallback;\n intent.putExtra(\"message\", \"OBD connected\");\n context.sendBroadcast(intent);\n } catch (Exception e2) {\n intent.putExtra(\"message\", \"OBD Connection error\");\n context.sendBroadcast(intent);\n Log.e(\"gping2\", \"BT connect error\");\n }\n }\n this.deviceAddress = deviceAddress;\n saveNewAddress();\n }",
"public void Send3bytes(int comm, int data, int more) { // in {FF} Arduino\r\n int info = data & 127;\r\n boolean logy = ((SpokeHard & 0xFFFF) < SpeakHard)\r\n || LogAllPcnts && (comm == REPORT_PULSECOUNT); // = 0xA0;\r\n byte[] msg = new byte[3];\r\n SpokeHard++;\r\n if (more < 0){\r\n more = (data >> 7) & 127;\r\n if (logy) System.out.println(\"F%%F/Send3by \" + comm + \" \" + data\r\n + \" .. => \" + info + \" \" + more + FormatMillis(\" @ \", 0x80000000));\r\n data = info;\r\n } else if (logy){\r\n System.out.println(\"F%%F/Send3by \" + comm + \" \" + data + \" \" + more +\r\n FormatMillis(\" @ \", 0x80000000));\r\n }\r\n if (comm < 128){\r\n return;\r\n } // not a valid command byte..\r\n if (comm > 255){\r\n return;\r\n }\r\n more = more & 127;\r\n data = info;\r\n msg[0] = (byte) (comm);\r\n msg[1] = (byte) (data);\r\n msg[2] = (byte) (more);\r\n try {\r\n surrealPort.writeBytes(msg);\r\n if (DoMore != null) DoMore.SendBytes(msg, 3);\r\n } catch (Exception ex) {\r\n System.out.println(ex);\r\n }\r\n }",
"void sendData(String msg) throws IOException\n {\n if ( msg.length() == 0 ) return;\n//\n msg += \"\\n\";\n// Log.d(msg, msg);\n if (outputStream != null)\n outputStream.write(msg.getBytes());\n// myLabel.setText(\"Data Sent\");\n// myTextbox.setText(\" \");\n }",
"public void write(String input) {\n byte[] msgBuffer = input.getBytes(); //converts entered String into bytes\n try {\n mmOutStream.write(msgBuffer); //write bytes over BT connection via outstream\n } catch (IOException e) {\n //if you cannot write, close the application\n Toast.makeText(getBaseContext(), \"Connection Failure\", Toast.LENGTH_LONG).show();\n finish();\n }\n }",
"private void writeCommandToSerial(final String command) throws SerialPortException {\n if( null == serialPort || !serialPort.isOpened()) {\n openSerial();\n }\n\n if( !serialPort.isOpened()) {\n openSerial();\n }\n\n LOGGER.info(command.toString());\n serialPort.writeString(command.toString());\n }",
"private void handleMessageBluetooth(Message msg) {\n\t\tToaster.doToastShort(context, \"Handle Bluetooth Mesage\");\n\t}",
"void sendData(String request) throws IOException {\n if (mmDevice == null) {\n Log.d(TAG, \"No device set\");\n }\n\n Log.d(TAG, \"Request is \" + request);\n if (mmOutputStream != null){\n mmOutputStream.write(request.getBytes(Charset.forName(\"UTF-8\")));\n }\n\n if (false && request.contains(\"travel\")) {\n closeBT();\n openBT();\n }\n }",
"@Override public void handleMessage(Message msg) {\n super.handleMessage(msg);\n byte[] byteArray = (byte[]) msg.obj;\n int length = msg.arg1;\n byte[] resultArray = length == -1 ? byteArray : new byte[length];\n for (int i = 0; i < byteArray.length && i < length; ++i) {\n resultArray[i] = byteArray[i];\n }\n String text = new String(resultArray, StandardCharsets.UTF_8);\n if (msg.what == BluetoothTalker.MessageConstants.MESSAGE_WRITE) {\n Log.i(TAG, \"we just wrote... [\" + length + \"] '\" + text + \"'\");\n// mIncomingMsgs.onNext(text);\n } else if (msg.what == BluetoothTalker.MessageConstants.MESSAGE_READ) {\n Log.i(TAG, \"we just read... [\" + length + \"] '\" + text + \"'\");\n Log.i(TAG, \" >>r \" + Arrays.toString((byte[]) msg.obj));\n mIncomingMsgs.onNext(text);\n sendMsg(\"I heard you : \" + Math.random() + \"!\");\n// mReadTxt.setText(++ri + \"] \" + text);\n// if (mServerBound && mServerService.isConnected()) {\n// mServerService.sendMsg(\"I heard you : \" + Math.random() + \"!\");\n// } else if (mClientBound && mClientService.isConnected()) {\n// mClientService.sendMsg(\"I heard you : \" + Math.random() + \"!\");\n// }\n// mBluetoothStuff.mTalker.write();\n }\n }",
"public void sendTurno() throws RemoteException, InterruptedException, IOException ;",
"public synchronized byte[] sendMessage(byte[] strReq)\n\t{\n\t\tbyte[] response = null;\n\t\ttry\n\t\t{\n ezlink.info(\"--------os--------:\" + os.toString());\n\t\t\tSystem.out.println(\"Writing data=\"+ISOUtil.hexString(strReq,0,strReq.length)+\" Length : \"+strReq.length);\n ezlink.info(\"sendMessage() : Writing data= : \"+ISOUtil.hexString(strReq,0,strReq.length) );\n\t\t\tos.write(strReq);\n\t\t\tresponse = read();\n\t\t\tSystem.out.println(\"Data Received=\"+response);\n ezlink.info(\"sendMessage() : Data Received= : \"+response );\n \n\t\t}catch(Exception e){\n System.out.println(\"++++CONNECTION PROBLEM -PLEASE CHECK TERMINAL CONNECTION+++++++++++++++++++++++++++++++++++\");\n System.out.println(\"SerialConnection : sendMessage() - Exception:\"+e);\n e.printStackTrace();\n ezlink.info(\"++++++++++++CONNECTION PROBLEM -PLEASE CHECK TERMINAL CONNECTION++++++++++++++++ \");\n ezlink.info(\"SerialConnection : sendMessage() - Exception: \");\n ezlink.error(new Object(), e);\n }\n\t\treturn response;\n\t}",
"public void sendToArduino(char flag, String[] data) {\n\t\t// Uncomment for logging\n\t\t// StringBuffer dataString = new StringBuffer();\n\t\t// for (int i = 0; i < data.length; i++) {\n\t\t// dataString.append(data[i]);\n\t\t// if (i < data.length - 1) {\n\t\t// dataString = dataString.append(\",\");\n\t\t// }\n\t\t// }\n\t\t// RoboLog.log(mService, \"Send data to Robot \" + mName + \": Flag: \" +\n\t\t// flag + \" Data: \"\n\t\t// + dataString, false);\n\t\tAmarino.sendDataToArduino(mService, mAddress, flag, data);\n\t}",
"public void ArduinoConnection() \n {\n //variables para la identificacion del puerto y poder hacer la conexion\n CommPortIdentifier portId = null;\n Enumeration portEnum = CommPortIdentifier.getPortIdentifiers();\n\n //Ciclo para mandar todos los elementos, es decir, aqui se mandara por el puerto los caracteres del mensaje\n while (portEnum.hasMoreElements()) \n {\n CommPortIdentifier currPortId = (CommPortIdentifier) portEnum.nextElement();\n \n //comprobamos si hay algo\n if (PORT_NAME.equals(currPortId.getName())) \n {\n portId = currPortId;\n break;\n }\n }\n\n if (portId == null) \n {\n\n System.exit(ERROR);\n return;\n }\n\n try \n {\n \n serialPort = (SerialPort) portId.open(this.getClass().getName(), TIME_OUT);\n\n serialPort.setSerialPortParams(DATA_RATE,\n SerialPort.DATABITS_8,\n SerialPort.STOPBITS_1,\n SerialPort.PARITY_NONE);\n\n Output = serialPort.getOutputStream();\n\n } catch (Exception e) {\n\n System.exit(ERROR);\n }\n\n }",
"public void startConnection(){\n startBTConnection(mBTDevice,MY_UUID_INSECURE);\n }",
"void send(ByteBuffer data, Address addr) throws CCommException, IllegalStateException;",
"@Override\r\n public void handleMessage(Message msg) {\n super.handleMessage(msg);\r\n switch(msg.what){\r\n case baglanti:\r\n\r\n ConnectedThread connectedThread = new ConnectedThread((BluetoothSocket)msg.obj);\r\n Toast.makeText(getApplicationContext(), \"Baglandi\",Toast.LENGTH_LONG).show();\r\n String s = \"successfully connected\";\r\n break;\r\n case mesajoku:\r\n byte[] readBuf = (byte[])msg.obj;\r\n String string = new String(readBuf);\r\n Toast.makeText(getApplicationContext(), string, Toast.LENGTH_LONG).show();\r\n break;\r\n }\r\n }",
"public boolean enviarDatosArduino(String datosParaEnviar, Context mContext) {\n\n boolean statusSend = false;\n\n byte[] msgBuffer = datosParaEnviar.getBytes();\n\n try {\n mmOutStream.write(msgBuffer);\n\n statusSend = true;\n\n } catch (IOException e) {\n\n // Constant.editor = Constant.spSettings.edit();\n\n //Constant.editor.putString(\"methodConnect\", \"\");\n //Constant.editor.putString(\"ConnectDeviceBT\", \"OFF\");\n //Constant.editor.putString(\"macDeviceBT\", \"\");\n // Constant.editor.putString(\"nameDeviceBT\", \"\");\n\n // Constant.editor.commit();\n\n // mContext.stopService(new Intent(mContext, ServiceQueryLevelGas.class));\n\n Intent i = new Intent(mContext, Principal.class);\n i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n mContext.startActivity(i);\n\n Toast.makeText(mContext,\"Se ha producido perdida de comunicación.\", Toast.LENGTH_LONG).show();\n\n Log.e(\"mensaje\", \"detalle error: \" + e);\n\n statusSend = false;\n }\n\n return statusSend;\n }",
"public void sendDataToAMQ(){\n\t\t\r\n\t\tList<String> msg = new ArrayList<>();\r\n\t\tif(offsetfollower < (prototype.followerDrivingInfo.meetingLocation - 500)) {\r\n\t\t\toffsetleader += prototype.leaderDrivingInfo.speed;\r\n\t\t\toffsetfollower += prototype.followerDrivingInfo.speed;\r\n\t\t\tmsg.add(\"<carName TestCar carName> <segmentPosX -4 segmentPosX> <segmentPosY \"+ (+offsetleader) +\" segmentPosY> <carSpeed \" + (prototype.leaderDrivingInfo.speed)+\" carSpeed>\");\r\n\t\t\tmsg.add(\"<carName Camcar carName> <segmentPosX -4 segmentPosX> <segmentPosY \"+ (offsetfollower) +\" segmentPosY> <carSpeed \" + (prototype.followerDrivingInfo.speed)+\" carSpeed>\");\t\r\n\r\n\t\t}\r\n\t\telse {\r\n\t\t\toffsetleader += prototype.leaderDrivingInfo.speed;\r\n\t\t\toffsetfollower += prototype.leaderDrivingInfo.speed ;\r\n\t\t\tmsg.add(\"<carName TestCar carName> <segmentPosX -4 segmentPosX> <segmentPosY \"+ (+offsetleader) +\" segmentPosY> <carSpeed \" + (prototype.leaderDrivingInfo.speed)+\" carSpeed>\");\t\r\n\t\t\tmsg.add(\"<carName Camcar carName> <segmentPosX -4 segmentPosX> <segmentPosY \"+ (offsetfollower) +\" segmentPosY> <carSpeed \" + (prototype.leaderDrivingInfo.speed)+\" carSpeed>\");\r\n\r\n\t\t}\r\n for(int i = 0; i < msg.size();i++)\r\n {\r\n \tamqp.sendMessage(msg.get(i));\r\n }\r\n// \t}\r\n }",
"public boolean sendBLEString(final String patt, final int sendBLEChar) //BLEDevice.BLE_SEND_STRAND_CHARACTERISTIC\n {\n if ( isConnected() )\n {\n return currentBLEDevice.sendBLEString(patt, sendBLEChar);\n }\n Toolbox.toast(getContext(), \"Device not ready to send commands\");\n return false;\n }",
"public static void sendMessage(String message) {\r\n\t\tbtService.write(message.getBytes());\r\n\t}",
"private void sendData(String data) {\n\t\t\ttry {\n\t\t\t\tSystem.out.println(\"Sending data: '\" + data + \"'\");\n\n\t\t\t\t// open the streams and send the \"y\" character\n\t\t\t\toutput = serialPort.getOutputStream();\n\t\t\t\toutput.write(data.getBytes());\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.err.println(e.toString());\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\n\t\t}",
"public void Enviar_String_Bluetooth(String datos)\n {\n if (Bluetooth_Conectado == true && Bluetooth_Encendido == true)\n {\n conexionBluetooth.enviar_string(datos);\n }\n }",
"public void callSetCmd(){\n if(spinCmdValue.getSelectedItem().toString().equals(\"Select Value\")){\n Toast.makeText(getApplicationContext(),\"Please select value\",Toast.LENGTH_SHORT).show();\n return;\n }\n int floorNo = Integer.valueOf(String.valueOf(spinCmd.getSelectedItemPosition()));\n int a1 = 18;\n int a2 = 17;\n int a3 = 112;\n int a4 = 240 + floorNo;\n int a5 = Integer.parseInt(spinCmdValue.getSelectedItem().toString());\n int a6 = 00;\n\n int[] sendValChkSum = {a1, a2, a3, a4, a5, a6};\n String strChkSum = CalculateCheckSum.calculateChkSum(sendValChkSum);\n String asciiString = String.format(\"%04x\", a1).substring(2, 4) + String.format(\"%04x\", a2).substring(2, 4) + String.format(\"%04x\", a3).substring(2, 4) + String.format(\"%04x\", a4).substring(2, 4) + String.format(\"%04x\", a5).substring(2, 4) + String.format(\"%04x\", a6).substring(2, 4);\n asciiString = asciiString + strChkSum + \"\\r\";\n// Log.e(TAG, \"asciiString = \" + asciiString);\n\n if (isConnected()) {\n sendMessage(asciiString.getBytes());\n } else {\n Toast.makeText(getApplicationContext(), \"Connect to the device\", Toast.LENGTH_SHORT).show();\n }\n\n }",
"void send(ByteBuffer data) throws CCommException, IllegalStateException;",
"int libusb_control_transfer(DeviceHandle dev_handle, short bmRequestType, short bRequest, int wValue, int wIndex,\r\n String data, int wLength, int timeout);",
"void onCloseBleComplete();",
"public void sendPartita(Partita partita) throws InterruptedException, RemoteException, IOException;",
"public void authenticate(View view) {\n String value = makeXor(xorNum.getBytes(), key.getBytes());\n\n if(socket.isConnected()){\n try {\n socket.getOutputStream().write(value.getBytes());\n socket.getOutputStream().flush();\n Toast.makeText(ControlActivity.this, \"Message Sent\", Toast.LENGTH_SHORT).show();\n } catch (IOException e) {\n e.printStackTrace();\n Toast.makeText(ControlActivity.this, \"Error in sending message\", Toast.LENGTH_SHORT).show();\n }\n }else{\n Toast.makeText(ControlActivity.this, \"Bluetooth connection lost!\", Toast.LENGTH_SHORT).show();\n }\n\n\n }",
"void transmit(String protocol, String message);",
"public void sendToArduino(char flag, int[] data) {\n\t\t// Uncomment for logging\n\t\t// StringBuffer dataString = new StringBuffer();\n\t\t// for (int i = 0; i < data.length; i++) {\n\t\t// dataString.append(Integer.toString(data[i]));\n\t\t// if (i < data.length - 1) {\n\t\t// dataString.append(\",\");\n\t\t// }\n\t\t// }\n\t\t// RoboLog.log(mService, \"Send data to Robot \" + mName + \": Flag: \" +\n\t\t// flag + \" Data: \"\n\t\t// + dataString, false);\n\t\tAmarino.sendDataToArduino(mService, mAddress, flag, data);\n\t}",
"@Override\n\t\t\tpublic void handleMessage(Message msg) {\n\t\t\t\tprocessBluetoothDeviceMessage(msg);\n\t\t\t}",
"SerialResponse transfer(PinTransferPost pinTransferPost);",
"public final void setSerial(String serial){\n this.peripheralSerial = serial;\n }",
"public void sendToArduino(char flag, String data) {\n\t\t// Uncomment for logging\n\t\t// RoboLog.log(mService, \"Send data to Robot \" + mName + \": Flag: \" +\n\t\t// flag + \" Data: \" + data,\n\t\t// false);\n\t\tAmarino.sendDataToArduino(mService, mAddress, flag, data);\n\t}",
"public void serialEvent(SerialPortEvent e)\n {\n System.out.println(\"+++SERIAL EVENT TYPE ++++++++++++++++ : \"+e.getEventType());\n ezlink.info(\"serialEvent() received in \" + SerialConnection.class.getName());\n \t// Create a StringBuffer and int to receive input data.\n\tStringBuffer inputBuffer = new StringBuffer();\n\tint newData = 0;\n\n\t// Determine type of event.\n\tswitch (e.getEventType())\n\t{\n\n\t // Read data until -1 is returned. If \\r is received substitute\n\t // \\n for correct newline handling.\n\t case SerialPortEvent.DATA_AVAILABLE:\n\t byte[] readBuffer = new byte[500];\n\t\tint numBytes = 0;\n\t\tinputdata = null;\n\n\t\ttry {\n\t\t\t\tSystem.out.println(\"Data Received from com Port=\"+is.available());\n ezlink.info(\"Data Received from com Port= \" +is.available() );\n\n\t\t\t\twhile (is.available() > 0)\n\t\t\t\t{\n\t\t\t\t\tnumBytes = is.read(readBuffer);\n\t\t\t\t\tdataHandler.addISOPart(ISOUtil.hexString(readBuffer,0,numBytes));\n\n\t\t\t\t}\n\n\n\t\t\t\tString strResponse=null;\n\t\t\t\tif((strResponse = dataHandler.getNextISO(1)) !=null)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Response=\"+strResponse);\n ezlink.info(\"Response= : \" +strResponse );\n\t\t\t\t\tinputdata = strResponse;\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Full data not received from terminal\");\n ezlink.info(\"ull data not received from terminal!! \" );\n\t\t\t\t}\n\n\t\t\t\tdataRec =true;\n\n\t\t} catch (IOException exp) {\n System.out.println(\"serialEvent Exception(): \");\n exp.printStackTrace();\n System.out.println(\"serialEvent Exception(): \");\n ezlink.info(\"serialEvent Exception(): \");\n ezlink.error(new Object(), exp);\n }\n\n\t\tbreak;\n\n\t // If break event append BREAK RECEIVED message.\n\t case SerialPortEvent.BI:\n\t\tSystem.out.println(\"\\n--- BREAK RECEIVED ---\\n\");\n ezlink.info(\"\\n--- BREAK RECEIVED ---\\n \" );\n\t}\n\n }",
"void send();",
"private void writeData(String data) {\n try {\n outStream = btSocket.getOutputStream();\n } catch (IOException e) {\n }\n\n String message = data;\n byte[] msgBuffer = message.getBytes();\n\n try {\n outStream.write(msgBuffer);\n } catch (IOException e) {\n }\n }",
"public void send(String location, String ipAddress, ChangeCmd changeCmd, String serialNumber) {\n\n try (Socket socket = new Socket(location, Integer.parseInt(ipAddress))) {\n String json = mapper.writeValueAsString(new SendCmd(\n serialNumber,\n changeCmd.getPower(),\n changeCmd.getTemp())\n );\n\n DataOutputStream outputStream = new DataOutputStream(socket.getOutputStream());\n// DataInputStream inputStream = new DataInputStream(socket.getInputStream());\n outputStream.writeUTF(json);\n outputStream.flush();\n// String jsonRead = inputStream.readUTF();\n// inputStream.close();\n outputStream.close();\n// return mapper.readValue(jsonRead, SendCmd.class);\n } catch (IOException e) {\n log.info(\"error connection\");\n log.error(e);\n// return null;\n }\n }",
"private void BTKies() {\n Set<BluetoothDevice> pairedDevices;\n ArrayAdapter<String> BTArrayAdapter;\n final Dialog dialog = new Dialog(this);\n dialog.setContentView(R.layout.devicedialog);\n dialog.setTitle(\"Kies een verbinding\");\n BTListView = (ListView) dialog.findViewById(R.id.listView1);\n BTListView.setVisibility(View.VISIBLE);\n\n BTArrayAdapter = new ArrayAdapter<String>(this,\n android.R.layout.simple_list_item_1);\n BTListView.setAdapter(BTArrayAdapter);\n pairedDevices = BT.getBondedDevices();\n for (BluetoothDevice device : pairedDevices)\n BTArrayAdapter.add(device.getName() + \"\\n\" + device.getAddress());\n\n dialog.show();\n\n // Pick het item uit de list\n BTListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n long arg3) {\n ListView lv = (ListView) arg0;\n TextView tv = (TextView) lv.getChildAt(arg2);\n String s = tv.getText().toString();\n\n Connect(s); // Make connection\n }\n\n private void Connect(String s) {\n int i = s.length();\n address = s.substring(i - 17);\n BluetoothDevice device = BT.getRemoteDevice(address);\n Log.d(TAG, \"Connecting to ... \" + device);\n BT.cancelDiscovery();\n try { // omgaan met exeptions\n btSocket = device\n .createRfcommSocketToServiceRecord(MY_UUID);\n btSocket.connect();\n // hier de comunicatie invullen ***********************************************\n writeData(\"c#\"); // vraag om een bevestiging van de verbinding\n BTListView.setVisibility(View.INVISIBLE);\n dialog.dismiss();\n beginListenForData();\n } catch (IOException e) {\n try {\n btSocket.close();\n } catch (IOException e2) {\n DisplayToast(\"Unable to end the connection\");\n }\n DisplayToast(\"Ontvanger niet beschikbaar. Kies opnieuw\");\n }\n }\t// einde connect\n\n });\t// einde onClick\n }",
"public void initBT() {\n\n\t\tStatusBox.setText(\"Connecting...\");\n\t\tLog.e(TAG, \"Connecting...\");\n\t\t\n\t\tif (D) {\n\t\t\tLog.e(TAG, \"+ ON RESUME +\");\n\t\t\tLog.e(TAG, \"+ ABOUT TO ATTEMPT CLIENT CONNECT +\");\n\t\t}\n\t\t\n\t\t//If Mac Address is null then stop this process and display message\n\t\tif(MAC_ADDRESS == \"\"){\n\t\t\tLog.e(TAG,\"No MAC Address Found...\");\n\t\t\tToast.makeText(getApplicationContext(), \"No Mac Address found. Please Enter using button.\",Toast.LENGTH_SHORT );\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// When this returns, it will 'know' about the server,\n\t\t// via it's MAC address.\n\t\tBluetoothDevice device = null;\n\t\ttry {\n\t\t\tdevice = mBluetoothAdapter.getRemoteDevice(MAC_ADDRESS);\n\t\t} catch (Exception e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tToast.makeText(getApplicationContext(), \"NOT Valid BT MAC Address\", Toast.LENGTH_SHORT);\n\t\t\te1.printStackTrace();\n\t\t}\n\n\t\t// returns firefly e350\n\t\tLog.e(TAG, \"device name: \" + device.getName());\n\n\t\t// We need two things before we can successfully connect\n\t\t// (authentication issues aside): a MAC address, which we\n\t\t// already have, and an RFCOMM channel.\n\t\t// Because RFCOMM channels (aka ports) are limited in\n\t\t// number, Android doesn't allow you to use them directly;\n\t\t// instead you request a RFCOMM mapping based on a service\n\t\t// ID. In our case, we will use the well-known SPP Service\n\t\t// ID. This ID is in UUID (GUID to you Microsofties)\n\t\t// format. Given the UUID, Android will handle the\n\t\t// mapping for you. Generally, this will return RFCOMM 1,\n\t\t// but not always; it depends what other BlueTooth services\n\t\t// are in use on your Android device.\n\t\ttry {\n\t\t\t\n\t\t\tint currentapiVersion = android.os.Build.VERSION.SDK_INT;\n\t\t\t\n\t\t\t//RFCOMM connection varies depending on android version. Fixes bug in Gingerbread and newer where always asks for BT Pairing code.\n\t\t\tif (currentapiVersion >= android.os.Build.VERSION_CODES.GINGERBREAD_MR1){\n\t\t\t\t//used in android >= 2.3.3\n\t\t\t\tbtSocket = device.createInsecureRfcommSocketToServiceRecord(MY_UUID);\n\t\t\t} else if (currentapiVersion < android.os.Build.VERSION_CODES.GINGERBREAD_MR1){\n\t\t\t\t//used in android < 2.3.3\n\t\t\t\tbtSocket = device.createRfcommSocketToServiceRecord(MY_UUID);\n\t\t\t}\n\t\t\t\n\t\t\tLog.e(TAG, \"ON RESUME: Socket created!\");\n\t\t\n\t\t\n\t\t\t// Discovery may be going on, e.g., if you're running a\n\t\t\t// 'scan for devices' search from your handset's Bluetooth\n\t\t\t// settings, so we call cancelDiscovery(). It doesn't hurt\n\t\t\t// to call it, but it might hurt not to... discovery is a\n\t\t\t// heavyweight process; you don't want it in progress when\n\t\t\t// a connection attempt is made.\n\t\t\tmBluetoothAdapter.cancelDiscovery();\n\n\t\t\tmyBT = new ConnectedThread(btSocket);\n\t\t\t\n\t\t\t\n\t\t\t// don't write to the streams unless they are created\n\t\t\tif (myBT.BTconnStatus) {\n\t\t\t\t\n\t\t\t\tStatusBox.setText(\"CONNECTED\");\n\t\t\t\tLog.e(TAG, \"CONNECTED\");\n\t\t\t\t\n\t\t\t\t// ST,255 enables remote configuration forever...need this if\n\t\t\t\t// resetting\n\t\t\t\t// PIO4 is held high on powerup then toggled 3 times to reset\n\n\t\t\t\t// GPIO Commands to BT device page 15 of commands datasheet\n\t\t\t\tbyte[] cmdMode = { '$', '$', '$' };\n\t\t\t\tmyBT.write(cmdMode);\n\t\t\t\tmyBT.run();\n\n\t\t\t\t// S@,8080 temp sets GPIO-7 to an output\n\t\t\t\tbyte[] cmd1 = { 'S', '@', ',', '8', '0', '8', '0', 13 };\n\n\t\t\t\t// S%,8080 perm sets GPIO-7 to an output on powerup. only done once\n\t\t\t\t// byte [] cmd1 = {'S','%',',','8','0','8','0',13};\n\n\t\t\t\tmyBT.write(cmd1);\n\t\t\t\tmyBT.run();\n\n\t\t\t\t// S&,8000 drives GPIO-7 low\n\t\t\t\t// byte [] cmd2 = {'S','^',',','8','0','0','0',13};\n\n\t\t\t\t// make it so cmd mode won't timeout even after factory reset\n\t\t\t\tbyte[] cmd3 = { 'S', 'T', ',', '2', '5', '5', 13 };\n\t\t\t\tmyBT.write(cmd3);\n\t\t\t\tmyBT.run();\n\n\t\t\t} else {\n\t\t\t\t//StatusBox.setText(\"NOT Connected\");\t\n\t\t\t\tLog.e(TAG, \"NOT Connected\");\n\t\t\t}\n\t\t\n\t\t} catch (IOException e) {\n\t\t\t\n\t\t\tif (D)\n\t\t\t\tLog.e(TAG, \"ON RESUME: Socket creation failed.\", e);\n\t\t}\n\n\t\t\n\t\t\n\t}",
"@Override\n public void onReceive(Context context, Intent intent) {\n if (intent.getAction().equals(ACTION_USB_PERMISSION)) {\n boolean granted = intent.getExtras().getBoolean(UsbManager.EXTRA_PERMISSION_GRANTED);\n if (granted) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR1) {\n connection = usbManager.openDevice(device);\n }\n serialPort = UsbSerialDevice.createUsbSerialDevice(device, connection);\n if (serialPort != null) {\n if (serialPort.open()) { //Set Serial Connection Parameters.\n serialPort.setBaudRate(115200); //was 9600\n serialPort.setDataBits(UsbSerialInterface.DATA_BITS_8);\n serialPort.setStopBits(UsbSerialInterface.STOP_BITS_1);\n serialPort.setParity(UsbSerialInterface.PARITY_NONE);\n serialPort.setFlowControl(UsbSerialInterface.FLOW_CONTROL_OFF);\n serialPort.read(mCallback);\n //tvAppend(textView,\"Serial Connection Opened!\\n\");\n\n } else {\n Log.d(\"SERIAL\", \"PORT NOT OPEN\");\n Toast.makeText(getParent(), \"port not open\", Toast.LENGTH_LONG).show();\n }\n } else {\n Log.d(\"SERIAL\", \"PORT IS NULL\");\n Toast.makeText(getParent(), \"port is NULL\", Toast.LENGTH_LONG).show();\n }\n } else {\n Log.d(\"SERIAL\", \"PERM NOT GRANTED\");\n Toast.makeText(getParent(), \"perm not granted\", Toast.LENGTH_LONG).show();\n }\n } else if (intent.getAction().equals(UsbManager.ACTION_USB_DEVICE_ATTACHED)) {\n //onClickStart(startButton);\n System.out.println(\"onclick start startbutton\");\n } else if (intent.getAction().equals(UsbManager.ACTION_USB_DEVICE_DETACHED)) {\n //onClickStop(stopButton);\n System.out.println(\"onclick stop stopbutton\");\n }\n }",
"public void sendByteCommand(int address, byte command, boolean waitForCompletion)\n {\n final String funcName = \"sendByteCommand\";\n byte[] data = new byte[1];\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API, \"addr=%d,cmd=0x%x,sync=%s\",\n address, command, Boolean.toString(waitForCompletion));\n }\n\n data[0] = command;\n if (waitForCompletion)\n {\n syncWrite(address, data, data.length);\n }\n else\n {\n //\n // Fire and forget.\n //\n asyncWrite(null, address, data, data.length, null, null);\n }\n\n if (debugEnabled)\n {\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API);\n }\n }",
"public final String getSerial(){\n return this.peripheralSerial;\n }",
"public void send1(){\n digitalWrite(data1, LOW);\n delayMicroseconds(34);\n digitalWrite(data1, HIGH);\n}",
"public void sendToArduino(char flag, int data) {\n\t\t// Uncomment for logging\n\t\t// RoboLog.log(mService, \"Send data to Robot \" + mName + \": Flag: \" +\n\t\t// flag + \" Data: \"\n\t\t// + Integer.toString(data), false);\n\t\tAmarino.sendDataToArduino(mService, mAddress, flag, data);\n\t}",
"public void run() {\n\t\tserialPort = new SerialPort(\"COM6\"); \r\n try {\r\n serialPort.openPort();//Open port\r\n serialPort.setParams(9600, 8, 1, 0);//Set params\r\n int mask = SerialPort.MASK_RXCHAR + SerialPort.MASK_CTS + SerialPort.MASK_DSR;//Prepare mask\r\n serialPort.setEventsMask(mask);//Set mask\r\n serialPort.addEventListener(new SerialPortReader());//Add SerialPortEventListener\r\n serialPort.writeBytes(readRequest());\r\n }\r\n catch (SerialPortException ex) {\r\n System.out.println(ex);\r\n }\r\n\r\n\t\t\r\n\t}",
"protected void sequence_Bluetooth(ISerializationContext context, Bluetooth semanticObject) {\n\t\tif (errorAcceptor != null) {\n\t\t\tif (transientValues.isValueTransient(semanticObject, DrnPackage.Literals.CONNECTION_TYPE__NAME) == ValueTransient.YES)\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, DrnPackage.Literals.CONNECTION_TYPE__NAME));\n\t\t\tif (transientValues.isValueTransient(semanticObject, DrnPackage.Literals.CONNECTION_TYPE__ADRESS) == ValueTransient.YES)\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, DrnPackage.Literals.CONNECTION_TYPE__ADRESS));\n\t\t}\n\t\tSequenceFeeder feeder = createSequencerFeeder(context, semanticObject);\n\t\tfeeder.accept(grammarAccess.getBluetoothAccess().getNameBLUETOOTHKeyword_0_0(), semanticObject.getName());\n\t\tfeeder.accept(grammarAccess.getBluetoothAccess().getAdressMACTerminalRuleCall_2_0(), semanticObject.getAdress());\n\t\tfeeder.finish();\n\t}",
"public void sendmsg(Message msg){\n try {\n oos.writeObject(new Datapacket(1, null, msg,null, null));\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void selectBluetoothDevice(String selectedItem) {\n String[] stringParts = selectedItem.split(\"\\n\");\n\n if (stringParts.length == 2) {\n\n // The Bluetooth ID is: stringParts[1]\n\n // Activate the Bluetooth Input/Output steams\n if (activateBluetoothStreams(stringParts[1])) {\n\n // The device was selected successfully. Start the Robot Activity\n startControlRobotActivity();\n\n }\n else{\n Toast.makeText(getApplicationContext(), \"Selected Bluetooth device was not enabled.\",\n Toast.LENGTH_LONG).show();\n }\n\n }\n else\n {\n Toast.makeText(getApplicationContext(), \"There was a problem selecting a Device.\",\n Toast.LENGTH_LONG).show();\n }\n\n\n }",
"private void moveMotor(String num){\n Log.d(\"moveMotor\", \"TO\" + num);\n if (btSocket!=null) {\n try {\n btSocket.getOutputStream().write((\"TO\" + num).getBytes());\n }\n catch (IOException ex) {\n msg(\"Error\");\n }\n }\n }",
"private void bluetoothClientProcessing(){\n\n\t\tif( client != null ){\n\t\t\tbyte keyReceive = client.receiveByte() ;\n\n\t\t\tif( keyReceive == DataTransmiting.SOFTKEY_RIGHT ||\n\t\t\t\tkeyReceive == DataTransmiting.KEY_FIRE\t){\n \n\t\t\t\tshouldStop=true;\n\t // midlet.setCurrLevel(currlevel);+\n\t midlet.playGameAgain( currlevel ,isBluetoothMode );\n\n\t\t\t}\n\t\t\telse if( keyReceive == DataTransmiting.MESSAGE_EXIT_GAME ){\n\t\t\t\tmidlet.setAlert(\"The device disconnected\") ;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcurrlevel = keyReceive ;\n\t\t\t}\n\t\t\t\n\n\t\t}\n\t}",
"java.lang.String getSerial();",
"@Override\n public void onReceive(Context context, Intent intent) {\n if (intent.getAction().equals(ACTION_USB_PERMISSION)) {\n boolean granted = intent.getExtras().getBoolean(UsbManager.EXTRA_PERMISSION_GRANTED);\n if (granted) {\n connection = usbManager.openDevice(device);\n serialPort = UsbSerialDevice.createUsbSerialDevice(device, connection);\n if (serialPort != null) {\n if (serialPort.open()) { //Set Serial Connection Parameters.\n setUiEnabled(true);\n serialPort.setBaudRate(9600);\n serialPort.setDataBits(UsbSerialInterface.DATA_BITS_8);\n serialPort.setStopBits(UsbSerialInterface.STOP_BITS_1);\n serialPort.setParity(UsbSerialInterface.PARITY_NONE);\n serialPort.setFlowControl(UsbSerialInterface.FLOW_CONTROL_OFF);\n serialPort.read(mCallback);\n tvAppend(textView,\"Serial Connection Opened!\\n\");\n\n } else {\n Log.d(\"SERIAL\", \"PORT NOT OPEN\");\n }\n } else {\n Log.d(\"SERIAL\", \"PORT IS NULL\");\n }\n } else {\n Log.d(\"SERIAL\", \"PERM NOT GRANTED\");\n }\n } else if (intent.getAction().equals(UsbManager.ACTION_USB_DEVICE_ATTACHED)) {\n onClickStart(startButton);\n } else if (intent.getAction().equals(UsbManager.ACTION_USB_DEVICE_DETACHED)) {\n onClickStop(stopButton);\n\n }\n }",
"@Override\n public void onNotifySuccess() {\n Log.i(\"SleepDoc\", \"notify SYNC_CONTROL Success\");\n bleManager.write(bleDevice, ServiceUUID.SYNC.toString(), CharacteristicUUID.SYNC_CONTROL.toString(), new byte[]{Command.SYNC_CONTROL_START}, logWriteCallback);\n }",
"public void write(byte[] buffer) { //이건 보내주는거\n try {\n mmOutStream.write(buffer);\n\n // Disabled: Share the sent message back to the main thread\n mHandler.obtainMessage(MESSAGE_WRITE, -1, -1, buffer).sendToTarget(); //MH주석풀엇음 //what arg1, arg2 obj\n\n } catch (IOException e) {\n Log.e(TAG, \"Exception during write\");\n }\n }",
"public void sendBreak() {\n\tsPort.sendBreak(1000);\n }",
"private void sendData() {\n final ByteBuf data = Unpooled.buffer();\n data.writeShort(input);\n data.writeShort(output);\n getCasing().sendData(getFace(), data, DATA_TYPE_UPDATE);\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n if (intent.getAction().equals(ACTION_USB_PERMISSION)) {\n boolean granted = intent.getExtras().getBoolean(UsbManager.EXTRA_PERMISSION_GRANTED);\n if (granted) {\n connection = usbManager.openDevice(device);\n serialPort = UsbSerialDevice.createUsbSerialDevice(device, connection);\n if (serialPort != null) {\n if (serialPort.open()) { //Set Serial Connection Parameters.\n serialPort.setBaudRate(9600);\n serialPort.setDataBits(UsbSerialInterface.DATA_BITS_8);\n serialPort.setStopBits(UsbSerialInterface.STOP_BITS_1);\n serialPort.setParity(UsbSerialInterface.PARITY_NONE);\n serialPort.setFlowControl(UsbSerialInterface.FLOW_CONTROL_OFF);\n serialPort.read(mCallback);\n Toast.makeText(getApplication(), \"Serial Connection Opened!\", Toast.LENGTH_SHORT).show();\n\n } else {\n Log.d(\"SERIAL\", \"PORT NOT OPEN\");\n }\n } else {\n Log.d(\"SERIAL\", \"PORT IS NULL\");\n }\n } else {\n Log.d(\"SERIAL\", \"PERM NOT GRANTED\");\n }\n } else if (intent.getAction().equals(UsbManager.ACTION_USB_DEVICE_DETACHED)) {\n onClickStop(stopButton);\n }\n }",
"@FXML\r\n void connectSerialPort() {\r\n try {\r\n String comPort;//numer portu com\r\n comPort = comPortTextField.getText();//pobranie wpisanej nazwy port z poal tekstowego\r\n if(correctnessGuard.isComportCorrect(comPort)) {//sprawdzenie poprawnosci\r\n serialConnection.openSerialConnection(comPort);//proba nawiazania polaczenia\r\n if(isConnectionReady) {//sprawdzenie czy polaczenie zostalo pomyslnie utworzone\r\n serialConnection.sendMessage(\"AT\");//wysłanie komendy sprawdzającej poprawnośc nawiązanego połączenia z modułem\r\n Thread.sleep(commandDelay);//uspanie aplikacji na x milisekund\r\n showAnswer(serialConnection.getAnswerBufor());//wyswietlenie otrzymanych wiadomosci\r\n if(correctnessGuard.checkAnswer(serialConnection.getAnswerBufor(), \"\\r\\nOK\\r\\n\")) {//sprawdzenie, czy poprawnie nawiazano polaczenie\r\n FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource(\"/Resources/aplication.fxml\"));//zaladowanie parametrow okna z pliku fxml\r\n //Parent root = fxmlLoader.load();//zaladowanie danych do roota\r\n Parent root = FXMLLoader.load(getClass().getResource(\"/Resources/aplication.fxml\"));\r\n root.setId(\"myroot\");//ustwaienie id w celu identyfikacji w roota w pliku css\r\n Stage stage = new Stage();//nowy stejdż\r\n stage.setTitle(\"BEE - Simple aplication for sending phone messages\");//przypisanie nazwy okna\r\n Scene scene = new Scene(root);//stworzenie sceny\r\n stage.setScene(scene);//ustawienie zaladowanego okna\r\n stage.setResizable(false);//wylaczenie mozliwosci zmian rozmiarow\r\n stage.getIcons().add(new Image(\"file:\"+getClass().getResource(\"/Resources/connection.png\").getPath()));//ustawienie icony okna\r\n stage.show();//wyswietlenie okna\r\n stage.setOnCloseRequest((WindowEvent event_2) ->{//ustawienie zdarzenia na zamkniecie okna\r\n closeMainStage();//wywoloanie nizej zdefiniowanej metody\r\n });\r\n primaryStage.close();//zamkniecie poprzedniego stejdżu - okna nawiązywania połaczenia\r\n serialConnection.clearAnswerBufor();//wyczyszczenie bufora wiadomosci\r\n mainStage = stage;//przypisanie stowrzonego stage do stalej\r\n }else{\r\n JOptionPane.showMessageDialog(new JFrame(), \"Komenda AT zgłosiła błąd - niepoprawna odpowiedź modułu!\", \"Controller Error\",\r\n JOptionPane.ERROR_MESSAGE);\r\n }\r\n }\r\n }\r\n }catch(IOException er){\r\n System.out.println(er);\r\n JOptionPane.showMessageDialog(new JFrame(), \"Błąd wejścia/wyjścia w kontrolerze okna połączeniowego!\", \"Controller Error\",\r\n JOptionPane.ERROR_MESSAGE);\r\n }catch(Exception e){\r\n JOptionPane.showMessageDialog(new JFrame(), \"Niespodziewany błąd w kontrolerze okna połączeniowego!\", \"Controller Error\",\r\n JOptionPane.ERROR_MESSAGE);\r\n System.out.println(e);\r\n }\r\n }",
"private void connect() throws Exception {\n\n Log.i(TAG, \"Attempting connection to \" + address + \"...\");\n\n // Get this device's Bluetooth adapter\n BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();\n if ((adapter == null) || (!adapter.isEnabled())){\n throw new Exception(\"Bluetooth adapter not found or not enabled!\");\n }\n\n // Find the remote device\n BluetoothDevice remoteDevice = adapter.getRemoteDevice(address);\n\n // Create a socket with the remote device using this protocol\n socket = remoteDevice.createRfcommSocketToServiceRecord(uuid);\n\n // Make sure Bluetooth adapter is not in discovery mode\n adapter.cancelDiscovery();\n\n // Connect to the socket\n socket.connect();\n\n\n // Get input and output streams from the socket\n outStream = socket.getOutputStream();\n inStream = socket.getInputStream();\n\n Log.i(TAG, \"Connected successfully to \" + address + \".\");\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n\n MainActivity activity = (MainActivity) context;\n\n\n String action = intent.getAction();\n if (BluetoothDevice.ACTION_FOUND.equals(action));\n {\n\n Log.d(\"receive\",\"action found\");\n try {\n\n // rssi = intent.getShortExtra(BluetoothDevice.EXTRA_RSSI, Short.MIN_VALUE);\n\n\n BluetoothDevice bluetoothDevice = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);\n Short rssi = intent.getShortExtra(BluetoothDevice.EXTRA_RSSI,Short.MIN_VALUE);\n\n activity.setDisciveredDevice(bluetoothDevice,rssi);\n\n Log.d(\"receive\", \" Name = \"+bluetoothDevice.getName() );\n Log.d(\"receive\", \" Address = \"+bluetoothDevice.getAddress() );\n\n Toast.makeText(context,\"action found\",Toast.LENGTH_SHORT).show();\n\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n\n }\n\n }",
"public interface SerialHelper {\n\n interface DeviceReadyListener{\n void OnDeviceReady(boolean deviceReadyStatus);\n }\n\n ArrayList<String> enumerateDevices();\n void connectDevice(String id, DeviceReadyListener deviceReadyListener);\n void disconnect();\n boolean isDeviceConnected();\n boolean writeString(String data);\n boolean writeBytes(byte[] data);\n byte readByte();\n}",
"public void setTransmittedSerialNumber(String transmittedSerialNumber) ;",
"private void bluetoothSelected(JSONArray data, final CallbackContext callbackContext) throws JSONException {\n String arrayList = data.getString(0);\n\n String[] parts = arrayList.split(\"_\");\n\n String name = parts[0];\n String macAddress = parts[1];\n\n PinpadObject pinpad = new PinpadObject(name, macAddress, false);\n\n // Passa o pinpad selecionado para o provider de conexao bluetooth.\n BluetoothConnectionProvider bluetoothConnectionProvider = new BluetoothConnectionProvider(StoneSDK.this.cordova.getActivity(), pinpad);\n bluetoothConnectionProvider.setDialogMessage(\"Criando conexao com o pinpad selecionado\"); // Mensagem exibida do dialog.\n bluetoothConnectionProvider.setWorkInBackground(false); // Informa que havera um feedback para o usuario.\n bluetoothConnectionProvider.setConnectionCallback(new StoneCallbackInterface() {\n\n public void onSuccess() {\n Toast.makeText(StoneSDK.this.cordova.getActivity(), \"Pinpad conectado\", Toast.LENGTH_SHORT).show();\n callbackContext.success();\n }\n\n public void onError() {\n Toast.makeText(StoneSDK.this.cordova.getActivity(), \"Erro durante a conexao. Verifique a lista de erros do provider para mais informacoes\", Toast.LENGTH_SHORT).show();\n callbackContext.error(\"Erro durante a conexao. Verifique a lista de erros do provider para mais informacoes\");\n }\n\n });\n bluetoothConnectionProvider.execute(); // Executa o provider de conexao bluetooth.\n }"
] | [
"0.71418977",
"0.68411803",
"0.67522824",
"0.6671888",
"0.6583598",
"0.6570484",
"0.65189224",
"0.644357",
"0.6376619",
"0.6232193",
"0.6174217",
"0.6161969",
"0.6124261",
"0.6097199",
"0.6077042",
"0.6072158",
"0.60539174",
"0.603311",
"0.6032315",
"0.60265344",
"0.59959054",
"0.5984035",
"0.5942951",
"0.5932241",
"0.5927429",
"0.590562",
"0.5905451",
"0.5894856",
"0.586685",
"0.5861094",
"0.58343065",
"0.58300525",
"0.58240473",
"0.5813146",
"0.5804683",
"0.5797983",
"0.57935745",
"0.5770044",
"0.57677364",
"0.5762676",
"0.5736968",
"0.57223696",
"0.57187873",
"0.5708572",
"0.57061917",
"0.56875324",
"0.56871796",
"0.56826216",
"0.56769496",
"0.56616104",
"0.56605357",
"0.5647834",
"0.5644154",
"0.5639975",
"0.563668",
"0.5624961",
"0.5619413",
"0.56183934",
"0.5608986",
"0.56013817",
"0.5599629",
"0.5593675",
"0.5588017",
"0.5587122",
"0.55865055",
"0.5584908",
"0.5584521",
"0.5577974",
"0.5570417",
"0.5556249",
"0.5549043",
"0.55344135",
"0.55307543",
"0.5526455",
"0.5518419",
"0.5508381",
"0.5505987",
"0.5495436",
"0.5494639",
"0.5493825",
"0.5492475",
"0.54852664",
"0.54737353",
"0.54560155",
"0.5453258",
"0.54526174",
"0.5443229",
"0.54389966",
"0.54368496",
"0.54345185",
"0.54334927",
"0.54315615",
"0.5413926",
"0.54114527",
"0.5402032",
"0.5397397",
"0.5388858",
"0.5388369",
"0.5385706",
"0.5384962"
] | 0.7097971 | 1 |
Elimina y retorna la entrada asociada copn key en esta tabla Retorna null si la tabla no contiene a key como clave de algun valor | private Entry1 removeEntryForKey(Object key){
Object k= maskNull(key);
int i=hCode(key,table.length);
Entry1 previous=null;
for(Entry1 e=table[i]; e!=null; e=e.getNext()){
if(eq(k, maskNull(e.getKey()))){
if(e==table[i]){
table[i]=e.getNext();
} else{
previous.setNext(e.getNext());
}
return e;
}
previous=e;
}
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public Pacote remove(Object key) {\n Pacote pt = this.get(key);\n try {\n conn = Connect.connect();\n \n PreparedStatement stm = conn.prepareStatement(\"UPDATE Pacote SET visivel=FALSE WHERE nomePacote=?;\");\n \n stm.setString(1, (String)key); //parse da key para a querie\n stm.executeUpdate();\n \n } catch (SQLException | ClassNotFoundException e) {\n throw new NullPointerException(e.getMessage());\n } finally {\n Connect.close(conn);\n }\n return pt;\n }",
"@Override\n\tpublic V remove(K pLlave) {\n\t\tint posicion = hash(pLlave);\n\t\tSequentialSearchST<K,V> st = map.darElemento(posicion);\n\t\tNodoTabla<K,V> buscado = st.remove(pLlave);\n\t\tif(buscado == null)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn buscado.darValor();\n\t\t}\n\t}",
"@Override\n public void delete(Integer key) throws SQLException {\n //Ei toteutettu\n }",
"@Override\n\tpublic V remove(Object key) {\n\t\tIterator it1 = tabla.iterator();\n\t\tV valor = null;\n\t\tint i = 0;\n\t\twhile (it1.hasNext()) {\n\t\t\tit1.next();\n\t\t\tint indice = tabla.get(i).keySet().indexOf(key);\n\t\t\tif (indice != -1) {\n\t\t\t\tvalor = tabla.get(i).valueSet().get(indice);\n\t\t\t\ttabla.get(i).keySet().remove(indice);\n\t\t\t\ttabla.get(i).valueSet().remove(indice);\n\t\t\t}\n\t\t\ti++;\n\n\t\t}\n\t\treturn valor;\n\t}",
"@Override\n\tpublic void delete(String key) throws SQLException {\n\t\t\n\t}",
"@Override\n public V remove(Object key) {\n int index = key.hashCode() % table.length;\n if (index < 0) {\n index += table.length;\n }\n if (table[index] == null) {\n return null; // key is not in table\n }\n for (Entry<K, V> entry : table[index]) {\n if (entry.getKey().equals(key)) {\n V value = entry.getValue();\n table[index].remove(entry);\n numKeys--;\n if (table[index].isEmpty()) {\n table[index] = null;\n }\n return value;\n }\n }\n return null;\n }",
"public int deleteLocalKeyVal(String key){\n\t\tint result = 0;\n\t\tString whereClause = DBHelper.KEY_FIELD+\"=?\";\n\t\tString selection = key;\n \tString []whereArgs = new String[]{selection};\n \tif(selection.equals(\"@\")){\n \t\twhereClause = \"1\";\n \t\twhereArgs = null;\n \t}\n \tresult = dbHelper.delete(whereClause, whereArgs);\n\t\treturn result;\n\t}",
"Curso eliminaCurso(String clave);",
"@Override\n public Componente remove(Object key) {\n Componente cp = this.get(key);\n try {\n conn = Connect.connect();\n \n PreparedStatement stm = conn.prepareStatement(\"UPDATE Componente SET visivel=FALSE WHERE nome=?;\");\n \n stm.setString(1, (String)key); //parse da key para a querie\n stm.executeUpdate();\n \n } catch (SQLException | ClassNotFoundException e) {\n throw new NullPointerException(e.getMessage());\n } finally {\n Connect.close(conn);\n }\n return cp;\n }",
"@Override\n public Administrador remove(Object key) {\n Administrador a = this.get(key);\n try {\n conn = Connect.connect();\n \n PreparedStatement stm = conn.prepareStatement(\"UPDATE Administrador SET visivel=FALSE WHERE username=?;\");\n \n stm.setString(1, (String)key); //parse da key para a querie\n stm.executeUpdate();\n \n } catch (SQLException | ClassNotFoundException e) {\n throw new NullPointerException(e.getMessage());\n } finally {\n Connect.close(conn);\n }\n return a;\n }",
"public V delete(K key) {\n if (null == key) {\n throw new IllegalStateException(\"Null value for key is \" +\n \"unsupported!\");\n }\n\n V result = null;\n\n int hash1 = hash1(key);\n\n if (table[hash1] != null) {\n Node<Pair<K, V>> node = search(table[hash1].list, key);\n\n if (node != null) {\n result = node.getData().value;\n table[hash1].list.delete(node);\n }\n }\n\n int hash2 = hash2(key);\n\n if (table[hash2] != null && result == null) {\n Node<Pair<K, V>> node = search(table[hash2].list, key);\n\n if (node != null) {\n result = node.getData().value;\n table[hash2].list.delete(node);\n }\n }\n\n return result;\n }",
"@Override\n\tpublic Optional<Table<Key, Value>> remove(Key k) {\n\t\tif(containsKey(k)){\n\t\tTable<Key, Value> table = new BstTable<Key, Value>(bst.delete(k).get());\n\t\treturn Optional.of(table);\n\t\t}\n\t\telse{\n\t\t\treturn Optional.empty();\n\t\t}\n\t}",
"public void excluirPorChavePrimaria(@SuppressWarnings(\"rawtypes\") Class pClasse, Object pPrimaryKey);",
"public Trabajo borrar(){\r\n\t\tif(!estaVacia()){\r\n\t\tfrente = siguiente(frente);\r\n\t\treturn elementos[frente];\t\r\n\t\t}\r\n\t\telse\r\n\t\t\treturn null;\r\n\t}",
"public DataPair delete(DataPair key) {\n throw new NotImplementedException();\n }",
"@Override\n\tpublic boolean eliminarPorId(Integer llave) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic V remove(K key) {\n\t\tint h = Math.abs(key.hashCode()) % nrb;// calculam hash-ul asociat cheii\n\n\t\tfor (int i = 0; i < b.get(h).getEntries().size(); i++) {\n\t\t\t// parcurgerea listei de elemente pentru a gasi cheia ceruta si\n\t\t\t// stergerea acesteiu din lista\n\t\t\tif (b.get(h).getEntries().get(i).getKey().equals(key)) {\n\t\t\t\tV x = b.get(h).getEntries().get(i).getValue();\n\t\t\t\tb.get(h).e.remove(i);\n\t\t\t\treturn x;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}",
"public boolean eliminarClave(String id) {\n\t\tConnection conexion;\n\t\ttry {\n\t\t\tconexion = DriverManager.getConnection(\"jdbc:mysql://localhost/keyring\", \"root\" ,\"\");\n\t\t\tStatement sql = conexion.createStatement();\n\t\t\tint resultado = sql.executeUpdate(\"DELETE FROM entrada WHERE Id=\"+id);\n\n\t\t\tif (resultado > 0) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn false;\n\t}",
"void remove(@NotNull final ByteBuffer key) {\n final ClusterValue prev = storage.put(key, ClusterValue.deadCluster());\n if (prev == null) {\n tableSize = tableSize + key.remaining();\n } else if (!prev.isTombstone()) {\n tableSize = tableSize - prev.getData().remaining();\n }\n }",
"@Override\n\tpublic void put(K pLlave, V pValor) {\n\t\tint pos = hash(pLlave);\n \t//info de la posicion\n \tArregloDinamico<NodoTabla<K, V>> info = tablaDeHash[pos];\n //Si la posicion es null \t\n \tif(info.isEmpty()){\n \t\tNodoTabla<K, V> nodo = new NodoTabla<K,V>(pLlave, pValor);\n \t\tinfo.addLast(nodo);\n \t\ttablaDeHash[pos] = info;\n \t}\n //Si ya hay un bucket en la posicion\n \telse{\n \t\tboolean stop = false;\n \t\tfor(int i=1;i<=info.size()&&!stop;i++){\n \t\t\t//Ese objeto es el que ya tengo\n \t\t\tNodoTabla<K, V> actual = info.getElement(i);\n \t\t\tif(actual.darLlave().equals(pLlave)){\n \t\t\t\tactual.asignarValor(pValor);\n \t\t\t\tstop=true;\n \t\t\t}\n \t\t}\n \t\t//Es un objeto nuevo\n \t\tif(!stop){\n \t\t\tNodoTabla<K, V> nodo = new NodoTabla<K,V>(pLlave, pValor);\n \t\t\tinfo.addLast(nodo);\n \t\t}\n \t\t\t\n \t}\n\t}",
"public V remove(K key) {\n\tint bucket=Math.abs(key.hashCode()%capacity);\n\t//for(int i=0;i<table[bucket].size()-1;i++){\n\tfor(MyEntry i:table[bucket]) { \n\t if(i.key==key) {\n\t\t//location.remove(key\n\t\tV previousvalue=i.value;\n\t\ttable[bucket].remove(i);\n\t\tsize--;\n\t\t/*if(table[bucket].size()==0) {\n\t\t utilizedbuckets.remove(bucket);\n\t\t}*/\n\t\treturn previousvalue;\n\t }\t\n\t}\n\treturn null;\n }",
"public V remove(Object key) {\r\n int index = key.hashCode() % mainTable.length;\r\n if (index < 0) {\r\n index += mainTable.length;\r\n }\r\n if (mainTable[index] == null) {\r\n return null; // Key not in mainTable\r\n }\r\n Iterator<Entry<K,V>> iter = mainTable[index].iterator();\r\n while (iter.hasNext()) {\r\n Entry<K,V> nextItem = iter.next();\r\n // If the search is successful, return the value.\r\n if (nextItem.key.equals(key)) {\r\n V returnValue = nextItem.value;\r\n iter.remove();\r\n return returnValue;\r\n }\r\n }\r\n // Key not in mainTable\r\n return null;\r\n }",
"public void removeKey() {\n \tthis.key =null;\n \tdungeon.keyLeft().set(\"Key possession: No\\n\");\n }",
"public int del(int key) {\n int retval = 0;\n\n String sql = \"DELETE FROM data_map WHERE data_key = ?\";\n\n try (Connection con = this.connect();\n PreparedStatement pstmt = con.prepareStatement(sql)) {\n pstmt.setInt(1, key);\n retval = pstmt.executeUpdate();\n }\n catch (SQLException e) {\n retval = -1;\n }\n\n return retval;\n }",
"public V remove(K key)\r\n\t{\r\n\t\t//TODO: add your code here\r\n\t\tV oldVal;\r\n\t\tint slot = findSlot(key, false); // check if it already exists\r\n\t\t// sets the slot in the map to DUMMY value if it exists\r\n\t\tif (slot >= 0)\r\n\t\t{\r\n\t\t\toldVal = table[slot].getValue();\r\n\t\t\ttable[slot] = DUMMY;\r\n\t\t\tcount--;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\toldVal = null;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn oldVal;\r\n\t}",
"@Override\n protected final Void updateKeyAfterInsert(FarmField entity, long rowId) {\n return null;\n }",
"public void eliminarValor(String tabla, String columnaID, String datoABorrar){\n try {\n Statement stmt = Conexion.getInstancia().createStatement();\n stmt.executeUpdate(\"DELETE From \"+tabla+\" Where \"+columnaID+\" = \"+datoABorrar+\";\");\n }\n catch (Exception ex){\n ex.printStackTrace();\n }\n }",
"@Override\n protected final Void updateKeyAfterInsert(SupervisionstandardParagraph entity, long rowId) {\n return null;\n }",
"void eliminar(PK id);",
"@Override\n \n // override do metudo put\n public Pacote put(String key, Pacote value) {\n \n \n Pacote pt = null;\n \n try {\n conn = Connect.connect();\n \n //String com a querie -> inserir um Pacote na BD\n PreparedStatement stm = conn.prepareStatement(\"INSERT INTO Pacote (nomePacote,preco,visivel)\\n\" +\n \"VALUES (?, ?,TRUE)\\n\" +\n \"ON DUPLICATE KEY UPDATE nomePacote=VALUES(nomePacote), preco=VALUES(preco), visivel=VALUES(visivel);\", Statement.RETURN_GENERATED_KEYS);\n \n //Parse dos dados Cliente argumento (value)\n stm.setString(1, value.getNome());\n stm.setDouble(2, value.getPreco());\n \n // executa a querie\n stm.executeUpdate();\n \n this.addComponentes(pt);\n \n ResultSet rs = stm.getGeneratedKeys();\n if(rs.next()) {\n String newNome = rs.getString(\"nome\");\n if (!newNome.equals(value.getNome()))\n throw new PutPacoteFailureException(\"Put Pacote failure - falha na inserção de um Pacote na base de dados\");\n }\n \n pt = value;\n } catch (SQLException | PutPacoteFailureException | ClassNotFoundException e) {\n e.printStackTrace();\n } finally {\n Connect.close(conn);\n }\n return pt;\n }",
"public boolean remove(Key key) ;",
"public native Boolean delete(K key);",
"@org.junit.jupiter.api.Test\n void drop1elementoColisionNoExiste() {\n String key = \"0\";\n String value =\"David\";\n HashTable hashTable = new HashTable();\n hashTable.put(key,value);\n hashTable.drop(\"11\");\n String esperado = \"bucket[0] = [0, David]\\n\";\n Assertions.assertEquals(esperado,hashTable.toString());\n int count = 1;\n Assertions.assertEquals(count,hashTable.count());\n }",
"@Override\r\n\tpublic void insertar() {\n\t\ttab_cuenta.eliminar();\r\n\t\t\r\n\t\t\r\n\t}",
"boolean remove(byte[] key);",
"public V remove(K k) {\n int i = h(k);\r\n int z = i;\r\n int j = 0;\r\n while ((K)htable[i].key() != k) {\r\n i = (z + p(k, ++j)) % htable.length;\r\n if (j == htable.length) {\r\n return null;\r\n }\r\n while (htable[i] == null) {\r\n i = (z + p(k, ++j)) % htable.length;\r\n if (j == htable.length) {\r\n return null;\r\n }\r\n }\r\n }\r\n KVPair remove = htable[i];\r\n htable[i] = TOMBSTONE;\r\n size--;\r\n //resize table\r\n if (loadFactor() < 0.25 && (htable.length / 2) >= initCap) {\r\n KVPair[] temp = new KVPair[htable.length / 2];\r\n for (int y = 0; y < htable.length; y++) {\r\n if (htable[y] == null || htable[y] == TOMBSTONE) {\r\n continue;\r\n }\r\n i = (htable[y].key().hashCode() + temp.length) % temp.length;\r\n z = i;\r\n j = 0;\r\n while (temp[i] != null && temp[i] != TOMBSTONE) {\r\n i = (z + p(k, ++j)) % temp.length;\r\n if (j == temp.length) {\r\n throw new IllegalStateException();\r\n }\r\n }\r\n temp[i] = htable[y];\r\n }\r\n htable = temp.clone();\r\n }\r\n return (V)remove.value();\r\n }",
"void remove(ThreadLocal<?> key) {\n cleanUp();\n\n for (int index = key.hash & mask;; index = next(index)) {\n Object reference = table[index];\n\n if (reference == key.reference) {\n // Success!\n table[index] = TOMBSTONE;\n table[index + 1] = null;\n tombstones++;\n size--;\n return;\n }\n\n if (reference == null) {\n // No entry found.\n return;\n }\n }\n }",
"public void remove(String clave){\n if(!claves.isEmpty()){\n if(claves.contains(clave)){\n valores.remove(claves.indexOf(clave));\n claves.remove(claves.indexOf(clave));\n }\n }\n }",
"public Entry remove(K key){\r\n int loc = find(key);\r\n if(hashTable[loc]!=null && hashTable[loc].equals(key)){\r\n Entry<K,V> result = hashTable[loc];\r\n hashTable[loc].isDeleted = true;\r\n size--;\r\n return result;\r\n }\r\n else\r\n return null;\r\n }",
"abstract void remove(String key, boolean commit);",
"public abstract boolean remove(Key key);",
"@Override\n protected final Void updateKeyAfterInsert(VaccineInjectTimes entity, long rowId) {\n return null;\n }",
"void upsert(@NotNull final ByteBuffer key, @NotNull final ByteBuffer value) {\n final ClusterValue prev = storage.put(key, ClusterValue.of(value));\n if (prev == null) {\n tableSize = tableSize + key.remaining() + value.remaining();\n } else if (prev.isTombstone()) {\n tableSize = tableSize + value.remaining();\n } else {\n tableSize = tableSize + value.remaining() - prev.getData().remaining();\n }\n }",
"public Entry<K,V> insert (K k, V v) throws ClaveInvalidaException\r\n\t{\r\n\t\tif (k == null)\r\n\t\t\tthrow new ClaveInvalidaException (\"La clave que está intentando utilizar es null.\");\r\n\t\tEntry<K,V> entry = new Entrada<K,V> (k,v);//To return.\r\n\t\tupHeap(heap.add(entry));//Se reconfigura la Cola dejando el elemento mínimo (máxima prioridad) en la cabeza de la Cola.\r\n\t\treturn entry;\r\n\t}",
"@Override\npublic void delete(Key key) {\n\t\n}",
"@Override\n protected final Void updateKeyAfterInsert(BackAlarmModel entity, long rowId) {\n return null;\n }",
"public Entry<K, V> remove(K key) {\r\n try {\r\n int hash = key.hashCode();\r\n ListNode<Entry<K, V>> node = table[compFunction(hash)].front();\r\n if (node.isValidNode()) {\r\n Entry<K, V> entry = (Entry<K, V>) node.getItem();\r\n node.remove();\r\n return entry;\r\n }\r\n } catch (Exception e) {\r\n System.out.println(\"Unhashable key: \" + e);\r\n }\r\n return null;\r\n }",
"public boolean delete(byte[] key) throws Exception;",
"V remove(Object key);",
"private Node delete(Node h, int key) {\n if (key - h.key < 0) {\n if (!isRed(h.left) && !isRed(h.left.left))\n h = moveRedLeft(h);\n h.left = delete(h.left, key);\n } else {\n if (isRed(h.left))\n h = rotateRight(h);\n if (key - h.key == 0 && (h.right == null))\n return null;\n if (!isRed(h.right) && !isRed(h.right.left))\n h = moveRedRight(h);\n if (key - h.key == 0) {\n Node x = min(h.right);\n h.key = x.key;\n h.val = x.val;\n h.right = deleteMin(h.right);\n } else\n h.right = delete(h.right, key);\n }\n return balance(h);\n }",
"public void vaciarCarrito() {\r\n String sentSQL = \"DELETE from carrito\";\r\n try {\r\n Statement st = conexion.createStatement();\r\n st.executeUpdate(sentSQL);\r\n st.close();\r\n LOG.log(Level.INFO,\"Carrito vaciado\");\r\n } catch (SQLException e) {\r\n // TODO Auto-generated catch block\r\n \tLOG.log(Level.WARNING,e.getMessage());\r\n e.printStackTrace();\r\n }\r\n }",
"public void remove(Key key) {\n\n\t\tif (!contains(key)) return;\n\t\tint index = locate(key);\n\t\tkeys[index] = null;\n\t\tvalues[index] = null;\n\t\tthis.size--;\n\n\t\t// Check to see if any of the items in the table that follow\n\t\t// this one had collided with the key that was just removed.\n\t\t// If so, we need to rehash/reinsert them.\n\n\t\tint i = increment(index);\n\t\twhile (keys[i] != null) {\n\n\t\t\t// Save the key/value pair at this location.\n\n\t\t\tKey savedKey = keys[i];\n\t\t\tValue savedValue = values[i];\n\n\t\t\t// And temporarily remove it from the hash map.\n\n\t\t\tkeys[i] = null;\n\t\t\tvalues[i] = null;\n\n\t\t\t// Figure out where it should go now and reinsert it.\n\n\t\t\tindex = locate(savedKey);\n\t\t\tkeys[index] = savedKey;\n\t\t\tvalues[index] = savedValue;\n\n\t\t\t// Advance to the next item.\n\t\t\ti = increment(i);\n\t\t}\n\t}",
"public boolean delete(Comparable searchKey);",
"private boolean delete(K key) {\n\t\t\tif (!keySet.contains(key)) {\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\tint index = keySet.indexOf(key);\n\t\t\t\tkeySet.set(index, keySet.get(size - 1));\n\t\t\t\tvalueSet.set(index, valueSet.get(size - 1));\n\t\t\t\tkeySet.set(size - 1, null);\n\t\t\t\tvalueSet.set(size - 1, null);\n\t\t\t\tsize--;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}",
"public static int delete(Periode p){ \n int status=0; \n try{ \n //membuka koneksi\n Connection con=Koneksi.openConnection(); \n //melakukan query database untuk menghapus data berdasarkan id atau primary key\n PreparedStatement ps=con.prepareStatement(\"delete from periode where id=?\"); \n ps.setInt(1,p.getId()); \n status=ps.executeUpdate(); \n }catch(Exception e){System.out.println(e);} \n\n return status; \n }",
"public void eliminarBodegaActual(){\n Nodo_bodega_actual.obtenerAnterior().definirSiguiente(Nodo_bodega_actual.obtenerSiguiente());\n if(Nodo_bodega_actual.obtenerSiguiente() != null){\n Nodo_bodega_actual.obtenerSiguiente().definirAnterior(Nodo_bodega_actual.obtenerAnterior());\n } \n }",
"@org.junit.jupiter.api.Test\n void drop2ColisionesSeparados() {\n String key = \"0\";\n String value =\"David\";\n String key2 = \"11\";\n String value2 =\"ferrero\";\n HashTable hashTable = new HashTable();\n hashTable.put(key,value);\n hashTable.put(key2,value2);\n hashTable.put(\"22\",\"hola\");\n\n hashTable.drop(\"0\");\n hashTable.drop(\"22\");\n\n String esperado =\"bucket[0] = [11, ferrero]\\n\";\n Assertions.assertEquals(esperado,hashTable.toString());\n\n }",
"void delete(final Key key) {\n int r = rank(key);\n if (r == size || keys[r].compareTo(key) != 0) {\n return;\n }\n for (int i = r; i < size - 1; i++) {\n keys[i] = keys[i + 1];\n values[i] = values[i + 1];\n }\n size--;\n keys[size] = null;\n values[size] = null;\n }",
"@Override\n\tpublic int delete(int key) {\n\t\treturn 0;\n\t}",
"@Override\n\tpublic V remove(Object key) {\n\t\treturn null;\n\t}",
"@Override\n\tpublic V remove(Object key) {\n\t\treturn null;\n\t}",
"@org.junit.jupiter.api.Test\n void dropColision2() {\n String key = \"0\";\n String value =\"David\";\n String key2 = \"11\";\n String value2 =\"ferrero\";\n HashTable hashTable = new HashTable();\n hashTable.put(key,value);\n hashTable.put(key2,value2);\n hashTable.put(\"22\",\"hola\");\n hashTable.drop(\"11\");\n String esperado =\"bucket[0] = [0, David]\\n\" + \" -> [22, hola]\\n\";\n Assertions.assertEquals(esperado,hashTable.toString());\n int count = 2;\n Assertions.assertEquals(count,hashTable.count());\n }",
"@Override\r\n public ValueType remove(KeyType key) {\r\n // if capacity is 0, return null\r\n if (capacity == 0) {\r\n return null;\r\n }\r\n\r\n int index = hashFunction(key); // the index of the pair in the hashTable\r\n\r\n // If the linked list at the index is null, target is not exist, return null\r\n if (hashTable[index] == null) {\r\n return null;\r\n }\r\n\r\n int i = 0; // index tracker\r\n boolean isFound = false; // record whether the key is found\r\n // find the key and record the index of the key (i)\r\n for (HashNode node : hashTable[index]) {\r\n if (node.key.equals(key)) {\r\n isFound = true;\r\n break;\r\n }\r\n i++;\r\n }\r\n\r\n // if the key is found, remove with index of i. Otherwise return null\r\n if (isFound) {\r\n size--;\r\n return hashTable[index].remove(i).value;\r\n } else {\r\n return null;\r\n }\r\n }",
"public boolean removeInformation(String type,String removeKey){\n System.out.println(\"start remove\");\n if(type == null || removeKey == null)\n return false;\n Connection con = GetDBConnection.connectDB(\"booklibrarymanager\",\"root\",\"HanDong85\");\n userId = removeKey;\n String[][] res = queryUser();\n if(res == null)\n return false;\n String sql = \"delete from \" + type + \"information where \" + type +\"Id = ?;\";\n PreparedStatement preSQL;\n try{\n preSQL = con.prepareStatement(sql);\n preSQL.setString(1,removeKey);\n //System.out.println(\"delete from \" + type + \"information where \" + type + \"Id = \" + removeKey);\n int ok = preSQL.executeUpdate();\n GetDBConnection.closeCon(con);\n if(ok == 1)\n return true;\n return false;\n }\n catch (SQLException e){\n GetDBConnection.closeCon(con);\n return false;\n }\n }",
"Object remove(Object key) throws NullPointerException;",
"public removeKey_result(removeKey_result other) {\n __isset_bitfield = other.__isset_bitfield;\n this.success = other.success;\n }",
"protected abstract void _del(String key);",
"@Override\n\tpublic void eliminar(Object T) {\n\t\tSeccion seccionE= (Seccion)T;\n\t\tif(seccionE!=null){\n\t\t\ttry{\n\t\t\tString insertTableSQL = \"update seccion set estatus=?\" +\"where codigo=? and estatus='A'\";\n\t\t\tPreparedStatement preparedStatement = conexion.prepareStatement(insertTableSQL);\n\t\t\tpreparedStatement.setString(1, \"I\");\n\t\t\tpreparedStatement.setString(2, seccionE.getCodigo());\n\t\t\tpreparedStatement.executeUpdate();\n\t\t}catch(SQLException e){\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"No se elimino el registro\");\n\t\t}\n\t\tSystem.out.println(\"Eliminacion exitosa\");\n\t}\n\n\t}",
"@Override\n // override do metudo put\n public Administrador put(String key, Administrador value) {\n \n \n Administrador a = null;\n \n try {\n conn = Connect.connect();\n PreparedStatement stm = conn.prepareStatement(\"INSERT INTO Administrador(username,password,visivel)\\n\" +\n \"VALUES (?, ?,TRUE)\\n\" +\n \"ON DUPLICATE KEY UPDATE username=VALUES(username), password=VALUES(password),visivel=VALUES(visivel);\", Statement.RETURN_GENERATED_KEYS);\n \n stm.setString(1, value.getId());\n stm.setString(2, value.getPw());\n // executa a querie\n stm.executeUpdate();\n \n ResultSet rs = stm.getGeneratedKeys();\n if(rs.next()) {\n String newId = rs.getString(\"username\");\n if (!newId.equals(value.getId()))\n throw new PutAdministradorFailureException(\"Put Administradorfailure - falha na inserção de um Administrador na base de dados\");\n } \n a = value;\n } catch (SQLException | PutAdministradorFailureException | ClassNotFoundException e) {\n e.printStackTrace();\n } finally {\n Connect.close(conn);\n }\n return a;\n }",
"int deleteByPrimaryKey(RepStuLearningKey key);",
"public boolean delete(K key) {\n\t\treturn table.get(calcIndex(key)).delete(key);\n\n\t}",
"@Override\n\tpublic V remove(K key) {\n\t\treturn null;\n\t}",
"@org.junit.jupiter.api.Test\n void drop2ColisionesJuntos() {\n String key = \"0\";\n String value =\"David\";\n String key2 = \"11\";\n String value2 =\"ferrero\";\n HashTable hashTable = new HashTable();\n hashTable.put(key,value);\n hashTable.put(key2,value2);\n hashTable.put(\"22\",\"hola\");\n\n hashTable.drop(\"0\");\n hashTable.drop(\"11\");\n\n String esperado =\"bucket[0] = [22, hola]\\n\";\n Assertions.assertEquals(esperado,hashTable.toString());\n\n }",
"@Override\n\tpublic String remove(String key) {\n\t\tint hashVal = hashFunc(key);\n\t\twhile (hashArray[hashVal] != null) {\n\t\t\tif (hashArray[hashVal].value.equals(key)) {\n\t\t\t\thashArray[hashVal] = deleted;\n\t\t\t\tthis.numOfItems--;\n\t\t\t\treturn key;\n\t\t\t}\n\t\t\thashVal++;\n\t\t\thashVal = hashVal % size;\n\n\t\t}\n\t\treturn null;\n\t}",
"public void delete(DNA key){\n if(this.debug)\n System.out.println(\"ExtHash::delete >> eliminando cadena: \" + key.toString() + \", hashCode: \" + key.hashCode());\n\n Node actual_node = this.getReference(key);\n if(this.debug)\n System.out.println(\"ExtHash::delete >> altura del nodo: \" + actual_node.getAltura());\n\n int reference_page = actual_node.getReference();\n ArrayList<Integer> content = this.fm.read(reference_page); this.in_counter++;\n\n int last_page = reference_page, last_chain = 0;\n ArrayList<Integer> last_content = content, search_content;\n\n // last_block: referencia al ultimo bloque.\n // search_block: referencia al bloque con el elemento buscado.\n int last_block = reference_page, search_block = -1, search_pos = -1;\n int total_elements = 0, altura = actual_node.getAltura();\n\n while(true) {\n if(this.debug)\n System.out.println(\"ExtHash::delete >> referencia a pagina: \" + last_page);\n\n if(this.debug) {\n System.out.println(\"ExtHash::delete >> contenido de la pagina:\");\n for(int i=0; i<last_content.size(); i++)\n System.out.println(\" \" + last_content.get(i));\n }\n\n total_elements += last_content.get(0);\n if(search_block == -1) {\n for (int i = 1; i <= last_content.get(0); i++) {\n if (last_content.get(i) == key.hashCode()) {\n if(this.debug)\n System.out.println(\"ExtHash::delete >> cadena \" + key.hashCode() + \" encontrada\");\n search_pos = i;\n search_block = last_page;\n total_elements--;\n total_in--;\n break;\n }\n }\n }\n\n if(last_content.get(0) != 0) {\n last_block = last_page;\n last_chain = last_content.get(last_content.get(0));\n }\n\n if(last_content.get(0) != B - 2) {\n break;\n }\n\n if(this.debug)\n System.out.println(\"ExtHash::delete >> acceciendo a siguiente pagina\");\n\n last_page = last_content.get(B-1);\n last_content = this.fm.read(last_page); this.in_counter++;\n }\n\n ArrayList<Integer> new_content = new ArrayList<>();\n if(search_block != -1) {\n // se encontro el elemento buscado.\n // search_block: referencia al bloque que contiene la buscado.\n // last_block: referencia al ultimo bloque de la lista enlazada.\n\n search_content = this.fm.read(search_block); this.in_counter++;\n last_content = this.fm.read(last_block); this.in_counter++;\n\n if(search_block == last_block) {\n // elemento buscado estaba en la ultima pagina de la lista enlazada.\n new_content.add(search_content.get(0) - 1);\n for(int i=1; i<=search_content.get(0); i++) {\n if(i != search_pos)\n new_content.add(search_content.get(i));\n\n }\n if(search_content.get(0) == B-2)\n total_active_block--;\n\n } else {\n // elemento buscado no esta en la ultima pagina de la lista enlazada.\n new_content.add(search_content.get(0));\n for(int i=1; i<=search_content.get(0); i++) {\n if(i != search_pos)\n new_content.add(search_content.get(i));\n else\n new_content.add(last_chain);\n\n }\n new_content.add(search_content.get(B - 1));\n\n ArrayList<Integer> new_last_content = new ArrayList<>();\n new_last_content.add(last_content.get(0) - 1);\n for(int i=1; i<last_content.get(0); i++) {\n new_last_content.add(last_content.get(i));\n\n }\n if(last_content.get(0) == B-2)\n total_active_block--;\n\n this.fm.write(new_last_content, last_block); this.out_counter++;\n\n }\n this.fm.write(new_content, search_block); this.out_counter++;\n }\n\n // la pagina contiene pocos elementos, y no es parte del primer nodo\n\n if(total_elements < (B - 2) / 2 && search_block != -1 && 0 < altura){\n if(this.debug)\n System.out.println(\"ExtHash::delete >> limite de pagina, iniciando compresion\");\n this.compress(actual_node);\n }\n\n }",
"public boolean eliminarLoteria(int codigo) {\n\n String instruccion = \"delete from loteria where codigo =\" + codigo;\n boolean val = false;\n PreparedStatement pre;\n Connection con = null;\n try {\n con = Recurso.Conexion.getPool().getDataSource().getConnection();\n pre = con.prepareStatement(instruccion);\n pre.execute();\n val = true;\n } catch (SQLException ex) {\n ex.printStackTrace();\n\n } finally {\n if (con != null) {\n try {\n con.close();\n } catch (SQLException ex) {\n Logger.getLogger(GestorLoteria.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n return val;\n }\n\n }",
"@Override\n\n public Componente put(String key, Componente value) {\n \n \n Componente cp = null;\n \n try {\n conn = Connect.connect();\n \n //String com a querie -> inserir um Componente na BD\n PreparedStatement stm = conn.prepareStatement(\"INSERT INTO Componente (nome,tipo,designacao,preco,visivel,stock)\\n\" +\n \"VALUES (?, ?, ?, ?,TRUE,?)\\n\" +\n \"ON DUPLICATE KEY UPDATE nome=VALUES(nome), tipo=VALUES(tipo), designcao=VALUES(designcao), preco=VALUES(preco), visivel=VALUES(visivel),stock=VALUES(stock);\", Statement.RETURN_GENERATED_KEYS);\n \n //Parse dos dados Componentes argumento (value)\n stm.setString(1, value.getNome());\n stm.setString(2, value.getTipo());\n stm.setString(3, value.getDesignacao());\n stm.setDouble(4,value.getPreco());\n stm.setInt(5,value.getStock());\n \n // executa a querie\n stm.executeUpdate();\n \n this.adicionarIncompativeis(cp);\n this.adicionarObrigatorias(cp);\n\n \n ResultSet rs = stm.getGeneratedKeys();\n if(rs.next()) {\n String newId = rs.getString(\"nome\");\n if (!newId.equals(value.getNome()))\n throw new PutComponenteFailureException(\"Put Componente failure - falha na inserção de uma componente na base de dados\");\n }\n \n cp = value;\n } catch (SQLException | PutComponenteFailureException | ClassNotFoundException e) {\n e.printStackTrace();\n } finally {\n Connect.close(conn);\n }\n return cp;\n }",
"public boolean delete(K key);",
"@Override\n public V remove(K key) {\n return null;\n }",
"@org.junit.jupiter.api.Test\n void dropColision3() {\n String key = \"0\";\n String value =\"David\";\n String key2 = \"11\";\n String value2 =\"ferrero\";\n HashTable hashTable = new HashTable();\n hashTable.put(key,value);\n hashTable.put(key2,value2);\n hashTable.put(\"22\",\"hola\");\n hashTable.drop(\"22\");\n String esperado =\"bucket[0] = [0, David]\\n\" + \" -> [11, ferrero]\\n\";\n Assertions.assertEquals(esperado,hashTable.toString());\n int count = 2;\n Assertions.assertEquals(count,hashTable.count());\n }",
"public Entry remove(Object key) {\n int hashCode = key.hashCode();\n int index = compFunction(hashCode);\n\n if(defTable[index].isEmpty()) {\n return null;\n }\n\n Entry entry = new Entry();\n ListNode current = defTable[index].front();\n try{\n while(true) {\n if(( (Entry) current.item()).key().equals(key)) {\n entry.key = key;\n entry.value = ((Entry) current.item()).value();\n current.remove();\n size--;\n return entry;\n }\n if(current==defTable[index].back()) {\n break;\n }\n current = current.next();\n }\n } catch(Exception err) {\n System.out.println(err);\n }\n return null;\n }",
"public Entry remove(Object key) {\r\n if (find(key) == null) {\r\n return null;\r\n } else { \r\n try{\r\n int index = compFunction(key.hashCode());\r\n if (hash_table[index].size() == 1) {\r\n Entry entry = (Entry)hash_table[index].front().item();\r\n hash_table[index] = null;\r\n return entry;\r\n } else { \r\n DListNode current = (DListNode) hash_table[index].front();\r\n while(current.isValidNode()){\r\n Entry pair = (Entry) current.item();\r\n if(pair.key().equals(key)){\r\n current.remove();\r\n size--;\r\n return pair;\r\n }\r\n current = (DListNode) current.next();\r\n }\r\n \r\n System.out.println(\"Couldn't find the item\");\r\n return null;\r\n }\r\n \r\n }catch(InvalidNodeException e){\r\n return null;\r\n }\r\n }\r\n }",
"V remove(K key);",
"V remove(K key);",
"V remove(K key);",
"@org.junit.jupiter.api.Test\n void dropColision1() {\n String key = \"0\";\n String value =\"David\";\n String key2 = \"11\";\n String value2 =\"ferrero\";\n HashTable hashTable = new HashTable();\n hashTable.put(key,value);\n hashTable.put(key2,value2);\n hashTable.put(\"22\",\"hola\");\n hashTable.drop(\"0\");\n String esperado =\"bucket[0] = [11, ferrero]\\n\" + \" -> [22, hola]\\n\";\n Assertions.assertEquals(esperado,hashTable.toString());\n int count = 2;\n Assertions.assertEquals(count,hashTable.count());\n }",
"@Override\n\tpublic void eliminar(Seccion seccion) {\n\t\tentity.getTransaction().begin();\n\t\tentity.remove(seccion);\n\t\tentity.getTransaction().commit();\n\t}",
"@Override\n\tpublic void deleteByKey(Integer key) {\n\n\t}",
"@Override\n\tpublic V put(K key, V value) {\n\t\tint h = Math.abs(key.hashCode()) % nrb;// calculam hash-ul asociat cheii\n\n\t\tfor (int i = 0; i < b.get(h).getEntries().size(); i++) {\n\t\t\t// caut daca cheya mai este folosita si inlocuiesc elementul entry .\n\t\t\tif (b.get(h).e.get(i).getKey().equals(key)) {\n\t\t\t\tV x = b.get(h).getEntries().get(i).getValue();\n\t\t\t\tremove(key);\n\t\t\t\tb.get(h).e.add(new Entry<K, V>(key, value));\n\t\t\t\treturn x;\n\t\t\t}\n\t\t}\n\n\t\tb.get(h).e.add(new Entry<K, V>(key, value));\n\t\treturn null;\n\t}",
"@Override\n public void onSuccess(Void aVoid) {\n FirebaseDatabase.getInstance().getReference(Common.SHIPPER_INFO_TABLE)\n .child(Common.currentKey)//parent node of key/\n .removeValue()\n .addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Toast.makeText(TrackingOrder.this,\"Shipped\",Toast.LENGTH_SHORT).show();\n finish();\n }\n });\n }",
"public static void vaciartabla(){\n DefaultTableModel modelo=(DefaultTableModel) jtproveedores.getModel(); \n for (int i = 0; i < jtproveedores.getRowCount(); i++) {\n modelo.removeRow(i);\n i-=1;\n } \n }",
"void delete(String key);",
"@Override\n\tpublic V get(K pLlave) {\n\t\tint i = hash(pLlave);\n ArregloDinamico<NodoTabla<K,V>> lista = tablaDeHash[i];\n for(int j=1; j<=lista.size();j++){\n \tif(lista.getElement(j).darLlave().equals(pLlave)){\n \t\treturn (V) lista.getElement(j).darValor();\n \t}\n }\n \treturn null;\n\t}",
"public boolean delete(K key)\r\n\t{\r\n\t\tint size = SIZES[sizeIdx];\r\n\r\n\t\t// Probe no more iterations than the size of the table\r\n\t\tfor (int i = 0; i < size; ++i)\r\n\t\t{\r\n\t\t\t// Compute the next index in the probe sequence\r\n\t\t\tint index = probe(key, i, size);\r\n\r\n\t\t\t// If we reach an empty slot, we know the key isn't in the table\r\n\t\t\tif (table[index] == null)\r\n\t\t\t{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t// If we find the key and it isn't a tombstone\r\n\t\t\telse if (table[index].key.equals(key) && !table[index].isTombstone)\r\n\t\t\t{\r\n\t\t\t\t// Make it a tombstone\r\n\t\t\t\ttable[index].isTombstone = true;\r\n\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// If we've been probing for a long time, the key probably isn't in the\r\n\t\t// table\r\n\t\treturn false;\r\n\t}",
"@Override\n\t\t\tpublic AnalysisResult remove(Object key) {\n\t\t\t\treturn null;\n\t\t\t}",
"@Override\n\tpublic boolean eliminaRisposta(Long id) {\n\t\tDB db = getDB();\n\t\tMap<Long, Risposta> risposte = db.getTreeMap(\"risposte\");\n\t\trisposte.remove(id);\n\t\tdb.commit();\n\t\t\n\t\tif(!risposte.containsKey(id))\n\t\t\treturn true;\n\t\telse \n\t\t\treturn false;\n\t}",
"public boolean borrar(String pTabla, String pCondicion) {\n Statement s; // se utiliza para inicializar la conexión\n String sentencia;\n try {\n s = this.conn.createStatement();\n sentencia = \"DELETE FROM \" + pTabla + \" WHERE \" + pCondicion; // se crea el BORRADO\n s.execute(sentencia); //\n return true;\n } catch (Exception e) {\n System.out.printf(\"Error: \" + e.toString());\n return false;\n }\n }",
"public V remove(K key) throws InvalidKeyException;",
"public void eliminar(){\n conexion = base.GetConnection();\n try{\n PreparedStatement borrar = conexion.prepareStatement(\"DELETE from usuarios where Cedula='\"+this.Cedula+\"'\" );\n \n borrar.executeUpdate();\n // JOptionPane.showMessageDialog(null,\"borrado\");\n }catch(SQLException ex){\n System.err.println(\"Ocurrió un error al borrar: \"+ex.getMessage());\n \n }\n }",
"public abstract V remove(K key);"
] | [
"0.6387818",
"0.6291138",
"0.61274934",
"0.61250556",
"0.5969863",
"0.5927049",
"0.5893134",
"0.5868959",
"0.5865056",
"0.5848621",
"0.5759686",
"0.5738911",
"0.5732822",
"0.56909275",
"0.5683473",
"0.5680539",
"0.56264627",
"0.5600855",
"0.55792344",
"0.5567465",
"0.5558871",
"0.55402136",
"0.55191374",
"0.5515575",
"0.5508177",
"0.5493527",
"0.5491098",
"0.5475002",
"0.54715484",
"0.54685247",
"0.5467715",
"0.5461259",
"0.54519075",
"0.54422516",
"0.54375315",
"0.5422068",
"0.542046",
"0.5394652",
"0.537316",
"0.5365931",
"0.53445035",
"0.53366303",
"0.533092",
"0.5324761",
"0.53148144",
"0.5284496",
"0.527925",
"0.5225253",
"0.52203614",
"0.52142626",
"0.52047807",
"0.52008194",
"0.519839",
"0.5196776",
"0.51892734",
"0.5178166",
"0.5176355",
"0.5170747",
"0.5170125",
"0.5166875",
"0.5166875",
"0.5160734",
"0.51524967",
"0.51501983",
"0.51498926",
"0.5144751",
"0.5137306",
"0.5136249",
"0.5135967",
"0.51169574",
"0.51145446",
"0.5112796",
"0.51117915",
"0.51072377",
"0.5105521",
"0.51042855",
"0.51036394",
"0.50994027",
"0.5098769",
"0.5097435",
"0.50945026",
"0.5087308",
"0.50856805",
"0.50856805",
"0.50856805",
"0.50713974",
"0.5054392",
"0.5049815",
"0.5048354",
"0.50392294",
"0.5034933",
"0.5027053",
"0.50262237",
"0.50258094",
"0.50233245",
"0.5011521",
"0.5006404",
"0.5003354",
"0.5003223",
"0.4997838"
] | 0.5959403 | 5 |
Implementation of generic dao to handle with activity entity in database | public interface ActivityDao extends GenericDao<Activity> {
/**
* Find pageable activities in database
*
* @param page page of activities list
* @param size size of page of activities list
* @return pageable list of activities
*/
List<Activity> findAllPageable(int page, int size);
/**
* @return number of activity records
*/
long getNumberOfRecords();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface UserActivityDao {\n\n\n /**\n * Finds all userActivity in DB\n * @return List of all activities\n * @throws DataNotFoundException if connection is down, broken or unable to retrieve information for certain reasons\n */\n List<UserActivity> findAllUserActivityInDB() throws DataNotFoundException;\n\n /**\n * Finds UserActivity by userId\n * @param userId - UserActivity userId\n * @return UserActivity by userId\n * @throws DataNotFoundException if connection is down, broken or unable to retrieve information for certain reasons\n */\n UserActivity findUserActivityByUserId(int userId) throws DataNotFoundException;\n /**\n * Finds UserActivity by activityId\n * @param activityId - UserActivity activityId\n * @return UserActivity by activityId\n * @throws DataNotFoundException if connection is down, broken or unable to retrieve information for certain reasons\n */\n UserActivity findUserActivityByActivityId(int activityId) throws DataNotFoundException;\n /**\n * Adds new userActivity to DB\n * @param userActivity - userActivity to add in DB\n * @return true if operation success and false if fails\n */\n boolean addUserActivityToDB(UserActivity userActivity);\n\n /**\n * Updats userActivity in DB\n * @param userActivity - userActivity to update in DB\n * @return true if operation success and false if fails\n */\n boolean updateUserActivityInDB(UserActivity userActivity);\n\n /**\n * Deletes userActivity from DB\n * @param userActivity - UserActivity to delete from DB\n * @return true if operation success and false if fails\n */\n boolean deleteUserActivityFromDB(UserActivity userActivity);\n}",
"public interface ProductActivityDao {\n int insert(ProductActivity productActivity);\n ProductActivity existClient(ProductActivity productActivity);\n int update(ProductActivity productActivity);\n int updateByUp(ProductActivity productActivity);\n\n List<ProductActivity> getList(ProductActivityPara productActivityPara);\n long getListCount(ProductActivityPara productActivityPara);\n}",
"public interface ActivityFeedDAO extends ActivitiesDAO\n{\n public static final int MAX_LEN_USER_ID = 255; // needs to match schema: feed_user_id, post_user_id\n public static final int MAX_LEN_SITE_ID = 255; // needs to match schema: site_network\n public static final int MAX_LEN_ACTIVITY_TYPE = 255; // needs to match schema: activity_type\n public static final int MAX_LEN_ACTIVITY_SUMMARY = 4000; // needs to match schema: activity_summary\n public static final int MAX_LEN_ACTIVITY_FORMAT = 255; // needs to match schema: activity_format\n public static final int MAX_LEN_APP_TOOL_ID = 36; // needs to match schema: app_tool\n \n public long insertFeedEntry(ActivityFeedEntity activityFeed) throws SQLException;\n \n public int deleteFeedEntries(Date keepDate) throws SQLException;\n \n public int deleteUserFeedEntries(String feedUserId, String format, Date keepDate) throws SQLException;\n \n public int deleteSiteFeedEntries(String siteId, String format, Date keepDate) throws SQLException;\n \n public List<ActivityFeedEntity> selectFeedsToClean(int maxFeedSize) throws SQLException;\n \n public List<ActivityFeedEntity> selectUserFeedEntries(String feedUserId, String format, String siteId, boolean excludeThisUser, boolean excludeOtherUsers) throws SQLException;\n \n public List<ActivityFeedEntity> selectSiteFeedEntries(String siteUserId, String format) throws SQLException;\n}",
"public interface ActivityDAO extends BaseDAO<Activity>\n{\n Activity findOne(UUID uuid);\n\n List<Activity> findBySalesMethodOrderByIndexAsc(SalesMethod salesMethod);\n\n List<Activity> findBySalesMethod(SalesMethod salesMethod);\n\n List<Activity> findByUuidIn(Collection<UUID> idList);\n\n List<Activity> findBySalesMethodAndNameCaseInsensitive(SalesMethod salesMethod, String name);\n\n void removeBySalesMethodIn(List<SalesMethod> salesMethodList);\n\n List<Activity> findByActiveSalesMethodIn(List<SalesMethod> salesMethodList);\n}",
"public interface ActivityReservationDao {\n List<ActivityReservationBo> query(Map<String,Object> map);\n int querycount();\n int queryListcount(Map<String,Object> map);\n void updatestatus(ActivityReservationBo activityReservationBo);\n ActivityReservationBo queryById(Integer id);\n\n}",
"public interface ActivityManager extends GenericManager<Activity, Long> {\n// -------------------------- OTHER METHODS --------------------------\n\n Activity getActivity(Long activityID);\n\n List<Activity> getActivities();\n\n List<Activity> getActivitiesByDepartament(Long idDepartament);\n\n void removeActivity(Long activityId);\n\n Activity saveActivity(Activity activity);\n\n List<Activity> search(String searchTerm);\n}",
"public interface BaseDao<T extends BaseEntity> {\r\n\t/**\r\n\t * Adds entity to database\r\n\t * \r\n\t * @param entity\r\n\t * creating entity\r\n\t */\r\n\tvoid create(T entity);\r\n\r\n\t/**\r\n\t * Gets entity from database\r\n\t * \r\n\t * @param id\r\n\t * id of entity\r\n\t * @return found entity\r\n\t */\r\n\tT read(int id);\r\n\r\n\t/**\r\n\t * Gets all certain kind entities from database\r\n\t * \r\n\t * @return List of all entities\r\n\t */\r\n\tList<T> readAll();\r\n\r\n\t/**\r\n\t * Updates entity in database\r\n\t * \r\n\t * @param entity\r\n\t * entity for update\r\n\t */\r\n\tvoid update(T entity);\r\n\r\n\t/**\r\n\t * Deletes entity from database\r\n\t * \r\n\t * @param entityId\r\n\t * id of entity\r\n\t */\r\n\tvoid delete(int entityId);\r\n\r\n\t/**\r\n\t * get values from ResultSet and set them to entity object\r\n\t * \r\n\t * @param rs\r\n\t * ResultSet object\r\n\t * \r\n\t * @return entity object\r\n\t * @throws SQLException\r\n\t * if the columnLabel is not valid;\r\n\t */\r\n\tT buidEntity(ResultSet rs) throws SQLException;\r\n}",
"public interface GenericDao<Entity> {\n\n /**\n * Persists entity into database.\n * @param entity Entity which is going to be persisted\n * @return Saved entity.\n */\n Entity save(Entity entity);\n\n /**\n * Deletes entity from database.\n * @param entity Entity which is going to be deleted.\n */\n void delete(Entity entity);\n\n /**\n * Merges detached entity\n * @param entity Detached entity\n * @return Entity, which is menaged now.\n */\n Entity merge(Entity entity);\n\n /**\n * Deletes entity from database.\n * @param id Id of entity which is going to be deleted.\n */\n void deleteEntityById(Long id);\n\n /**\n * Returns entity with given id.\n * @param id Id of entity.\n * @return Entity with given id.\n */\n Entity getEntityById(Long id);\n\n /**\n * Returns all entities.\n * @return All entities from table.\n */\n List<Entity> getAll();\n}",
"@Dao\n@TypeConverters({DateConverter.class})\npublic interface DAO {\n\n @Insert(onConflict = OnConflictStrategy.REPLACE)\n void insert(DatabaseModel databaseModels);\n\n @Query(\"Select *from todoitem\")\n LiveData<List<DatabaseModel>> getAllTask();\n\n @Query(\"Select * from todoitem where id = :id\")\n LiveData<DatabaseModel> getTaskById(int id);\n\n @Query(\"Select * from todoitem where tag = :tag\")\n LiveData<List<DatabaseModel>> getTaskByTag(String tag);\n\n @Query(\"Select * from todoitem where priority = :priority\")\n LiveData<List<DatabaseModel>> getTaskByPriority(String priority);\n\n @Query(\"Select * from todoitem where isTaskDone = :isDone\")\n LiveData<List<DatabaseModel>> getTaskByStatus(Boolean isDone);\n\n @Query(\"Delete from todoitem where id = :id\")\n void deleteById(int id);\n\n @Delete\n void delete(DatabaseModel databaseModel);\n\n\n}",
"@Dao\npublic interface TaskDao {\n\n @Query(\"Select * from Task\")\n List<Task> getAll();\n\n @Query(\"Select * from Task where id = :taskId \")\n Task findById(String taskId);\n\n @Insert(onConflict = OnConflictStrategy.REPLACE)\n void addTask(Task task);\n\n @Update(onConflict = OnConflictStrategy.REPLACE)\n void updateTask(Task task);\n\n @Delete\n void delete(Task byId);\n}",
"protected abstract Dao getDaoIntance(Context context);",
"@Dao\npublic interface TaskDao {\n /**\n * The name of the table tasks are stored in.\n */\n String TABLE = \"task\";\n\n /**\n * Queries the database for all of its Tasks and returns them in a LiveData object.\n *\n * @return a LiveData containing a List with all of the table's Tasks\n */\n @Query(\"SELECT * FROM \" + TABLE)\n LiveData<List<Task>> getAll();\n\n /**\n * Queries the database for all of its Tasks and returns them in a List, synchronously.\n * Should never be used in the UI, only in tests.\n *\n * @return a List containing all of the table's Tasks\n */\n @Query(\"SELECT * FROM \" + TABLE)\n List<Task> getAllSync();\n\n /**\n * Queries the database for a Task with id id.\n *\n * @param id the id to search for\n * @return a Task with id id or null if none was found\n */\n @Query(\"SELECT * FROM \" + TABLE + \" WHERE mId == :id\")\n @Nullable\n Task get(long id);\n\n /**\n * Inserts task into the database. Returns its id, which is automatically assigned\n * if it didn't already have one.\n *\n * @param task the task to insert into the database\n * @return the id of the task that has been inserted\n */\n @Insert\n long insert(Task task);\n\n /**\n * Inserts all of the tasks into the database.\n *\n * @param tasks the tasks to insert\n * @return an array containing the ids of the tasks that have been inserted\n */\n @Insert\n long[] insertAll(Task... tasks);\n\n /**\n * Deletes all of the Tasks passed in from the database.\n *\n * @param task the tasks to delete\n */\n @Delete\n void delete(Task... task);\n}",
"public interface ActivityService {\n\n /**\n * @Description: 获得所有的活动信息\n * @Param: []\n * @return: java.util.List<com.edu.ccnu.app.demo.pojo.Activity>\n * @Author: Anakin\n * @Date: 2020/9/23\n */\n public List<Activity> getAllActivity();\n\n /**\n * @Description: 分页获得活动的信息\n * @Param: []\n * @return: com.github.pagehelper.PageInfo<com.edu.ccnu.app.demo.pojo.Activity>\n * @Author: Anakin\n * @Date: 2020/9/23\n */\n public PageInfo<Activity> getActivityByPage(Integer pageNum, Integer pageSize);\n\n /**\n * @Description: 根据id获得活动的信息\n * @Param: [activityId]\n * @return: com.edu.ccnu.app.demo.pojo.Activity\n * @Author: Anakin\n * @Date: 2020/9/23\n */\n public Activity getActivityById(String activityId);\n\n /**\n * @Description: 插入一条活动的信息\n * @Param: [activity]\n * @return: java.lang.Integer\n * @Author: Anakin\n * @Date: 2020/9/23\n */\n public Activity insertActivity(Activity activity);\n\n /**\n * @Description: 更新一条活动的信息\n * @Param: [activity]\n * @return: java.lang.Integer\n * @Author: Anakin\n * @Date: 2020/9/23\n */\n public Integer updateActivity(Activity activity);\n\n /**\n * @Description: 根据id删除一条活动信息\n * @Param: [activityId]\n * @return: java.lang.Integer\n * @Author: Anakin\n * @Date: 2020/9/23\n */\n public Integer deleteActivityById(String activityId);\n\n /**\n * @Description: 根据一组id对活动进行批量删除\n * @Param: [ids]\n * @return: java.lang.Integer\n * @Author: Anakin\n * @Date: 2020/9/23\n */\n public Integer deleteActivityByIds(String ids);\n\n /**\n * 执行定时任务,做到更新活动状态信息\n */\n void updateActivityState();\n\n\n}",
"public interface TipoActividadDAO {\n \n /**\n * Funció que engloba les funcións que s'utilitzen per crear tipus d'activitat\n * @param tipoAct\n * @return String\n * @throws PersistenceException\n * @throws ClassNotFoundException \n */\n public abstract String callCrear(TipoActividad tipoAct) throws PersistenceException, ClassNotFoundException;\n \n /**\n * Verifica que no existeixi un tipus amb el mateix nom\n * @param tipoAct\n * @return int\n * @throws PersistenceException\n * @throws ClassNotFoundException \n */\n public abstract int getTipoByName(TipoActividad tipoAct) throws PersistenceException, ClassNotFoundException;\n \n /**\n * Inserta un tipus d'activitat en la base de dades\n * @param tipoAct\n * @return String\n * @throws PersistenceException\n * @throws ClassNotFoundException \n */\n public abstract String insertarTipoActividad(TipoActividad tipoAct) throws PersistenceException, ClassNotFoundException;\n \n /**\n * Agafa els tipus d'activitats que esten actius\n * @return List de TipoActividad\n * @throws PersistenceException\n * @throws ClassNotFoundException \n */\n public abstract List<TipoActividad> getTiposActividad() throws PersistenceException, ClassNotFoundException;\n \n /**\n * Agafa tots els tipus d'activitats \n * @return List de TipoActividad\n * @throws PersistenceException\n * @throws ClassNotFoundException \n */\n public abstract List<TipoActividad> getTiposActividadAdm() throws PersistenceException, ClassNotFoundException;\n \n /**\n * Seleccionar el tipo de actividad d'una actividad\n * @param activity\n * @return String\n * @throws PersistenceException\n * @throws ClassNotFoundException \n */\n public abstract String getTipoByAct(Actividad activity) throws PersistenceException, ClassNotFoundException;\n\n /**\n * Guarda la sessió del tipus d'activitat\n * @param tipoAct\n * @param pagina\n * @throws PersistenceException\n * @throws ClassNotFoundException \n */\n public abstract void guardarSession(TipoActividad tipoAct, String pagina) throws PersistenceException, ClassNotFoundException;\n \n /**\n * Funció que engloba les funcións per editar un tipus d'activitat\n * @param tipoAct\n * @return String\n * @throws PersistenceException\n * @throws ClassNotFoundException \n */\n public abstract String callEditar(TipoActividad tipoAct) throws PersistenceException, ClassNotFoundException;\n \n /**\n * Funció que permet editar el Tipus d'activitat\n * @param tipoAct\n * @return String\n * @throws PersistenceException\n * @throws ClassNotFoundException \n */\n public abstract String editarTipoActividad(TipoActividad tipoAct) throws PersistenceException, ClassNotFoundException;\n}",
"@Repository\r\npublic interface TrafficDao {\r\n\r\n List<TrafficMenu> getMenuByPIdIsNull();\r\n\r\n List<TrafficMenu> getMenuByPId(Long pid);\r\n\r\n int addTrafficMenu(TrafficMenu trafficMenu);\r\n\r\n int updateTrafficMenu(TrafficMenu trafficMenu);\r\n\r\n int deleteTrafficMenu(Long id);\r\n\r\n TrafficContent findContentByTId(Long tid);\r\n\r\n int saveTrafficContent(TrafficContent trafficContent);\r\n\r\n int updateTrafficContent(TrafficContent trafficContent);\r\n}",
"public interface EntityDao<T extends Entity> {\n\n\tint insert(T t);\n\tT findById(int id);\n\tint update(T t);\n\tList<T> queryInIds(@Param(\"ids\")Collection<Integer> ids);\n\n\tList<T> queryAll(RowBounds rowBounds);\n\n\tint batchInsert(List<T> items);\n\n}",
"public interface DailyDao {\n public boolean addDeily(Daily daily);\n\n public List<Daily> getAllDaily();\n}",
"public interface GenericDao<T extends Identified<PK>, PK extends Serializable> {\n\n /**\n * Creates new entry and returns corresponding domain object\n *\n * @return domain object\n * @throws SQLException\n */\n T create() throws PersistException;\n\n /**\n * Creates new entry corresponding to domain object\n *\n * @param obj domain object\n * @return domain object\n * @throws SQLException\n */\n T persist(T obj) throws PersistException;\n\n /**\n * Find entry corresponding to domain object by primary key\n *\n * @param key entity primary key\n * @return domain object if found, else null\n * @throws SQLException\n */\n T getByPk(int key) throws PersistException;\n\n /**\n * Update entry corresponding to domain object state\n *\n * @param obj domain object\n * @throws SQLException\n */\n void update(T obj) throws PersistException;\n\n /**\n * Delete entry corresponding to domain object from database\n *\n * @param obj domain object\n * @throws SQLException\n */\n void delete(T obj) throws PersistException;\n\n /**\n * Get all entries from database\n *\n * @return list of domain objects\n * @throws SQLException\n */\n List<T> getAll() throws PersistException;\n\n}",
"public interface AspectDao {\n void insert(AspectEntity aspectEntity);\n void edit(AspectEntity aspectEntity);\n void delete(int aspectID);\n AspectEntity getAspect(int aspectID);\n List getAllAspects();\n}",
"public interface ActivityService {\n //分页展示首页的活动列表的接口\n PageInfo<HomeActivity> getHomeActivityPageInfo(\n Integer page, Integer rows, double coordLong, double coordLat);\n\n //搜索活动列表\n //分页返回搜索结果\n PageInfo<HomeActivity> getHomeActivityPageInfo(\n Integer page, Integer rows, double coordLong, double coordLat,\n String activityName);\n\n //根据活动类别返回对应活动列表\n //分页返回结果\n PageInfo<HomeActivity> getHomeActivityPageInfo(\n Integer page, Integer rows, double coordLong, double coordLat,\n String category, Integer collation, String district);\n\n //根据活动id和经纬度返回包装有志愿者等信息的活动详情\n ActivityDetails getActivityById(\n Integer id, double coordLong, double coordLat);\n\n //创建活动\n boolean createActivity(Activity activity);\n\n //根据志愿者id返回该志愿者参与的活动列表\n PageInfo<ActivityDetails> getActivityPageInfoByVolunteerId(\n Integer page, Integer rows, Integer id);\n\n //根据志愿者id返回该志愿者的服务历史\n PageInfo<ActivityDetails> getHistoricalActivityPageInfo(\n Integer page, Integer rows, Integer id);\n\n //根据组织id返回该组织的所有活动\n PageInfo<ActivityDetails> getActivityPageInfoByOrganizationId(\n Integer page, Integer rows, Integer id);\n\n //根据活动id和状态id更新活动\n String updateActivityStatusById(\n Integer id, Integer activityStatusId);\n}",
"public interface BaseDao {\n\n public Session getMySession();\n\n public void close(Session session);\n //实体处理\n\n /**\n * 保存实体\n * @param t 实体对象\n * @param <T>\n * @return\n */\n public <T> boolean saveEntity(T t);\n\n /**\n * 删除实体\n * @param t 实体对象\n * @param <T>\n * @return\n */\n public <T> boolean deleteEntity(T t);\n\n /**\n * 更新实体\n * @param t 实体对象\n * @param <T>\n * @return\n */\n public <T> boolean updateEntity(T t);\n\n /**\n * 获得实体\n * @param t 实体类\n * @param id 实体id\n * @param <T>\n * @return\n */\n public <T> T getEntity(Class t,Serializable id);\n\n //批量处理\n\n /**\n * 查询\n * @param hql hql语句\n * @param objects\n * @return\n */\n public <T> List<T> queryByHql(String hql,Object...objects);\n\n /**\n * 分页查询\n * @param hql 查询语句\n * @return\n */\n public <T> List<T> queryForPages(final String hql, final Object[] params,\n final int start, final int limit);\n}",
"public interface MetricDayDao extends BaseDao<MetricDay> {\n List<MetricDay> queryByProjectIdList(Map<String, Object> params);\n\n List<MetricDay> findByProjectIds(List<String> idList);\n\n void insertDataByParentId(Map<String, Object> params);\n\n int deleteByProjectId(Map<String, Object> params);\n\n void batchUpdateByProjectNumAndDate(List<MetricDay> list);\n \n void batchUpdateShopSales(List<BsShopSales> list);\n\n int insertOrUpdateUserMetrics(MetricDay metricDay);\n \n int batchUpdateByMemberAndPotential(String runDate);\n \n List<MetricDay> queryMetricMonthByDate(Map<String, Object> params);\n \n List<MetricDay> queryMetricWeekByDate(Map<String, Object> params);\n \n List<BsShopSales> listShopSalesByDateList(List<String> dates);\n \n}",
"public interface VisitLineDao extends BaseDao<VisitLine, Long> {\n\n List<VisitLineListModel> getAllVisitLineListModel();\n\n List<VisitLineListModel> getAllVisitLineListModel(Date from, Date to);\n\n List<LabelValue> getAllVisitLineLabelValue();\n\n VisitLineListModel getVisitLineListModelByBackendId(long visitlineBackendId);\n\n VisitLine getVisitLineByBackendId(Long backendId);\n\n}",
"public interface GenericDao <Entity extends Serializable, ID extends Object>{\n Entity findById(ID id);\n List<Entity> findAll(int isRef);\n List<Entity> findByName(String name);\n\n int insert(Entity entity);\n int update(Entity entity);\n int delete(Entity entity);\n int delete(ID id);\n}",
"public interface TaskLinkTaskDao {\n void insert(TaskLinkTask taskLinkTask);\n void update(TaskLinkTask taskLinkTask);\n void updateCurrentId(@Param(value = \"currentId\")String currentId,@Param(value = \"id\")Long id);\n TaskLinkTask getTaskLinkTaskByCurrentId(String currentId);\n}",
"@Dao\npublic interface MentorDAO {\n @Insert\n void insertMentor(Mentor mentor);\n\n @Update\n void updateMentor(Mentor mentor);\n\n @Delete\n void deleteMentor(Mentor mentor);\n\n @Query(\"SELECT * FROM Mentors\")\n LiveData<List<Mentor>> getAllMentors();\n\n\n @Query(\"SELECT * FROM Mentors WHERE MentorId = :mentorId\")\n Mentor getMentorById(int mentorId);\n\n @Query(\"SELECT * FROM Mentors WHERE CourseId = :courseId\")\n LiveData<List<Mentor>> getMentorsByCourseId(int courseId);\n}",
"public interface BaseDao<T> {\n\n /**\n * save the entity\n * @param t\n * @throws Exception\n */\n void save(T t) ;\n /**\n * update the entity\n * @param t\n * @throws Exception\n */\n void update(T t) ;\n /**\n * delete the entity\n * @param t\n * @throws Exception\n */\n void delete(T t) ;\n /**\n * find by id\n * @param id\n * @return\n * @throws Exception\n */\n T findById(Serializable id) ;\n /**\n * find the list of the entity\n * @return\n * @throws Exception\n */\n List<T> findAll() ;\n /**\n * get the entity count\n * @return\n * @throws Exception\n */\n int findAllCount() ;\n /**\n * find entities by criteria\n * @param criteria\n * @return\n * @throws Exception\n */\n List<T> findByCriteria(Criteria criteria) ;\n /**\n * find the entities by example\n * @param t\n * @return\n * @throws Exception\n */\n List<T> findByExample(T t) ;\n /**\n * find entities by hql\n * @param hql\n * @param objects\n * @return\n * @throws Exception\n */\n List<Object[]> findByHql(String hql, final Object... objects) ;\n /**\n * find the object by sql\n * @param sql\n * @param objects\n * @return\n */\n List<Object[]> findBySql(String sql, final Object... objects);\n}",
"@Dao\npublic interface MeasurementDao {\n\n /** Fetch all measuremnts in table\n * @author Yehor Kaliuzhniy\n * @return List of measuremnts\n */\n @Query(\"SELECT * FROM measurements\")\n List<Measurement> findAll();\n\n /** Fetch measuremnt by id\n * @author Yehor Kaliuzhniy\n * @param measurementId id of needed measurment\n * @return Measurement object or null\n */\n @Query(\"SELECT * FROM measurements WHERE id = :measurementId\")\n Measurement find(long measurementId);\n\n\n @Query(\"SELECT id, measured_at FROM measurements WHERE measured_at >= :startDate AND measured_at < :endDate\")\n @TypeConverters({DateConverter.class})\n LiveData<List<MeasurementEvent>> findForPeriod(Date startDate, Date endDate);\n\n\n /** Fetch measuremnts in period\n * @author Yehor Kaliuzhniy\n * @param startDate start date of period\n * @param endDate end date of period\n * @return List of Measurement objects\n */\n @Query(\"SELECT id, measured_at FROM measurements WHERE measured_at >= :startDate AND measured_at < :endDate\")\n @TypeConverters({DateConverter.class})\n List<MeasurementEvent> findForPeriodTest(Date startDate, Date endDate);\n\n\n /** Insert measuremnts in table\n * @author Yehor Kaliuzhniy\n * @param measurement\n * @return id of inserted measuremnet\n */\n @Insert\n long insert(Measurement measurement);\n\n /** Multimple insert measuremnts in table\n * @author Yehor Kaliuzhniy\n * @param measurements\n */\n @Insert\n void insertAll(Measurement... measurements);\n\n\n /** Update existing record in table\n * @author Yehor Kaliuzhniy\n * @param measurement\n */\n @Update\n void update(Measurement measurement);\n\n /** Delete existing record in table\n * @author Yehor Kaliuzhniy\n * @param measurement\n */\n @Delete\n void delete(Measurement measurement);\n}",
"public interface GenericDao<T> {\n\n /**\n * Creates passed entity.\n * @param object entity\n */\n void create(T object);\n\n /**\n * Gets entity by id.\n * @param id id\n * @return entity\n */\n T read(int id);\n\n /**\n * Updates passed entity.\n * @param object entity\n */\n void update(T object);\n\n /**\n * Deletes passed entity.\n * @param object entity\n */\n void delete(T object);\n\n /**\n * Gets total entities count.\n * @return entities count\n */\n int getTotalCount();\n\n /**\n * Gets all entities.\n * @return a list of entities\n */\n List<T> getAll();\n\n /**\n * Gets all entities by specified range.\n * @param firstItemNumber first item number of range (first item has 0 index)\n * @param itemsCount items count of range\n * @param sortBy sort by\n * @param sortTo sort direction\n * @return a list of entities\n */\n List<T> getAllByRange(int firstItemNumber,\n int itemsCount,\n String sortBy,\n String sortTo);\n}",
"public interface Activity extends EJBObject {\r\n public void setLinkCondition(String linkCondition, Vector binds) throws RemoteException;\r\n\r\n public void setData(ActivityDao attrs) throws RemoteException;\r\n\r\n public ActivityDao getData() throws RemoteException;\r\n\r\n public void insert(ActivityDao attrs) throws RemoteException, DupKeyException, UserException;\r\n\r\n public void update(ActivityDao attrs) throws RemoteException, UserException;\r\n\r\n public void delete(Vector<String> actlistID) throws RemoteException, ConstraintViolatedException, UserException;\r\n\r\n public void findByPrimaryKey(ActivityDao attrs) throws RemoteException, RowNotFoundException, UserException;\r\n\r\n public void findNext(ActivityDao attrs) throws RemoteException, FinderException, RowNotFoundException;\r\n\r\n public void findPrev(ActivityDao attrs) throws RemoteException, FinderException, RowNotFoundException;\r\n\r\n public Collection listAll() throws RemoteException, RowNotFoundException, UserException;\r\n\r\n public Collection find(ActivityDao attrs) throws RemoteException, FinderException, RowNotFoundException;\r\n\r\n public Collection findExact(ActivityDao attrs) throws RemoteException, FinderException, RowNotFoundException;\r\n\r\n public String[] lookupDesc(Object[] pkKeys) throws RemoteException, RowNotFoundException;\r\n\r\n public Collection<ActivityDao> getActivityTree(String startActivityNode) throws RemoteException, RowNotFoundException, UserException;\r\n}",
"public interface ITrafficDao {\r\n\r\n\t/**\r\n\t * Returns a paginated list of incidents according to some filter criteria\r\n\t * @param filter\r\n\t * @param offset\r\n\t * @param pageSize\r\n\t * @return\r\n\t */\r\n\tpublic List<TrafficIncident> getTraffic(Filter filter, int offset, int pageSize);\r\n\t\r\n\t/**\r\n\t * Returns the count of the filtered results (used for pagination)\r\n\t * @param filter\r\n\t * @return\r\n\t */\r\n\tpublic Long getCount(Filter filter);\r\n\t\r\n\t/**\r\n\t * Returns the initial clustering key-value pairs for the overview\r\n\t * @param filter\r\n\t * @return\r\n\t */\r\n\t public List<ParameterValueObject> getClustering(Filter filter);\r\n\t \r\n\t /**\r\n\t * Returns detailed data for a specific entry with Twitter link\r\n\t * @param filter\r\n\t * @return\r\n\t */\r\n\t public TrafficIncident getIncidentById(Filter filter);\r\n}",
"public interface BaseDao<T , PK> {\n\n /**\n * 获取列表\n *\n * @param queryRule\n * 查询条件\n * @return\n * @throws Exception\n */\n List<T> select(QueryRule queryRule) throws Exception;\n\n /**\n * 获取分页结果\n *\n * @param queryRule\n * 查询条件\n * @param pageNo\n * 页码\n * @param pageSize\n * 每页条数\n * @return\n * @throws Exception\n */\n Page<?> select(QueryRule queryRule , int pageNo , int pageSize) throws Exception;\n\n /**\n * 根据SQL获取列表\n *\n * @param sql\n * sql语句\n * @param args\n * 参数\n * @return\n * @throws Exception\n */\n List<Map<String , Object>> selectBySql(String sql , Object... args) throws Exception;\n\n /**\n * 根据SQL获取分页\n *\n * @param sql\n * SQL语句\n * @param param\n *\n * @param pageNo\n * 页码\n * @param pageSize\n * 每条页码数\n * @return\n * @throws Exception\n */\n Page<Map<String , Object>> selectBySqlToPage(String sql , Object[] param , int pageNo , int pageSize) throws Exception;\n\n /**\n * 删除一条记录\n * @param entity\n * entity中的id不能为空。如果id为空,其他条件不能为空。都为空不执行。\n * @return\n * @throws Exception\n */\n boolean delete(T entity) throws Exception;\n\n /**\n * 批量删除\n * @param list\n * @return 返回受影响的行数\n * @throws Exception\n */\n int deleteAll(List<T> list) throws Exception;\n\n /**\n * 插入一条记录并返回插入后的ID\n * @param entity\n * 只要entity不等于null,就执行插入\n * @return\n * @throws Exception\n */\n PK insertAndReturnId(T entity) throws Exception;\n\n /**\n * 插入一条记录,自增id\n * @param entity\n * @return\n * @throws Exception\n */\n boolean insert(T entity) throws Exception;\n\n /**\n * 批量插入\n *\n * @param list\n * @return\n * 返回受影响的行数\n * @throws Exception\n */\n int insertAll(List<T> list) throws Exception;\n\n /**\n * 修改一条记录\n * @param entity\n * entity中的ID不能为空。如果ID为空,其他条件不能为空。都为空不执行。\n * @return\n * @throws Exception\n */\n boolean update(T entity) throws Exception;\n}",
"public interface DotaMaxDAO {\n\n\n /**\n * 将hero实例存储到数据库。\n */\n void insertHeroes(List<Heroes> heroList);\n\n /**\n * 将Item实例存储到数据库。\n */\n void insertItems(List<Items> itemsList);\n\n\n /**\n * 加载英雄列表\n * @return\n */\n Heroes getHeroes(int id);\n\n\n\n\n\n\n void insertMatch(MatchDetails match);\n\n /**\n * 加载数据库里已有的数据\n * @param id\n * @return\n */\n MatchDetails getMatch(long id);\n\n /**\n * 加载用户的数据\n * @param account_id\n * @return\n */\n List<MatchDetails> getMatchByAccountId(long account_id);\n\n\n String getItemsNameById(String item_id);\n\n\n\n /**\n * 添加到User表\n */\n boolean insertUser(User user);\n\n /**\n * 从User表读取所有的用户\n */\n List<Long> getUser();\n\n\n\n}",
"public interface BaseDao<T> {\n\t\n\tpublic void setEntityClass(Class<T> entityClass);\n\t\n\tpublic Session getSession();\n\t\n\tpublic Criteria getCriteria();\n\t\n\tpublic T load(Long id);\n\t\n\tpublic T get(Long id);\n\n\tpublic List<T> get(Long[] ids);\n\t\n\tpublic T get(String propertyName, Object value);\n\t\n\tpublic T get(DetachedCriteria criteria);\n\t\n\tpublic List<T> getList(String propertyName, Object value);\n\t\n\tpublic Long getCount();\n\t\n\tpublic Long getCount(DetachedCriteria criteria);\n\n Long getId(DetachedCriteria criteria);\n\n public Long save(T entity);\n\t\n\tpublic void saveOrUpdate(T entity);\n\t\n\tpublic void update(T entity);\n\t\n\tpublic void merge(T entity);\n\t\n\tpublic void delete(T entity);\n\t\n\tpublic void delete(Long id);\n\t\n\tpublic void delete(Long[] ids);\n\t\n\tpublic void delete(List<T> list);\n\t\n\tpublic List<T> list();\n\t\n\tpublic Object findUniqueObject(DetachedCriteria criteria);\n\t\n\tpublic List<T> list(DetachedCriteria criteria);\n//\tpublic Page<T> list(DetachedCriteria criteria, Integer pageNumber);\n\t\n//\tpublic Page<T> list(DetachedCriteria criteria, Page<T> page);\n\t\n\tpublic Page<T> list(DetachedCriteria criteria, Integer pageNumber, Integer pageSize);\n\t\n\tpublic List<T> listData(DetachedCriteria criteria, Integer pageNumber, Integer pageSize);\n\n public List<T> listData(DetachedCriteria criteria, int firstResult, int maxResults);\n\n List<Long> listIds(DetachedCriteria criteria, int firstResult, int maxResults);\n\n @SuppressWarnings(\"unchecked\")\n List<Long> listIds(DetachedCriteria criteria);\n\n public Page<T> list(DetachedCriteria criteria, Page<T> page);\n\n\tpublic T refresh(T entity);\n\t\n\t//\n\tpublic List<T> getActiveListByRefAndCompany(DetachedCriteria criteria,String ref, Long companyId);\n\t\n\tpublic void refreshCache();\n\n\tpublic String getNextIDForObject(String fieldName, String tableName, Integer number);\n}",
"public abstract ToDoDao toDoDao();",
"public interface GenericDao <T, I>{\n\n //save an instance to the db\n int save(T t);\n\n //select an object by its primary key\n T getbyId(I id);\n\n //TODO: create own GymCollection to handle this\n //gather all objects in the db\n //GymCollection getAll();\n\n //delete an object from the db\n boolean remove (I id);\n\n //update an object in the db\n boolean update(T t);\n\n boolean doesIDExist(I id);\n\n void getAll();\n\n //TODO: when an offer is accepted, update all other offers tied to that cat to declined\n // update all recods in a table that correspond to the objects inside the GymCollection argument\n //int updateAll(GymCollection collection);\n\n}",
"public interface PlanActivityDao extends BaseDao<PlanActivity,Long> {\n Page<PlanActivity> findPage(Pageable pageable, User user);\n}",
"public interface BaseDao<T> {\n\n T get(Long id);\n\n int save(T t);\n\n int update(T t);\n\n int delete(T t);\n\n int delete(Long id);\n\n T getObj(String sql, Object... args);\n\n Long count(String sql, Object... args);\n\n List<T> getList(String sql);\n\n List<T> getList(String frameSql, Object... args);\n\n Page<T> getPage(Page page, String frameSql, Object[] args);\n\n}",
"public interface AdvertisementsDao extends GenericDao<Advertisement>{\n\n List<Advertisement> getAll() throws DaoException;\n\n Advertisement getById(int id) throws DaoException;\n}",
"public interface CommonDao<ENTITY extends SelServicesEntity> {\n\t\n\tpublic void create(ENTITY entity);\n\t\n\tpublic ENTITY get(long id);\n\t\n\tpublic void update(ENTITY entity);\n\t\n\tpublic void delete(long id);\n\t\n\tpublic NotificationFactory getNotificationFactory();\n\t\n\tpublic Date lastDateUpdate();\n\n}",
"@Dao\npublic interface ItemDao {\n\n @Insert(onConflict = OnConflictStrategy.REPLACE)\n void insertSingleItem(Item item);\n\n @Insert(onConflict = OnConflictStrategy.REPLACE)\n void insertMultipleItem(List<Item> itemList);\n\n @Query(\"SELECT * FROM Item WHERE item_id = :itemId\")\n Flowable<Item> fetchItemByItemId(int itemId);\n\n @Query(\"SELECT * FROM Item\")\n Flowable<List<Item>> fetchItems();\n\n @Update\n void updateItem(Item item);\n\n @Delete\n void deleteItem(Item item);\n\n}",
"public interface ConProcessDao {\n\n\t/**\n\t * Judgement whether the record of specified contract id is exist in the contract process table\n\t * \n\t * @param conId Contract id\n\t * @return boolean Return true if exist,otherwise return false\n\t * @throws AppException\n\t */\n\tpublic boolean isExist(int conId) throws AppException;\n\t\n\t/**\n\t * Add contract operation process information\n\t * \n\t * @param conProcess Contract process object\n\t * @return boolean Return true if successful , otherwise false \n\t * @throws AppException\n\t */\n\tpublic boolean add(ConProcess conProcess) throws AppException;\n\t\n\t/**\n\t * Query all contract ids that meet the conditions from contract process table\n\t * \n\t * @param Contract process object\n\t * @return Contract id set\n\t * @throws AppException\n\t */\n\tpublic List<Integer> getConIds(ConProcess conProcess) throws AppException;\n\t\n\t/**\n\t * Update status,content and time of contract process according to userId, userId and operation type\n\t * \n\t * @param userId User id\n\t * @param conId Contract id\n\t * @param type Operation type\n\t * @return boolean Return true if successful , otherwise false \n\t * @throws AppException\n\t */\n\tpublic boolean update(ConProcess conProcess) throws AppException;\n\t\n\t/**\n\t * Query total number of eligible records from contract process table according to contract id, operation type and its processing state\n\t * \n\t * @param con_id Contract id\n\t * @param type Operation type\n\t * @param state Processing state of Operation type\n\t * @return Total number of eligible records\n\t * @throws AppException\n\t */\n\tpublic int getTotalCount(ConProcess conProcess) throws AppException;\n\t\n\t/**\n\t * Query contract process id set according to contract id,operation type and its corresponding operation state\n\t * \n\t * @param conId Contract id\n\t * @param type Operation type \n\t * @param state Operation state that corresponding operation type\n\t * @return Contract process id set \n\t * @throws AppException\n\t */\n\tpublic List<Integer> getIds(int conId, int type, int state) throws AppException;\n\t\n\t/**\n\t * Query contract process information according to contract process\n\t * \n\t * @param id Contract id\n\t * @return Contract process object\n\t * @throws AppException\n\t */\n\tpublic ConProcess getById(int id) throws AppException;\n\t\n}",
"public interface RelayDao {\n public void insert(RelayDto relay) throws SQLException;\n\n public void insertTranslation(Long relayId, Long langId, String translation) throws SQLException;\n\n public void update(RelayDto relay) throws SQLException;\n\n public void remove(Long relayId) throws SQLException;\n\n public RelayDto getById(Long id) throws SQLException;\n\n public List<RelayDto> getAll() throws SQLException;\n\n public List<RelayDto> getAll(Long langId) throws SQLException;\n}",
"public interface ServicoDao extends EntidadeDao<Servico> {\n Long contarTotalServicos();\n Long contarServicosStatus(StatusServico statusServico);\n @Override\n List<Servico> listar();\n\n List<Servico> listarServicos();\n public List<Servico> listarMeusServicos(Long id);\n public List<Servico> listarServicosEmAberto();\n Long servicoPorSetor(Long id);\n Servico BuscarPorId(Long id);\n void salvarLogServico(LogServico logServico);\n\n public void verificarConlusaoEAtualizar(Long id);\n\n Long meusServicos();\n Long contarPorSetor(Long id);\n List<Object[]> contarDeAteDataPorSetorDESC(LocalDate dtDe, LocalDate dtAte);\n List<Object[]> contarAPartirDePorSetorDESC(LocalDate dtDe);\n List<Object[]> contarAteDataPorSetorDESC(LocalDate dtAte);\n List<Object[]> contarDeAteDataDESC(LocalDate dtDe, LocalDate dtAte);\n List<Servico> filtrarDeAteDataPorSetorDESC(Long id, LocalDate dtDe, LocalDate dtAte);\n List<Servico> filtrarAPartirDePorSetorDESC(Long id, LocalDate dtDe);\n List<Servico> filtrarAteDataPorSetorDESC(Long id, LocalDate dtAte);\n List<Servico> filtrarDeAteDataDESC(LocalDate dtDe, LocalDate dtAte);\n\n List<Servico> filtrarMaisRecentesPorSetor(Long id);\n}",
"public interface IPermissionOwnerDao {\n\n /**\n * Retrieve the permission owner with the specified unique ID.\n * \n * @param id\n * @return\n */\n public IPermissionOwner getPermissionOwner(long id);\n\n /**\n * Retrieve the permission owner with the specified functional name.\n * \n * @param fname\n * @return\n */\n public IPermissionOwner getPermissionOwner(String fname);\n\n /**\n * Retrieve the permission owner associated with the supplied functional\n * name. If no matching permission owner can be found, create a new\n * permission owner instance with the supplied functional name.\n * \n * @Param name Name of the permission owner\n * @param fname functional name of the desired permission owner\n * @return \n */\n public IPermissionOwner getOrCreatePermissionOwner(String name, String fname);\n\n /**\n * Retrieve a list of all known permission owners from the data store.\n * \n * @return\n */\n public List<IPermissionOwner> getAllPermissionOwners();\n \n /**\n * Persist a permission owner to the data layer, creating or updating\n * the owner as appropriate.\n * \n * @param owner\n * @return\n */\n public IPermissionOwner saveOwner(IPermissionOwner owner);\n \n /**\n * Retrieve a permission activity by unique ID.\n * \n * @param id\n * @return\n */\n public IPermissionActivity getPermissionActivity(long id);\n\n /**\n * Retrieve a permission activity under the specified permission owner\n * with the provided activity functional name.\n * \n * @param ownerId unique ID of the desired activity's owner\n * @param activityFname functional name of the desired activity\n * @return\n */\n public IPermissionActivity getPermissionActivity(long ownerId, String activityFname);\n \n /**\n * Retrieve a permission activity under the specified permission owner\n * with the provided activity functional name.\n * \n * @param ownerFname functional name of the desired activity's owner\n * @param activityFname functional name of the activity itself\n * @return\n */\n public IPermissionActivity getPermissionActivity(String ownerFname, String activityFname);\n \n /**\n * Retrieve the permission activity associated with the supplied functional\n * name, under the specified permission owner. If no matching activity \n * can be found, create a new permission activity instance with the supplied \n * owner and activity functional name.\n * \n * \n * @param owner permission owner\n * @param fname activity fname\n * @return\n */\n public IPermissionActivity getOrCreatePermissionActivity(IPermissionOwner owner, String name, String fname, String targetProviderKey);\n \n /**\n * Persist a permission activity to the data layer, creating or updating\n * the activity as appropriate.\n * \n * @param activity\n * @return\n */\n public IPermissionActivity savePermissionActivity(IPermissionActivity activity);\n\n}",
"public interface PertenenciaDAO extends GenericDao<Pertenencia, Long> {\n\n}",
"public interface InvMainDao extends GenericDao<InvMain, String> {\n\tpublic JQueryPager getInvMainCriteria(final JQueryPager paginatedList,List<PropertyFilter> filters);\n\tpublic boolean checkAllInitInvMainConfirm(String orgCode,String copyCode,String kjYear,String storeId);\n\tpublic InvMain getInvMainByNo(String no, String orgCode, String copyCode);\n\tpublic boolean checkAllDocsInStore(String storeId,String orgCode,String copyCode,String kjYear);\n\tpublic void deleteInvDictAccount(String storeId, String orgCode,String copyCode,String kjYear);\n\n}",
"@SuppressWarnings(\"rawtypes\")\npublic interface GenericDao <T, PK extends Serializable> {\n\n /**\n * Generic method used to get all objects of a particular type. This\n * is the same as lookup up all rows in a table.\n * @return List of populated objects\n */\n List<T> getAll();\n\n /**\n * Gets all records without duplicates.\n * <p>Note that if you use this method, it is imperative that your model\n * classes correctly implement the hashcode/equals methods</p>\n * @return List of populated objects\n */\n List<T> getAllDistinct();\n\n /**\n * Generic method to get an object based on class and identifier. An\n * ObjectRetrievalFailureException Runtime Exception is thrown if\n * nothing is found.\n *\n * @param id the identifier (primary key) of the object to get\n * @return a populated object\n * @see org.springframework.orm.ObjectRetrievalFailureException\n */\n T get(PK id);\n\n /**\n * Checks for existence of an object of type T using the id arg.\n * @param id the id of the entity\n * @return - true if it exists, false if it doesn't\n */\n boolean exists(PK id);\n\n /**\n * Generic method to save an object \n * @param object the object to save\n * @return the persisted object\n */\n T save(T object);\n \n /**\n * Generic method to update an object \n * @param object the object to save\n * @return the persisted object\n */\n T update(T object);\n\n /**\n * Generic method to delete an object based on class and id\n * @param id the identifier (primary key) of the object to remove\n */\n void remove(PK id);\n \n /**\n\t * paging\n\t * @param pager Canstants.TOTALCOUNT of the first key, Canstants.PAGINGRESULTS of the second key\n\t * @return the first value is totalCount and second value is paging result\n\t */\n\tpublic Page queryByPage(Page page);\n\t\n\t/**\n\t * getting total records\n\t * @param params\n\t * @return\n\t */\n\tpublic Integer getTotalCount();\n}",
"public interface CurrentCompetitionDao extends BaseDao<CurrentCompetition> {\n}",
"public interface News2Dao {\r\n\r\n News2 persist(News2 news);\r\n\r\n boolean delete(int id);\r\n\r\n boolean update(News2 news);\r\n\r\n List<News2> getAll();\r\n\r\n News2 findById(int id);\r\n}",
"public interface GenericDao<T, ID extends Serializable> {\r\n\r\n /**\r\n * <p/>\r\n * Get the entity with the appropriate type and id from the datasource.\r\n * <p/>\r\n * If none is found, return null.\r\n */\r\n T get(ID id);\r\n\r\n /**\r\n * <p/>\r\n * Save the entity in datasource.\r\n * <p/>\r\n * Returns new id of the entity.\r\n */\r\n ID create(T entity);\r\n\r\n /**\r\n * <p/>\r\n * Update entity in datasource.\r\n */\r\n void update(T entity);\r\n\r\n /**\r\n * <p/>\r\n * Create or update entity in datasource.\r\n */\r\n void createOrUpdate(T entity);\r\n\r\n /**\r\n * <p/>\r\n * Remove entity from datasource\r\n */\r\n void delete(T entity);\r\n\r\n /**\r\n * <p/>\r\n * Refresh given entity with datasource state\r\n */\r\n void refresh(T... entities);\r\n\r\n /**\r\n * <p/>\r\n * Find all objects in datasource for appropriate domain object\r\n */\r\n List<T> findAll();\r\n\r\n /**\r\n * <p/>\r\n * Find all objects in datasource for appropriate domain object with specified <code>ListParams</code> object.\r\n */\r\n List<T> findAll(ListParams params);\r\n\r\n /**\r\n * <p/>\r\n * Get total records count in datasource for appropriate domain object.\r\n */\r\n Long count();\r\n}",
"public interface TransferDAO extends BaseDAO<Transfer>, InsertableDAO<Transfer>, UpdatableDAO<Transfer> {\n\n /**\n * List of sums of incoming transactions amounts per member. Used by Activity: all using GrossProduct. <b>Important NOTE:</b> Beware that this\n * method only gets the members who were actually trading. Members with NO incoming trades are NOT included. If you need those, you need to\n * manually add them to the list.\n * @return a List of Pair objects where the first element is the member and the second is the gross product of the member (sum of incoming\n * transactions).\n */\n List<Pair<Member, BigDecimal>> getGrossProductPerMember(StatisticalDTO dto) throws DaoException;\n\n /**\n * gets the gross product summed over all members in a list, where each element in the list specifies a specific month in the period.\n * @return a list with <code>KeyDevelopmentsStatsPerMonthVO</code>s, containing for each element the gross products, the year and the month.\n */\n List<KeyDevelopmentsStatsPerMonthVO> getGrossProductPerMonth(final StatisticalDTO dto);\n\n /**\n * List of numbers of incoming transactions per member. Used by Activity Stats > all which use number of trans, % not trading\n * @return a List of Pair objects where the first element is the member and the second is the number of transactions\n * @param dto parameters that filter the query\n */\n List<Pair<Member, Integer>> getNumberOfTransactionsPerMember(StatisticalDTO dto) throws DaoException;\n\n /**\n * gets the number of transactions summed over all members in a list, where each element in the list specifies a specific month in the period.\n * @return a list with <code>KeyDevelopmentsStatsPerMonthVO</code>s, containing for each element the gross products, the year and the month.\n */\n List<KeyDevelopmentsStatsPerMonthVO> getNumberOfTransactionsPerMonth(final StatisticalDTO dto);\n\n /**\n * List of sums of outgoing transaction amounts (payments) per member. Used by Taxes Stats. <b>Important NOTE:</b> Beware that this method only\n * gets the members who were actually trading. Members with NO incoming trades are NOT included. If you need those, you need to manually add them\n * to the list.\n * @param dto parameters that filter the query\n * @return a List of Pair objects where the first element is the member and the second is the sum of payments done by this member\n */\n List<Pair<Member, BigDecimal>> getPaymentsPerMember(StatisticalDTO dto) throws DaoException;\n\n /**\n * Sum of the amounts of the transactions. Used by Key Dev Stats > gross product\n * @param dto a StatisticalDTO object passing the query\n */\n BigDecimal getSumOfTransactions(StatisticalDTO dto) throws DaoException;\n\n /**\n * Calculates the sum of transactions there was on this SystemAccountType for any payments NOT belonging to the set of paymentFilters, during the\n * period\n */\n BigDecimal getSumOfTransactionsRest(TransferQuery query);\n\n /**\n * gets a list with transaction amounts and their id's. There is no separate query for the number of transactions; just use this one and the size\n * of the resulting list is the number of transactions. This is more efficient than a separate query.\n */\n List<Number> getTransactionAmounts(final StatisticalDTO dto);\n\n /**\n * Loads a transfer generated by the client and with the specified trace number and generated by the client id\n * @param traceNumber\n * @param clientId\n */\n Transfer loadTransferByTraceNumber(String traceNumber, Long clientId);\n\n /**\n * Returns simple transfers VOs for a given account and period, ordering results by date ascending\n */\n List<SimpleTransferVO> paymentVOs(Account account, Period period) throws DaoException;\n\n /**\n * Searches for transfers. If no entity can be found, returns an empty list. If any exception is thrown by the underlying implementation, it\n * should be wrapped by a DaoException.\n * \n * <p>\n * The condition specified by <code>query.getMember()</code> should only be taken in account when <code>query.getOwner() != null</code> and\n * <code>query.getType() != null</code>.\n */\n List<Transfer> search(TransferQuery query) throws DaoException;\n\n /**\n * Searches for transfers awaiting authorization\n */\n List<Transfer> searchTransfersAwaitingAuthorization(TransfersAwaitingAuthorizationQuery query);\n\n /**\n * Updates the transfer with authorization data\n */\n Transfer updateAuthorizationData(Long id, Transfer.Status status, AuthorizationLevel nextLevel, Calendar processDate);\n\n /**\n * Updates the transfer with the chargeback\n */\n Transfer updateChargeBack(Transfer transfer, Transfer chargeback);\n\n /**\n * Updates the transfer with the external transfer\n */\n Transfer updateExternalTransfer(Long id, ExternalTransfer externalTransfer);\n\n /**\n * Updates the transfer with the status\n */\n Transfer updateStatus(Long id, Payment.Status status);\n\n /**\n * Updates the transfer with the generated transaction number\n */\n Transfer updateTransactionNumber(Long id, String transactionNumber);\n}",
"public interface BaseDao<T> {\n\n public List<?> doSqlQuery(String sql);\n\n public List<?> doHqlQuery(String hql);\n\n public void add(T t);\n\n public void delete(T t);\n\n public void update(T t);\n\n @SuppressWarnings({ \"rawtypes\" })\n public T getById(String id);\n\n @SuppressWarnings({\"rawtypes\" })\n public T getByColumn(String column, Object value);\n\n @SuppressWarnings({\"rawtypes\" })\n public List<T> getListByColumn(String column, Object value);\n\n @SuppressWarnings({\"rawtypes\" })\n public List<T> getListByColumn(String column, Object value, int page, int size);\n\n @SuppressWarnings({\"rawtypes\" })\n public List<T> getListByColumn(String column, Object value, int page, int size, String ordercolumn, boolean asc);\n\n public List<T> getListByLikeColumn(String column, Object value);\n\n @SuppressWarnings({\"rawtypes\" })\n public List<T> getListByLikeColumn(String column, Object value, int page, int size, String ordercolumn, boolean asc);\n\n @SuppressWarnings({\"rawtypes\"})\n public List<Object> getPropertyList(String column, boolean asc);\n\n @SuppressWarnings({\"rawtypes\"})\n public List<Object> getPropertyListByColumn(String column, String paramColumn, String value, boolean asc);\n\n @SuppressWarnings({ \"rawtypes\" })\n public List<T> getAll();\n\n @SuppressWarnings({ \"rawtypes\" })\n public List<T> getAllByPage(int page,int size);\n\n @SuppressWarnings(\"rawtypes\")\n public int getCounts();\n\n @SuppressWarnings(\"rawtypes\")\n public int getCounts(String columnName, Object value);\n}",
"public interface EntityDao<T extends Entity> {\n \n /**\n * Saves or updates entity\n * @param entity entity to save\n */\n void saveOrUpdate(T entity);\n\n /**\n * Deletes entity by object reference\n * @param entity entity to delete\n */\n void delete(T entity);\n\n /**\n * Returns entity found by given unique id or {@code null} if entity\n * wasn't found\n * @param id entity's unique id\n * @return entity just found\n */\n T getById(int id);\n\n /**\n * Returns {@code true} if entity with given unique id exists\n * @param id unique id of entity\n * @return {@code true} if entity exists\n */\n boolean isExist(int id);\n}",
"public interface ITradeDao {\n int insertTrade(Trade trade);\n\n List<Trade> queryTrade(TradeQuery query);\n}",
"public interface BaseDAO {\n void insertWeChat(WeChat weChat);\n\n void insertCategory(Category category);\n\n boolean isExistCategory(Integer c_id);\n}",
"public interface BeeDataDao {\n\n /*获取兼职数据*/\n BeeJobTime getBeeJobTime();\n\n /*分页获取兼职数据*/\n BeeJobTime getBeeJobTimes(@Param(\"startIndex\") int startIndex, @Param(\"endAmount\") int endAmount);\n\n /*获取暑期工数据*/\n BeeSummerJob getBeeSummerJob();\n\n /*分页获取暑期工数据*/\n BeeSummerJob getBeeSummerJobs(@Param(\"startIndex\") int startIndex, @Param(\"endAmount\") int endAmount);\n\n /*根据JID获取兼职详细信息*/\n BeeJobTimeDetailed getBeeJobTimeDetailed(int jid);\n\n /*根据SID获取兼职详细信息*/\n BeeSummerJobDetailed getSummerJobDetailed(int sid);\n\n /*分页获取兼职报名信息*/\n UserMessageList getSignUpJobFairs(@Param(\"startIndex\") int startIndex, @Param(\"endAmount\") int endAmount);\n\n /*获取兼职报名List*/\n UserMessageList getSignUpJobFair();\n\n /*根据phone查询兼职报名人员*/\n UserMessageList selectJobFairUser(String phone);\n\n /*兼职报名*/\n void putSignUpJobFair(@Param(\"userMessage\") UserMessage userMessage);\n\n /*根据UserId查询报名人员*/\n String selectSignUpJobFairByUserId(int UserId);\n\n /*插入amount*/\n void insertAmount(@Param(\"amount\") String amount,@Param(\"jobNames\") String jobNames,@Param(\"userId\") int userId);\n\n /*暑期工报名*/\n void putSignUpSummerJob(@Param(\"userMessage\") UserMessage userMessage);\n\n /*暑期工发布*/\n void publishSummerJob(@Param(\"beeSummerJobDetailed\") BeeSummerJobDetailed beeSummerJobDetailed,@Param(\"tag\") String tag);\n\n /*兼职发布*/\n void publishJobFair(@Param(\"beeSummerJobDetailed\") BeeSummerJobDetailed beeSummerJobDetailed,@Param(\"tag\") String tag);\n\n /*分页获取暑期工报名信息*/\n UserMessageList getSignUpSummerJobs(@Param(\"startIndex\") int startIndex, @Param(\"endAmount\") int endAmount);\n\n /*获取暑期工报名List*/\n UserMessageList getSignUpSummerJob();\n\n BeeSummerJobDetailedList AuditingJobFairs(@Param(\"startIndex\") int startIndex, @Param(\"endAmount\") int endAmount);\n\n BeeSummerJobDetailedList AuditingJobFair();\n\n BeeSummerJobDetailedList AuditingSummerJob();\n\n BeeSummerJobDetailedList AuditingSummerJobs(@Param(\"startIndex\") int startIndex, @Param(\"endAmount\") int endAmount);\n\n String selectSignUpJobFairByJIDS(int userId);\n\n UserMessageList selectSummerJobUser(String phone);\n\n String selectSignUpSummerJobByJIDS(int userId);\n\n String selectSignUpSummerJobByUserId(int userId);\n\n void insertAmount1(String jids, String jobNameS, int userId);\n\n int getSid(int id);\n\n int getJid(int id);\n\n void putOpenId(@Param(\"openId\") Object openId,@Param(\"targetId\") int targetId);\n\n BeeJobTime getAuditingBeeJobTimeByOpenId(String openId);\n\n BeeJobTime getAuditingBeeJobTimesByOpenId(@Param(\"openId\") String openId, @Param(\"startIndex\") int startIndex, @Param(\"endAmount\") int endAmount);\n\n BeeJobTime getBeeJobTimesByOpenId(@Param(\"openId\") String openId, @Param(\"startIndex\") int startIndex, @Param(\"endAmount\") int endAmount);\n\n BeeJobTime getBeeJobTimeByOpenId(String openId);\n\n int selectIsGet(int i);\n\n UserMessageList getSignUpJobFairsByJid();\n\n UserMessageList getSignUpJobFairByJid(@Param(\"jid\") String jid,@Param(\"startIndex\") int startIndex, @Param(\"endAmount\") int endAmount);\n\n int selectargetId(String openId);\n\n BeeJobTimeDetailed getAuditingBeeJobTimeDetailed(int jid);\n\n int selectOpenId(Object openId);\n\n Object selectOpenIds(Object openId);\n\n List<Integer> getJidByOpenId(String openId);\n\n void getJobTimeUserByJid(List<Integer> jid);\n\n String getJidsByOpenId(String openId);\n\n BeeJobTime getJobTimeByOpenId(@Param(\"jidS\") List<String> jidS);\n\n BeeJobTime getBeeJobTimesByOpenIds(int startIndex, int endAmount);\n\n String getJidsByJid(int i);\n\n String[] getJids();\n}",
"public interface OperaLogDao {\r\n public void add(OperaLog o);\r\n}",
"public interface BusinessDao {\n\n public List<Business> getAllBusiness() throws Exception;\n public Business getBusinessbyId(Long businessId) throws Exception;\n public void addBusiness (Business business) throws Exception;\n public void updateBusiness(Business business) throws Exception;\n public void deleteBusiness(Business business) throws Exception;\n}",
"public interface GenericDao<E, N> {\n \n \n /**\n * Find object based on the V Id.\n * \n * @param id\n * Find object based on the Id.\n * @return T entity.\n */\n E findById(N id);\n\n /**\n * Create a new entity.\n * \n * @param entity\n * Entity to be created.\n */\n void save(E entity);\n\n /**\n * Delete T type.\n * \n * @param entity\n * the object to be deleted from DB.\n */\n void remove(E entity);\n\n /**\n * Update information T entity.\n * \n * @param entity\n * object T entity to be updated.\n * \n * @return updated entity.\n */\n E update(E entity);\n\n \n /**\n * Get Entity from database.\n * \n * @return a list of all the elements in Entity.\n */\n List<E> findAll();\n}",
"public interface ITrackerDao\n{\n Tracker findById(int idTracker);\n List<Tracker> getAll();\n}",
"public interface TypeTransportDao extends GenericDao<TypeTransport, Long> {\n}",
"public interface IBaseDao<T> {\n\n Serializable save(T o) throws Exception;\n Serializable save(List<T> o)throws Exception;\n void delete(T o);//此功能尚未完成\n boolean insert(String sql, Object[] params);\n\n boolean delete(String sql, Integer id);\n boolean update(String sql, Object[] params);\n void update(T o) throws Exception;\n Serializable update(List<T> o) throws Exception;\n void saveOrUpdate(T o);\n List<Object> executeSQL(String sql, Object[] param);\n List<T> find(String hql);\n int countNum(String hql, Object[] param);\n List<T> find(String hql, Object[] param);\n\n List<T> find(String hql, List<Object> param);\n\n List<T> find(String hql, Object[] param, Integer page, Integer rows);\n\n List<T> findNumberRows(String hql, Object[] param, Integer first, Integer max);\n\n List<T> findNumberRows(String hql, List param, Integer first, Integer max);\n\n List<T> find(String hql, List<Object> param, Integer page, Integer rows);\n\n T get(Class<T> c, Serializable id);\n\n T get(String hql, Object[] param);\n\n T get(String hql, List<Object> param);\n\n Long count(String hql);\n\n Long count(String hql, Object[] param);\n\n Long count(String hql, List<Object> param);\n\n Double countAvg(String hql, Object[] param);\n\n Integer executeHql(String hql);//此功能尚未完成\n\n Integer executeHql(String hql, Object[] param);//此功能尚未完成\n\n Integer executeHql(String hql, List<Object> param);//此功能尚未完成\n}",
"public interface CityDao extends GenericDao<City, Long> {\n\n}",
"UserInfoDao getUserInfoDao();",
"public interface CommonDao<T> {\n int save(T t);\n\n int update(T t);\n\n T findByParams(T t);\n\n int delete(int id);\n}",
"@Dao\npublic interface MembreDAO {\n @Query(\"SELECT * FROM membres WHERE id_membre =:membreID\")\n Flowable<Membre> getUserById(String membreID);\n\n @Query(\"SELECT * FROM membres\")\n Flowable<List<Membre>> getAllUsers();\n\n @Insert\n void insertUser(Membre... membres);\n\n @Update\n void UpdateUser(Membre... membres);\n\n @Delete\n void DeleteUser(Membre membre);\n\n @Query(\"DELETE FROM membres\")\n void deleteAllUsers();\n}",
"public interface BaseDao {\n\n int getTotalCount(SelectArgs selectArgs);\n\n List<Map<String,Object>> queryList(SelectArgs selectArgs);\n\n int addRecord (InsertArgs insertArgs);\n}",
"public interface ForecastDao extends SavableEntityDao<Forecast>, UpdatableEntityDao<Forecast>, RemovableEntityDao<Forecast> {\n\n Forecast getById(Long forecastId);\n\n List<Forecast> getAll();\n\n List<ResultadoQuery> findSumForecastAgrupadosGrupoGastos(int anio);\n\n List<ResultadoQuery> findImporteTotalMes(int anio);\n\n List<ResultadoQuery> findDetalleForecastsPorGrupoGastos(String grupoGasto, int anio);\n\n}",
"public interface Dao<T extends Identifiable> {\r\n\t/**\r\n\t * Performs a parameterized read query to the database, expecting a single\r\n\t * result in the form of an object of type T with the specified identifier.\r\n\t * \r\n\t * @param id a object identifier in database\r\n\t * @return a {@link Optional} implementation with object.\r\n\t * @throws DaoException Signals that an database access object exception of some\r\n\t * sort has occurred.\r\n\t */\r\n\tOptional<T> findById(Long id) throws DaoException;\r\n\r\n\t/**\r\n\t * Performs a parameterized read query to a database to find all object type T.\r\n\t *\r\n\t * @return a {@link List} implementation with all finding objects.\r\n\t * @throws DaoException Signals that an database access object exception of some\r\n\t * sort has occurred.\r\n\t */\r\n\tList<T> findAll() throws DaoException;\r\n\r\n\t/**\r\n\t * The method designed for the process of saving a objects in database.\r\n\t *\r\n\t * @param item an object type T that should be saved to the database.\r\n\t * @return created lot identifier in database.\r\n\t * @throws DaoException Signals that an database access object exception of some\r\n\t * sort has occurred.\r\n\t */\r\n\tlong save(T item) throws DaoException;\r\n\r\n\t/**\r\n\t * Using id delete an entity from the database.\r\n\t *\r\n\t * @param id\r\n\t * @throws DaoException\r\n\t */\r\n\tvoid removeById(Long id) throws DaoException;\r\n\r\n}",
"public interface BookingDao extends Dao<Booking, Integer> {\n\n @Override\n int create(Booking booking) throws SQLException;\n}",
"@Dao\npublic interface PostDao {\n @Insert(onConflict = OnConflictStrategy.REPLACE)\n void insertPost(iPost iPosts);\n\n @Update\n void updatePost(iPost iPost);\n\n @Delete\n void deletePost(iPost iPost);\n\n @Query(\"SELECT * FROM iPost\")\n List<iPost> getAllPosts();\n\n @Query(\"SELECT * FROM iPost WHERE idThread=:threadId\")\n List<iPost> findPostsByThread(final int threadId);\n\n @Transaction\n @Query(\"SELECT * FROM iPost WHERE idThread=:threadId\")\n Single<List<PostsHelper>> getPostsFromThread(String threadId);\n}",
"public interface OrdersDao extends BaseDao<Orders> {\n public void updateANT(String address,String name,String telephone,String oid);\n\n}",
"public interface IBuyDao extends Dao<Buy> {\n\n// /** Gets the appropriate List<Executor> by period */\n// public List<Buy> getExecutorsByPeriod(int first, int second) throws PersistException;\n//\n /** Gets all Items*/\n public List<Buy> getAll() throws PersistException;\n\n public String[] getBuysListNameArray() throws PersistException;\n\n /** Gets count Buys*/\n public int getCountBuys() throws PersistException;\n\n// /** Gets Executor by name*/\n// public Buy getExecutorByName(String name) throws PersistException;\n//\n// /** Gets Executors with status Active*/\n// public List<Buy> getActiveExecutors() throws PersistException;\n}",
"public interface AppointmentDao {\n\n // Создает новую запись и соответствующий ей приём\n void addAppointment(long id);\n\n // Возвращает приём соответствующий записи с первичным ключом id или null\n Appointment getAppointment(long id);\n\n // Возвращает список приёмов соответствующих всем записям в базе данных\n List<Appointment> getAllAppointments();\n\n // Сохраняет состояние приёма в базе данных\n void setAppointment(long id);\n\n // Удаляет запись о приёме из базы данных\n void deleteAppointment(long id);\n}",
"@Dao\npublic interface NoteItemDao{\n @Query(\"select * from \" + DBTables.NoteItemTable.TABLE_NAME + \" order by \" + DBTables.NoteItemTable._ID + \" ASC\")\n List<NoteItem> queryAllNotes();\n\n @Insert\n void insertNote(NoteItem noteItem);\n\n @Delete\n void deleteNote(NoteItem noteItem);\n\n @Update\n void updateNote(NoteItem noteItem);\n}",
"@Dao\npublic interface UnsentChangedDao {\n\n\n @Insert\n long insertSingleChange(UnsentChange change);\n\n @Delete\n void deleteChanges(List<UnsentChange> changes);\n\n @Update\n void updateSigleChange(UnsentChange change);\n\n /**\n * Returns all unsent changed runner for given competition\n * @param competition_id ID of given competition\n */\n @SuppressWarnings(RoomWarnings.CURSOR_MISMATCH)\n @Query(\"SELECT * FROM unsent_changes \" +\n \"JOIN changed_runners ON unsent_changes.changed_runner_id = changed_runners.id \" +\n \"WHERE changed_runners.competition_id = :competition_id\")\n List<UnsentChange> GetUnsentChangesByCompetitionId(int competition_id);\n}",
"@Dao\npublic interface FParamDiskonItemVendorDao {\n /**\n * @param fParamDiskonItemVendor\n * Harus Menggunakan\n * .allowMainThreadQueries() pada Configurasi database utama agar tidak perlu menggunakan AsynT\n */\n @Insert\n void insert(FParamDiskonItemVendor fParamDiskonItemVendor);\n @Update\n void update(FParamDiskonItemVendor fParamDiskonItemVendor);\n @Delete\n void delete(FParamDiskonItemVendor fParamDiskonItemVendor);\n\n\n @Query(\"DELETE FROM fParamDiskonItemVendor\")\n void deleteAllFParamDiskonItemVendor();\n\n @Query(\"SELECT * FROM fParamDiskonItemVendor \")\n LiveData<List<FParamDiskonItemVendor>> getAllFParamDiskonItemVendorLive();\n\n @Query(\"SELECT * FROM fParamDiskonItemVendor \")\n List<FParamDiskonItemVendor> getAllFParamDiskonItemVendor();\n\n\n @Query(\"SELECT * FROM fParamDiskonItemVendor WHERE id = :id \")\n List<FParamDiskonItemVendor> getAllById(int id);\n\n @Query(\"SELECT * FROM fParamDiskonItemVendor WHERE fdivisionBean = :id \")\n List<FParamDiskonItemVendor> getAllByDivision(int id);\n\n}",
"public interface AccountDao {\n\n /**\n * Get one account with accountNumber\n *\n * @param accountNumber unique number for account\n * @return Account or null\n */\n Account getAccount(Integer accountNumber);\n\n /**\n * Get one account with accountNumber\n *\n * @param accountNumber unique number for account\n * @param configuration {@link Configuration} for executing in DB-transaction\n * @return Account or null\n */\n Account getAccount(Integer accountNumber, Configuration configuration);\n\n /**\n * Get all accounts for user with login\n *\n * @param login unique String key for user\n * @return List of Account or empty List\n */\n List<Account> getAccounts(String login);\n\n /**\n * Update account\n *\n * @param account new data to Account\n * @param configuration {@link Configuration} for executing in DB-transaction\n * @return new updated Account\n */\n Account updateAccount(Account account, Configuration configuration);\n\n}",
"public interface ProgramaTVDAO {\n\t/**\n\t * Crea una nueva monitorización\n\t * @param titulo Título del programa\n\t * @param episodeCode Código del Episodio (ej. T01E03)\n\t * @param fechaInicio Fecha y hora de Inicio\n\t * @param fechaFin Fecha y hora de Fin\n\t * @param hashtag Hashtag que se monitorizará\n\t * @return Objeto ProgramaTV\n\t */\n\tpublic ProgramaTV crearMonitorizacion(String titulo, String episodeCode, Date fechaInicio, Date fechaFin, String hashtag);\n\n\t/**\n\t * Monitorización por clave primaria\n\t * @param primaryKey Clave primaria\n\t * @return Objeto ProgramaTV\n\t */\n\tpublic ProgramaTV programaPorId(Long primaryKey);\n\t\n\t/**\n\t * Todas las monitorizaciones que llevan el mismo hashtag\n\t * @param hashtag Hashtag\n\t * @return Lista de objetos ProgramaTV\n\t */\n\tpublic List<ProgramaTV> ProgramasPorHashtag(String hashtag);\n\t\n\t/**\n\t * Lista de monitorizaciones del mismo programa\n\t * @param titulo Título del programa\n\t * @return Lista de objetos ProgramaTV\n\t */\n\tpublic List<ProgramaTV> programasPorTitulo(String titulo);\n\t\n\t /**\n\t * Todas las monitorizaciones\n\t * @return Lists de todos los objetos ProgramaTV\n\t */\n\tpublic List<ProgramaTV> todosLosProgramas();\n\t\n\t/**\n\t * Top 5 programas más vistos\n\t * @return Array ordenado de los 5 programas más vistos\n\t */\n\tpublic ProgramaTV[] programasTop5();\n\n\t/**\n\t * Actualiza monitorizacion\n\t * @param prog Objeto ProgramaTV\n\t */\n\tpublic void updateProgramaTV(ProgramaTV prog);\n\n\n\t/**\n\t * Borra una monitorización\n\t * @param prog Clave primaria de la monitorización\n\t */\n\tpublic void deleteProgramaTV(Long prog);\n\t\n\t/**\n\t * Borra todos los programas\n\t */\n\tpublic void deleteAll();\n\t\n\n\t\n\n\t}",
"public interface AdDao extends GenericDao<Ad, Long> {\n\n\t/**\n\t * Retourne toutes les publicité éligible\n\t * @param date\n\t * @return\n\t * @throws Exception\n\t */\n\tList<Ad> getAll(Date date)throws Exception;\n\n \n}",
"public interface BatchDao extends BaseDao<Batch> {\n public BatchDto addClientItem(BatchDto clientItemDto);\n public List<BatchDto> getAllBatchesForClient(Long clientId);\n}",
"public interface TipoDao {\r\n\r\n /**\r\n * Inserta un nuevo registro en la tabla Tipos.\r\n */\r\n public TipoPk insert(Tipo dto) throws TipoDaoException;\r\n\r\n /**\r\n * Actualiza un unico registro en la tabla Tipos.\r\n */\r\n public void update(TipoPk pk, Tipo dto) throws TipoDaoException;\r\n\r\n /**\r\n * Elimina un unico registro en la tabla Tipos.\r\n */\r\n public void delete(TipoPk pk) throws TipoDaoException;\r\n\r\n /**\r\n * Retorna un unico registro en la tabla Tipos que conicida con la\r\n * primary-key especificada.\r\n */\r\n public Tipo findByPrimaryKey(TipoPk pk) throws TipoDaoException;\r\n\r\n /**\r\n * Retorna un registro de la tabla Tipos que coincida con el criterio\r\n * 'id_tipo = :idTipo'.\r\n */\r\n public Tipo findByPrimaryKey(Integer idTipo) throws TipoDaoException;\r\n\r\n /**\r\n * Retorna todos los registros de la tabla Tipos que coincidan con el\r\n * criterio 'nombre_tipo LIKE %:nombre%'.\r\n */\r\n public Tipo[] findByName(String nombre) throws TipoDaoException;\r\n\r\n /**\r\n * Retorna un registro de la tabla Tipos que coincida con el\r\n * criterio 'nombre_tipo = :nombre'.\r\n */\r\n public Tipo findByFullName(String nombre) throws TipoDaoException;\r\n\r\n /**\r\n * Retorna todas las filas de la tabla Tipos.\r\n */\r\n public Tipo[] findAll() throws TipoDaoException;\r\n\r\n /**\r\n * Retorna todos los registros de la tabla Tipos que coincidan con la\r\n * sentencia SQL especificada arbitrariamente\r\n */\r\n public Tipo[] findByDynamicSelect(String sql, Object[] sqlParams)\r\n throws TipoDaoException;\r\n\r\n /**\r\n * Retorna todos los registros de la tabla Tipos que coincidan con el WHERE\r\n * SQL especificado arbitrariamente\r\n */\r\n public Tipo[] findByDynamicWhere(String sql, Object[] sqlParams)\r\n throws TipoDaoException;\r\n\r\n /**\r\n * Sets the value of maxRows\r\n */\r\n public void setMaxRows(int maxRows);\r\n\r\n /**\r\n * Gets the value of maxRows\r\n */\r\n public int getMaxRows();\r\n\r\n /**\r\n * Retorna la conexión actual del usuario\r\n * \r\n * @return Connection\r\n */\r\n public Connection getUserConn();\r\n\r\n /**\r\n * Setea la conexión a usar con la BD\r\n * \r\n * @param userConn\r\n */\r\n public void setUserConn(Connection userConn);\r\n\r\n}",
"public interface AppHealthDataDao {\n public AppHealthData findByType(String type, String idNo) throws Exception;\n\n public AppHealthData findByPatientId(String patientId, String ghh000,String type) throws Exception;\n\n public void addHealthDataImplements(JSONObject jsonall,String idNo,String card,String type,String requestUserId,String requestUserName,String userType) throws Exception;\n}",
"@Dao\npublic interface DailyWeatherForecastDao {\n\n @Insert(onConflict = OnConflictStrategy.REPLACE)\n void insert(DailyWeatherForecast data);\n\n @Delete\n void delete(DailyWeatherForecast data);\n\n @Query(\"SELECT * From daily_weather_forecast WHERE daily_id = 1\")\n DailyWeatherForecast getDailyWeatherForecastDetails();\n}",
"@Dao\npublic interface ChatRoomDao {\n\n @Query(\"SELECT * FROM chatroom \")\n List<ChatRoom> getAll();\n\n\n @Insert\n void insertAll(List<ChatRoom> msg);\n\n @Update\n void update(ChatRoom room);\n\n @Delete\n void delete(ChatRoom room);\n\n\n @Query(\"SELECT * FROM chatroom WHERE firebaseid = :firebaseid LIMIT 1\")\n ChatRoom findByFirebaseId(String firebaseid);\n\n @Query(\"SELECT * FROM chatroom WHERE uid = :uid LIMIT 1\")\n ChatRoom findByUid(String uid);\n\n @Insert(onConflict = OnConflictStrategy.REPLACE)\n Long insert(ChatRoom todo);\n\n\n}",
"public interface BugsActivityDAO {\n\n @Insert(\"insert into firefox_bugs_activity \" +\n \"(`bugId`,`who`,`when`,`what`,`removed`,`added`,`crawledTime`) \" +\n \"values (#{bugId},#{who},#{when},#{what},#{removed},#{added},#{crawledTime})\")\n public int add(BugsActivity fireFoxBugsActivity);\n\n @Insert(\"insert into firefox_bugs_activity_html (`bugId`,`html`) \" +\"values (#{bugId},#{html})\")\n public int addHtml(BugsActivity fireFoxBugsActivity);\n}",
"public interface TransactionDAO\n{\n public void addTransaction(Transaction transaction);\n public Transaction findById(Integer id);\n public List<Transaction> getAll();\n}",
"@Dao\npublic interface ReservationDao {\n\n @Query(\"SELECT * FROM reservation\")\n Single<List<Reservation>> getAllReservations();\n\n @Query(\"SELECT * FROM reservation where customer_id = :id LIMIT 1\")\n Single<Reservation> findByCustomerId(long id);\n\n @Query(\"SELECT * FROM reservation where table_no = :tableNo LIMIT 1\")\n Single<Reservation> findByTableNo(int tableNo);\n\n @Insert(onConflict = OnConflictStrategy.REPLACE)\n long insertReservation(Reservation reservation);\n\n @Insert\n long[] insertAll(List<Reservation> reservations);\n\n @Update\n void update(Reservation reservation);\n\n @Delete\n int delete(Reservation reservation);\n\n @Query(\"DELETE FROM reservation\")\n int deleteAll();\n}",
"@Dao\npublic interface PersistableItemDao {\n\n\n @Insert( onConflict = OnConflictStrategy.FAIL)\n Long insertEntity(PersistableItem entity);\n\n @Update\n void updateEntity(PersistableItem entity);\n\n @Delete\n void deleteEntity(PersistableItem entity);\n\n @Query(\"delete from persistableItem\")\n void deleteAllItems();\n\n @Query(\"Select * from persistableItem\")\n List<PersistableItem> getAllItems();\n\n @Query(\"Select * from persistableItem WHERE itemId = :itemId \"+\n \"AND itemColor = :itemColor \" +\"AND itemSize = :itemSize\")\n PersistableItem getItemByItemIdColorAndSize(String itemId,String itemColor,String itemSize);\n\n }",
"@Dao\npublic interface ExpenseDao {\n\n @Query(\"SELECT * FROM expenses\")\n List<Expense> getExpenses();\n\n @Query(\"SELECT * FROM expenses WHERE id = :expenseId\")\n Expense getExpense(long expenseId);\n\n\n @Insert()\n long addExpense(Expense expense);\n\n @Update()\n void updateExpense(Expense expense);\n\n @Delete()\n void deleteExpense(Expense expense);\n\n @Insert()\n void addTwoExpenses(List<Expense> expenses);\n\n\n}",
"public interface DeptDao {\n //动态查询\n @SelectProvider(type=DeptDynaSqlProvider.class,method = \"selectWithParam\")\n List<Dept> selectByPage(Map<String,Object> params);\n @SelectProvider(type=DeptDynaSqlProvider.class,method = \"count\")\n Integer count(Map<String,Object> params);\n @Select(\"select * from \"+DEPTTABLE+\" \")\n List<Dept> selectAllDept();\n @Select(\"select * from \"+DEPTTABLE+\" where id = #{id}\")\n Dept selectById(int id);\n @Delete(\"delete from \"+DEPTTABLE+\" where id = #{id}\")\n void deleteById(int id);\n //动态插入部门\n @InsertProvider(type=DeptDynaSqlProvider.class,method = \"insertDept\")\n void save(Dept dept);\n //动态修改部门\n @UpdateProvider(type=DeptDynaSqlProvider.class,method = \"updateDept\")\n void update(Dept dept);\n}",
"public interface CityDao {\n\n List<City> queryAllCity() throws Exception;\n\n City queryCityByCode(String cityCode) throws Exception;\n\n List<City> queryCityByBmsCode(String code) throws Exception;\n\n List<City> insert(City city) throws Exception;\n\n}",
"public interface TaskDefineDao {\n List findAll(String domainId);\n\n int add(TaskDefineModel m);\n\n String delete(List<TaskDefineModel> m);\n\n int update(TaskDefineModel m);\n}",
"public interface InventoryDao extends GenericDao<Inventory, Long> {\n\n public boolean removeInventory(Long id);\n\n public boolean isInventory(Long id);\n\n public Inventory getInventory(Long id);\n\n\n}",
"public interface BodyChangeDao {\n BodyChange insert(BodyChange item);\n\n List<BodyChange> query(BodyChange item);\n\n void update(BodyChange item);\n\n void delete(BodyChange item);\n\n}",
"public interface FlowOrderDao {\n\n //数据库新增 充值流浪 记录\n int AddFlowOrder(FlowOrder flowOrder);\n\n //数据库修改 当前订单的状态\n int updateFlowStatus(String orderId);\n\n\n //查询 flowOrder 流量充值记录\n ArrayList<FlowOrder> searchFlowOrderList () ;\n\n}",
"public interface BaseDao<T> {\n public void insert(T t);\n public void delete(String id);\n public void update(T t);\n public T queryOne(String id);\n public List<T> queryAll();\n}",
"public interface DatabaseInteractor {\n\n long persistEvent(Event event);\n\n ArrayList<Event> getActiveEvents(String filter, int offset);\n\n ArrayList<Event> getAllEvents();\n\n ArrayList<Event> getActiveEventsOnDate(String timestamp);\n\n ArrayList<Event> getActiveEventsByLocation(String latitude, String longitude, String locationName);\n\n ArrayList<Event> getSavedEvents(String filter);\n\n ArrayList<Event> getSavedEventsInNext24Hours(String timestamp);\n\n ArrayList<Event> getActiveEventsByCategory(@Event.Category int categoryId, String filter);\n\n Event getEventById(long eventId);\n\n void setSavedStateOfEvent(Event event, boolean isSaved);\n\n long persistPlace(Place place);\n\n void persistPlaces(ArrayList<Place> places);\n\n ArrayList<Place> getPlaces(String filter);\n\n Place getPlaceById(long placeId);\n\n /**\n * Deletes all events older than two months, and all places\n * */\n void cleanUpEventsAndPlaces();\n\n void changeSaveEvent(Event event, boolean isEventSaved);\n}",
"List<UserActivity> findAllUserActivityInDB() throws DataNotFoundException;"
] | [
"0.80290556",
"0.7580822",
"0.72912025",
"0.7173234",
"0.69820154",
"0.68695486",
"0.68478745",
"0.6798631",
"0.677492",
"0.6667",
"0.6653274",
"0.66475534",
"0.6635346",
"0.6634498",
"0.6602105",
"0.65976745",
"0.6593465",
"0.6533989",
"0.6529377",
"0.6525646",
"0.6525078",
"0.6524425",
"0.6519844",
"0.64900607",
"0.64728737",
"0.6466971",
"0.64646333",
"0.6451212",
"0.6442465",
"0.643922",
"0.6431793",
"0.64275664",
"0.64257497",
"0.6424589",
"0.6423023",
"0.6410636",
"0.63988405",
"0.63928896",
"0.6379484",
"0.6372034",
"0.6366701",
"0.6360242",
"0.6351113",
"0.63463396",
"0.6343663",
"0.6335733",
"0.6332094",
"0.63313955",
"0.63197744",
"0.6313411",
"0.6313364",
"0.6311527",
"0.63036066",
"0.63025045",
"0.62936497",
"0.6286768",
"0.6280617",
"0.62772524",
"0.62748784",
"0.6271991",
"0.6271383",
"0.6270215",
"0.6265341",
"0.62652725",
"0.62526053",
"0.62515384",
"0.62489176",
"0.62453234",
"0.62452936",
"0.62447554",
"0.62435544",
"0.62427247",
"0.62408507",
"0.6236826",
"0.6230685",
"0.6229667",
"0.62273103",
"0.6225371",
"0.62236494",
"0.62217224",
"0.6220201",
"0.6218744",
"0.62170494",
"0.62091136",
"0.6206867",
"0.6206443",
"0.62055594",
"0.6197773",
"0.61919636",
"0.6191106",
"0.61897975",
"0.6188496",
"0.6188053",
"0.6187665",
"0.618057",
"0.6179677",
"0.6177942",
"0.617771",
"0.6175672",
"0.6175348"
] | 0.7180905 | 3 |
Find pageable activities in database | List<Activity> findAllPageable(int page, int size); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void findWithPagination(Pagination<Activity, Assignment> pagination);",
"Page<EventActivityDTO> findAll(Pageable pageable);",
"Page<CoveredActivityDTO> findAll(Pageable pageable);",
"Page<Visited> findAll(Pageable pageable);",
"public interface ActivityDao extends GenericDao<Activity> {\n /**\n * Find pageable activities in database\n *\n * @param page page of activities list\n * @param size size of page of activities list\n * @return pageable list of activities\n */\n List<Activity> findAllPageable(int page, int size);\n\n /**\n * @return number of activity records\n */\n long getNumberOfRecords();\n}",
"List<T> findPage(int pageNumber);",
"void findWithPagination(Pagination<Task, Project> pagination);",
"Page<Accessprofile> listAllByPage(Pageable pageable);",
"public interface PlanActivityDao extends BaseDao<PlanActivity,Long> {\n Page<PlanActivity> findPage(Pageable pageable, User user);\n}",
"public Page<Event> findAllProcessEvents(int processNumber , Pageable pageable);",
"Page<Expert> findAll(Pageable pageable);",
"Page<Accessprofile> listWithCriterasByPage(List<SearchCriteria> searchCriterias, Pageable pageable);",
"Page<Accessprofile> listWithCriteraByPage(SearchCriteria searchCriteria, Pageable pageable);",
"public LearningResultHasActivity[] findAll() throws LearningResultHasActivityDaoException;",
"Page<DeliveryBoy> findAllByActive(Boolean activeRecords, Pageable pageable);",
"public interface VideoCustomDao {\n\n Page<Video> findGalleryVideosUniqueParted(VideoStatus status, Pageable pageable);\n}",
"List<E> page(Page page, Long...params);",
"Page<Person> findAll(Pageable pageable);",
"public Page<LearningType> findAll(Pageable pageable);",
"Page<Research> findAll(Pageable pageable);",
"List<Board> boardListPage(Criteria cri) throws Exception;",
"Page<T> findAll(Pageable pageable);",
"Page<Job> findAll(Pageable pageable);",
"List<UserActivity> findAllUserActivityInDB() throws DataNotFoundException;",
"public LearningResultHasActivity[] findWhereActivityIdActivityEquals(int activityIdActivity) throws LearningResultHasActivityDaoException;",
"Page<Livre> findAll(Pageable pageable);",
"Page<LoginHistoryEntity> findAll(Integer page);",
"Page<Examination> getPageByExamPackage(int examPackageID,int pageNo, int pageSize);",
"Page<EtatOperation> findAll(Pageable pageable);",
"List<Product>findAllBy(Pageable pageable);",
"Page<Link> findLink(Integer pageNow, Integer pageSize);",
"public abstract <T> Page<T> list(Pageable pageable, Class<T> clazz);",
"Page<PathHistory> findAll(Pageable pageable);",
"Page<DashboardDTO> findAll(Pageable pageable);",
"public List<Timetable> pagging(int pageIndex, int pageSize) throws Exception;",
"Integer getPage();",
"Page<ChatDTO> findAll(Pageable pageable);",
"List<SportActivity> findAll();",
"Page<PolicyRecord> findAll(Pageable pageable);",
"Page<Student> findAll(Pageable pageable);",
"PageInfo list(Date beginDate, Date endDate, List<Integer> resources, int pageNo, int pageSize);",
"Page<Student> findPaginated(int pageNo, int pageSize);",
"public Result findByPage(Page page,String hql, Object... params) ;",
"List<JournalPage> getAllPages();",
"@Override\n\tpublic List<Signuptable> findPage(String where, int startIndex, int pageSize) {\n\t\treturn null;\n\t}",
"Page<Preferences> findAll(Pageable pageable);",
"public List<Activity> getAllActivities();",
"public List<PageContent> getAllPageContent();",
"Page<Catalog> findAll(Pageable pageable);",
"Page<Enrollment> findAll(Pageable pageable);",
"@Test\n public void queryByPage() {\n List<Album> albums = albumDao.SelectByPage(1, 5);\n for (Album album : albums) {\n System.out.println(album);\n }\n }",
"Page<SchoolProgressDTO> findAll(Pageable pageable);",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface IntroductionStoryRepository extends JpaRepository<IntroductionStory, Long> {\n\t\n\tPage<IntroductionStory> findAllIntroductionStoriesByActivityId(Pageable pageable,Long activityId);\n\n}",
"int getPage();",
"Page<BaacDTO> findAll(Pageable pageable);",
"LiveData<PagedList<Response>> pagedList();",
"Page<UserContentComment> findAll(Pageable pageable);",
"List<OperationArea> findAllBy(Pageable pageable);",
"Page<ExtendedTextHeader> findAll(Pageable pageable);",
"public Page<T> list(DetachedCriteria criteria, Integer pageNumber, Integer pageSize);",
"public Page<Event> findEventsByUserId(Long userId , Pageable pageable);",
"Page<SpecimenStatusDTO> findAll(Pageable pageable);",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface ActivityRepository extends JpaRepository<Activity,Long> {\n\n @Query(\"select activity from Activity activity where activity.user.login = ?#{principal.username}\")\n Page<Activity> findByUserIsCurrentUser(Pageable pageable)\n ;\n @Query(\"select activity from Activity activity where activity.user.login = ?#{principal.username}\")\n List<Activity> findByUserIsCurrentUserDateBetween(LocalDate fromDate, LocalDate toDate);\n\n //List<Activity> findAllDateBetween(LocalDate fromDate, LocalDate toDate);\n}",
"public List<ExoSocialActivity> getSpaceActivities(Identity spaceIdentity, int index, int limit);",
"Page<Employee> findAll(Pageable page);",
"@CustomAnnotation(value = \"FIND_ALL_ACTIVITY\")\n\t@RequestMapping(\n\t\t\tvalue=\"/activities\",\n\t\t\tmethod=RequestMethod.GET\n\t\t\n\t\t\t)\n\tpublic ResponseEntity<Set<Activity>> findAcitities(){\n\t\treturn new ResponseEntity<Set<Activity>>(activityService.findAll(), HttpStatus.OK);\n\t}",
"@Test\n\tpublic void findAllByVisibleIsTrue_pageable() {\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\tRecord record = TestHelper.mockRecord();\n\t\t\trecord.setVisible(true);\n\t\t\tentityManager.persist(record);\n\t\t}\n\n\t\t// and 2 private records\n\t\tfor (int i = 0; i < 2; i++) {\n\t\t\tRecord record = TestHelper.mockRecord();\n\t\t\trecord.setVisible(false);\n\t\t\tentityManager.persist(record);\n\t\t}\n\n\t\tentityManager.flush();\n\n\t\tPage<Record> firstPage2Records = repository.findAllByVisibleIsTrue(PageRequest.of(0, 2));\n\t\tassertThat(firstPage2Records.getContent()).hasSize(2);\n\n\t\tPage<Record> allVisibleRecords = repository.findAllByVisibleIsTrue(PageRequest.of(0, 100));\n\t\tassertThat(allVisibleRecords.getContent()).hasSize(3);\n\t}",
"Page<TITransferDetails> findAll(Pageable pageable);",
"public Page<User> findAll(Pageable pageable);",
"Page<HrDocumentRequest> getPendingDocumentRequests(Pageable pageRequest);",
"@Query(value = \"SELECT user FROM User user WHERE user.active = :active\")\n Page<User> findByUserIsActive(Pageable pageable, @Param(\"active\") Integer active);",
"Page<HrDocumentRequest> getApprovedDocumentRequests(Pageable pageRequest);",
"public Result sqlQueryByPage(String sql,Page page,Object... params);",
"public Page<Event> findEventsByEventTypeId(Long typeId , Pageable pageable);",
"public void getWantedPageFromPagination()throws Exception{\r\n SearchPageFactory pageFactory = new SearchPageFactory(driver);\r\n List<WebElement> pageOrderList = pageFactory.searchPagePaginationList;\r\n WebElement wantedPageOrder = pageOrderList.get(1);\r\n clickElement(wantedPageOrder, Constant.explicitTime);\r\n }",
"Pages getPages();",
"Page<PeopleDTO> findAll(Pageable pageable);",
"Page<HousingAssociation> findAll(Pageable pageable);",
"public Page<Event> findAllProcessEventByUser(int processNumber , Long userId , Pageable pageable);",
"Page<ExamPackage> getPageByUsername(String username, int pageNo, int pageSize);",
"Page<ParaUserDTO> findAll(Pageable pageable);",
"List<ShopItem> findAllByInTopPageTrue();",
"Page<TeamDTO> findAll(Pageable pageable);",
"Page<ExamPackage> searchList(int pageNo, int pageSize, Sort sort);",
"Page<LevelElementDTO> findAll(Pageable pageable);",
"public IScapSyncSearchPage[] getPages();",
"Page<NoteDTO> findAll(Pageable pageable);",
"List<ProductView> getAllByPage(PageableAndSortable pageableAndSortable) throws ProductException;",
"public Page<Event> findEventsByAppModuleId(Long moduleId , Pageable pageable);",
"public abstract Page<CustomerInfo> findAll(GlobalSearch globalSearch, Pageable pageable);",
"public List<UserVO> pagingUser(Criteria cri);",
"Page<ConsultationInfoDTO> findAll(Pageable pageable);",
"@Override\r\n\tpublic String paging(String sql) {\n\t\treturn null;\r\n\t}",
"Page<ProjectsDTO> findAll(Pageable pageable);",
"List selectByExampleWithPage(PaymentTradeExample example);",
"Page<AttachmentDTO> findAll(Pageable pageable);",
"public interface CmTaskRepository extends PagingAndSortingRepository<CmTask, Integer> {\n // Page<CmTask> findByDeletedFalse(Pageable pageable);\n Page<CmTask> findAll(Pageable pageable);\n}",
"Page<Preferences> search(String query, Pageable pageable);",
"List<MemberAdvisoryComment> selectSelectiveWithPage(MemberAdvisoryComment record);",
"Page<AppConfigDTO> findAll(Pageable pageable);"
] | [
"0.68643564",
"0.6756979",
"0.6690341",
"0.663698",
"0.62432235",
"0.6235516",
"0.6213941",
"0.62095976",
"0.615533",
"0.6095307",
"0.6079206",
"0.6056418",
"0.60416025",
"0.60139376",
"0.6012248",
"0.60112196",
"0.5970013",
"0.59395564",
"0.5932668",
"0.5910284",
"0.5909488",
"0.58770126",
"0.58745426",
"0.58584905",
"0.5852869",
"0.58437425",
"0.5833258",
"0.5812621",
"0.5812107",
"0.5785738",
"0.5770043",
"0.5762279",
"0.57601064",
"0.5732369",
"0.57231754",
"0.57199097",
"0.5699567",
"0.5694907",
"0.56858",
"0.56719005",
"0.5670268",
"0.5655055",
"0.5642051",
"0.56320167",
"0.5623246",
"0.5612144",
"0.5604762",
"0.559132",
"0.5589973",
"0.55827624",
"0.55790776",
"0.5576443",
"0.55701345",
"0.55664915",
"0.5566327",
"0.5564431",
"0.5564144",
"0.5552117",
"0.55499023",
"0.55445147",
"0.55432576",
"0.55285466",
"0.5521374",
"0.5513672",
"0.55080044",
"0.55063874",
"0.5505507",
"0.5491007",
"0.5484958",
"0.54797685",
"0.54780895",
"0.5455602",
"0.54507416",
"0.54382324",
"0.5434346",
"0.5426528",
"0.5426078",
"0.5425535",
"0.53852737",
"0.5371657",
"0.53642756",
"0.5363955",
"0.5361442",
"0.5341414",
"0.5330104",
"0.532329",
"0.53224176",
"0.5306986",
"0.5303582",
"0.5299657",
"0.5299482",
"0.52969044",
"0.5293504",
"0.529194",
"0.5281445",
"0.52778137",
"0.5273359",
"0.52733284",
"0.52675456",
"0.526384"
] | 0.7703782 | 0 |
Triggered only when new data needs to be appended to the list Add whatever code is needed to append new items to your AdapterView | @Override
public void onLoadMore(int page, int totalItemsCount) {
customLoadMoreDataFromApi(page);
// or customLoadMoreDataFromApi(totalItemsCount);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void createList(DataSnapshot dataSnapshot) {\n if (daList.isEmpty()) {\n Item item = dataSnapshot.getValue(LostItem.class);\n daList.add(item);\n adapter.notifyDataSetChanged();\n } else {\n Item item = dataSnapshot.getValue(LostItem.class);\n daList.add(item);\n adapter.notifyDataSetChanged();\n }\n }",
"public void addNewData(List<PublicPollResponseModel.Data> data) {\n //remove footer view\n this.removeFooterView(footer);\n //Add all data into the adapter\n adapter.addAll(data);\n //Notifies the attached observers that the underlying\n // data has been changed and any View reflecting the data set should refresh itself.\n adapter.notifyDataSetChanged();\n isLoading = false;\n }",
"void loadNewData(List<Todo> newTodo) {\n mTodoList = newTodo;\n notifyDataSetChanged();\n }",
"private void addItem() {\n\t\tString message = edtMessage.getText().toString();\n\t\t// build the human\n\t\tHuman hum = new Human(message, humans.size());\n\t\t// 1° method\n\t\tarrayAdapter.add(hum);\n\t\t// 2° method\n\t\t// messages.add(message);\n\t\t// arrayAdapter.notifyDataSetChanged();\n\t\t// and flush\n\t\tedtMessage.setText(\"\");\n\t}",
"public void addItem(ArrayList<HashMap<String, String>> new_list) {\n list = new_list;\n notifyDataSetChanged();\n }",
"private void addDataForListView() {\n \t\n \tif(loadable)\n \t{\t\n \tloadable = false;\n \tdirection = BACKWARD;\n \tstrUrl = Url.composeHotPageUrl(type_id, class_id, last_id);\n \trequestData();\n \t}\n\t}",
"@Override\n public void onAdapterAboutToEmpty(int itemsInAdapter) {\n arrayAdapter.notifyDataSetChanged();\n Log.d(\"LIST\", \"notified\");\n i++;\n }",
"private void addDataToRv() {\n RealmResults<NewsModel> newsModels = realm.where(NewsModel.class).findAll();\n //initialize our adapter\n adapter = new NewsAdapter(new ArrayList<>(newsModels), this);\n mRvNewsList.setLayoutManager(new LinearLayoutManager(this));\n mRvNewsList.setAdapter(adapter);\n //notify the adapter that we have new data\n adapter.notifyDataSetChanged();\n }",
"@Override\n public void notifyDataSetChanged() {\n super.notifyDataSetChanged();\n }",
"private void addItemToList(String item) {\n itemList.add(item);\n\n // ListView aktualisieren\n adapter.notifyDataSetChanged();\n }",
"private void additems() {\n MaVolleyRequest.getInstance(getApplicationContext()).GetMethodRequest(getLink(), null, new VolleyRequestOnResultListener() {\n @Override\n public void onSucces(String result) {\n Log.d(\"qwerty\", getLink());\n ResearchResultBeanz item = (new Gson()).fromJson((new Gson()).fromJson(result, JsonObject.class).getAsJsonObject(\"data\"), ResearchResultBeanz.class);\n if (adapter == null) {\n adapter = new GridViewAdapter2(ImageGridViewActivity.this, Utils.fromArrayToList(item.items));\n gridView.setAdapter(adapter);\n } else {\n adapter.appendData (Utils.fromArrayToList(item.items));\n }\n flag_loading = false;\n }\n @Override\n public void onFailure(String error) {\n makeToast(\"Loading failure\");\n flag_loading = false;\n }\n });\n }",
"public void addAsPerFilterFirstLoad(List<Job> newJob){\n int currentSize = mJobList.size();\n //remove the current items\n mJobList.clear();\n //add all the new items\n mJobList.addAll(newJob);\n //tell the recycler view that all the old items are gone\n notifyItemRangeRemoved(0, currentSize);\n //tell the recycler view how many new items we added\n notifyItemRangeInserted(0, mJobList.size());\n }",
"@Override\n public void onItemAdded(Object toAdd) {\n if(toAdd instanceof SpotifyItem)\n return;\n\n //Reflect changes in the drink list\n DrinkInfo item = (DrinkInfo)toAdd;\n Log.d(TAG, \"Array size = \" + mDrinkInfos.size());\n mDrinkInfos.add(mDrinkInfos.size(), item);\n mDrinkQueueAdapter.notifyDataSetChanged();\n Log.d(TAG, \"Added song: \" + item.getDrinkName());\n }",
"@Override\n public void notifyItemInserted(int index, int count, int viewType) {\n int pos = index == count - 1 ? getItemCount() : flatPos(index, viewType);\n types.add(pos, viewType);\n /*Notificar al adapter después de la inserción [EN] Notify the adapter after insertion*/\n super.notifyItemInserted(index, count, viewType);\n }",
"@Override\n public void run() {\n chatListAdapter.add(response);\n chatListAdapter.notifyDataSetChanged();\n getListView().setSelection(chatListAdapter.getCount() - 1);\n }",
"private void populateListView() {\n List<String> groupNames = new ArrayList<String>();\n for (Pair<String, Group> pair : savedGroups) {\n groupNames.add(pair.first);\n }\n if (groupsListAdapter != null) {\n groupsListAdapter.clear();\n groupsListAdapter.addAll(groupNames);\n groupsListAdapter.notifyDataSetChanged();\n }\n }",
"public void addItem(View v){\n //Creates a new IngredientModel, adds it to the List<IngredientModel>\n IngredientModel ingredientModel = new IngredientModel(ingredientEditText.getText().toString());\n ingredientModelList.add(ingredientModel);\n //Notifies the adapter the data set has changed in order to update the recyclerView\n ingredientSearchAdapter.notifyDataSetChanged();\n }",
"public void refreshList()\n {\n final ArrayAdapter adapter = (ArrayAdapter)this.foodListAdapter;\n this.getActivity().runOnUiThread(new Runnable() {\n public void run() {\n adapter.notifyDataSetChanged();\n }\n });\n }",
"private void updataUserfouce() {\n\t\tcDynamicAdapter.notifyDataSetChanged();\n\t}",
"public void setDatatoList() {\n swipeRefreshLayout.setRefreshing(true);\n DatabaseHandler databaseHandler = new DatabaseHandler(getApplicationContext());\n locationDetailsList = databaseHandler.getAllLocationDetails();\n if (locationDetailsList.size() > 0) {\n\n recyclerView.setVisibility(View.VISIBLE);\n emptyListText.setVisibility(View.GONE);\n\n mAdapter = new LocationDetailsAdapter(locationDetailsList, this);\n RecyclerView.LayoutManager mLayoutManager = new LinearLayoutManager(getApplicationContext());\n recyclerView.setLayoutManager(mLayoutManager);\n recyclerView.setItemAnimator(new DefaultItemAnimator());\n recyclerView.setAdapter(mAdapter);\n } else {\n recyclerView.setVisibility(View.GONE);\n emptyListText.setVisibility(View.VISIBLE);\n emptyListText.setText(this.getResources().getString(R.string.no_list_items));\n }\n swipeRefreshLayout.setRefreshing(false);\n }",
"@Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n GenericTypeIndicator<ArrayList<String>> t = new GenericTypeIndicator<ArrayList<String>>() {};\n values = dataSnapshot.getValue(t);\n if (values != null) {\n for (int i = 0; i < values.size() ;i++){\n listAdapter.add(values.get(i));\n mainListView.setSelection(listAdapter.getCount() - 1);\n }\n } Log.d(\"guyTag\", values.toString());\n }",
"public void onAddItem(View view) {\n EditText editText = (EditText) findViewById(R.id.editText);\n // get the contents and cast from an Object to a String\n String text = editText.getText().toString();\n mNameMatch = false;\n\n // add the text to our adapter if text isn't blank\n if (text.trim().length() > 0) {\n for (int i = 0; i < mCurrentList.size(); i++) {\n if (text.equals(mCurrentList.get(i).text)) {\n Toast toast = Toast.makeText(NewListActivity.this, \"That option was already inserted previously\", Toast.LENGTH_SHORT);\n toast.setGravity(Gravity.CENTER, 0, 0);\n toast.show();\n mNameMatch = true;\n }\n }\n if (mNameMatch == false) {\n ListItem item = new ListItem(text, mListID, false);\n mAdapter.add(item, mAdapter.getItemCount());\n mCurrentList = mAdapter.getCurrentListItems(mListID, \"\");\n }\n\n } else {\n editText.setError(\"Nothing added because no text was inserted\");\n }\n\n // clear EditText so user won’t add it twice\n editText.setText(\"\");\n }",
"private void triggerAjouterChamp(JSONObject item) {\n this.listViewChampAdapter.add(item);\n }",
"void onItemsLoadComplete() {\n adapter.notifyDataSetChanged();\n\n // Stop refresh animation\n srl.setRefreshing(false);\n }",
"public static void addView() {\n\t\tListView listview = (ListView) main_detail.findViewById(R.id.listview);\n\t\tbaseAdapter = new BaseAdapter(getActivity(), new ArrayList<Object>()) {\n\t\t\t@Override\n\t\t\tpublic BaseView getView(Context context, Object data) {\n\t\t\t\tfinal ProfileRecommentItemView profileRecommentItemView = new ProfileRecommentItemView(context);\n\t\t\t\treturn profileRecommentItemView;\n\t\t\t}\n\t\t};\n\t\tbaseAdapter.clear();\n\t\tbaseAdapter.addAllItems(baseItemsCreditMain);\n\t\tbaseAdapter.notifyDataSetChanged();\n\t\tlistview.setOnItemClickListener(new OnItemClickListener() {\n\t\n\t\t\t@Override\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\t\t\t\tBaseItem baseItem = (BaseItem) parent.getItemAtPosition(position);\n//\t\t\t\tfinishEC(baseItem.getString(\"id_card\"));\n\t\t\t}\n\t\t\t\n\t\t});\n\t\tlistview.setAdapter(baseAdapter);\n\t}",
"public void refreshListView() {\n if (recyclerViewAdapter != null) {\n recyclerViewAdapter.notifyDataSetChanged();\n }\n }",
"void notifyListItemInserted(int position);",
"private void loadDataInListView() {\n list_med = myMedicationDB.getAllData();\n list_schedule = myMedicationDB.getAllDataSchedule();\n myAdapterMedication = new myAdapterMedication(context, list_med, list_schedule);\n allMedList.setAdapter(myAdapterMedication);\n myAdapterMedication.notifyDataSetChanged();\n\n }",
"private void reloadListView() {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n mDevicesListViewAdapter.notifyDataSetChanged();\n }\n });\n }",
"@Override\n public void addItem(int position) {\n // Getting the auto complete input field\n AutoCompleteTextView source = (AutoCompleteTextView) v.findViewById(R.id.auto_complete_input);\n // Getting the Title of the ingredient\n String title = source.getText().toString();\n // Check if we have already added this ingredient\n boolean item_seen = false;\n\n // Creating a new object for the recyclerview that can later be displayed\n IngredientItem temp = new IngredientItem(R.drawable.ic_restaurant_menu_green_24dp, source.getText().toString(), all_ingredients.get(title).get(1), all_ingredients.get(title).get(2), all_ingredients.get(title).get(3));\n\n // For every item in our recyclerview ...\n for (int i = 0; i < rv_adapt.getItemCount(); i++)\n // ... if the ingredient we want to add equals the item we recognize as it is already present within\n // our list of ingredients, then we set the item as already seen, so it does not get added again\n if (ingredients.get(i).getTitle().equals(title)) {\n // This log can be uncommented to check if the item is known yet\n // Log.d(\"Debug\", ingredients.get(i).getTitle() + \" \" + title + \" \" + rv_adapt.getItemCount());\n item_seen = true;\n }\n\n // If we recognize the item which should be added as a valid item and we haven't added it\n // yet, then we can add it now to our list of ingredients and notify our adaptor to refresh.\n if (all_ingredients.containsKey(title) && !item_seen) {\n // Notification in Logcat that item xyz has been added\n Log.d(\"Debug\", \"Adding \" + title + \" \" + all_ingredients.get(title));\n ingredients.add(temp);\n rv_adapt.notifyItemInserted(position);\n }\n\n // After adding an item the auto complete input field is getting emptied again, so\n // a new item can be added. Further the add button is being disabled for cosmetic purposes.\n source.setText(\"\");\n v.findViewById(R.id.button_add).setEnabled(false);\n\n // If we have 1+ Items in the recyclerview then the search is being enabled, as\n // it makes no sense to search for 0 items\n if (rv_adapt.getItemCount() > 0)\n v.findViewById(R.id.button_search).setEnabled(true);\n\n // Just a quick log to see which ingredients are present in our list\n // (Debugging purposes)\n Log.d(\"Debug\", ingredients.toString());\n\n // Notifying the adapter to refresh\n rv_adapt.notifyDataSetChanged();\n }",
"@Override\n public void onDataChange(@NonNull DataSnapshot snapshot) {\n for (DataSnapshot dataSnapshot: snapshot.getChildren()) {\n GroceryList p = dataSnapshot.getValue(GroceryList.class);\n list.add(p);\n }\n\n groceryListAdapter = new GroceryListAdapter(CreateList.this, list);\n groceryList.setAdapter(groceryListAdapter);\n groceryListAdapter.notifyDataSetChanged();\n }",
"private void updateList() {\n Model.instace.getAllArticles(new ArticleFirebase.GetAllArticlesAndObserveCallback() {\n @Override\n public void onComplete(List<Article> list) {\n data.clear();\n data = list;\n adapter.notifyDataSetChanged();\n }\n\n @Override\n public void onCancel() {\n\n }\n });\n }",
"@Override\n public void run() {\n notifyDataSetChanged();\n }",
"private void showList() {\n try {\n swipeRefreshLayout.setVisibility(View.VISIBLE);\n tvMessage.setVisibility(View.GONE);\n\n /* to void duplicate data*/\n Set<NewsDetail> newsDetailSet = new HashSet<NewsDetail>(newsList);\n\n newsList.clear();\n newsList = new ArrayList<NewsDetail>(newsDetailSet);\n if (adapter == null) {\n adapter = new NewsListAdapter(mContext, newsList);\n listView.setAdapter(adapter);\n } else {\n adapter.notifyDataSetChanged();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }",
"private void append_request(DataSnapshot dataSnapshot) {\n Iterator i = dataSnapshot.getChildren().iterator();\n //Go over all the requests\n while (i.hasNext()){\n\n //Add a new request iten to the list\n String message = (String) ((DataSnapshot)i.next()).getValue();\n String email = (String) ((DataSnapshot)i.next()).getValue();\n String newMessage= message ;\n //\" asked to join the group\"\n requestList.add(new requestItem(newMessage,email,activity_name));\n }\n request_item_adapter adapter = new request_item_adapter(this, R.layout.activity_request_item, requestList);\n //attaching adapter to the listview\n listView.setAdapter(adapter);\n }",
"public void addMyPollData(List<UserPollResponseModel.Results.Data> dataResults) {\n //remove footer viewe\n this.removeFooterView(footer);\n //add data in array list\n myPolladapter.addAll(dataResults);\n //Notifies the attached observers that the underlying\n // data has been changed and any View reflecting the data set should refresh itself.\n myPolladapter.notifyDataSetChanged();\n isLoading = false;\n }",
"private void addNewListItem() {\n\n View view = LayoutInflater.from(CheckboxNoteActivity.this).inflate(R.layout.cell_item_edit, null);\n final CheckBox checkBox = view.findViewById(R.id.chk_edit_item);\n final EditText mEtListItem = view.findViewById(R.id.et_edit_item);\n final ImageView mIvAddItem = view.findViewById(R.id.iv_add_item);\n\n mEtListItem.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n if (s.length() > 1) {\n mIvAddItem.setVisibility(View.VISIBLE);\n } else {\n mIvAddItem.setVisibility(View.INVISIBLE);\n }\n\n }\n });\n //Successfully insert an item\n mIvAddItem.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n mEtListItem.setEnabled(true);\n mRlAddItem.setEnabled(true);\n mIvAddItem.setVisibility(View.INVISIBLE);\n\n Items cbitem = new Items();\n cbitem.itemId = row;\n cbitem.itemName = mEtListItem.getText().toString();\n cbitem.isChecked = false;\n items.add(cbitem);\n\n Toast.makeText(CheckboxNoteActivity.this, \"Items Size = \" + items.size()\n + \"Retrieved Items = \" + retrievedItems.size(), Toast.LENGTH_SHORT).show();\n }\n });\n\n\n mLlDynamicLayout.addView(view);\n }",
"public void update_list_view() {\n\n Collections.sort(mA.alarms);\n\n // make array adapter to bind arraylist to listview with new custom item layout\n AlarmsAdapter aa = new AlarmsAdapter(mA, R.layout.alarm_entry, mA.alarms);\n alarm_list_view.setAdapter(aa);\n registerForContextMenu(alarm_list_view);\n aa.notifyDataSetChanged(); // to refresh items in the list\n }",
"private void updateListView() {\n adapter = new TableItemAdapter(this, tableItems);\n this.listView.setAdapter(adapter);\n }",
"@Override\n public void onDataChange(DataSnapshot snapshot) {\n\n\n MemInfo.Store_Info store_info = snapshot.getValue(MemInfo.Store_Info.class);\n myAdapter.clear();\n for (int i = 0; i < store_info.getStore_Size(); i++) {\n myAdapter.addItem(store_info.getStore_menus().get(i).getMenu_img()\n , store_info.getStore_menus().get(i).getMenu_name()\n , store_info.getStore_menus().get(i).getMenu_price());\n }\n myAdapter.notifyDataSetChanged();\n\n }",
"public void populateListView() {\n\n\n }",
"@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {\n String rec = recipes.get(i);\n inMealRecipes.add(rec);\n adapterM.notifyDataSetChanged();\n }",
"protected void populateContentListView(ArrayList<UnistorEntry> content){\n\n // If first entry is back button, the content array\n // is sorted without this item, which will be added in the first position\n if(content.get(0).getEntryType() == Constants.ENTRY_TYPE_BACK){\n UnistorEntry backEntry = content.remove(0);\n Collections.sort(content, new UnistorEntryComparator());\n content.add(0, backEntry);\n }else{\n Collections.sort(content, new UnistorEntryComparator());\n }\n\n // Setting the adapter with the new items.\n // If the adapter have been previously created, we use notifyDataSetChanged to refresh,\n // that uses fairly less resources than creating a new one.\n if(this.listView.getAdapter() == null){\n UnistorEntryListAdapter listViewAdapter = new UnistorEntryListAdapter(mContext, content);\n this.listView.setAdapter(listViewAdapter);\n // Set context menu for the listview\n registerForContextMenu(listView);\n\n }else{\n UnistorEntryListAdapter listViewAdapter = (UnistorEntryListAdapter)this.listView.getAdapter();\n listViewAdapter.clear();\n listViewAdapter.addAll(content);\n listViewAdapter.notifyDataSetChanged();\n }\n\n\n }",
"@Override\n public void run() {\n chatListAdapter.add(sendToOthers);\n chatListAdapter.notifyDataSetChanged();\n getListView().setSelection(chatListAdapter.getCount() - 1);\n }",
"@Override\n public void onScroll(AbsListView view, int firstVisibleItem,\n int visibleItemCount, int totalItemCount) {\n if (getAdapter() == null)\n return;\n if (getAdapter().getCount() == 0)\n return;\n int l = visibleItemCount + firstVisibleItem;\n if (l >= totalItemCount && !isLoading) {\n // It is time to add new data. We call the listener\n this.addFooterView(footer);\n isLoading = true;\n listener.loadData();\n\n }\n }",
"@Override\n public void onAdded() {\n }",
"public void addmyPollCommentsData(List<CommentDisplayResponseModel.Results.Data> data) {\n //add data\n myPollCommentsAdapter.addAll(data);\n //Notifies the attached observers that the underlying\n // data has been changed and any View reflecting the data set should refresh itself.\n myPollCommentsAdapter.notifyDataSetChanged();\n isLoading = false;\n\n }",
"private void refreshList() {\n ArrayAdapter<Plan> planAdapter = new PlanAdapter();\n mListView.setAdapter(planAdapter);\n\n }",
"@Override\r\n\tpublic void notifyDataSetChanged() {\n\t\tsuper.notifyDataSetChanged();\r\n\t\tLog.v(\"DEBUG\", \"CHANGE\");\r\n\t}",
"@Override\r\n public void onDataSetChanged() {\n }",
"public void updateListView(ArrayList<itemInfo> playerCards){\n final ListView itemListView = findViewById(R.id.itemListView);\n\n // Standard list view adapter\n /*\n final listViewAdapter listAdapter = new listViewAdapter(this,R.layout.itemlistlayout);\n itemListView.setAdapter(listAdapter);\n */\n\n //Array list adapter\n cardArrayAdapter myArrayAdapter = new cardArrayAdapter(this,playerCards);\n itemListView.setAdapter(myArrayAdapter);\n\n //Refresh the adapter data from the arraylist\n myArrayAdapter.notifyDataSetChanged();\n\n //playerCard = playerCards.get(cardCounter);\n\n //listAdapter.add(playerCard);\n\n listCount = itemListView.getAdapter().getCount();\n\n //cardCounter = cardCounter + 1;\n\n }",
"private void populateListView() {\n String[] myItems = {\"Blue\", \"green\", \"Purple\", \"red\"};\n\n //creating listviewadapter which is an array for storing the data and linking it according to the\n //custom listview\n\n ArrayAdapter<String> listViewAdapter = new ArrayAdapter<String>(this, R.layout.da_items, myItems);\n //linking the listview with our adapter to present data\n ListView Lv = (ListView)findViewById(R.id.listView_data);\n Lv.setAdapter(listViewAdapter);\n }",
"public void notifyChanged() {\n notifyDataSetChanged();\n }",
"@Override\n\tpublic void notifyDataSetChanged() {\n\t\tsuper.notifyDataSetChanged();\n\t\tsetIndexer(list);\n\t}",
"@Override\n\t\t\tpublic void onStart() {\n\t\t\t\tlistitem.clear();\n\t\t\t\tnew AsyncTask<Void, Void, Void>() {\n\t\t\t\t\tprotected Void doInBackground(Void... params) {\n\t\t\t\t\t\tgetmessage_list(1);\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tprotected void onPostExecute(Void result) {\n\t\t\t\t\t\tif (count >= 19) {\n\t\t\t\t\t\t\txListView.startLoadMore();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\txListView.stopLoadMore();\n\t\t\t\t\t\t}\n\t\t\t\t\t\txListView.setRefreshSuccess();\n\t\t\t\t\t\tadapter.notifyDataSetChanged();\n\t\t\t\t\t\tLog.d(TAG, \"jieshu\");\n\t\t\t\t\t}\n\t\t\t\t}.execute(null, null, null);\n\t\t\t}",
"private void populateListView() {\n ((MovieAdapter)((HeaderViewListAdapter)myListView.getAdapter()).getWrappedAdapter()).notifyDataSetChanged();\n\n // Check if the user selected a specific movie and start a new activity with only that movie's information.\n myListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n Movie selectedMovie = movies.get(position);\n\n Intent intent = new Intent(MovieListActivity.this, MovieOverviewActivity.class);\n intent.putExtra(TITLE_KEY, selectedMovie.getTitle());\n intent.putExtra(RELEASE_DATE_KEY, selectedMovie.getReleaseDate());\n intent.putExtra(RATING_KEY, selectedMovie.getRating());\n intent.putExtra(OVERVIEW_KEY, selectedMovie.getOverview());\n intent.putExtra(POSTER_PATH_KEY, selectedMovie.getPosterURL());\n startActivity(intent);\n }\n });\n }",
"private void populateListView() {\n ArrayAdapter<Representative> adapter = new MyListAdapter();\n ListView list = (ListView) findViewById(R.id.repListView);\n list.setAdapter(adapter);\n }",
"@Override\n public void onListDataLoaded() {\n if (this.progressBar != null && !this.isListLoaded) {\n this.progressBar.setVisibility(View.GONE);\n }\n if (!this.isListLoaded) {\n addListHeader();\n this.isListLoaded = true;\n }\n }",
"private void supaporn() {\n\t\tlistView = (ListView) findViewById(R.id.listView1);\n\t\tlists = new ArrayList<items_list>();\n\t\tadapter=new MyAdater();\n\t\tlistView.setAdapter(adapter);\n\t}",
"@Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n recipes = new ArrayList<>();\n for (DataSnapshot data : dataSnapshot.getChildren()) {\n recipes.add(data.getValue(Recipe.class));\n }\n //ListAdapter adapter = new RecipeAdapter(getApplicationContext(),R.layout.list_view_recipe,recipes, mUser.getUid());\n ListAdapter adapter = new RecipeAdapter(getApplicationContext(), R.layout.list_view_recipe, recipes, mUser.getUid());\n listViewRecipes.setAdapter(adapter);\n listViewRecipes.invalidateViews();\n\n\n // ...\n }",
"@Override\n\t\tpublic void onLoadMore() {\n\t\t\tdaoIndex++;\n\t\t\tgetData();\n\t\t\tadapter.notifyDataSetChanged();\n\t\t\tonLoad();\n\t\t}",
"@Override\n public void onReceive(Context context, Intent intent) {\n System.out.println(\"\");\n notifyDataSetChanged();\n\n }",
"public void addNewItem(DataHolder newRow) {\n this.add(newRow);\n\n // sends request to update ListAdapter\n notifyDataSetChanged();\n }",
"void notifyListDataSetChanged();",
"public void notifyDataSetChanged() {\n generateDataList();\n mSectionedExpandableGridAdapter.notifyDataSetChanged();\n }",
"@Override\n // once adding an entry\n public void onDataChange(DataSnapshot dataSnapshot) {\n Set<String> chatRoomsSet = new HashSet<String>();\n Iterator i = dataSnapshot.getChildren().iterator();\n\n // go through the whole database and add the new\n while (i.hasNext()){\n chatRoomsSet.add(((DataSnapshot)i.next()).getKey());\n }\n // clear the old list and add the new ones\n chatRoomsList.clear();\n chatRoomsList.addAll(chatRoomsSet);\n arrayAdapter.notifyDataSetChanged();\n }",
"public void updateListView() {\n listView = findViewById(R.id.list_view);\n contactList = new ArrayList<>();\n Cursor cursor = db.getAllContacts();\n\n if (cursor.getCount() == 0) {\n contactListAdaptor.clear();\n contactListAdaptor.notifyDataSetChanged();\n Toast.makeText(this, \"No contacts added!\", Toast.LENGTH_SHORT).show();\n } else {\n while (cursor.moveToNext()) {\n Pair<String, String> contact = new Pair<>(cursor.getString(1), cursor.getString(2));\n contactList.add(contact);\n }\n contactListAdaptor = new ContactListAdaptor(this, contactList, this);\n listView.setAdapter(contactListAdaptor);\n }\n }",
"public void refreshListAdapter() {\n adapter.setListContent(requests);\n //We in turn set the adapter to the RecyclerView\n recyclerView.setAdapter(adapter);\n }",
"private void populateList(){\n listView = (ListView) findViewById(R.id.group_leader_list);\n // Build Adapter\n mAdapter = new GroupArrayAdapter(ChangeLeaderListActivity.this, groupList);\n listView.setAdapter(mAdapter);\n clickCallBack();\n }",
"@Override\n public void onLoadMoreItems() {\n if (mAdapter.hasMoreItems()) {\n requestData(mAdapter.getItems() == null ? 0 : mAdapter.getItems().size(), false);\n } else {\n mAdapter.onFinishLoading(false);\n }\n }",
"public void AddItemsToRecyclerView()\n {\n source = new Vector();\n source.add(\"排班\");\n source.add(\"加班\");\n source.add(\"打卡\");\n source.add(\"請假\");\n source.add(\"文件\");\n source.add(\"訂餐\");\n }",
"@Override\n public void run() {\n loadItems();\n notifyDataSetChanged();\n }",
"private void updateUI() {\n swipeRefreshLayout.setRefreshing(false);\n adapter.clearItems();\n itemList.addAll(DatabaseController.getInstance(getApplicationContext()).getItems());\n if (itemList.size() > 0){\n emptyTextView.setVisibility(View.GONE);\n adapter.notifyDataSetChanged();\n } else {\n emptyTextView.setVisibility(View.VISIBLE);\n }\n }",
"private void add() {\n \t\r\n\tArrayAdapter<String> adp=new ArrayAdapter<String>(this,\r\n\t\tandroid.R.layout.simple_dropdown_item_1line,li);\r\n\t \t\r\n\tadp.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line);\r\n\tauto.setThreshold(1);\r\n\tauto.setAdapter(adp);\r\n\tsp.setAdapter(adp);\r\n\t\r\n }",
"private void updateListView() {\n if (smsListView.getAdapter() == null) {\n Log.d(TAG, \"updateListView: set new adapter\");\n smsListView.setAdapter(new SmsListAdapter(SmsListActivity.this, getDataProviderManager(),\n getLayoutInflater()));\n smsListView.setEmptyView(findViewById(R.id.nosms));\n smsListView.setOnItemClickListener(new OnItemClickListener() {\n\n @Override\n public void onItemClick(AdapterView<?> arg0, View arg1, int index, long itemId) {\n if (itemId != -1) {\n Intent smsDetails = new Intent(SmsListActivity.this, SmsDetailsActivity.class);\n smsDetails.putExtra(EXTRAS_KEY_SMSID, Long.valueOf(itemId));\n startActivityForResult(smsDetails, R.id.requestCode_sms_changeInDetailView);\n }\n }\n });\n\n smsListView.setOnItemLongClickListener(new OnItemLongClickListener() {\n\n @Override\n public boolean onItemLongClick(AdapterView<?> arg0, View arg1, int index, long itemId) {\n return showItemLongClickMenu(arg0, itemId, index);\n }\n });\n } else {\n Log.d(TAG, \"updateListView: notifyDataSetChanged\");\n ((SmsListAdapter) smsListView.getAdapter()).clearImageCache();\n ((SmsListAdapter) smsListView.getAdapter()).notifyDataSetChanged();\n }\n\n }",
"@Override\n public void onResponse(ArrayList<WeatherForeCastModel> weatherForeCastModel) {\n ArrayAdapter arrayAdapter = new ArrayAdapter(MainActivity.this, android.R.layout.simple_list_item_1, weatherForeCastModel);\n lv.setAdapter(arrayAdapter);\n }",
"@Override\n public void onResponse(ArrayList<WeatherForeCastModel> weatherForeCastModel) {\n ArrayAdapter arrayAdapter = new ArrayAdapter(MainActivity.this, android.R.layout.simple_list_item_1, weatherForeCastModel);\n lv.setAdapter(arrayAdapter);\n }",
"@Override\n public void onChanged(List<Contact> updatedContacts) {\n adapter.clear();\n adapter.addAll(updatedContacts);\n adapter.notifyDataSetChanged();\n }",
"@Override\n\t\t\tpublic void onStart() {\n\t\t\t\tif (listitem != null || listitem.size() > 0) {\n\t\t\t\t\tlistitem.clear();\n\t\t\t\t}\n\t\t\t\tnew AsyncTask<Void, Void, Void>() {\n\t\t\t\t\tprotected Void doInBackground(Void... params) {\n\t\t\t\t\t\tgetdata(1);\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tprotected void onPostExecute(Void result) {\n\t\t\t\t\t\tif (count >= 19) {\n\t\t\t\t\t\t\txlistview.startLoadMore();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\txlistview.stopLoadMore();\n\t\t\t\t\t\t}\n\t\t\t\t\t\txlistview.setRefreshSuccess();\n\t\t\t\t\t\tadapter.notifyDataSetChanged();\n\t\t\t\t\t\tLog.d(TAG, \"jieshu\");\n\t\t\t\t\t}\n\t\t\t\t}.execute(null, null, null);\n\t\t\t}",
"@Override\n\t\t\t\t\t \t public void run() {\n\t\t\t\t\t \t \tadp.notifyDataSetChanged();\n\t\t\t\t\t \t }",
"@Override\r\n public void onDataChange(DataSnapshot dataSnapshot) {\n arrayListmensagens.clear();\r\n\r\n //RECUPERAR MENSAGENS\r\n for(DataSnapshot dados: dataSnapshot.getChildren()){\r\n //RECUPERAR MENSAGEM INDIVIDUAL\r\n Mensagem mensagem = dados.getValue(Mensagem.class);\r\n //ADICIONAR AO LIST\r\n arrayListmensagens.add(mensagem);\r\n }\r\n\r\n arrayAdapter.notifyDataSetChanged(); //Notificando que dados mudaram\r\n\r\n lvMensagens.setSelection(lvMensagens.getAdapter().getCount() - 1);\r\n }",
"@Override\n\tpublic void onScrollStateChanged(AbsListView view, int scrollState) {\n\t\tswitch (scrollState) {\n\t\tcase SCROLL_STATE_FLING:\n\t\t\tMap<String, Object>map=new HashMap<String, Object>();\n\t\t\tmap.put(\"pic\",R.drawable.ic_launcher);\n\t\t\tmap.put(\"text\", \"增加项\");\n\t\t\tdataList.add(map);\n\t\t\tsim_adp.notifyDataSetChanged();\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t}\n\t}",
"private void insertLatestData() {\n String[] names = new String[feedbacks.size()];\n String[] ratings = new String[feedbacks.size()];\n String[] reviews = new String[feedbacks.size()];\n for (int i = 0; i < feedbacks.size(); i++) {\n names[i] = \"Name: \" + feedbacks.get(i).getName();\n ratings[i] = \"Rating: \" + feedbacks.get(i).getRatingBar();\n reviews[i] = \"Review: \" + feedbacks.get(i).getReview();\n }\n feedbackListAdapter = new FeedbackListAdapter(ViewPsmFeedbackActivity.this, names, ratings, reviews);\n listFeedback.setAdapter(feedbackListAdapter);\n }",
"public void refreshList() {\n mCursor.requery();\n mCount = mCursor.getCount() + mExtraOffset;\n notifyDataSetChanged();\n }",
"private void refreshListView() {\n\t\tSQLiteDatabase db = dbh.getReadableDatabase();\n\t\tsharedListView.setAdapter(null);\n\t\tCursor c1 = db.rawQuery(\"SELECT _id, title, subtitle, content, author, otheruser FROM todos WHERE otheruser = '\" + author + \"'\", null);\n\t\tListAdapter adapter2 = new SimpleCursorAdapter(this, R.layout.activity_items, c1, from, to, 0);\n\t\tsharedListView.setAdapter(adapter2);\n\t\tadapter.notifyDataSetChanged();\n\t}",
"@Override\n\t\tpublic void handleMessage(Message msg) {\n\t\t\tsuper.handleMessage(msg);\n\t\t\tif(msg.what==1){\n\t\t\t\thladapter.notifyDataSetChanged();\n\t\t\t}\n\t\t}",
"private void setdatalistthongbao()\n {\n // showing refresh animation before making http call\n swipeRefreshLayout.setRefreshing(true);\n\n for (int i = 0 ; i < 5 ; i++)\n {\n Arr_listthongbao.add(new listthongbao(\"Lịch khám\" , \"Còn 10p nữa đến giờ khám bệnh nhân Nguyễn Văn A, tại P. 306\"));\n\n }\n\n\n // count noti\n countnoti = Arr_listthongbao.size();\n thongbaoadapter.notifyDataSetChanged();\n\n // stopping swipe refresh\n swipeRefreshLayout.setRefreshing(false);\n\n\n\n\n\n }",
"private void populateList() {\n new AsyncTask<Void, Void, Boolean>() {\n @Override\n protected Boolean doInBackground(Void... params) {\n List<Item> list = TodoApplication.getDbHelper().getAllItems();\n if(list == null) {\n Log.d(TAG, \"doInBackground: no items in the database.\");\n return false;\n } else {\n itemsList = list;\n adapter.setUpdatedList(itemsList);\n }\n // Successfully loaded the list.\n return true;\n }\n\n @Override\n protected void onPostExecute(Boolean isSuccess) {\n super.onPostExecute(isSuccess);\n if(isCancelled()) {\n return;\n }\n if(isSuccess) {\n if(adapter != null) {\n adapter.notifyDataSetChanged();\n }\n if(itemsList == null || itemsList.size() == 0) {\n setEmptyScreen();\n } else {\n emptyText.setVisibility(View.GONE);\n todoRecyclerView.setVisibility(View.VISIBLE);\n }\n } else {\n setEmptyScreen();\n }\n }\n }.execute();\n }",
"public void updateListView(){\n mAdapter = new ListViewAdapter(getActivity(),((MainActivity)getActivity()).getRockstarsList());\n mRockstarsListView.setAdapter(mAdapter);\n }",
"private void getFoodProcessingInpectionList() {\n ListView list = (ListView) getView().findViewById(R.id.foodprocessinglist);\n foodProcessingInpectionArrayList.clear();\n foodProcessingInpectionArrayList.removeAll(foodProcessingInpectionArrayList);\n List<FoodProcessingInpection> foodProcessingInpectionlist = db.getFoodProcessingInpectionList();\n\n List<CBPartner> cbPartnerList = db.getAllCPartners();\n String cbPartner = \"\";\n\n int listSize = foodProcessingInpectionlist.size();\n System.out.println(listSize + \"===============foodProcessingInpectionlist==========\");\n\n for (int i = 0; i < foodProcessingInpectionlist.size(); i++) {\n System.out.println(\"Document Number=== \" + foodProcessingInpectionlist.get(i).getDocumentNumber());\n\n String retreivedDocumentDate = foodProcessingInpectionlist.get(i).getDocumentDate();\n\n cbPartnerID = foodProcessingInpectionlist.get(i).getNameOfApplicant();\n\n for(CBPartner partner : cbPartnerList){\n if(null != cbPartnerID && cbPartnerID.equals(partner.getC_bpartner_id())){\n cbPartner = partner.getName();\n System.out.println(app + \" cbPartner : \" + cbPartner);\n } else{\n //System.out.println(app + \" cbPartner not found\");\n }\n }\n\n\n if (retreivedDocumentDate != null) {\n foodProcessingInpectionArrayList.add(new FoodProcessingInpection(\n foodProcessingInpectionlist.get(i).getDocumentNumber(),\n retreivedDocumentDate,\n cbPartner,\n foodProcessingInpectionlist.get(i).getFoodCropManufacturingPlanApproval()));\n }\n\n\n localhash.put(i, foodProcessingInpectionlist.get(i).getLocalID());\n adapter = new FoodProcessingListAdapter(getActivity(), foodProcessingInpectionArrayList);\n list.setAdapter(adapter);\n }\n\n\n list.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View viewClicked, int position, long id) {\n TextView textviewDocumentNumber = viewClicked.findViewById(R.id.textviewdocument_no_no);\n TextView textviewDocumentDate = viewClicked.findViewById(R.id.textviewdocument_date_date);\n TextView textviewsisalSpinningExportNumber = viewClicked.findViewById(R.id.textviewlicence_number);\n TextView textviewApplicantName = viewClicked.findViewById(R.id.textviewname_of_applicant);\n\n documentNumber = foodProcessingInpectionArrayList.get(position).getDocumentNumber();\n documentDate = foodProcessingInpectionArrayList.get(position).getDocumentDate();\n Licenceno = foodProcessingInpectionArrayList.get(position).getFoodCropManufacturingPlanApproval();\n nameOfApplicant = foodProcessingInpectionArrayList.get(position).getNameOfApplicant();\n\n localID = localhash.get(position);\n\n }\n });\n }",
"@Override\n public void onClick(View view) {\n String interactionType = _interactionTypeSpinner.getSelectedItem() + \"\";\n String details = _details.getText().toString();\n String specialNote = _specialNote.getText().toString();\n String nextActionType = _nextActionTypeSpinner.getSelectedItem() + \"\";\n String nextActionDate = _nextActionDate.getText().toString();\n String nextMeetingLocation = _nextMeetingLocation.getText().toString();\n\n CommunicationDM.SpecificCommRecord specificCommRecord = new CommunicationDM.SpecificCommRecord();\n specificCommRecord.setInteractionType(interactionType);\n specificCommRecord.setInteractionDate(TimeUtils.getToday());\n specificCommRecord.setAgentId(Session.getSeassionData().getId() + \"\");\n specificCommRecord.setDetails(details);\n specificCommRecord.setSpecialNote(specialNote);\n specificCommRecord.setActionType(nextActionType);\n specificCommRecord.setDate(nextActionDate);\n specificCommRecord.setLocation(nextMeetingLocation);\n specificCommRecord.setLName(Session.getSeassionData().getName());\n\n //TODO: Need to write code for add data to server\n commList.add(specificCommRecord);\n\n\n addNewCommunicationRecord(((ClientDetails) getActivity()).getMemberProfile().getGeneralInfo().getLandownerName(),interactionType,\n TimeUtils.getToday(),details,specialNote,nextActionType,Session.getSeassionData().getName(),nextActionDate,nextMeetingLocation);\n\n adapter.notifyDataSetChanged();\n alertDialog.cancel();\n }",
"public void refreshAdapter() {\n\t\tadapter.notifyDataSetChanged();\n\t\tthis.listView.onRefreshComplete();\n\t}",
"@Override\n public void onLoadMore() {\n if (searchbeanArrayList_new.size() != 0) {\n\n\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n // remove progress item\n\n\n //add items one by one\n\n if (pageTokenAvailable) {\n smoothProgressBar.setVisibility(View.VISIBLE);\n\n current_start += 10;\n\n // searchbean_post_data.getStart_limit()+=10;\n\n searchbean_post_data.setStart_limit(current_start);\n\n\n findDataFromServer();\n\n\n //or you can add all at once but do not forget to call mAdapter.notifyDataSetChanged();\n }\n\n\n }\n }, 2000);\n\n }\n\n }",
"public void onDataSetChanged();",
"public void addPollLikesData(List<LikesResponseModel.Results.Data> dataResults) {\n //remove footer view\n this.removeFooterView(footer);\n //Add all data into the adapter\n customLikesPollAdapter.addAll(dataResults);\n //Notifies the attached observers that the underlying\n // data has been changed and any View reflecting the data set should refresh itself.\n customLikesPollAdapter.notifyDataSetChanged();\n isLoading = false;\n }",
"private void updateUI() {\n ArrayList<String> taskList = new ArrayList<>();\n SQLiteDatabase db = mHelper.getReadableDatabase();\n Cursor cursor = db.query(Task.TaskEntry.TABLE,new String[] {Task.TaskEntry.COL_TASK_TITLE},null,null,null,null,null);\n listItems.clear();\n\n while (cursor.moveToNext()){\n int index = cursor.getColumnIndex(Task.TaskEntry.COL_TASK_TITLE);\n taskList.add(cursor.getString(index));\n ListItems item = new ListItems(cursor.getString(index));\n listItems.add(item);\n }\n\n\n R_adapter = new RecyclerAdapterGoals(this.getContext(), listItems);\n mTaskListView.setAdapter(R_adapter);\n cursor.close();\n db.close();\n }",
"private void addNewFoodItemRefresh() {\n // create a foodItem instance with input information\n FoodItem foodItem = new FoodItem(id.getText(), name.getText());\n foodItem.addNutrient(\"calories\", Double.valueOf(calories.getText()));\n foodItem.addNutrient(\"fat\", Double.valueOf(fat.getText()));\n foodItem.addNutrient(\"carbohydrate\", Double.valueOf(carbohydrate.getText()));\n foodItem.addNutrient(\"fiber\", Double.valueOf(fiber.getText()));\n foodItem.addNutrient(\"protein\", Double.valueOf(protein.getText()));\n this.foodData.addFoodItem(foodItem);// add it to the food data to store\n this.close();// close the addfooditem stage\n this.foodList.refreshAfterAdd(foodItem);// refresh the foodList\n\n }",
"public void notifyDataSetChanged() {\n if (noxItemCatalog != null) {\n noxItemCatalog.recreate();\n createShape();\n initializeScroller();\n refreshView();\n }\n }",
"@Override\n public int getItemCount() {\n return dataList.size();\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent newItemBackIntent) {\n \tLog.i(TAG, \"On Activity Result\");\n \tif (resultCode == RESULT_OK && requestCode == 0) {\n \t\tLog.i(TAG, \"Result Code OK\");\n \t\tparseArrayList.clear();\n \t\t//listAdapter.notifyDataSetInvalidated();\n\t\t\tqueryParseForItems();\n\t\t\tlistAdapter.notifyDataSetChanged();\n\t\t}\n \t//super.onActivityResult(requestCode, resultCode, newItemBackIntent);\n }",
"@Override\n public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {\n super.onViewCreated(view, savedInstanceState);\n btnAdd = view.findViewById(R.id.btnAdd);\n btnGenerate = view.findViewById(R.id.btnGenerate);\n etItem = view.findViewById(R.id.etItem);\n rvItems = view.findViewById(R.id.rvItems);\n\n //items = new ArrayList<>(); //delete later when able to save to parse server\n /*items.add(\"apples\");\n items.add(\"flour\");\n items.add(\"sugar\"); */\n\n // loadItems();\n //queryIngredients();\n if (!(items == null) && items.size() > 0) {\n items = LoginActivity.ingItems;\n } else {\n loadItems();\n }\n Log.i(\"AfterqueryIngredients:\", String.valueOf(items));\n\n ItemsAdapter.OnLongClickListener onLongClickListener = new ItemsAdapter.OnLongClickListener() {\n @Override\n public void onItemLongClicked(int position) {\n // Delete the item from the model\n items.remove(position);\n // Notify the adapter\n itemsAdapter.notifyItemRemoved(position);\n Toast.makeText(getContext(), \"Item was removed\", Toast.LENGTH_SHORT).show();\n saveItems();\n }\n };\n itemsAdapter = new ItemsAdapter(items, onLongClickListener);\n rvItems.setAdapter(itemsAdapter);\n rvItems.setLayoutManager(new LinearLayoutManager(getContext()));\n\n btnAdd.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n String ingredientItem = etItem.getText().toString();\n // Add item to the model\n items.add(ingredientItem);\n // Notify adapter that an item is inserted\n itemsAdapter.notifyItemInserted(items.size() - 1);\n etItem.setText(\"\");\n saveItems();\n }\n });\n\n btnGenerate.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n // lead to next screen of generated recipes from the api call\n ParseUser currentUser = ParseUser.getCurrentUser();\n saveIngredients(currentUser);\n //Log.i(\"aftersaveUpdate\", ingredients);//String.valueOf(items));\n }\n });\n Log.i(\"endquery\", String.valueOf(items));\n }"
] | [
"0.6918777",
"0.6915631",
"0.6737341",
"0.6656226",
"0.66303617",
"0.6611395",
"0.6574799",
"0.6534353",
"0.65318257",
"0.6511874",
"0.64961535",
"0.64728045",
"0.6471205",
"0.6462247",
"0.6446484",
"0.6443555",
"0.64411545",
"0.6429461",
"0.6429193",
"0.64251024",
"0.6419024",
"0.64063203",
"0.6402307",
"0.6398288",
"0.638412",
"0.6383467",
"0.6382891",
"0.638068",
"0.6365874",
"0.635339",
"0.63529295",
"0.6344673",
"0.6342472",
"0.6330851",
"0.63282275",
"0.63139015",
"0.6313164",
"0.62997776",
"0.62991434",
"0.6299135",
"0.62886286",
"0.62855846",
"0.6278179",
"0.6262859",
"0.625269",
"0.6242974",
"0.6239102",
"0.6236309",
"0.6235986",
"0.6233474",
"0.6222109",
"0.6213808",
"0.62124574",
"0.6205815",
"0.6201538",
"0.61987936",
"0.6196325",
"0.61880684",
"0.61858743",
"0.6184398",
"0.61809886",
"0.61774164",
"0.6176117",
"0.61699367",
"0.61683065",
"0.61627024",
"0.6156716",
"0.61393476",
"0.6138836",
"0.61381924",
"0.6138013",
"0.61314213",
"0.61312073",
"0.6121355",
"0.61124814",
"0.6088728",
"0.6088728",
"0.60882586",
"0.6085448",
"0.6080868",
"0.60803366",
"0.6078899",
"0.6078289",
"0.6077528",
"0.6076995",
"0.60674363",
"0.60663044",
"0.6062637",
"0.6062106",
"0.60440725",
"0.6036461",
"0.6027468",
"0.60233283",
"0.6022809",
"0.60191435",
"0.6016199",
"0.6013265",
"0.6012858",
"0.6002989",
"0.5999599",
"0.599872"
] | 0.0 | -1 |
Append more data into the adapter | public void customLoadMoreDataFromApi(int offset) {
// This method probably sends out a network request and appends new data items to your adapter.
// Use the offset value and add it as a parameter to your API request to retrieve paginated data.
// Deserialize API response and then construct new objects to append to the adapter
AsyncHttpClient client = new AsyncHttpClient();
//https://ajax.googleapis.com/ajax/services/search/images?v=1.0&q=%s&start=%d&imgsz=medium
//client.get("https://ajax.googleapis.com/ajax/services/search/images?"+"start="+0+"&v=1.0&q="+Uri.encode(query),
client.get(getQueryString(offset*8) + Uri.encode(query),
new JsonHttpResponseHandler(){
@Override
public void onSuccess(JSONObject response){
JSONArray imageJsonResults = null;
try{
imageJsonResults = response.getJSONObject("responseData").getJSONArray("results");
imageAdapter.addAll(ImageResult.fromJSONArray(imageJsonResults));
}catch(JSONException e){
e.printStackTrace();
}
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void loadMoreData() {\n twitterClient.getNextPageOfTweets(new JsonHttpResponseHandler() {\n @Override\n public void onSuccess(int statusCode, Headers headers, JSON json) {\n Log.i(ACTIVITY_TAG, \"onSuccess: loadMoreData\");\n // deserialize and construct new model objects from API response\n JSONArray jsonArray = json.jsonArray;\n try {\n // append new data object tweets to existing list\n // notify adapter\n tweetsAdapter.addAll(Tweet.fromJsonArray(jsonArray));\n } catch (JSONException e) {\n Log.e(ACTIVITY_TAG, \"JSON exception: loadMoreData\", e);\n }\n }\n\n @Override\n public void onFailure(int statusCode, Headers headers, String response, Throwable throwable) {\n Log.e(ACTIVITY_TAG, \"onFailure: loadMoreData:\" + response , throwable);\n }\n }, tweets.get(tweets.size() - 1).getId());\n }",
"@Override\n\t\tpublic void onLoadMore() {\n\t\t\tdaoIndex++;\n\t\t\tgetData();\n\t\t\tadapter.notifyDataSetChanged();\n\t\t\tonLoad();\n\t\t}",
"public void addNewData(List<PublicPollResponseModel.Data> data) {\n //remove footer view\n this.removeFooterView(footer);\n //Add all data into the adapter\n adapter.addAll(data);\n //Notifies the attached observers that the underlying\n // data has been changed and any View reflecting the data set should refresh itself.\n adapter.notifyDataSetChanged();\n isLoading = false;\n }",
"public void customLoadMoreDataFromApi() {\n // This method probably sends out a network request and appends new data items to your adapter. \n // Use the offset value and add it as a parameter to your API request to retrieve paginated data.\n // Deserialize API response and then construct new objects to append to the adapter\n \tmakeGoogleApiCall();\n \t\n }",
"private void insertLatestData() {\n String[] names = new String[feedbacks.size()];\n String[] ratings = new String[feedbacks.size()];\n String[] reviews = new String[feedbacks.size()];\n for (int i = 0; i < feedbacks.size(); i++) {\n names[i] = \"Name: \" + feedbacks.get(i).getName();\n ratings[i] = \"Rating: \" + feedbacks.get(i).getRatingBar();\n reviews[i] = \"Review: \" + feedbacks.get(i).getReview();\n }\n feedbackListAdapter = new FeedbackListAdapter(ViewPsmFeedbackActivity.this, names, ratings, reviews);\n listFeedback.setAdapter(feedbackListAdapter);\n }",
"@Override\n public void onLoadMoreItems() {\n if (mAdapter.hasMoreItems()) {\n requestData(mAdapter.getItems() == null ? 0 : mAdapter.getItems().size(), false);\n } else {\n mAdapter.onFinishLoading(false);\n }\n }",
"private void addDataForListView() {\n \t\n \tif(loadable)\n \t{\t\n \tloadable = false;\n \tdirection = BACKWARD;\n \tstrUrl = Url.composeHotPageUrl(type_id, class_id, last_id);\n \trequestData();\n \t}\n\t}",
"private void additems() {\n MaVolleyRequest.getInstance(getApplicationContext()).GetMethodRequest(getLink(), null, new VolleyRequestOnResultListener() {\n @Override\n public void onSucces(String result) {\n Log.d(\"qwerty\", getLink());\n ResearchResultBeanz item = (new Gson()).fromJson((new Gson()).fromJson(result, JsonObject.class).getAsJsonObject(\"data\"), ResearchResultBeanz.class);\n if (adapter == null) {\n adapter = new GridViewAdapter2(ImageGridViewActivity.this, Utils.fromArrayToList(item.items));\n gridView.setAdapter(adapter);\n } else {\n adapter.appendData (Utils.fromArrayToList(item.items));\n }\n flag_loading = false;\n }\n @Override\n public void onFailure(String error) {\n makeToast(\"Loading failure\");\n flag_loading = false;\n }\n });\n }",
"@Override\n public void onLoadMore() {\n if (searchbeanArrayList_new.size() != 0) {\n\n\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n // remove progress item\n\n\n //add items one by one\n\n if (pageTokenAvailable) {\n smoothProgressBar.setVisibility(View.VISIBLE);\n\n current_start += 10;\n\n // searchbean_post_data.getStart_limit()+=10;\n\n searchbean_post_data.setStart_limit(current_start);\n\n\n findDataFromServer();\n\n\n //or you can add all at once but do not forget to call mAdapter.notifyDataSetChanged();\n }\n\n\n }\n }, 2000);\n\n }\n\n }",
"private void addDataToRv() {\n RealmResults<NewsModel> newsModels = realm.where(NewsModel.class).findAll();\n //initialize our adapter\n adapter = new NewsAdapter(new ArrayList<>(newsModels), this);\n mRvNewsList.setLayoutManager(new LinearLayoutManager(this));\n mRvNewsList.setAdapter(adapter);\n //notify the adapter that we have new data\n adapter.notifyDataSetChanged();\n }",
"public void addMyPollData(List<UserPollResponseModel.Results.Data> dataResults) {\n //remove footer viewe\n this.removeFooterView(footer);\n //add data in array list\n myPolladapter.addAll(dataResults);\n //Notifies the attached observers that the underlying\n // data has been changed and any View reflecting the data set should refresh itself.\n myPolladapter.notifyDataSetChanged();\n isLoading = false;\n }",
"private void addItem() {\n\t\tString message = edtMessage.getText().toString();\n\t\t// build the human\n\t\tHuman hum = new Human(message, humans.size());\n\t\t// 1° method\n\t\tarrayAdapter.add(hum);\n\t\t// 2° method\n\t\t// messages.add(message);\n\t\t// arrayAdapter.notifyDataSetChanged();\n\t\t// and flush\n\t\tedtMessage.setText(\"\");\n\t}",
"@Override\n public void onLoadMore(int page, int totalItemsCount, RecyclerView view) {\n loadNextData(page);\n }",
"public void addmyPollCommentsData(List<CommentDisplayResponseModel.Results.Data> data) {\n //add data\n myPollCommentsAdapter.addAll(data);\n //Notifies the attached observers that the underlying\n // data has been changed and any View reflecting the data set should refresh itself.\n myPollCommentsAdapter.notifyDataSetChanged();\n isLoading = false;\n\n }",
"@Override\n public void onLoadMore(int page, int totalItemsCount, RecyclerView view) {\n loadNextDataFromApi(page);\n }",
"@Override\n public void onLoadMore(int page, int totalItemsCount, RecyclerView view) {\n loadNextDataFromApi(page);\n }",
"@Override\n public void onLoadMore(int page, int totalItemsCount, RecyclerView view) {\n loadNextDataFromApi(page);\n }",
"private void loadMoreData(){\n\n //just for tesing\n\n progressBar.setVisibility(View.VISIBLE);\n\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n\n adsList.add(new AdvertismentClass(1,\"Shoe\",1000,800,\"10/8/2018\",\"30/10/2018\",false,\"Adidas\"));\n adsList.add(new AdvertismentClass(1,\"Shoe\",1000,800,\"10/8/2018\",\"30/10/2018\",true,\"Adidas\"));\n adsList.add(new AdvertismentClass(1,\"Shoe\",1000,800,\"10/8/2018\",\"30/10/2018\",true,\"Adidas\"));\n adsList.add(new AdvertismentClass(1,\"Shoe\",1000,800,\"10/8/2018\",\"30/10/2018\",false,\"Adidas\"));\n\n progressBar.setVisibility(View.GONE);\n\n adapter.notifyDataSetChanged();\n }\n },3000);\n\n }",
"public void addData(@NonNull Collection<? extends T> newData) {\n mData.addAll(newData);\n notifyItemRangeInserted(mData.size() - newData.size() + getHeaderLayoutCount(), newData.size());\n compatibilityDataSizeChanged(newData.size());\n }",
"private void appendData() {\n XYDataset tempdata = getDataset();\n\n XYSeriesCollection originaldata = (XYSeriesCollection) chartpanel.getChart().getXYPlot().getDataset();\n XYSeriesCollection newdata = (XYSeriesCollection) getDataset();\n\n addToDataSet(newdata, originaldata);\n tempdata = missingSeries(newdata, originaldata);\n\n XYSeriesCollection foo = (XYSeriesCollection) tempdata;\n int n = foo.getSeriesCount();\n for (int i = 0; i < n; i++) {\n originaldata.addSeries(foo.getSeries(i));\n }\n nullMissingPoints((XYSeriesCollection) chartpanel.getChart().getXYPlot().getDataset());\n }",
"@Override\n public void onLoadMore(int page, int totalItemsCount, RecyclerView view) {\n loadMoreRecyclerViewData(hal[0]);\n hal[0]++;\n }",
"public void customLoadMoreDataFromApi(int offset) {\n// Log.d(TAG, \"page = \" + offset);\n populateTimeline();\n // This method probably sends out a network request and appends new data items to your adapter.\n // Use the offset value and add it as a parameter to your API request to retrieve paginated data.\n // Deserialize API response and then construct new objects to append to the adapter\n }",
"@Override\n public void onLoadMore() {\n }",
"private void addData() {\n Details d1 = new Details(\"Arpitha\", \"+91-9448907664\", \"25/05/1997\");\n Details d2 = new Details(\"Abhijith\", \"+91-993602342\", \"05/10/1992\");\n details.add(d1);\n details.add(d2);\n }",
"@Override\n public void onMoreDataFetch() {\n Log.d(TAG, \"onMoreDataFetch: hasMoreData:\" + hasMoreData);\n //figure out if we have more data to fetch, i.e. hasMoreData == true\n if (!hasMoreData) return;\n\n //fetch more data\n ((SuggestionsDataFragment) fragments[DATA]).fetchSuggestions(pageNumber + 1, nextUrl);\n }",
"private void append_request(DataSnapshot dataSnapshot) {\n Iterator i = dataSnapshot.getChildren().iterator();\n //Go over all the requests\n while (i.hasNext()){\n\n //Add a new request iten to the list\n String message = (String) ((DataSnapshot)i.next()).getValue();\n String email = (String) ((DataSnapshot)i.next()).getValue();\n String newMessage= message ;\n //\" asked to join the group\"\n requestList.add(new requestItem(newMessage,email,activity_name));\n }\n request_item_adapter adapter = new request_item_adapter(this, R.layout.activity_request_item, requestList);\n //attaching adapter to the listview\n listView.setAdapter(adapter);\n }",
"public void addPollLikesData(List<LikesResponseModel.Results.Data> dataResults) {\n //remove footer view\n this.removeFooterView(footer);\n //Add all data into the adapter\n customLikesPollAdapter.addAll(dataResults);\n //Notifies the attached observers that the underlying\n // data has been changed and any View reflecting the data set should refresh itself.\n customLikesPollAdapter.notifyDataSetChanged();\n isLoading = false;\n }",
"public void addData(@NonNull T data) {\n mData.add(data);\n notifyItemInserted(mData.size() + getHeaderLayoutCount());\n compatibilityDataSizeChanged(1);\n }",
"public void setNewData(@Nullable List<T> data) {\n this.mData = data == null ? new ArrayList<T>() : data;\n if (mRequestLoadMoreListener != null) {\n mNextLoadEnable = true;\n mLoadMoreEnable = true;\n mLoading = false;\n mLoadMoreView.setLoadMoreStatus(LoadMoreView.STATUS_DEFAULT);\n }\n mLastPosition = -1;\n notifyDataSetChanged();\n }",
"protected void addmore() \n\t{\t\n\t\tcall();\n\t\tstrwadd=wadds.getText().toString();\n\t\tstrcompadd=comadd.getText().toString();\n\t\tstrpadd=epah.getText().toString();\n\t\tstrnname=nn.getText().toString();\n\t\tstrbirth=bir.getText().toString();\n\t\tstrani=aniv.getText().toString();\n\t\tstrorgcw=eorgwc.getText().toString();\n\t\tstrorgco=eorgoc.getText().toString();\n\t\tstrorgpw=eorgwp.getText().toString();\n\t\tstrorgpo=eorgop.getText().toString();\n\t\tstrpaw=epaw.getText().toString();\n\t\tstrpao=epao.getText().toString();\n\t\tif(strwadd==null)\n\t\t{\n\t\t\tstrwadd=\"\";\n\t\t}\n\t\tif(strcompadd==null)\n\t\t{\n\t\t\tstrcompadd=\"\";\n\t\t}\n\t\tif(strnname==null)\n\t\t{\n\t\t\tstrnname=\"\";\n\t\t}\n\t\tif(strpadd==null)\n\t\t{\n\t\t\tstrpadd=\"\";\n\t\t}\n\t\tif(strpaw==null)\n\t\t{\n\t\t\tstrpaw=\"\";\n\t\t}\n\t\tif(strani==null)\n\t\t{\n\t\t\tstrani=\"\";\n\t\t}\n\t\tif(strbirth==null)\n\t\t{\n\t\t\tstrbirth=\"\";\n\t\t}\n\t\tif(strorgcw==null)\n\t\t{\n\t\t\tstrorgcw=\"\";\n\t\t}\n\t\tif(strorgco==null)\n\t\t{\n\t\t\tstrorgco=\"\";\n\t\t}\n\t\tif(strorgpo==null)\n\t\t{\n\t\t\tstrorgpo=\"\";\n\t\t}\n\t\tif(strpao==null)\n\t\t{\n\t\t\tstrpao=\"\";\t\n\t\t}\n\t\t//Inserts more info of contact to database \n\t\tdata.InsertMore(id,strwadd,strorgcw,strorgco,strorgpw,strorgpo,strorgcust,strcompadd, strnname, strpadd,strpaw,strpao,strpacust, strbirth, strani);\n\t\tToast.makeText(AddContact.this, \"Added Successfully\",Toast.LENGTH_SHORT).show();\n\t\tCursor c5=data.getMoreInfoData();\n\t\twhile(c5.moveToNext())\n\t\t{\n\t\t\tint a=c5.getInt(0);\n\t\t\tString c1=c5.getString(1);\n\t\t\tString d=c5.getString(2);\n\t\t\tString e=c5.getString(3);\n\t\t\tString e1=c5.getString(4);\n\t\t\tString e2=c5.getString(5);\n\t\t\tString e3=c5.getString(6);\n\t\t\tString e4=c5.getString(7);\n\t\t\tSystem.out.println(\"Id....\"+a);\n\t\t\tSystem.out.println(\"wadd....\"+c1);\n\t\t\tSystem.out.println(\"Comp....\"+d);\n\t\t\tSystem.out.println(\"Com Add....\"+e);\n\t\t\tSystem.out.println(\"Job....\"+e1);\n\t\t\tSystem.out.println(\"Nick name....\"+e2);\n\t\t\tSystem.out.println(\"Bday....\"+e3);\n\t\t\tSystem.out.println(\"Ani....\"+e4);\n\t\t}\n c5.close();\n\t\t\n\t}",
"public void append(Object item);",
"@Override\n\tpublic void onLoadMore() {\n\t\tSimpleDateFormat sdf=new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\", Locale.getDefault());\t\t\n\t\tmAdapterView.setLoadTime(sdf.format(new Date()));\n\t\tmAdapterView.stopLoadMore();\n\t\tFindHttpPost();\n\t}",
"@Override\n\t public void onLoadMore(int page, int totalItemsCount) {\n\t customLoadMoreDataFromApi(); \n // or customLoadMoreDataFromApi(totalItemsCount); \n\t }",
"@Override\n public void onMoreLoadding() {\n\n }",
"public void addPrivatePollData(List<PrivatePollResponseModel.Results.Data> dataResults) {\n //remove footer viewe\n this.removeFooterView(footer);\n //add data in array list\n privatePolladapter.addAll(dataResults);\n //Notifies the attached observers that the underlying\n // data has been changed and any View reflecting the data set should refresh itself.\n privatePolladapter.notifyDataSetChanged();\n isLoading = false;\n }",
"@Override\n public void onLoadMore(int page, int totalItemsCount, RecyclerView view) {\n loadNextFeedPage(page);\n }",
"@Override\n public void onLoadMore() {\n\n }",
"private void createAdapter() {\n Query query = partituraDaoImpl.getOwnPartituras();\n FirestoreRecyclerOptions<Partitura> options = new FirestoreRecyclerOptions.Builder<Partitura>()\n //query and class in which the data is saved\n .setQuery(query, Partitura.class).setLifecycleOwner(this).build();\n if (adapter != null) adapter.stopListening();\n //Create adapter\n adapter = new PartituraAdapter(options, getContext());\n //assign the adapter\n rvPartituras.setAdapter(adapter);\n //we began to listen.\n adapter.startListening();\n // Move the scroll of the recyclerView to the beginning to see the new message\n adapter.getSnapshots().addChangeEventListener(new ChangeEventListener() {\n @Override\n public void onChildChanged(@NonNull ChangeEventType type, @NonNull\n DocumentSnapshot snapshot, int newIndex, int oldIndex) {\n rvPartituras.smoothScrollToPosition(0);\n }\n @Override\n public void onDataChanged() {\n }\n @Override\n public void onError(@NonNull FirebaseFirestoreException e) {\n }\n });\n }",
"@Override\n public void onLoadMore(int page, int totalItemsCount) {\n customLoadMoreDataFromApi(page);\n // or customLoadMoreDataFromApi(totalItemsCount);\n }",
"@Override\n public void onLoadMore(int page, int totalItemsCount) {\n customLoadMoreDataFromApi(page);\n // or customLoadMoreDataFromApi(totalItemsCount);\n }",
"@Override\n\t public void onLoadMore(int page, int totalItemsCount) {\n\t customLoadMoreDataFromApi(page); \n // or customLoadMoreDataFromApi(totalItemsCount); \n\t }",
"public void addData(@IntRange(from = 0) int position, @NonNull Collection<? extends T> newData) {\n mData.addAll(position, newData);\n notifyItemRangeInserted(position + getHeaderLayoutCount(), newData.size());\n compatibilityDataSizeChanged(newData.size());\n }",
"public void addSearchPollCommentsData(List<CommentDisplayResponseModel.Results.Data> data) {\n //remove footer view\n this.removeFooterView(footer);\n //Add all data into the adapter\n searchPollCommentsAdapter.addAll(data);\n //Notifies the attached observers that the underlying\n // data has been changed and any View reflecting the data set should refresh itself.\n searchPollCommentsAdapter.notifyDataSetChanged();\n isLoading = false;\n\n }",
"private void initializeViewMoreSellersAdapter() {\n mViewMoreSellersAdapter = new ViewMoreSellersAdapter(mSupplierArrayList, this);\n mBinding.rvViewSellersDetails.setAdapter(mViewMoreSellersAdapter);\n }",
"public void addUserPollData(List<UserPollResponseModel.Results.Data> dataResults) {\n //remove footer viewe\n this.removeFooterView(footer);\n //add data in array list\n userPolladapter.addAll(dataResults);\n //Notifies the attached observers that the underlying\n // data has been changed and any View reflecting the data set should refresh itself.\n userPolladapter.notifyDataSetChanged();\n isLoading = false;\n }",
"@Override\n public void onLoadMore(int page, int totalItemsCount, RecyclerView view) {\n Log.d(\"DEBUG\", \"network continue load before count:\" + tweets.size());\n loadNextDataFromApi(page, view);\n }",
"@Override\r\n\tpublic void onLoadMore() {\n\t}",
"private void displayData() {\n int j = finalList.size() - 1;\n\n while (j >= 0) {\n Log.d(\"j\", \"\" + j);\n SleepNormalRow normalRow = new SleepNormalRow(\n finalList.get(j).getDateOfSleep(),\n finalList.get(j).getDurationString(),\n finalList.get(j).getSleepTimeToWakeTime());\n recyclerViewItems.add(normalRow);\n j--;\n }\n\n adapter = new SleepAdapter(SleepActivity.this, recyclerViewItems);\n mRecyclerView.setAdapter(adapter);\n\n }",
"@Override\n public void onLoadMore(int page, int totalItemsCount, RecyclerView view) {\n System.out.println(\"load more\" + totalItemsCount);\n loadMore(totalItemsCount);\n }",
"@Override\n\tpublic void onLoadMore() {\n\t\tif (onRefresh_number) {\n\t\t\tpage = page + 1;\n\n\t\t\tonRefresh_number = false;\n\t\t\tgetData();\n\n\t\t\t// if (Tools.isConnect(getApplicationContext())) {\n\t\t\t// onRefresh_number = false;\n\t\t\t// getData();\n\t\t\t// } else {\n\t\t\t// onRefresh_number = true;\n\t\t\t// handler.sendEmptyMessage(2);\n\t\t\t// }\n\t\t} else {\n\t\t\thandler.sendEmptyMessage(3);\n\t\t}\n\t}",
"@Override\n\tpublic void addDataItem(FinanceData newdata) {\n\t\tlist_fr.add(0, newdata);\n\t}",
"public void addCamapignCommetsData(List<CommentDisplayResponseModel.Results.Data> data) {\n //remove footer view\n this.removeFooterView(footer);\n //Add all data into the adapter\n commentsAdapter.addAll(data);\n //Notifies the attached observers that the underlying\n // data has been changed and any View reflecting the data set should refresh itself.\n commentsAdapter.notifyDataSetChanged();\n isLoading = false;\n }",
"void addAll(List<News> data) {\n\t\t// Traverse the data list to add news item to the adapter's data set\n\t\tfor (int i = 0; i < data.size(); i++) {\n\t\t\t// Get the book at current index\n\t\t\tNews newsStory = data.get(i);\n\t\t\t// Add the book to the data set\n\t\t\tmNewsList.add(newsStory);\n\n\t\t\t// Notify the adapter of the change in the data set\n\t\t\t// so that it repopulates the view with the updated data set\n\t\t\tnotifyDataSetChanged();\n\t\t}\n\t}",
"public void addItemAt(MySmsMessage itemTemp,int positionTemp){\n dataset.add(positionTemp,itemTemp);\n notifyItemInserted(positionTemp);\n }",
"@Override\n public void run() {\n chatListAdapter.add(response);\n chatListAdapter.notifyDataSetChanged();\n getListView().setSelection(chatListAdapter.getCount() - 1);\n }",
"@Override\r\n\tpublic void onLoadMore() {\n\r\n\t}",
"@Override\n public int getItemCount() {\n return data2.size();\n }",
"@Override\n\t\t\tpublic void onStart() {\n\t\t\t\tLog.d(TAG, \"点击了读取更多 \");\n\t\t\t\tnumber++;\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tnew AsyncTask<Void, Void, Void>() {\n\t\t\t\t\t@Override\n\t\t\t\t\tprotected Void doInBackground(Void... params) {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\tgetdata(number);\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tprotected void onPostExecute(Void result) {\n\t\t\t\t\t\txlistview.setLoadMoreSuccess();\n\t\t\t\t\t\tadapter.notifyDataSetChanged();\n\t\t\t\t\t\tLog.d(TAG, \"jieshu\");\n\t\t\t\t\t}\n\t\t\t\t}.execute(null, null, null);\n\t\t\t}",
"@Override\n\tpublic void onMyLoadMore() {\n\t\t\n\t}",
"@Override\n\tpublic void onMyLoadMore() {\n\t\t\n\t}",
"private void fillData() {\n\t\tmCursor = dbHelper.getResultsByTime();\n\t\tstartManagingCursor(mCursor);\n\n\t\tdataListAdapter = new SimpleCursorAdapter(this, R.layout.row, mCursor,\n\t\t\t\tFROM, TO);\n\t\tmConversationView.setAdapter(dataListAdapter);\n\t}",
"public void addPollCommetsData(List<CommentDisplayResponseModel.Results.Data> dataResults) {\n //remove footer view\n this.removeFooterView(footer);\n //Add all data into the adapter\n pollCommentsAdapter.addAll(dataResults);\n //Notifies the attached observers that the underlying\n // data has been changed and any View reflecting the data set should refresh itself.\n pollCommentsAdapter.notifyDataSetChanged();\n isLoading = false;\n\n }",
"public void addPrivatePollLikesData(List<LikesResponseModel.Results.Data> dataResults) {\n //remove footer view\n this.removeFooterView(footer);\n //Add all data into the adapter\n priavteLikesPollAdapter.addAll(dataResults);\n //Notifies the attached observers that the underlying\n // data has been changed and any View reflecting the data set should refresh itself.\n priavteLikesPollAdapter.notifyDataSetChanged();\n isLoading = false;\n }",
"private void setdatalistthongbao()\n {\n // showing refresh animation before making http call\n swipeRefreshLayout.setRefreshing(true);\n\n for (int i = 0 ; i < 5 ; i++)\n {\n Arr_listthongbao.add(new listthongbao(\"Lịch khám\" , \"Còn 10p nữa đến giờ khám bệnh nhân Nguyễn Văn A, tại P. 306\"));\n\n }\n\n\n // count noti\n countnoti = Arr_listthongbao.size();\n thongbaoadapter.notifyDataSetChanged();\n\n // stopping swipe refresh\n swipeRefreshLayout.setRefreshing(false);\n\n\n\n\n\n }",
"@Override\n\tpublic void onPullUpToRefresh(PullToRefreshBase<ListView> refreshView) {\n\t\tif (isend) {\n\t\t\thandler.sendEmptyMessage(1);\n\t\t\tToast.makeText(this, \"没有更多了\", Toast.LENGTH_SHORT).show();\n\t\t} else {\n\t\t\tgetData(pageIndex, pageSize);\n\t\t}\n\t}",
"@Override\n public void onItemAdded(Object toAdd) {\n if(toAdd instanceof SpotifyItem)\n return;\n\n //Reflect changes in the drink list\n DrinkInfo item = (DrinkInfo)toAdd;\n Log.d(TAG, \"Array size = \" + mDrinkInfos.size());\n mDrinkInfos.add(mDrinkInfos.size(), item);\n mDrinkQueueAdapter.notifyDataSetChanged();\n Log.d(TAG, \"Added song: \" + item.getDrinkName());\n }",
"public void AddItemsToRecyclerView()\n {\n source = new Vector();\n source.add(\"排班\");\n source.add(\"加班\");\n source.add(\"打卡\");\n source.add(\"請假\");\n source.add(\"文件\");\n source.add(\"訂餐\");\n }",
"public void addCampaignLikesData(List<LikesResponseModel.Results.Data> dataResults) {\n //remove footer view\n this.removeFooterView(footer);\n //Add all data into the adapter\n customCampaignLikesAdapter.addAll(dataResults);\n //Notifies the attached observers that the underlying\n // data has been changed and any View reflecting the data set should refresh itself.\n customCampaignLikesAdapter.notifyDataSetChanged();\n isLoading = false;\n }",
"public void more(User[] users, String next) {\n this.next = next;\n int count = users.length;\n for(int i=0; i< count; i++) {\n this.mList.add(users[i]);\n }\n this.notifyDataSetChanged();\n }",
"public void addSearchPollData(List<UserPollResponseModel.Results.Data> dataResults) {\n //remove footer viewe\n this.removeFooterView(footer);\n //add data in array list\n searchAdapter.addAll(dataResults);\n //Notifies the attached observers that the underlying\n // data has been changed and any View reflecting the data set should refresh itself.\n searchAdapter.notifyDataSetChanged();\n isLoading = false;\n }",
"public void loadNextDataFromApi(int offset) {\n // Send an API request to retrieve appropriate paginated data\n // --> Send the request including an offset value (i.e `page`) as a query parameter.\n // --> Deserialize and construct new model objects from the API response\n // --> Append the new data objects to the existing set of items inside the array of items\n // --> Notify the adapter of the new items made with `notifyItemRangeInserted()`\n\n Toast.makeText(getActivity(), \"new data loading\", Toast.LENGTH_SHORT).show();\n\n final Integer count =Integer.parseInt(dataoffset)+10;\n dataoffset=count.toString();\n\n\n JsonObjectRequest fetchAllStores = new JsonObjectRequest(Request.Method.POST, \"http://omtii.com/mile/fetchpagegroupchat.php?mobno=\"+mobileno+\"&dataoffset=\"+count.toString(), null, new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n\n Log.d(TAG, \"more data query : \" + \"http://omtii.com/mile/fetchpagegroupchat.php?mobno=\"+mobileno+\"&dataoffset=\"+count.toString());\n\n Log.d(TAG, \"Fetch Stores: \" + response);\n showStores(response);\n //MyRecyclerView.setAdapter(adapter);\n System.err.println(\"adpter attached\");\n adapter.notifyDataSetChanged();\n System.err.println(\"data set changed attached\");\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.d(TAG, \"Fetch Stores Error: \" + error.getMessage());\n }\n });\n ApplicationController.getInstance().addToRequestQueue(fetchAllStores);\n }",
"public void appendTvShows(List<TvShowModel> tvShowList) {\n //Remove pagination loading item\n removePaginationLoading();\n mTvShows.addAll(tvShowList);\n notifyDataSetChanged();\n }",
"@Override\n\tpublic synchronized void onLoadMore() {\n\t\ttry {\n\t\t\t// 如果总页数大于当前页码数,加载更多\n\t\t\tif (pageSize > curPage) {\n\t\t\t\tURL = URL.substring(0, URL.lastIndexOf(\"_\") + 1);\n\t\t\t\tcurPage++;\n\t\t\t\tURL = URL + curPage + \".xml\";\n\t\t\t\tnew AsyncLoadNews(lsnb, URL).execute();\n\t\t\t} else {\n\t\t\t\tlistView.setPullLoadEnable(false);\n\t\t\t\tonLoadStop();\n\t\t\t\tToast toast = Toast.makeText(getActivity(), \"数据已经加载完毕!\",\n\t\t\t\t\t\tToast.LENGTH_LONG);\n\t\t\t\t// toast.getView().setBackgroundResource(R.drawable.red_toast_bg);\n\t\t\t\ttoast.getView().setPadding(20, 10, 20, 10);\n\t\t\t\ttoast.show();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"void addData();",
"private void setData() {\n\n if (id == NO_VALUE) return;\n MarketplaceItem item = ControllerItems.getInstance().getModel().getItemById(id);\n if (item == null) return;\n\n ControllerAnalytics.getInstance().logItemView(id, item.getTitle());\n\n if (item.getPhotos() != null\n && item.getPhotos().size() > 0 &&\n !TextUtils.isEmpty(item.getPhotos().get(0).getSrc_big(this)))\n Picasso.with(this).load(item.getPhotos().get(0).getSrc_big(this)).into((ImageView) findViewById(R.id.ivItem));\n else if (!TextUtils.isEmpty(item.getThumb_photo()))\n Picasso.with(this).load(item.getThumb_photo()).into((ImageView) findViewById(R.id.ivItem));\n\n adapter.updateData(item, findViewById(R.id.rootView));\n }",
"public void addMeteoData(MeteoDataInfo aDataInfo) {\n dataInfoList.add(aDataInfo);\n currentDataInfo = aDataInfo; \n }",
"@Override\n public void onLoadMore(int page, int totalItemsCount, RecyclerView view) {\n notificationID = notifications.get(notifications.size()-1).getID();\n feachNotificationsFromApi(notificationID);\n }",
"@Override\n public int getItemCount() {\n return arrayData.size();\n }",
"public void addUserPollCommentsData(List<CommentDisplayResponseModel.Results.Data> data) {\n //remove footer view\n this.removeFooterView(footer);\n //Add all data into the adapter\n pollCommentsAdapter.addAll(data);\n //Notifies the attached observers that the underlying\n // data has been changed and any View reflecting the data set should refresh itself.\n pollCommentsAdapter.notifyDataSetChanged();\n isLoading = false;\n\n }",
"public void addDataSet(List<Movie> items){\n mValues.addAll(items);\n notifyDataSetChanged();\n }",
"@Override\n public int getItemCount() {\n return responseList.size()+1;\n }",
"@Override\n public int getItemCount() {\n return this.datas.size();\n }",
"@Override\n\t\tpublic synchronized void onLoadMore() {\n\t\t\ttry {\n\t\t\t\t//如果总页数大于当前页码数,加载更多\n\t\t\t\tif(pageSize > curPage){\n\t\t\t\t\tURL = URL.substring(0, URL.lastIndexOf(\"_\")+1);\n\t\t\t\t\tcurPage++;\n\t\t\t\t\tURL = URL+curPage+\".xml\";\n\t\t\t\t\tnew AsyncLoadNews(flag,lsnb,URL).execute();\n\t\t\t\t}else{\n\t\t\t\t\tlistView.setPullLoadEnable(false);\n\t\t\t\t\tonLoadStop();\n\t\t\t\t\tToast toast = Toast.makeText(getActivity(), \"数据已经加载完毕!\", Toast.LENGTH_LONG);\n//\t\t\t\t\ttoast.getView().setBackgroundResource(R.drawable.red_toast_bg);\n\t\t\t\t\ttoast.getView().setPadding(20, 10, 20, 10);\n\t\t\t\t\ttoast.show();\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}",
"@Override\r\n public int getCount() {\n return mdata.size();\r\n }",
"public void customLoadMoreDataFromApi(int offset) {\n }",
"@Subscribe(threadMode = ThreadMode.MAIN)\n public void onLoadMoreFinished(final LoadMoreFinishedEvent event) {\n if (!event.getSessionId().equals(MyApplication.getInstance().getSessionId())) {\n return;\n }\n EventBus.getDefault().removeStickyEvent(LoadMoreFinishedEvent.class);\n\n new AsyncTask<Void, Void, Void>() {\n @Override\n protected Void doInBackground(Void... params) {\n if (event.isSuccessful()) {\n //Add on bottom but before the loading item\n for (StockChange stock : event.getStockList()) {\n mListManipulator.addItemToPosition(mListManipulator.getCount() - 1, stock);\n }\n // Remove loading item if it exists\n mListManipulator.removeLoadingItem();\n }\n mLoadingMore = false;\n return null;\n }\n\n @Override\n protected void onPostExecute(Void aVoid) {\n if (mEventListener != null) {\n mEventListener.onLoadMoreFinished(event);\n }\n }\n }.execute();\n }",
"@SuppressWarnings(\"unchecked\")\n\tprotected void grow(){\n\t\t// makes new arraylist\n\t\tT[] temp = (T[]) new Object[data.length *2];\n\t\tfor(int i = 0; i < data.length; i++ ){\n\t\t\ttemp[i] = data[i];\n\t\t}\n\t\tdata = temp;\n\t}",
"public void addItem(String item){\n adapter.add(item);\n }",
"public void append(IoBuffer buffer) {\n data.offerLast(buffer);\n updateBufferList();\n }",
"public void addAll(E[] es){\n for(E e: es) {\n \tmData.add(e);\n }\n notifyDataSetChanged();\n }",
"public void appendAdd(EPPSecDNSExtDsData dsData) {\n\t\tif (addDsData == null) {\n\t\t\taddDsData = new ArrayList();\n\t\t}\n\t\taddDsData.add(dsData);\n }",
"public void appendData(T data){\n Node<T> newEnd = new Node<>(data); // new Node referenced by newEnd\n Node<T> thisNode = this; // grab this Node\n\n // traverse list and append to the tail\n while (thisNode.next != null){\n thisNode = thisNode.next;\n }\n thisNode.next = newEnd;\n }",
"@Override\n public int getCount() {\n return data.size();\n }",
"@Override\n public int getItemCount() {\n return data.size();\n }",
"@Override\n public int getItemCount() {\n return data.size();\n }",
"@Override\r\n\tpublic int getCount() {\n\t\treturn listmore.size();\r\n\t}",
"@Override\r\n\tpublic void itemAdded() {\r\n\t\tif (sendLines.size() == 1){\r\n\t\t\tgrblPort.addNewLineListener(this);\r\n\t\t\tgrblPort.sendDataLine(sendLines.get(0));\t\t\r\n\t\t}\r\n\t\t\r\n\t}",
"private void popupMenuAppendData() {\n\t\t//\n\t\t// Display the dialog\n\t\t//\n\t\tAddDataDialog addDataDialog = new AddDataDialog(table.getShell(), Messages.HexEditorControl_48, HexEditorConstants.DIALOG_TYPE_APPEND);\n\t\tif (addDataDialog.open() != Window.OK)\n\t\t\treturn;\n\t\tint[] addDialogResult = addDataDialog.getResult();\n\n\t\tif (addDialogResult == null) {\n\t\t\t//\n\t\t\t// Cancel button pressed - do nothing\n\t\t\t//\n\t\t\treturn;\n\t\t}\n\n\t\t//\n\t\t// Retrieve the parameters from the 'Insert' dialog\n\t\t//\n\t\tint dataSize = addDialogResult[0];\n\t\tint dataValue = addDialogResult[1];\n\n\t\tif (dataSize <= 0) return;\n\n\t\t//\n\t\t// Append new bytes into the table\n\t\t//\n\t\tappendData(dataSize, dataValue);\n\n\t\t//\n\t\t// Update the status panel\n\t\t//\n\t\tupdateStatusPanel();\n\t}",
"@Override\n public int getItemCount() {\n return rvData.size();\n }",
"@Override\n public void onScroll(AbsListView view, int firstVisibleItem,\n int visibleItemCount, int totalItemCount) {\n if (getAdapter() == null)\n return;\n if (getAdapter().getCount() == 0)\n return;\n int l = visibleItemCount + firstVisibleItem;\n if (l >= totalItemCount && !isLoading) {\n // It is time to add new data. We call the listener\n this.addFooterView(footer);\n isLoading = true;\n listener.loadData();\n\n }\n }",
"@Override\n\t\t\tpublic void onPullUpToRefresh(PullToRefreshBase<ListView> refreshView) {\n\t\t\t\tmRefreshType = RefreshType.LOAD_MORE;\n\t\t\t\tfetchData();\n\t\t\t}"
] | [
"0.6881785",
"0.6593877",
"0.6470943",
"0.64408314",
"0.64066076",
"0.6366639",
"0.622204",
"0.611898",
"0.6099725",
"0.60959595",
"0.6079069",
"0.6064088",
"0.6058634",
"0.59932166",
"0.595907",
"0.595907",
"0.595907",
"0.5921188",
"0.5910416",
"0.58757526",
"0.58696526",
"0.58545977",
"0.5821855",
"0.5806128",
"0.57990676",
"0.5772315",
"0.5738372",
"0.5738065",
"0.5709035",
"0.5708431",
"0.56920886",
"0.5680383",
"0.56734264",
"0.5670977",
"0.5669893",
"0.5668784",
"0.56610787",
"0.5637963",
"0.5631475",
"0.5631475",
"0.56269026",
"0.5609429",
"0.5607252",
"0.559639",
"0.5586199",
"0.5583737",
"0.55709034",
"0.55587345",
"0.554957",
"0.5546787",
"0.5546361",
"0.5538922",
"0.5531937",
"0.55284977",
"0.5520283",
"0.5511431",
"0.55105263",
"0.54997146",
"0.54968154",
"0.54968154",
"0.5493114",
"0.54799145",
"0.5479136",
"0.5473235",
"0.5468208",
"0.5468014",
"0.54658085",
"0.54597265",
"0.54594946",
"0.54550743",
"0.5454309",
"0.54504466",
"0.544631",
"0.54415435",
"0.543769",
"0.5426149",
"0.5423708",
"0.54197055",
"0.54082966",
"0.5405383",
"0.5398015",
"0.53782344",
"0.5377793",
"0.5373667",
"0.5369951",
"0.5365544",
"0.5365232",
"0.53600436",
"0.5359217",
"0.53558385",
"0.5355214",
"0.53456044",
"0.53439087",
"0.53438216",
"0.53438216",
"0.53407663",
"0.5337071",
"0.5336495",
"0.5335512",
"0.53350395",
"0.5333063"
] | 0.0 | -1 |
Inflate the menu; this adds items to the action bar if it is present. | @Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.search, menu);
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.actions, menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main_actions, menu);\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\t\tinflater.inflate(R.menu.action_bar_menu, menu);\r\n\t\tmMenu = menu;\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.act_bar_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_actions, menu);\r\n\t\treturn true;\r\n //return super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\r\n\t inflater.inflate(R.menu.action_bar_all, menu);\r\n\t return super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\t super.onCreateOptionsMenu(menu);\n\t\tMenuInflater muu= getMenuInflater();\n\t\tmuu.inflate(R.menu.cool_menu, menu);\n\t\treturn true;\n\t\t\n\t\t\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.adventure_archive, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.archive_menu, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n \tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n \t\tinflater.inflate(R.menu.main, menu);\n \t\tsuper.onCreateOptionsMenu(menu, inflater);\n \t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.action_menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater bow=getMenuInflater();\n\t\tbow.inflate(R.menu.menu, menu);\n\t\treturn true;\n\t\t}",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.action_menu, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\t\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\t\t\n\t\t/* Inflate the menu; this adds items to the action bar if it is present */\n\t\tgetMenuInflater().inflate(R.menu.act_main, menu);\t\t\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflate = getMenuInflater();\n inflate.inflate(R.menu.menu, ApplicationData.amvMenu.getMenu());\n return true;\n }",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.menu, menu);\n\t\t\treturn true; \n\t\t\t\t\t\n\t\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_item, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.menu, menu);\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t \n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\t//menu.clear();\n\t\tinflater.inflate(R.menu.soon_to_be, menu);\n\t\t//getActivity().getActionBar().show();\n\t\t//getActivity().getActionBar().setBackgroundDrawable(\n\t\t\t\t//new ColorDrawable(Color.rgb(223, 160, 23)));\n\t\t//return true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n this.getMenuInflater().inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.main, menu);\n }",
"@Override\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n \t// We must call through to the base implementation.\r\n \tsuper.onCreateOptionsMenu(menu);\r\n \t\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_menu, menu);\r\n\r\n return true;\r\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.inter_main, menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.action, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu (Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.custom_action_bar, menu);\n\t\treturn true;\n\t}",
"public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp=getMenuInflater();\n\t\tblowUp.inflate(R.menu.welcome_menu, menu);\n\t\treturn true;\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.listing, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.item, menu);\n return true;\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.resource, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu,menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.home_action_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.template, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Log.d(\"onCreateOptionsMenu\", \"create menu\");\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.socket_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);//Menu Resource, Menu\n\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actionbar, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(toolbar_res, menu);\n updateMenuItemsVisibility(menu);\n return true;\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t// \n\t\tMenuInflater mi = getMenuInflater();\n\t\tmi.inflate(R.menu.thumb_actv_menu, menu);\n\t\t\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n }",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.swag_list_activity_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\n\t\treturn true;\n\t}",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.jarvi, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.main, menu);\n\n }",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add__listing, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actmain, menu);\r\n return true;\r\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.buat_menu, menu);\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.layout.menu, menu);\n\t\treturn true;\n\t}",
"@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\n\t\n\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\n\treturn super.onCreateOptionsMenu(menu);\n}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ichat, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater)\n\t{\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\tinflater.inflate(R.menu.expenses_menu, menu);\n\t}",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.action_bar, menu);\n return true;\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp = getMenuInflater();\n\t\tblowUp.inflate(R.menu.status, menu);\n\t\treturn true;\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.menu, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn true;\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ui_main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_activity_actions, menu);\n return true;\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }"
] | [
"0.7246102",
"0.7201358",
"0.7194834",
"0.7176498",
"0.71066517",
"0.7039537",
"0.7037961",
"0.70112145",
"0.70094734",
"0.69807225",
"0.6944953",
"0.69389373",
"0.6933199",
"0.6916928",
"0.6916928",
"0.6891486",
"0.68831646",
"0.68754137",
"0.68745375",
"0.68621665",
"0.68621665",
"0.68621665",
"0.68621665",
"0.68515885",
"0.68467957",
"0.68194443",
"0.6817494",
"0.6813087",
"0.6813087",
"0.6812847",
"0.6805774",
"0.6801204",
"0.6797914",
"0.6791314",
"0.6789091",
"0.67883503",
"0.6783642",
"0.6759701",
"0.6757412",
"0.67478645",
"0.6744127",
"0.6744127",
"0.67411774",
"0.6740183",
"0.6726017",
"0.6723245",
"0.67226785",
"0.67226785",
"0.67208904",
"0.67113477",
"0.67079866",
"0.6704564",
"0.6699229",
"0.66989094",
"0.6696622",
"0.66952467",
"0.66865396",
"0.6683476",
"0.6683476",
"0.6682188",
"0.6681209",
"0.6678941",
"0.66772443",
"0.6667702",
"0.66673946",
"0.666246",
"0.6657578",
"0.6657578",
"0.6657578",
"0.6656586",
"0.66544783",
"0.66544783",
"0.66544783",
"0.66524047",
"0.6651954",
"0.6650132",
"0.66487855",
"0.6647077",
"0.66467404",
"0.6646615",
"0.66464466",
"0.66449624",
"0.6644209",
"0.6643461",
"0.6643005",
"0.66421187",
"0.6638628",
"0.6634786",
"0.6633529",
"0.6632049",
"0.6632049",
"0.6632049",
"0.66315657",
"0.6628954",
"0.66281766",
"0.6627182",
"0.6626297",
"0.6624309",
"0.6619582",
"0.6618876",
"0.6618876"
] | 0.0 | -1 |
Inflate the menu; this adds items to the action bar if it is present. | @Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_process, menu);
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.actions, menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main_actions, menu);\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\t\tinflater.inflate(R.menu.action_bar_menu, menu);\r\n\t\tmMenu = menu;\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.act_bar_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_actions, menu);\r\n\t\treturn true;\r\n //return super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\r\n\t inflater.inflate(R.menu.action_bar_all, menu);\r\n\t return super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\t super.onCreateOptionsMenu(menu);\n\t\tMenuInflater muu= getMenuInflater();\n\t\tmuu.inflate(R.menu.cool_menu, menu);\n\t\treturn true;\n\t\t\n\t\t\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.adventure_archive, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.archive_menu, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n \tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n \t\tinflater.inflate(R.menu.main, menu);\n \t\tsuper.onCreateOptionsMenu(menu, inflater);\n \t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.action_menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater bow=getMenuInflater();\n\t\tbow.inflate(R.menu.menu, menu);\n\t\treturn true;\n\t\t}",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.action_menu, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\t\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\t\t\n\t\t/* Inflate the menu; this adds items to the action bar if it is present */\n\t\tgetMenuInflater().inflate(R.menu.act_main, menu);\t\t\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflate = getMenuInflater();\n inflate.inflate(R.menu.menu, ApplicationData.amvMenu.getMenu());\n return true;\n }",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.menu, menu);\n\t\t\treturn true; \n\t\t\t\t\t\n\t\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_item, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.menu, menu);\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t \n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\t//menu.clear();\n\t\tinflater.inflate(R.menu.soon_to_be, menu);\n\t\t//getActivity().getActionBar().show();\n\t\t//getActivity().getActionBar().setBackgroundDrawable(\n\t\t\t\t//new ColorDrawable(Color.rgb(223, 160, 23)));\n\t\t//return true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n this.getMenuInflater().inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.main, menu);\n }",
"@Override\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n \t// We must call through to the base implementation.\r\n \tsuper.onCreateOptionsMenu(menu);\r\n \t\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_menu, menu);\r\n\r\n return true;\r\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.inter_main, menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.action, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu (Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.custom_action_bar, menu);\n\t\treturn true;\n\t}",
"public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp=getMenuInflater();\n\t\tblowUp.inflate(R.menu.welcome_menu, menu);\n\t\treturn true;\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.listing, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.item, menu);\n return true;\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.resource, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu,menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.home_action_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.template, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Log.d(\"onCreateOptionsMenu\", \"create menu\");\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.socket_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);//Menu Resource, Menu\n\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actionbar, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(toolbar_res, menu);\n updateMenuItemsVisibility(menu);\n return true;\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t// \n\t\tMenuInflater mi = getMenuInflater();\n\t\tmi.inflate(R.menu.thumb_actv_menu, menu);\n\t\t\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n }",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.swag_list_activity_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\n\t\treturn true;\n\t}",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.jarvi, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.main, menu);\n\n }",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add__listing, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actmain, menu);\r\n return true;\r\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.buat_menu, menu);\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.layout.menu, menu);\n\t\treturn true;\n\t}",
"@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\n\t\n\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\n\treturn super.onCreateOptionsMenu(menu);\n}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ichat, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater)\n\t{\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\tinflater.inflate(R.menu.expenses_menu, menu);\n\t}",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.action_bar, menu);\n return true;\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp = getMenuInflater();\n\t\tblowUp.inflate(R.menu.status, menu);\n\t\treturn true;\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.menu, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn true;\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ui_main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_activity_actions, menu);\n return true;\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }"
] | [
"0.7246102",
"0.7201358",
"0.7194834",
"0.7176498",
"0.71066517",
"0.7039537",
"0.7037961",
"0.70112145",
"0.70094734",
"0.69807225",
"0.6944953",
"0.69389373",
"0.6933199",
"0.6916928",
"0.6916928",
"0.6891486",
"0.68831646",
"0.68754137",
"0.68745375",
"0.68621665",
"0.68621665",
"0.68621665",
"0.68621665",
"0.68515885",
"0.68467957",
"0.68194443",
"0.6817494",
"0.6813087",
"0.6813087",
"0.6812847",
"0.6805774",
"0.6801204",
"0.6797914",
"0.6791314",
"0.6789091",
"0.67883503",
"0.6783642",
"0.6759701",
"0.6757412",
"0.67478645",
"0.6744127",
"0.6744127",
"0.67411774",
"0.6740183",
"0.6726017",
"0.6723245",
"0.67226785",
"0.67226785",
"0.67208904",
"0.67113477",
"0.67079866",
"0.6704564",
"0.6699229",
"0.66989094",
"0.6696622",
"0.66952467",
"0.66865396",
"0.6683476",
"0.6683476",
"0.6682188",
"0.6681209",
"0.6678941",
"0.66772443",
"0.6667702",
"0.66673946",
"0.666246",
"0.6657578",
"0.6657578",
"0.6657578",
"0.6656586",
"0.66544783",
"0.66544783",
"0.66544783",
"0.66524047",
"0.6651954",
"0.6650132",
"0.66487855",
"0.6647077",
"0.66467404",
"0.6646615",
"0.66464466",
"0.66449624",
"0.6644209",
"0.6643461",
"0.6643005",
"0.66421187",
"0.6638628",
"0.6634786",
"0.6633529",
"0.6632049",
"0.6632049",
"0.6632049",
"0.66315657",
"0.6628954",
"0.66281766",
"0.6627182",
"0.6626297",
"0.6624309",
"0.6619582",
"0.6618876",
"0.6618876"
] | 0.0 | -1 |
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml. | @Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
//noinspection SimplifiableIfStatement
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n //\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // Back button clicked\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // app icon in action bar clicked; goto parent activity.\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n switch (id) {\r\n case android.R.id.home:\r\n // app icon in action bar clicked; go home\r\n this.finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // app icon in action bar clicked; go home\n finish();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n Log.e(\"clik\", \"action bar clicked\");\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n\t public boolean onOptionsItemSelected(MenuItem item) {\n\t int id = item.getItemId();\n\t \n\t\t\tif (id == android.R.id.home) {\n\t\t\t\t// Respond to the action bar's Up/Home button\n\t\t\t\t// NavUtils.navigateUpFromSameTask(this);\n\t\t\t\tonBackPressed();\n\t\t\t\treturn true;\n\t\t\t}\n\t \n\t \n\t return super.onOptionsItemSelected(item);\n\t }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n // Respond to the action bar's Up/Home button\r\n case android.R.id.home:\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle presses on the action bar items\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n case R.id.action_clear:\n return true;\n case R.id.action_done:\n\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onActionHomePressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId())\n {\n case android.R.id.home :\n super.onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId ()) {\n case android.R.id.home:\n onBackPressed ();\n return true;\n\n default:\n break;\n }\n return super.onOptionsItemSelected ( item );\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t switch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\t// app icon in action bar clicked; go home \n\t\t\tIntent intent = new Intent(this, Kelutral.class); \n\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); \n\t\t\tstartActivity(intent); \n\t\t\treturn true;\t\t\n\t case R.id.Search:\n\t \treturn onSearchRequested();\n\t\tcase R.id.AppInfo:\n\t\t\t// Place holder menu item\n\t\t\tIntent newIntent = new Intent(Intent.ACTION_VIEW,\n\t\t\t\t\tUri.parse(\"http://forum.learnnavi.org/mobile-apps/\"));\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\n\t\tcase R.id.Preferences:\n\t\t\tnewIntent = new Intent(getBaseContext(), Preferences.class);\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\t\n\t }\n\t return false;\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n onBackPressed();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // Intent homeIntent = new Intent(this, MainActivity.class);\n // homeIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n // startActivity(homeIntent);\n finish();\n return true;\n default:\n return (super.onOptionsItemSelected(item));\n }\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // setResult and close the activity when Action Bar Up Button clicked.\n if (item.getItemId() == android.R.id.home) {\n setResult(RESULT_CANCELED);\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // This ID represents the Home or Up button. In the case of this\n // activity, the Up button is shown. Use NavUtils to allow users\n // to navigate up one level in the application structure. For\n // more details, see the Navigation pattern on Android Design:\n //\n // http://developer.android.com/design/patterns/navigation.html#up-vs-back\n //\n \tgetActionBar().setDisplayHomeAsUpEnabled(false);\n \tgetFragmentManager().popBackStack();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if(id == android.R.id.home){\n onBackPressed();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n\n }\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@RequiresApi(api = Build.VERSION_CODES.M)\n @Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif(item.getItemId()==android.R.id.home)\r\n\t\t{\r\n\t\t\tgetActivity().onBackPressed();\r\n\t\t}\r\n\t\treturn super.onOptionsItemSelected(item);\r\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if(item.getItemId()==android.R.id.home){\n super.onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n return false;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n //Back arrow\n case android.R.id.home:\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // android.R.id.home是Android内置home按钮的id\n finish();\n break;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n this.onBackPressed();\n return false;\n }\n return false;\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n\r\n case android.R.id.home:\r\n /*Intent i= new Intent(getApplication(), MainActivity.class);\r\n i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n startActivity(i);*/\r\n onBackPressed();\r\n finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case android.R.id.home:\n this.finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Pass the event to ActionBarDrawerToggle, if it returns\n // true, then it has handled the app icon touch event\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n\n // Handle your other action bar items...\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n NavUtils.navigateUpFromSameTask(getActivity());\n return true;\n case R.id.action_settings:\n Intent i = new Intent(getActivity(), SettingsActivity.class);\n startActivity(i);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n //Fixes the Up Button\n if(id == android.R.id.home) {\n BuildRoute.this.finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()){\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return true;\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if (id == android.R.id.home) {\n NavUtils.navigateUpFromSameTask(this);\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n break;\r\n }\r\n return true;\r\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif (item.getItemId() == android.R.id.home) {\n\t\t\tfinish();\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n onBackPressed();\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if ( id == android.R.id.home ) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.home) {\r\n NavUtils.navigateUpFromSameTask(this);\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_about) {\r\n AboutDialog();\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_exit) {\r\n finish();\r\n return true;\r\n }\r\n\r\n\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n//noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n// finish the activity\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item)\n {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if( id == android.R.id.home ) // Back button of the actionbar\n {\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n\t\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\t\tswitch (item.getItemId()) {\r\n\t\t\tcase android.R.id.home:\r\n\t\t\t\tfinish();\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\treturn super.onOptionsItemSelected(item);\r\n\t\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n return true;\n }\n return false;\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if(id == android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n if (item.getItemId() == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\r\n\t\tcase android.R.id.home:\r\n\t\t\tsetResult(RESULT_OK, getIntent());\r\n\t\t\tfinish();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n\n case android.R.id.home:\n this.finish();\n return true;\n }\n return true;\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\tif (id == android.R.id.home) {\n\t\t\tfinish();\n\t\t\treturn true;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if (id == android.R.id.home) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n //NavUtils.navigateUpFromSameTask(this);\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // todo: goto back activity from here\n finish();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n // Handle item selection\r\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n return true;\r\n\r\n case me.cchiang.lookforthings.R.id.action_sample:\r\n// Snackbar.make(parent_view, item.getTitle() + \" Clicked \", Snackbar.LENGTH_SHORT).show();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tcase R.id.scan_menu:\n\t\t\tonScan();\n\t\t\tbreak;\n\t\tcase R.id.opt_about:\n\t\t\t//onAbout();\n\t\t\tbreak;\n\t\tcase R.id.opt_exit:\n\t\t\tfinish();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t\treturn true;\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n super.onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n finish();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if(id==android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\r\n\t switch (item.getItemId()) {\r\n\t \t// back to previous page\r\n\t case android.R.id.home:\r\n\t finish();\r\n\t return true;\r\n\t }\r\n\t return super.onOptionsItemSelected(item);\r\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId())\n {\n case android.R.id.home:\n this.finish();\n return (true);\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case R.id.home:{\n NavUtils.navigateUpFromSameTask(this);\n return true;\n }\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n switch(item.getItemId())\n {\n case android.R.id.home:\n super.onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\treturn true;\n\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n\r\n int id = item.getItemId();\r\n if(id==android.R.id.home){\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }"
] | [
"0.79041183",
"0.7805934",
"0.77659106",
"0.7727251",
"0.7631684",
"0.7621701",
"0.75839096",
"0.75300384",
"0.74873656",
"0.7458051",
"0.7458051",
"0.7438486",
"0.742157",
"0.7403794",
"0.7391802",
"0.73870087",
"0.7379108",
"0.7370295",
"0.7362194",
"0.7355759",
"0.73454577",
"0.734109",
"0.73295504",
"0.7327726",
"0.73259085",
"0.73188347",
"0.731648",
"0.73134047",
"0.7303978",
"0.7303978",
"0.7301588",
"0.7298084",
"0.72932935",
"0.7286338",
"0.7283324",
"0.72808945",
"0.72785115",
"0.72597474",
"0.72597474",
"0.72597474",
"0.725962",
"0.7259136",
"0.7249966",
"0.7224023",
"0.721937",
"0.7216621",
"0.72045326",
"0.7200649",
"0.71991026",
"0.71923256",
"0.71851367",
"0.7176769",
"0.7168457",
"0.71675026",
"0.7153402",
"0.71533287",
"0.71352696",
"0.71350807",
"0.71350807",
"0.7129153",
"0.7128639",
"0.7124181",
"0.7123387",
"0.7122983",
"0.71220255",
"0.711715",
"0.711715",
"0.711715",
"0.711715",
"0.7117043",
"0.71169263",
"0.7116624",
"0.71149373",
"0.71123946",
"0.7109806",
"0.7108778",
"0.710536",
"0.7098968",
"0.70981944",
"0.7095771",
"0.7093572",
"0.7093572",
"0.70862055",
"0.7082207",
"0.70808214",
"0.7080366",
"0.7073644",
"0.7068183",
"0.706161",
"0.7060019",
"0.70598614",
"0.7051272",
"0.70374316",
"0.70374316",
"0.7035865",
"0.70352185",
"0.70352185",
"0.7031749",
"0.703084",
"0.7029517",
"0.7018633"
] | 0.0 | -1 |
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor. | @SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jPanel1 = new javax.swing.JPanel();
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
jLabel4 = new javax.swing.JLabel();
jPanel2 = new javax.swing.JPanel();
jLabel3 = new javax.swing.JLabel();
jLabel6 = new javax.swing.JLabel();
jSeparator1 = new javax.swing.JSeparator();
jPanel3 = new javax.swing.JPanel();
jLabel8 = new javax.swing.JLabel();
jPanel4 = new javax.swing.JPanel();
jLabel10 = new javax.swing.JLabel();
jPanel6 = new javax.swing.JPanel();
jLabel12 = new javax.swing.JLabel();
jPanel13 = new javax.swing.JPanel();
jLabel21 = new javax.swing.JLabel();
jPanel5 = new javax.swing.JPanel();
jLabel5 = new javax.swing.JLabel();
lid = new javax.swing.JLabel();
jLabel7 = new javax.swing.JLabel();
fname = new javax.swing.JLabel();
lname = new javax.swing.JLabel();
jLabel9 = new javax.swing.JLabel();
bd = new javax.swing.JLabel();
jLabel11 = new javax.swing.JLabel();
tp = new javax.swing.JLabel();
jLabel13 = new javax.swing.JLabel();
sex = new javax.swing.JLabel();
jLabel15 = new javax.swing.JLabel();
address = new javax.swing.JLabel();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setResizable(false);
getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
jPanel1.setBackground(new java.awt.Color(102, 0, 0));
jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/University_of_Kelaniya_logo.png"))); // NOI18N
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(321, 321, 321)
.addComponent(jLabel1)
.addContainerGap(376, Short.MAX_VALUE))
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 89, Short.MAX_VALUE)
);
getContentPane().add(jPanel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 1090, -1));
jLabel2.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N
jLabel2.setText("Welcome");
getContentPane().add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(510, 110, -1, -1));
jLabel4.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N
jLabel4.setText("Welcome");
getContentPane().add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(650, 110, -1, -1));
jPanel2.setBackground(new java.awt.Color(102, 102, 102));
jPanel2.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
jLabel3.setBackground(new java.awt.Color(255, 255, 255));
jLabel3.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
jLabel3.setForeground(new java.awt.Color(204, 204, 204));
jLabel3.setText("jLabel3");
jPanel2.add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 30, -1, -1));
jLabel6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Teacher-male-icon.png"))); // NOI18N
jPanel2.add(jLabel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 10, -1, -1));
jPanel2.add(jSeparator1, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 90, 190, 10));
jPanel3.setBackground(new java.awt.Color(153, 153, 153));
jPanel3.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
public void mouseMoved(java.awt.event.MouseEvent evt) {
jPanel3MouseMoved(evt);
}
});
jPanel3.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jPanel3MouseClicked(evt);
}
public void mouseEntered(java.awt.event.MouseEvent evt) {
jPanel3MouseEntered(evt);
}
public void mouseExited(java.awt.event.MouseEvent evt) {
jPanel3MouseExited(evt);
}
});
jLabel8.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
jLabel8.setForeground(new java.awt.Color(204, 204, 204));
jLabel8.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/result.png"))); // NOI18N
jLabel8.setText("Enter Results");
jLabel8.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jLabel8MouseClicked(evt);
}
});
javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
jPanel3.setLayout(jPanel3Layout);
jPanel3Layout.setHorizontalGroup(
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
.addContainerGap(69, Short.MAX_VALUE)
.addComponent(jLabel8)
.addGap(53, 53, 53))
);
jPanel3Layout.setVerticalGroup(
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layout.createSequentialGroup()
.addComponent(jLabel8)
.addGap(0, 8, Short.MAX_VALUE))
);
jPanel2.add(jPanel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 140, 250, 40));
jPanel4.setBackground(new java.awt.Color(153, 153, 153));
jPanel4.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jPanel4MouseClicked(evt);
}
public void mouseEntered(java.awt.event.MouseEvent evt) {
jPanel4MouseEntered(evt);
}
public void mouseExited(java.awt.event.MouseEvent evt) {
jPanel4MouseExited(evt);
}
});
jLabel10.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
jLabel10.setForeground(new java.awt.Color(204, 204, 204));
jLabel10.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/update.png"))); // NOI18N
jLabel10.setText("Update Details");
jLabel10.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jLabel10MouseClicked(evt);
}
});
javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
jPanel4.setLayout(jPanel4Layout);
jPanel4Layout.setHorizontalGroup(
jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()
.addContainerGap(69, Short.MAX_VALUE)
.addComponent(jLabel10)
.addGap(46, 46, 46))
);
jPanel4Layout.setVerticalGroup(
jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel4Layout.createSequentialGroup()
.addComponent(jLabel10)
.addGap(0, 8, Short.MAX_VALUE))
);
jPanel2.add(jPanel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 200, 250, 40));
jPanel6.setBackground(new java.awt.Color(153, 153, 153));
jPanel6.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jPanel6MouseClicked(evt);
}
public void mouseEntered(java.awt.event.MouseEvent evt) {
jPanel6MouseEntered(evt);
}
public void mouseExited(java.awt.event.MouseEvent evt) {
jPanel6MouseExited(evt);
}
});
jLabel12.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
jLabel12.setForeground(new java.awt.Color(204, 204, 204));
jLabel12.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/logout.png"))); // NOI18N
jLabel12.setText("Log Out");
jLabel12.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jLabel12MouseClicked(evt);
}
});
javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
jPanel6.setLayout(jPanel6Layout);
jPanel6Layout.setHorizontalGroup(
jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel6Layout.createSequentialGroup()
.addGap(75, 75, 75)
.addComponent(jLabel12)
.addContainerGap(83, Short.MAX_VALUE))
);
jPanel6Layout.setVerticalGroup(
jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel12, javax.swing.GroupLayout.DEFAULT_SIZE, 45, Short.MAX_VALUE)
);
jPanel2.add(jPanel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 460, -1, -1));
jPanel13.setBackground(new java.awt.Color(153, 153, 153));
jPanel13.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jPanel13MouseClicked(evt);
}
public void mouseEntered(java.awt.event.MouseEvent evt) {
jPanel13MouseEntered(evt);
}
public void mouseExited(java.awt.event.MouseEvent evt) {
jPanel13MouseExited(evt);
}
});
jLabel21.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
jLabel21.setForeground(new java.awt.Color(204, 204, 204));
jLabel21.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/update.png"))); // NOI18N
jLabel21.setText("Change Password");
javax.swing.GroupLayout jPanel13Layout = new javax.swing.GroupLayout(jPanel13);
jPanel13.setLayout(jPanel13Layout);
jPanel13Layout.setHorizontalGroup(
jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel13Layout.createSequentialGroup()
.addContainerGap(69, Short.MAX_VALUE)
.addComponent(jLabel21)
.addGap(21, 21, 21))
);
jPanel13Layout.setVerticalGroup(
jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel13Layout.createSequentialGroup()
.addGap(0, 0, Short.MAX_VALUE)
.addComponent(jLabel21))
);
jPanel2.add(jPanel13, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 260, 250, -1));
getContentPane().add(jPanel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 80, 250, 510));
jPanel5.setBackground(new java.awt.Color(204, 204, 204));
jLabel5.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
jLabel5.setText("Lecture ID:");
lid.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
lid.setText("Lecture ID:");
jLabel7.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
jLabel7.setText("Lecture Name:");
fname.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
fname.setText("Lecture ID:");
lname.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
lname.setText("Lecture ID:");
jLabel9.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
jLabel9.setText("Birth Date:");
bd.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
bd.setText("Lecture ID:");
jLabel11.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
jLabel11.setText("Mobile No:");
tp.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
tp.setText("Lecture ID:");
jLabel13.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
jLabel13.setText("Gender:");
sex.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
sex.setText("Lecture ID:");
jLabel15.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
jLabel15.setText("Address:");
address.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
address.setText("Lecture ID:");
javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
jPanel5.setLayout(jPanel5Layout);
jPanel5Layout.setHorizontalGroup(
jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel5Layout.createSequentialGroup()
.addGap(29, 29, 29)
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jLabel11)
.addComponent(jLabel9)
.addComponent(jLabel7)
.addComponent(jLabel5)
.addGroup(jPanel5Layout.createSequentialGroup()
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel15))
.addGap(3, 3, 3)))
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel5Layout.createSequentialGroup()
.addGap(22, 22, 22)
.addComponent(lid))
.addGroup(jPanel5Layout.createSequentialGroup()
.addGap(18, 18, 18)
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(sex)
.addComponent(tp)))
.addGroup(jPanel5Layout.createSequentialGroup()
.addGap(22, 22, 22)
.addComponent(fname)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(lname))
.addGroup(jPanel5Layout.createSequentialGroup()
.addGap(18, 18, 18)
.addComponent(bd))
.addGroup(jPanel5Layout.createSequentialGroup()
.addGap(18, 18, 18)
.addComponent(address)))
.addContainerGap(38, Short.MAX_VALUE))
);
jPanel5Layout.setVerticalGroup(
jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel5Layout.createSequentialGroup()
.addGap(46, 46, 46)
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel5)
.addComponent(lid))
.addGap(32, 32, 32)
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel7)
.addComponent(fname)
.addComponent(lname))
.addGap(26, 26, 26)
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel9)
.addComponent(bd))
.addGap(30, 30, 30)
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel11)
.addComponent(tp))
.addGap(28, 28, 28)
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel13)
.addComponent(sex))
.addGap(32, 32, 32)
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel15)
.addComponent(address))
.addContainerGap(76, Short.MAX_VALUE))
);
getContentPane().add(jPanel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(480, 170, 300, 360));
pack();
setLocationRelativeTo(null);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Form() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public frmRectangulo() {\n initComponents();\n }",
"public form() {\n initComponents();\n }",
"public AdjointForm() {\n initComponents();\n setDefaultCloseOperation(HIDE_ON_CLOSE);\n }",
"public FormListRemarking() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n \n }",
"public FormPemilihan() {\n initComponents();\n }",
"public GUIForm() { \n initComponents();\n }",
"public FrameForm() {\n initComponents();\n }",
"public TorneoForm() {\n initComponents();\n }",
"public FormCompra() {\n initComponents();\n }",
"public muveletek() {\n initComponents();\n }",
"public Interfax_D() {\n initComponents();\n }",
"public quanlixe_form() {\n initComponents();\n }",
"public SettingsForm() {\n initComponents();\n }",
"public RegistrationForm() {\n initComponents();\n this.setLocationRelativeTo(null);\n }",
"public Soru1() {\n initComponents();\n }",
"public FMainForm() {\n initComponents();\n this.setResizable(false);\n setLocationRelativeTo(null);\n }",
"public soal2GUI() {\n initComponents();\n }",
"public EindopdrachtGUI() {\n initComponents();\n }",
"public MechanicForm() {\n initComponents();\n }",
"public AddDocumentLineForm(java.awt.Frame parent) {\n super(parent);\n initComponents();\n myInit();\n }",
"public BloodDonationGUI() {\n initComponents();\n }",
"public quotaGUI() {\n initComponents();\n }",
"public Customer_Form() {\n initComponents();\n setSize(890,740);\n \n \n }",
"public PatientUI() {\n initComponents();\n }",
"public Oddeven() {\n initComponents();\n }",
"public myForm() {\n\t\t\tinitComponents();\n\t\t}",
"public Magasin() {\n initComponents();\n }",
"public intrebarea() {\n initComponents();\n }",
"public RadioUI()\n {\n initComponents();\n }",
"public NewCustomerGUI() {\n initComponents();\n }",
"public ZobrazUdalost() {\n initComponents();\n }",
"public FormUtama() {\n initComponents();\n }",
"public p0() {\n initComponents();\n }",
"public INFORMACION() {\n initComponents();\n this.setLocationRelativeTo(null); \n }",
"public ProgramForm() {\n setLookAndFeel();\n initComponents();\n }",
"public AmountReleasedCommentsForm() {\r\n initComponents();\r\n }",
"public form2() {\n initComponents();\n }",
"public MainForm() {\n\t\tsuper(\"Hospital\", List.IMPLICIT);\n\n\t\tstartComponents();\n\t}",
"public LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n setRequestFocusEnabled(false);\n setVerifyInputWhenFocusTarget(false);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 465, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 357, Short.MAX_VALUE)\n );\n }",
"public kunde() {\n initComponents();\n }",
"public MusteriEkle() {\n initComponents();\n }",
"public frmMain() {\n initComponents();\n }",
"public frmMain() {\n initComponents();\n }",
"public DESHBORDPANAL() {\n initComponents();\n }",
"public GUIForm() {\n initComponents();\n inputField.setText(NO_FILE_SELECTED);\n outputField.setText(NO_FILE_SELECTED);\n progressLabel.setBackground(INFO);\n progressLabel.setText(SELECT_FILE);\n }",
"public frmVenda() {\n initComponents();\n }",
"public FrmMenu() {\n initComponents();\n }",
"public Botonera() {\n initComponents();\n }",
"public OffertoryGUI() {\n initComponents();\n setTypes();\n }",
"public JFFornecedores() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setBackground(new java.awt.Color(255, 255, 255));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 983, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 769, Short.MAX_VALUE)\n );\n\n pack();\n }",
"public EnterDetailsGUI() {\n initComponents();\n }",
"public vpemesanan1() {\n initComponents();\n }",
"public Kost() {\n initComponents();\n }",
"public UploadForm() {\n initComponents();\n }",
"public FormHorarioSSE() {\n initComponents();\n }",
"public frmacceso() {\n initComponents();\n }",
"public HW3() {\n initComponents();\n }",
"public Managing_Staff_Main_Form() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(null);\n\n pack();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }",
"public sinavlar2() {\n initComponents();\n }",
"public P0405() {\n initComponents();\n }",
"public IssueBookForm() {\n initComponents();\n }",
"public MiFrame2() {\n initComponents();\n }",
"public Choose1() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n\n String oldAuthor = prefs.get(\"AUTHOR\", \"\");\n if(oldAuthor != null) {\n this.authorTextField.setText(oldAuthor);\n }\n String oldBook = prefs.get(\"BOOK\", \"\");\n if(oldBook != null) {\n this.bookTextField.setText(oldBook);\n }\n String oldDisc = prefs.get(\"DISC\", \"\");\n if(oldDisc != null) {\n try {\n int oldDiscNum = Integer.parseInt(oldDisc);\n oldDiscNum++;\n this.discNumberTextField.setText(Integer.toString(oldDiscNum));\n } catch (Exception ex) {\n this.discNumberTextField.setText(oldDisc);\n }\n this.bookTextField.setText(oldBook);\n }\n\n\n }",
"public GUI_StudentInfo() {\n initComponents();\n }",
"public Lihat_Dokter_Keseluruhan() {\n initComponents();\n }",
"public JFrmPrincipal() {\n initComponents();\n }",
"public bt526() {\n initComponents();\n }",
"public Pemilihan_Dokter() {\n initComponents();\n }",
"public Ablak() {\n initComponents();\n }",
"@Override\n\tprotected void initUi() {\n\t\t\n\t}",
"@SuppressWarnings(\"unchecked\")\n\t// <editor-fold defaultstate=\"collapsed\" desc=\"Generated\n\t// Code\">//GEN-BEGIN:initComponents\n\tprivate void initComponents() {\n\n\t\tlabel1 = new java.awt.Label();\n\t\tlabel2 = new java.awt.Label();\n\t\tlabel3 = new java.awt.Label();\n\t\tlabel4 = new java.awt.Label();\n\t\tlabel5 = new java.awt.Label();\n\t\tlabel6 = new java.awt.Label();\n\t\tlabel7 = new java.awt.Label();\n\t\tlabel8 = new java.awt.Label();\n\t\tlabel9 = new java.awt.Label();\n\t\tlabel10 = new java.awt.Label();\n\t\ttextField1 = new java.awt.TextField();\n\t\ttextField2 = new java.awt.TextField();\n\t\tlabel14 = new java.awt.Label();\n\t\tlabel15 = new java.awt.Label();\n\t\tlabel16 = new java.awt.Label();\n\t\ttextField3 = new java.awt.TextField();\n\t\ttextField4 = new java.awt.TextField();\n\t\ttextField5 = new java.awt.TextField();\n\t\tlabel17 = new java.awt.Label();\n\t\tlabel18 = new java.awt.Label();\n\t\tlabel19 = new java.awt.Label();\n\t\tlabel20 = new java.awt.Label();\n\t\tlabel21 = new java.awt.Label();\n\t\tlabel22 = new java.awt.Label();\n\t\ttextField6 = new java.awt.TextField();\n\t\ttextField7 = new java.awt.TextField();\n\t\ttextField8 = new java.awt.TextField();\n\t\tlabel23 = new java.awt.Label();\n\t\ttextField9 = new java.awt.TextField();\n\t\ttextField10 = new java.awt.TextField();\n\t\ttextField11 = new java.awt.TextField();\n\t\ttextField12 = new java.awt.TextField();\n\t\tlabel24 = new java.awt.Label();\n\t\tlabel25 = new java.awt.Label();\n\t\tlabel26 = new java.awt.Label();\n\t\tlabel27 = new java.awt.Label();\n\t\tlabel28 = new java.awt.Label();\n\t\tlabel30 = new java.awt.Label();\n\t\tlabel31 = new java.awt.Label();\n\t\tlabel32 = new java.awt.Label();\n\t\tjButton1 = new javax.swing.JButton();\n\n\t\tlabel1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel1.setText(\"It seems that some of the buttons on the ATM machine are not working!\");\n\n\t\tlabel2.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel2.setText(\"Unfortunately these numbers are exactly what Professor has to use to type in his password.\");\n\n\t\tlabel3.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel3.setText(\n\t\t\t\t\"If you want to eat tonight, you have to help him out and construct the numbers of the password with the working buttons and math operators.\");\n\n\t\tlabel4.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tlabel4.setText(\"Denver's Password: 2792\");\n\n\t\tlabel5.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel5.setText(\"import java.util.Scanner;\\n\");\n\n\t\tlabel6.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel6.setText(\"public class ATM{\");\n\n\t\tlabel7.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel7.setText(\"public static void main(String[] args){\");\n\n\t\tlabel8.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel8.setText(\"System.out.print(\");\n\n\t\tlabel9.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel9.setText(\" -\");\n\n\t\tlabel10.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel10.setText(\");\");\n\n\t\ttextField1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\ttextField1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tlabel14.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel14.setText(\"System.out.print( (\");\n\n\t\tlabel15.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel15.setText(\"System.out.print(\");\n\n\t\tlabel16.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel16.setText(\"System.out.print( ( (\");\n\n\t\tlabel17.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel17.setText(\")\");\n\n\t\tlabel18.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel18.setText(\" +\");\n\n\t\tlabel19.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel19.setText(\");\");\n\n\t\tlabel20.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel20.setText(\" /\");\n\n\t\tlabel21.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel21.setText(\" %\");\n\n\t\tlabel22.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel22.setText(\" +\");\n\n\t\tlabel23.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel23.setText(\");\");\n\n\t\tlabel24.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel24.setText(\" +\");\n\n\t\tlabel25.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel25.setText(\" /\");\n\n\t\tlabel26.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel26.setText(\" *\");\n\n\t\tlabel27.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\t\tlabel27.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel27.setText(\")\");\n\n\t\tlabel28.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel28.setText(\")\");\n\n\t\tlabel30.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel30.setText(\"}\");\n\n\t\tlabel31.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel31.setText(\"}\");\n\n\t\tlabel32.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel32.setText(\");\");\n\n\t\tjButton1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tjButton1.setText(\"Check\");\n\t\tjButton1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tjButton1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tjavax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n\t\tlayout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(28).addGroup(layout\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING).addComponent(getDoneButton()).addComponent(jButton1)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, 774, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addGap(92).addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15, GroupLayout.PREFERRED_SIZE, 145,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(2)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(37))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(174)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(7)))\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label23, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20).addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(23).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel10, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16, GroupLayout.PREFERRED_SIZE, 177,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));\n\t\tlayout.setVerticalGroup(\n\t\t\t\tlayout.createParallelGroup(Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup().addGroup(layout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(19)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(78)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(76)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(75)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(27))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel23,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(29)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))))\n\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t.addGap(30)\n\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(25)\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(26).addComponent(jButton1).addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(getDoneButton()).addContainerGap(23, Short.MAX_VALUE)));\n\t\tthis.setLayout(layout);\n\n\t\tlabel16.getAccessibleContext().setAccessibleName(\"System.out.print( ( (\");\n\t\tlabel17.getAccessibleContext().setAccessibleName(\"\");\n\t\tlabel18.getAccessibleContext().setAccessibleName(\" +\");\n\t}",
"public Pregunta23() {\n initComponents();\n }",
"public FormMenuUser() {\n super(\"Form Menu User\");\n initComponents();\n }",
"public AvtekOkno() {\n initComponents();\n }",
"public busdet() {\n initComponents();\n }",
"public ViewPrescriptionForm() {\n initComponents();\n }",
"public Ventaform() {\n initComponents();\n }",
"public Kuis2() {\n initComponents();\n }",
"public CreateAccount_GUI() {\n initComponents();\n }",
"public POS1() {\n initComponents();\n }",
"public Carrera() {\n initComponents();\n }",
"public EqGUI() {\n initComponents();\n }",
"public JFriau() {\n initComponents();\n this.setLocationRelativeTo(null);\n this.setTitle(\"BuNus - Budaya Nusantara\");\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setBackground(new java.awt.Color(204, 204, 204));\n setMinimumSize(new java.awt.Dimension(1, 1));\n setPreferredSize(new java.awt.Dimension(760, 402));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 750, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n }",
"public nokno() {\n initComponents();\n }",
"public dokter() {\n initComponents();\n }",
"public ConverterGUI() {\n initComponents();\n }",
"public hitungan() {\n initComponents();\n }",
"public Modify() {\n initComponents();\n }",
"public frmAddIncidencias() {\n initComponents();\n }",
"public FP_Calculator_GUI() {\n initComponents();\n \n setVisible(true);\n }"
] | [
"0.73213893",
"0.72913563",
"0.72913563",
"0.72913563",
"0.7286415",
"0.724936",
"0.72132975",
"0.72076875",
"0.71963966",
"0.7190991",
"0.7184836",
"0.71593595",
"0.71489584",
"0.709429",
"0.7080468",
"0.70567",
"0.6987573",
"0.69780385",
"0.69556123",
"0.69538146",
"0.6945521",
"0.69423586",
"0.6935968",
"0.69330275",
"0.692813",
"0.6924971",
"0.69242555",
"0.6911953",
"0.6911683",
"0.689307",
"0.689293",
"0.68911546",
"0.68901724",
"0.6888897",
"0.6883029",
"0.68823075",
"0.68819803",
"0.6878825",
"0.6875638",
"0.6874702",
"0.68724024",
"0.68601924",
"0.68568707",
"0.6856268",
"0.6856217",
"0.68552643",
"0.6853839",
"0.6852327",
"0.6852327",
"0.6843502",
"0.68374175",
"0.6837008",
"0.6828905",
"0.6828786",
"0.68258685",
"0.6823454",
"0.6823341",
"0.68164855",
"0.6816273",
"0.681072",
"0.6810196",
"0.68090945",
"0.68083966",
"0.68072087",
"0.6802229",
"0.679545",
"0.6795217",
"0.67920595",
"0.67905307",
"0.67902476",
"0.6789075",
"0.6787793",
"0.678205",
"0.6765594",
"0.67655575",
"0.676554",
"0.6755679",
"0.6755387",
"0.67527455",
"0.6750321",
"0.6741919",
"0.6739145",
"0.67376417",
"0.673622",
"0.6733591",
"0.67282665",
"0.6727961",
"0.6720994",
"0.6715958",
"0.6715172",
"0.67146355",
"0.67088073",
"0.67068994",
"0.67046213",
"0.67008626",
"0.67002195",
"0.6699175",
"0.66977036",
"0.66942674",
"0.6691273",
"0.6689522"
] | 0.0 | -1 |
Take document, detect first level, detect end of element, create element, parse element | public void parse(){
Integer childStart = this.findNewElement(0, this.document.length - 1);
if(childStart == null){
return;
}
this.root.removeData();
this.copyTextToDocumentTree(this.root, 0, childStart - 1);
DocumentSectionType childType = this.getType(childStart);
do {
Integer end = this.findNextSameLevelElement(childStart + 1, childType);
//now we have boundaries of our new element, so let's grab it's index
//we need appropriate matcher
Matcher childMatcher = childType.getPattern().matcher(this.document[childStart]);
childMatcher.find();
DocumentTree child = new DocumentTree(childType, childMatcher.group(1), null);
//now clear first line
try{
String group2 = childMatcher.group(2);
this.document[childStart] = group2 != null ? group2 + " " : "";
}catch(IndexOutOfBoundsException e){
this.document[childStart] = "";
}
try {
this.document[childStart] += childMatcher.group(3);
}catch(IndexOutOfBoundsException e){
this.document[childStart] += "";
}
//and copy it's text
this.copyTextToDocumentTree(child, childStart, end - 1);
root.addChild(child);
//finally, parse it
DocumentParser childParser = new DocumentParser(child, joinChapterWithChapterNames);
childParser.parse();
childStart = end;
}while(childStart != this.document.length);
if(this.root.getType() == DocumentSectionType.CHAPTER && this.joinChapterWithChapterNames){
DocumentTree nameNode = (DocumentTree)this.root.getChildren().get(0);
this.root.removeData();
this.root.appendData(nameNode.getIndex());
this.root.replaceChild(nameNode, nameNode.getChildren());
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static Element newRootElement()\n {\n Element element = null;\n \n try\n {\n javax.xml.parsers.DocumentBuilderFactory factory =\n javax.xml.parsers.DocumentBuilderFactory.newInstance();\n \n javax.xml.parsers.DocumentBuilder builder =\n factory.newDocumentBuilder();\n \n Document document = builder.newDocument();\n Element holder = document.createElement(\"root\");\n document.appendChild(holder);\n element = document.getDocumentElement();\n }\n catch(Exception ex) { ex.printStackTrace(); }\n \n return element;\n }",
"public Element generateElement(Document dom);",
"Object create(Element element) throws IOException, SAXException, ParserConfigurationException;",
"public Element addElement(Element rootElement,String type,Document document){\n\t\t// define school elements \n\t\tElement node = document.createElement(type); \n\t\trootElement.appendChild(node);\n\t\treturn node;\n\t}",
"Object create(Document doc) throws IOException, SAXException, ParserConfigurationException;",
"protected Element createDocument() {\r\n // create the dom tree\r\n DocumentBuilder builder = getDocumentBuilder();\r\n Document doc = builder.newDocument();\r\n Element rootElement = doc.createElement(TESTSUITES);\r\n doc.appendChild(rootElement);\r\n\r\n generatedId = 0;\r\n\r\n // get all files and add them to the document\r\n File[] files = getFiles();\r\n for (int i = 0; i < files.length; i++) {\r\n File file = files[i];\r\n try {\r\n if(file.length()>0) {\r\n Document testsuiteDoc\r\n = builder.parse(\"file:///\" + file.getAbsolutePath());\r\n Element elem = testsuiteDoc.getDocumentElement();\r\n // make sure that this is REALLY a testsuite.\r\n if (TESTSUITE.equals(elem.getNodeName())) {\r\n addTestSuite(rootElement, elem);\r\n generatedId++;\r\n } else {\r\n }\r\n } else {\r\n }\r\n } catch (SAXException e) {\r\n // a testcase might have failed and write a zero-length document,\r\n // It has already failed, but hey.... mm. just put a warning\r\n } catch (IOException e) {\r\n }\r\n }\r\n return rootElement;\r\n }",
"Element createElement();",
"protected void parseRootElement() {\n\n // This is the Activiti method body for parsing through the XML object model\n // The Joda Engine needs less information than Activiti. That's why some methods are commented out.\n parseProcessDefinitions();\n }",
"ElementDefinition createElementDefinition();",
"public Element readElement() throws XMLParseException {\n\t\t// #(\n\t\tswitch (_tokenizer.next()) {\n\t\tcase OPEN:\n\t\t\tif (_tokenizer.getCurrentName().equalsIgnoreCase(\"html\")) {\n\t\t\t\t_tokenizer.addCDATA(\"script\");\n\t\t\t\t_tokenizer.addCDATA(\"style\");\n\t\t\t\tisHTML = true;\n\t\t\t}\n\t\t\t_tokenizer.saveToken();\n\t\t\tElement result = (Element)read();\n\t\t\t// System.out.println(\"result = \" + result);\n\t\t\tif (_tokenizer.hasNext()) throw new XMLParseException(\"more than one element!\");\n\t\t\treturn result;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\t// #)\n\t\t// TODO: start the process and then call the recursive helper method\n\t\treturn null;\n\t}",
"public static Element serialize( SerializationPosition state) {\n Element doc = state.doc;\n DefaultMutableTreeNode treeNode = state.currPos;\n \n Object value = treeNode.getUserObject();\n Element parentElement = null; \n \n parentElement = doc.getOwnerDocument().createElement(\"directory\");\n\n \n // Apply properties to root element...\n Attr attrName = doc.getOwnerDocument().createAttribute(\"name\");\n attrName.setNodeValue(state.currPos.toString());\n parentElement.getAttributes().setNamedItem(attrName);\n \n return parentElement;\n }",
"private void createDocument(){\n\t\tDocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\n\t\ttry {\n\t\t//get an instance of builder\n\t\tDocumentBuilder db = dbf.newDocumentBuilder();\n\n\t\t//create an instance of DOM\n\t\tdom = db.newDocument();\n\n\t\t}catch(ParserConfigurationException pce) {\n\t\t\t//dump it\n\t\t\tSystem.out.println(\"Error while trying to instantiate DocumentBuilder \" + pce);\n\t\t\tSystem.exit(1);\n\t\t}\n }",
"@Test\n public void create() throws ParserConfigurationException, IOException, SAXException {\n Document document = createDocument();\n Document documentExpected = readDocument(\"createExpected.xml\");\n XModifier modifier = new XModifier(document);\n modifier.setNamespace(\"ns\", \"http://localhost\");\n // create an empty element\n modifier.addModify(\"/ns:root/ns:element1\");\n // create an element with attribute\n modifier.addModify(\"/ns:root/ns:element2[@attr=1]\");\n // append an new element to existing element1\n modifier.addModify(\"/ns:root/ns:element1/ns:element11\");\n // create an element with text\n modifier.addModify(\"/ns:root/ns:element3\", \"TEXT\");\n modifier.modify();\n assertXmlEquals(documentExpected, document);\n }",
"DocumentRoot createDocumentRoot();",
"DocumentRoot createDocumentRoot();",
"DocumentRoot createDocumentRoot();",
"DocumentRoot createDocumentRoot();",
"private void createDocument() {\n\t\t\tDocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\r\n\t\t\ttry {\r\n\t\t\t//get an instance of builder\r\n\t\t\tDocumentBuilder db = dbf.newDocumentBuilder();\r\n\r\n\t\t\t//create an instance of DOM\r\n\t\t\tdom = db.newDocument();\r\n\r\n\t\t\t}catch(ParserConfigurationException pce) {\r\n\t\t\t\t//dump it\r\n\t\t\t\tSystem.out.println(\"Error while trying to instantiate DocumentBuilder \" + pce);\r\n\t\t\t\tSystem.exit(1);\r\n\t\t\t}\r\n\r\n\t\t}",
"public HashMap<String, String> getNextNode() throws XMLStreamException,\n\t\t\tIOException {\n\t\tboolean add_elements = false;\n\t\tString node_name = new String();\n\t\tHashMap<String, String> document = new HashMap<String, String>();\n\t\t// StringWriter tag_content = new StringWriter();\n\n\t\t// Loop over the document\n\t\twhile (xmlEventReader.hasNext()) {\n\t\t\txmlEvent = xmlEventReader.nextEvent();// get the next event\n\n\t\t\t// Start element\n\t\t\tif (xmlEvent.isStartElement()) {\n\t\t\t\tnode_name = xmlEvent.asStartElement().getName().getLocalPart();\n\t\t\t\tif (!node_name.equalsIgnoreCase(root_node)\n\t\t\t\t\t\t&& !formatter_nodes.contains(\"|\" + node_name + \"|\")) {\n\t\t\t\t\t// not 'dblp' and is a document type tag\n\t\t\t\t\tif (document_types.contains(\"|\" + node_name + \"|\")) {\n\t\t\t\t\t\tadd_elements = true;\n\t\t\t\t\t\tdocument.put(\"type\", node_name);\n\t\t\t\t\t\t// Read the attributes to the document\n\t\t\t\t\t\tgetAttributes(\n\t\t\t\t\t\t\t\txmlEvent.asStartElement().getAttributes(),\n\t\t\t\t\t\t\t\tdocument);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// xmlWriter = xmlOutputFactory\n\t\t\t\t\t\t// .createXMLEventWriter(tag_content);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (add_elements && xmlEvent.isEndElement()) {\n\t\t\t\tnode_name = xmlEvent.asEndElement().getName().getLocalPart();\n\t\t\t\tif (!formatter_nodes.contains(\"|\" + node_name + \"|\")) {\n\t\t\t\t\t// Close the XML writer\n\t\t\t\t\t// xmlWriter.close();\n\t\t\t\t\t// add the node content to the document\n\t\t\t\t\t// String tag_value = tag_content.toString();\n\t\t\t\t\t// if (tag_value != null)\n\t\t\t\t\t// addNode(node_name, tag_value.trim(), document);\n\t\t\t\t\t// // Refresh the tag content value\n\t\t\t\t\t// tag_content = new StringWriter();\n\t\t\t\t\t// Stop adding elements\n\t\t\t\t\tif (document_types.contains(\"|\" + node_name + \"|\")) {\n\t\t\t\t\t\tadd_elements = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (xmlEvent.isCharacters()) {\n\t\t\t\t// Add the characters to the XMLWriter stream\n\t\t\t\tString value = xmlEvent.asCharacters().getData().trim();\n\t\t\t\tif (!value.isEmpty())\n\t\t\t\t\taddNode(node_name, value, document);\n\n\t\t\t}\n\n\t\t}\n\t\treturn document;\n\n\t}",
"protected static org.w3c.dom.Document setUpXML(String nodeName)\n throws ParserConfigurationException\n {\n //try\n //{\n DocumentBuilderFactory myFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder myDocBuilder = myFactory.newDocumentBuilder();\n DOMImplementation myDOMImpl = myDocBuilder.getDOMImplementation();\n // resultDocument = myDOMImpl.createDocument(\"at.ac.tuwien.dbai.pdfwrap\", \"PDFResult\", null);\n org.w3c.dom.Document resultDocument =\n myDOMImpl.createDocument(\"at.ac.tuwien.dbai.pdfwrap\", nodeName, null);\n return resultDocument;\n //}\n //catch (ParserConfigurationException e)\n //{\n // e.printStackTrace();\n // return null;\n //}\n\n }",
"private void parseXMLDocument(final Document doc)\r\n {\r\n Node docRoot = doc.getDocumentElement();\r\n StringBuilder indent = new StringBuilder();\r\n\r\n fullXmlTree.append(\"<\" + docRoot.getNodeName() + \">\\n\");\r\n searchTreeFromBranch(docRoot, 0, indent);\r\n fullXmlTree.append(\"</\" + docRoot.getNodeName() + \">\\n\");\r\n\r\n if (getPrintFullTree())\r\n {\r\n printFullTree();\r\n }\r\n }",
"public void root(Element element)\n {\n }",
"private void buildObject(Element current) {\n\t\tList<Element> children = current.getChildren();\n\t\tIterator<Element> iterator = children.iterator();\n\t\twhile (iterator.hasNext()) {\n\t\t\tElement child = iterator.next();\n\t\t\tString category = child.getAttributeValue(\"description\");\n\t\t\tString reference = child.getAttributeValue(\"reference\");\n\n\t\t\tEplusObject ob = new EplusObject(category, reference);\n\t\t\tprocessFields(child, ob);\n\t\t\tobjects.add(ob);\n\t\t}\n\t}",
"public void openBlankXmlFile() {\n\t\t\n\t\t// the root of the xmlElement tree\n\t\trootNode = new XmlNode(this);\n\t\tXmlElement rootField = rootNode.getXmlElement();\n\t\t\n\t\trootField.setName(\"rootElement\", true);\n\t\t\n\t\tXmlNode newNode = new XmlNode(rootNode, this);// make a new default-type field\n\t\trootNode.addChild(newNode);\n\t}",
"abstract public void data(Document document, Element rootElement);",
"@Override\r\n public String createSubDocument(File file, List<FirstElement> partElement) {\n return null;\r\n }",
"private void createDOMTree(){\n\t\t\tElement rootEle = dom.createElement(\"html\");\r\n\t\t\tdom.appendChild(rootEle);\r\n\t\t\t\r\n\t\t\t//\t\t\tcreates <head> and <title> tag\r\n\t\t\tElement headEle = dom.createElement(\"head\");\r\n\t\t\tElement titleEle = dom.createElement(\"title\");\r\n\t\t\t\r\n\t\t\t//\t\t\tset value to <title> tag\r\n\t\t\tText kuerzelText = dom.createTextNode(\"Auswertung\");\r\n\t\t\ttitleEle.appendChild(kuerzelText);\r\n\t\t\theadEle.appendChild(titleEle);\r\n\t\t\t\r\n\t\t\tElement linkEle = dom.createElement(\"link\");\r\n\t\t\tlinkEle.setAttribute(\"rel\", \"stylesheet\");\r\n\t\t\tlinkEle.setAttribute(\"type\", \"text/css\");\r\n\t\t\tlinkEle.setAttribute(\"href\", \"./format.css\");\r\n\t\t\theadEle.appendChild(linkEle);\r\n\t\t\t\r\n\t\t\trootEle.appendChild(headEle);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tElement bodyEle = dom.createElement(\"body\");\r\n\t\t\tElement divEle = dom.createElement(\"div\");\r\n\t\t\tdivEle.setAttribute(\"id\", \"cont\");\r\n\t\t\t\r\n\t\t\tVector<String> tmp = myData.get(0);\r\n\t\t\tElement h2Ele = dom.createElement(\"h2\");\r\n\t\t\tString h1Str = \"\";\r\n\t\t\tfor(Iterator i = tmp.iterator(); i.hasNext(); )\r\n\t\t\t{\r\n\t\t\t\th1Str = h1Str + (String)i.next() + \" \";\r\n\t\t\t}\r\n\t\t\tText aText = dom.createTextNode(h1Str);\r\n\t\t\th2Ele.appendChild(aText);\r\n\t\t\tdivEle.appendChild(h2Ele);\r\n\t\t\tmyData.remove(0);\r\n\t\t\t\r\n\t\t\tElement tableEle = dom.createElement(\"table\");\r\n//\t\t\ttableEle.setAttribute(\"border\", \"1\");\r\n\t\t\t\r\n\t\t\ttmp = myData.get(0);\r\n\t\t\tElement trHeadEle = createTrHeadElement(tmp);\r\n\t\t\ttableEle.appendChild(trHeadEle);\r\n\t\t\tmyData.remove(0);\r\n\t\t\t\r\n\t\t\tIterator it = myData.iterator();\r\n\t\t\twhile(it.hasNext()) {\r\n\t\t\t\ttmp = (Vector<String>)it.next();\r\n\t\t\t\tElement trEle = createTrElement(tmp);\r\n\t\t\t\ttableEle.appendChild(trEle);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tdivEle.appendChild(tableEle);\r\n\t\t\tbodyEle.appendChild(divEle);\r\n\t\t\trootEle.appendChild(bodyEle);\r\n\t\t\t\r\n\t\t}",
"BaleElementEvent fixup()\n{\n if (line_elements.size() > 0) addLine();\n\n BaleElementEvent ee = new BaleElementEvent(root_element,new_children);\n root_element.clear();\n for (BaleElement be : new_children) root_element.add(be);\n BoardLog.logD(\"BALE\",\"ELEMENT FIXUP ROOT \" + new_children.size());\n\n return ee;\n}",
"public interface SDXHelper {\n /**\n * Creates a DOM <CODE>Element</CODE> node and appends it as a child\n * to the given <CODE>parent</CODE> element. The attributes stored by\n * the SAX object are retrieved and set to the created DOM object.\n *\n * @param namespaceURI The namespace URI for the new element\n * @param localName The local name for the new element\n * @param qualifiedName The qualified name for the new element\n * @param attributes The attributes for the new element\n * @param parent The parent for the new element or\n * <CODE>null</CODE> if this is a root element\n * @return The created DOM <CODE>Element</CODE>\n */\n public Element createElement(String namespaceURI, String qualifiedName,\n Attributes attributes, Element parent);\n\n /**\n * Creates a DOM <CODE>Text</CODE> node and appends it as a child\n * to the given <CODE>parent</CODE> element or just appends the data\n * to the last child of <CODE>parent</CODE> if that last child is\n * a <CODE>Text</CODE> node. In other words, this method doesn't allow\n * the creation of adjacent <CODE>Text</CODE> nodes and creates\n * a <CODE>Text</CODE> node only when this is necessary.\n *\n * @param data The character data for the text node\n * @param parent The parent for the text node\n * @return The created or existent <CODE>Text</CODE> node\n */\n public Text createTextNode(String data, Element parent);\n\n /**\n * Creates a DOM <CODE>CDATASection</CODE> node and appends it as a child\n * to the given <CODE>parent</CODE> element or just appends the data\n * to the last child of <CODE>parent</CODE> if that last child is\n * a <CODE>CDATASection</CODE> node and <CODE>newCDATA</CODE> is\n * <CODE>false</CODE>. In other words, this method avoids the creation\n * of adjacent <CODE>CDATASection</CODE> nodes and creates a\n * <CODE>CDATASection</CODE> node only when this is necessary or required.\n *\n * @param data The character data for the CDATA section\n * @param newCDATA Indicates the beginning of a new CDATA section\n * @param parent The parent for the CDATA section\n * @return The created or existent\n * <CODE>CDATASection</CODE> node\n */\n public CDATASection createCDATASection(String data, boolean newCDATA,\n Element parent);\n\n /**\n * Creates a DOM <CODE>ProcessingInstruction</CODE> node and appends it\n * as a child to the given <CODE>parent</CODE> element.\n *\n * @param target The target for the new processing instruction\n * @param data The data for the new processing instruction\n * @param parent The parent for the new processing instruction\n * @return The created <CODE>ProcessingInstruction</CODE>\n */\n public ProcessingInstruction createProcessingInstruction(\n String target, String data, Element parent);\n\n /**\n * Creates a DOM <CODE>Comment</CODE> node and appends it as a child\n * to the given <CODE>parent</CODE> element.\n *\n * @param data The data for the new comment\n * @param parent The parent for the new comment\n * @return The created <CODE>Comment</CODE> node\n */\n public Comment createComment(String data, Element parent);\n}",
"@Override\n protected abstract Document parseAsDom(final T input) throws ConversionException;",
"@Override\n protected Document parseAsDom(final Document input) {\n return input;\n }",
"private Document getFragmentAsDocument(CharSequence value)\n/* */ {\n/* 75 */ Document fragment = Jsoup.parse(value.toString(), \"\", Parser.xmlParser());\n/* 76 */ Document document = Document.createShell(\"\");\n/* */ \n/* */ \n/* 79 */ Iterator<Element> nodes = fragment.children().iterator();\n/* 80 */ while (nodes.hasNext()) {\n/* 81 */ document.body().appendChild((Node)nodes.next());\n/* */ }\n/* */ \n/* 84 */ return document;\n/* */ }",
"private static void addNodeToDocument(Node node, Node newHead, Document document, int mode) {\n NodeList childList = node.getChildNodes();\n switch (mode) {\n case DET_MODE:\n buildDetailedNode(document, childList, newHead);\n break;\n case SUM_MODE:\n buildSummaryNode(document, childList, newHead);\n break;\n case DOUBLES_MODE:\n buildDoublesNode(document, childList, newHead);\n break;\n default:\n break;\n }\n }",
"XomNode appendElement(Element element) throws XmlBuilderException;",
"private Document createXMLDocumentStructure() {\r\n\t\tDocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\r\n\t\tDocumentBuilder builder = null;\r\n\t\ttry {\r\n\t\t\tbuilder = dbf.newDocumentBuilder();\r\n\t\t} catch (ParserConfigurationException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\t// Creates the Document\r\n\t\tDocument serviceDoc = builder.newDocument();\r\n\t\t/*\r\n\t\t * Create the XML Tree\r\n\t\t */\r\n\t\tElement root = serviceDoc.createElement(\"service\");\r\n\r\n\t\tserviceDoc.appendChild(root);\r\n\t\treturn serviceDoc;\r\n\t}",
"protected Element createRootElement(DOMContext domContext) {\n return domContext.createElement(HTML.DIV_ELEM);\r\n }",
"private void createDOMTree(){\n\t\tElement rootEle = dom.createElement(\"Personnel\");\n\t\tdom.appendChild(rootEle);\n\n\t\t//No enhanced for\n\t\tIterator it = user.iterator();\n\t\twhile(it.hasNext()) {\n\t\t\tUserInformation b = (UserInformation)it.next();\n\t\t\t//For each Book object create element and attach it to root\n\t\t\tElement bookEle = createUserElement(b);\n\t\t\trootEle.appendChild(bookEle);\n\t\t}\n\t}",
"@Override\r\n\tprotected AbstractElement createDefaultRoot() {\n\t\tthis.writeLock();\r\n\r\n\t\tthis.branchContext = BranchContext.FILE_HEADER;\r\n\t\tthis.leafContext = LeafContext.OTHER;\r\n\r\n\t\tBranchElement root = new SectionElement();\r\n\t\tBranchElement branch = (BranchElement) this.createBranchElement(root, null);\r\n\t\tbranch.replace(0, 0, new Element[] { this.createLeafElement(branch, null, 0, 1) });\r\n\t\troot.replace(0, 0, new Element[] { branch });\r\n\r\n\t\tthis.writeUnlock();\r\n\r\n\t\treturn root;\r\n\t}",
"private BaleElement fixLeafElement(BaleElement be,boolean first)\n{\n // handle indents\n BaleAstNode sn = cur_ast.getChild(be.getDocumentStartOffset());\n\n if (be.isEmpty() && !be.isEndOfLine()) {\n if (first && be instanceof BaleElement.Space) {\n\t be = new BaleElement.Indent(for_document,cur_parent,be.getStartOffset(),be.getEndOffset());\n }\n else if (!first && be instanceof BaleElement.Indent) {\n\t be = new BaleElement.Space(for_document,cur_parent,be.getStartOffset(),be.getEndOffset());\n }\n }\n else if (be.isIdentifier()) {\n BaleAstIdType ityp = BaleAstIdType.NONE;\n if (sn != null) ityp = sn.getIdType();\n switch (ityp) {\n\t case FIELD :\n\t if (!(be instanceof BaleElement.FieldId)) {\n\t be = new BaleElement.FieldId(for_document,cur_parent,be.getStartOffset(),be.getEndOffset());\n\t }\n\t break;\n\t case FIELD_STATIC :\n\t if (!(be instanceof BaleElement.StaticFieldId)) {\n\t be = new BaleElement.StaticFieldId(for_document,cur_parent,be.getStartOffset(),be.getEndOffset());\n\t }\n\t break;\n\t case CALL :\n\t if (!(be instanceof BaleElement.CallId)) {\n\t be = new BaleElement.CallId(for_document,cur_parent,be.getStartOffset(),be.getEndOffset());\n\t }\n\t break;\n\t case CALL_STATIC :\n\t if (!(be instanceof BaleElement.StaticCallId)) {\n\t be = new BaleElement.StaticCallId(for_document,cur_parent,be.getStartOffset(),be.getEndOffset());\n\t }\n\t break;\n\t case CALL_UNDEF :\n\t if (!(be instanceof BaleElement.UndefCallId)) {\n\t be = new BaleElement.UndefCallId(for_document,cur_parent,be.getStartOffset(),be.getEndOffset());\n\t }\n\t break;\n\t case CALL_DEPRECATED :\n\t if (!(be instanceof BaleElement.DeprecatedCallId)) {\n\t be = new BaleElement.DeprecatedCallId(for_document,cur_parent,be.getStartOffset(),be.getEndOffset());\n\t }\n\t break;\n\t case TYPE :\n\t if (!(be instanceof BaleElement.TypeId)) {\n\t be = new BaleElement.TypeId(for_document,cur_parent,be.getStartOffset(),be.getEndOffset());\n\t }\n\t break;\n\t case ENUMC :\n\t case FIELDC :\n\t if (!(be instanceof BaleElement.ConstId)) {\n\t be = new BaleElement.ConstId(for_document,cur_parent,be.getStartOffset(),be.getEndOffset());\n\t }\n\t break;\n\t case CLASS_DECL :\n\t if (!(be instanceof BaleElement.ClassDeclId)) {\n\t be = new BaleElement.ClassDeclId(for_document,cur_parent,be.getStartOffset(),be.getEndOffset());\n\t }\n\t break;\n\t case CLASS_DECL_MEMBER :\n\t if (!(be instanceof BaleElement.ClassDeclMemberId)) {\n\t be = new BaleElement.ClassDeclMemberId(for_document,cur_parent,be.getStartOffset(),be.getEndOffset());\n\t }\n\t break;\n\t case METHOD_DECL :\n\t if (!(be instanceof BaleElement.MethodDeclId)) {\n\t be = new BaleElement.MethodDeclId(for_document,cur_parent,be.getStartOffset(),be.getEndOffset());\n\t }\n\t break;\n\t case EXCEPTION_DECL :\n\t case LOCAL_DECL :\n\t if (!(be instanceof BaleElement.LocalDeclId)) {\n\t be = new BaleElement.LocalDeclId(for_document,cur_parent,be.getStartOffset(),be.getEndOffset());\n\t }\n\t break;\n\t case FIELD_DECL :\n\t if (!(be instanceof BaleElement.FieldDeclId)) {\n\t be = new BaleElement.FieldDeclId(for_document,cur_parent,be.getStartOffset(),be.getEndOffset());\n\t }\n\t break;\n\t case ANNOT :\n\t if (!(be instanceof BaleElement.AnnotationId)) {\n\t be = new BaleElement.AnnotationId(for_document,cur_parent,be.getStartOffset(),be.getEndOffset());\n\t }\n\t break;\n\t case UNDEF :\n\t if (!(be instanceof BaleElement.UndefId)) {\n\t be = new BaleElement.UndefId(for_document,cur_parent,be.getStartOffset(),be.getEndOffset());\n\t }\n\t break;\n\t case BUILTIN :\n\t if (!(be instanceof BaleElement.BuiltinId)) {\n\t be = new BaleElement.BuiltinId(for_document,cur_parent,be.getStartOffset(),be.getEndOffset());\n\t }\n\t break;\n\t default :\n if (be.getClass() != BaleElement.Identifier.class) {\n\t be = new BaleElement.Identifier(for_document,cur_parent,be.getStartOffset(),be.getEndOffset());\n\t }\n\t break;\n }\n }\n\n be.setAstNode(sn);\n return be;\n}",
"public void importElement(XmlPullParser xpp, Epml epml) {\n\t\tlineNumber = xpp.getLineNumber();\n\t\t/*\n\t\t * Import all attributes of this element.\n\t\t */\n\t\timportAttributes(xpp, epml);\n\t\t/*\n\t\t * Create afresh stack to keep track of start tags to match.\n\t\t */\n\t\tArrayList<String> stack = new ArrayList<String>();\n\t\t/*\n\t\t * Add the current tag to this stack, as we still have to find the\n\t\t * matching end tag.\n\t\t */\n\t\tstack.add(tag);\n\t\t/*\n\t\t * As long as the stack is not empty, we're still working on this\n\t\t * object.\n\t\t */\n\t\twhile (!stack.isEmpty()) {\n\t\t\ttry {\n\t\t\t\t/*\n\t\t\t\t * Get next event.\n\t\t\t\t */\n\t\t\t\tint eventType = xpp.next();\n\t\t\t\tif (eventType == XmlPullParser.END_DOCUMENT) {\n\t\t\t\t\t/*\n\t\t\t\t\t * End of document. Should not happen.\n\t\t\t\t\t */\n\t\t\t\t\tepml.log(tag, xpp.getLineNumber(), \"Found end of document\");\n\t\t\t\t\treturn;\n\t\t\t\t} else if (eventType == XmlPullParser.START_TAG) {\n\t\t\t\t\t//System.out.println(xpp.getLineNumber() + \" <\" + xpp.getName() + \">\");\n\t\t\t\t\t/*\n\t\t\t\t\t * Start tag. Push it on the stack.\n\t\t\t\t\t */\n\t\t\t\t\tstack.add(xpp.getName());\n\t\t\t\t\t/*\n\t\t\t\t\t * If this tag is the second on the stack, then it is a\n\t\t\t\t\t * direct child.\n\t\t\t\t\t */\n\t\t\t\t\tif (stack.size() == 2) {\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t * For a direct child, check whether the tag is known.\n\t\t\t\t\t\t * If so, take proper action. Note that this needs not\n\t\t\t\t\t\t * to be done for other offspring.\n\t\t\t\t\t\t */\n\t\t\t\t\t\tif (importElements(xpp, epml)) {\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t * Known start tag. The end tag has been matched and\n\t\t\t\t\t\t\t * can be popped from the stack.\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tstack.remove(stack.size() - 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if ((eventType == XmlPullParser.END_TAG)) {\n\t\t\t\t\t//System.out.println(xpp.getLineNumber() + \" </\" + xpp.getName() + \">\");\n\t\t\t\t\t/*\n\t\t\t\t\t * End tag. Should be identical to top of the stack.\n\t\t\t\t\t */\n\t\t\t\t\tif (xpp.getName().equals(stack.get(stack.size() - 1))) {\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t * Yes it is. Pop the stack.\n\t\t\t\t\t\t */\n\t\t\t\t\t\tstack.remove(stack.size() - 1);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t * No it is not. XML violation.\n\t\t\t\t\t\t */\n\t\t\t\t\t\tepml.log(tag, xpp.getLineNumber(), \"Found \" + xpp.getName() + \", expected \"\n\t\t\t\t\t\t\t\t+ stack.get(stack.size() - 1));\n\t\t\t\t\t}\n\t\t\t\t} else if (eventType == XmlPullParser.TEXT) {\n\t\t\t\t\t/*\n\t\t\t\t\t * Plain text. Import it.\n\t\t\t\t\t */\n\t\t\t\t\timportText(xpp.getText(), epml);\n\t\t\t\t}\n\t\t\t} catch (Exception ex) {\n\t\t\t\tepml.log(tag, xpp.getLineNumber(), ex.getMessage());\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t/*\n\t\t * The element has been imported. Now is a good time to check its\n\t\t * validity.\n\t\t */\n\t\tcheckValidity(epml);\n\t}",
"private static void buildDetailedNode(Document document, NodeList childList, Node newHead) {\n Element detNode = document.createElement(\"offer\");\n for (int i = 0; i < childList.getLength(); i++) {\n Node current = childList.item(i);\n for (int j = 0; j < TableEntry.ENTRY_SIZE; j++) {\n if (current.getNodeName().equals(TableEntry.tags[j])) {\n Element element = document.createElement(current.getNodeName());\n element.setTextContent(current.getTextContent());\n detNode.appendChild(element);\n }\n }\n }\n newHead.appendChild(detNode);\n }",
"private void parse() {\n stack.push(documentNode);\n try {\n Token token = lexer.nextToken();\n boolean tagOpened = false;\n\n while (token.getType() != TokenType.EOF) {\n\n if (token.getType() == TokenType.TEXT) {\n TextNode textNode = new TextNode((String) token.getValue());\n ((Node) stack.peek()).addChild(textNode);\n\n } else if (token.getType() == TokenType.TAG_OPEN) {\n if (tagOpened) {\n throw new SmartScriptParserException(\"The tag was previously open but is not yet closed.\");\n }\n tagOpened = true;\n lexer.setState(LexerState.TAG);\n\n } else if (token.getType() == TokenType.TAG_NAME && token.getValue().equals(\"=\")) {\n parseEchoTag(tagOpened);\n tagOpened = false;\n\n } else if (token.getType() == TokenType.TAG_NAME && ((String) token.getValue()).matches(\"[Ff][Oo][Rr]\")) {\n parseForTag(tagOpened);\n tagOpened = false;\n\n } else if (token.getType() == TokenType.TAG_NAME && ((String) token.getValue()).matches(\"[Ee][Nn][Dd]\")) {\n parseEndTag();\n tagOpened = false;\n } else {\n throw new SmartScriptParserException(PARSE_ERROR);\n }\n token = lexer.nextToken();\n }\n if (!(stack.peek() instanceof DocumentNode)) {\n throw new SmartScriptParserException(PARSE_ERROR);\n }\n } catch (LexerException | EmptyStackException exc) {\n throw new SmartScriptParserException(PARSE_ERROR);\n }\n}",
"abstract protected UiElementNode getRootNode();",
"BElement createBElement();",
"public void closeElement() throws IOException {\r\n if (this.elements.size() <= 1) return;\r\n Element elt = popElement();\r\n this.depth--;\r\n // this is an empty element\r\n if (this.isNude) {\r\n writer.write('/');\r\n this.isNude = false;\r\n // the element contains text\r\n } else {\r\n if (elt.hasChildren) this.indent();\r\n this.writer.write('<');\r\n this.writer.write('/');\r\n int x = elt.qName.indexOf(' ');\r\n if (x < 0)\r\n this.writer.write(elt.qName);\r\n else\r\n this.writer.write(elt.qName.substring(0, x));\r\n }\r\n // restore previous mapping if necessary\r\n restorePrefixMapping(elt);\r\n this.writer.write('>');\r\n if (super.indent) this.writer.write('\\n');\r\n }",
"private Object read() throws XMLParseException {\n\t\tswitch (_tokenizer.next()) {\n\t\tdefault: break;\n\t\tcase ERROR: throw new XMLParseException(_tokenizer.getCurrentText());\n\t\tcase TEXT: return _tokenizer.getCurrentText();\n\t\tcase OPEN:\n\t\t\tElement result = new Element(_tokenizer.getCurrentName());\n\t\t\twhile (_tokenizer.next() == XMLTokenType.ATTR) {\n\t\t\t\tif (result.setAttr(_tokenizer.getCurrentName(), _tokenizer.getCurrentText()) != null) {\n\t\t\t\t\tthrow new XMLParseException(\"duplicate attribute: \" + _tokenizer.getCurrentName());\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (_tokenizer.current() == XMLTokenType.ECLOSE) {\n\t\t\t\t// System.out.println(\"ended /> for \" + result.getName());\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\tif (_tokenizer.current() != XMLTokenType.CLOSE) {\n\t\t\t\tthrow new XMLParseException(_tokenizer.getCurrentText());\n\t\t\t}\n\t\t\t_pending.push(result.getName());\n\t\t\twhile (_tokenizer.next() != XMLTokenType.ETAG) {\n\t\t\t\t/*if (_tokenizer.current() == XMLTokenType.END) {\n\t\t\t\t\tthrow new XMLParseException(\"Unexpected end of file\");\n\t\t\t\t}*/\n\t\t\t\tif (_tokenizer.current() == XMLTokenType.END) {\n\t\t\t\t\tif (isHTML) {\n\t\t\t\t\t\t_pending.pop();\n\t\t\t\t\t\treturn result;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new XMLParseException(\"Missing end tag for <\" + result.getName() + \">\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t_tokenizer.saveToken();\n\t\t\t\tresult.addContent(read());\n\t\t\t}\n\t\t\t_pending.pop();\n\t\t\tif (!_tokenizer.getCurrentName().equals(result.getName())) {\n\t\t\t\tif (isHTML) {\n\t\t\t\t\t// System.out.println(\"HTML backup for \" + result.getName());\n\t\t\t\t\tfor (String p : _pending) {\n\t\t\t\t\t\tif (_tokenizer.getCurrentName().equals(p)) {\n\t\t\t\t\t\t\t_tokenizer.saveToken();\n\t\t\t\t\t\t\t//System.out.println(\"implicitly ended by </\" + p + \">\");\n\t\t\t\t\t\t\treturn result;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthrow new XMLParseException(\"<\" + result.getName() + \"> ended with </\" + _tokenizer.getCurrentName() + \">\");\n\t\t\t}\n\t\t\treturn result;\n\t\tcase END: throw new XMLParseException(\"no XML element\");\n\t\t}\n\t\t// NB: if execution reaches here, we did something wrong.\n\t\tthrow new XMLParseException(\"internal error: what kind of token is this? \" + _tokenizer);\n\t}",
"private HTMLElement generateIntroElement(IntroElement element,\n \t\t\tint indentLevel) {\n \t\tif (element == null)\n \t\t\treturn null;\n \t\tswitch (element.getType()) {\n \t\t\tcase IntroElement.DIV :\n \t\t\t\treturn generateIntroDiv((IntroDiv) element, indentLevel);\n \t\t\tcase IntroElement.LINK :\n \t\t\t\treturn generateIntroLink((IntroLink) element, indentLevel);\n \t\t\tcase IntroElement.HTML :\n \t\t\t\treturn generateIntroHTML((IntroHTML) element, indentLevel);\n \t\t\tcase IntroElement.IMAGE :\n \t\t\t\treturn generateIntroImage((IntroImage) element, indentLevel);\n \t\t\tcase IntroElement.TEXT :\n \t\t\t\treturn generateIntroText((IntroText) element, indentLevel);\n \t\t\tdefault :\n \t\t\t\treturn null;\n \t\t}\n \t}",
"@Override\n\t\t\tpublic ElementVisitResult visitDocument(Element document, Integer depth) {\n\t\t\t\tprettyPrintElement(document);\n\t\t\t\treturn ElementVisitResult.CONTINUE;\n\t\t\t}",
"static boolean DirElemConstructor(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"DirElemConstructor\")) return false;\n if (!nextTokenIs(b, XMLSTARTTAGSTART)) return false;\n boolean r;\n Marker m = enter_section_(b);\n r = XmlEmptyTag(b, l + 1);\n if (!r) r = XmlFullTag(b, l + 1);\n exit_section_(b, m, null, r);\n return r;\n }",
"public T getRootElement();",
"public void addElement() {\n\t\tXmlNode newNode = new XmlNode(rootNode, this);// make a new default-type field\n\t\taddElement(newNode);\n\t}",
"public abstract WalkerDocument newDocument(DocumentTag adapter, IOptions options);",
"@Test\n public void setSiblingParent() throws Exception {\n DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n DocumentBuilder builder = factory.newDocumentBuilder();\n Document mockdoc = builder.newDocument();\n Element root = mockdoc.createElement(\"root\");\n Element root1 = mockdoc.createElement(\"root1\");\n Element root2 = mockdoc.createElement(\"root2\");\n Element root12 = mockdoc.createElement(\"root12\");\n Element root22 = mockdoc.createElement(\"root22\");\n\n mockdoc.appendChild(root);\n root.appendChild(root1);\n root.appendChild(root2);\n root1.appendChild(root12);\n root1.appendChild(root22);\n\n Tester tester=new Tester();\n assertFalse(tester.test(root)==root1);\n assertFalse(tester.setSiblingParent(root)==root1);\n\n\n }",
"private XMLDocument startElement(String name, boolean closeTag) {\r\n return this.startElement(name, null, closeTag);\r\n }",
"public DocumentManipulator() {\n\t\ttry {\n\t\t\tthis.document = XMLUtils.buildDocument();\n\t\t} catch (UnsupportedEncodingException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (SAXException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (ParserConfigurationException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t//-- Init Xpath\n\t\tinit();\n\t}",
"void addChild(BaleElement be)\n{\n if (be.isLeaf()) {\n line_elements.add(be);\n if (be.isEndOfLine()) {\n\t addLine();\n\t line_elements.clear();\n }\n }\n else {\n for (int i = 0; i < be.getElementCount(); ++i) {\n\t BaleElement ce = be.getBaleElement(i);\n\t if (ce.getStartOffset() >= 0)\n\t addChild(ce);\n }\n }\n}",
"@Test\n public void newParagraphInSpan()\n {\n \n rootDSL.addChild(paragraph().addChild(span(\"style\", \"bold\").addChild(text(\"b\"))));\n \n TreeOperation insert = new TreeNewParagraph(SITE_ID, 0);\n insert.execute(rootDSL.getTree());\n\n //expectedRootDSL.getTree() = <p>[]</p><p><span bold>[b]</span></p>\n expectedRootDSL.addChild(paragraph().addChild(text(\"\")),\n paragraph().addChild(span(\"style\", \"bold\").addChild(text(\"b\"))));\n \n assertEquals(\"Invalid tree\", expectedRootDSL.getTree(), rootDSL.getTree());\n }",
"W getRootElement();",
"private DocumentFragment selectFrom(Node n, Module mod) {\n DocumentFragment local_df = mod.getDoc().createDocumentFragment();\n if (isWanted(n)) {\n\n local_df.appendChild(mod.getDoc().importNode(n.cloneNode(true), true));\n if (local_df.getLastChild().getNodeName().compareToIgnoreCase(\"img\") == 0) {\n // we make this a default wxtimage or not \n //((Element)local_df.getLastChild()).setAttribute(\"class\",\"wxtimage\");\n }\n return local_df;\n }\n\n if (n.hasChildNodes()) {\n Node child = n.getFirstChild();\n while (child != null) {\n local_df.appendChild(selectFrom(child, mod));\n child = child.getNextSibling();\n }\n\n }\n return local_df;\n }",
"org.landxml.schema.landXML11.BridgeElementDocument.BridgeElement addNewBridgeElement();",
"public Document decoratePosition (Document parseTree);",
"private void parseDocument()\n {\n\tElement docEle = dom.getDocumentElement();\n\n\t// get a nodelist of <employee> elements\n\tNodeList nl = docEle.getElementsByTagName(\"path\");\n\tif (nl != null && nl.getLength() > 0)\n\t{\n\t for (int i = 0; i < nl.getLength(); i++)\n\t {// System.out.println(i);\n\n\t\t// get the employee element\n\t\tElement el = (Element) nl.item(i);\n\n\t\t// get the Employee object\n\t\tmakeRoom(el);\n\n\t }\n\n\t //Log.d(\"NUMROOMS\", \"numRooms = \" + numDetectedRooms + \" \" + \"numHallways = \" + numDetectedHallways);\n\t}\n\t// This will read in the numbers. This is possibly useful for giving the rooms their correct numbers.\n\t// Find all of the glyphs within the room using it's coordinates and the ID designated by roomsMap.\n\t// Organize their coordinates from left to right and translate the filename to what number they are.\n\t// These numbers from left to right are the room number.\n\n\t/*\n\t * NodeList glyphs = docEle.getElementsByTagName(\"use\"); if (nl != null && glyphs.getLength() > 0) { for (int i = 0; i < glyphs.getLength(); i++) {\n\t * \n\t * //get the employee element Element el = (Element) glyphs.item(i); //System.out.println(el.getAttribute(\"id\")); String x = el.getAttribute(\"x\"); String y = el.getAttribute(\"y\");\n\t * \n\t * //Create a new Employee with the value read from the xml nodes\n\t * \n\t * myGlyphs.add(new Point((int)Double.parseDouble(x), (int)(Double.parseDouble(y))));\n\t * \n\t * } }\n\t */\n\n\t//Log.d(Constants.TAG, \"XMLReader::parseDocument() Exiting!\");\n }",
"protected abstract T parentElementFor(T child) throws SAXException;",
"private static Document createCopiedDocument(Document originalDocument) {\n DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\n DocumentBuilder db;\n Document copiedDocument = null;\n try {\n db = dbf.newDocumentBuilder();\n Node originalRoot = originalDocument.getDocumentElement();\n copiedDocument = db.newDocument();\n Node copiedRoot = copiedDocument.importNode(originalRoot, true);\n copiedDocument.appendChild(copiedRoot);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n return copiedDocument;\n }",
"@org.junit.Test\n public void constrCompelemNested1() {\n final XQuery query = new XQuery(\n \"element elem {1, element a {2, element b {element c {}, element d {3}}, 4}}\",\n ctx);\n try {\n result = new QT3Result(query.value());\n } catch(final Throwable trw) {\n result = new QT3Result(trw);\n } finally {\n query.close();\n }\n test(\n assertSerialization(\"<elem>1<a>2<b><c/><d>3</d></b>4</a></elem>\", false)\n );\n }",
"public static Document createDocument(final Element element) {\n\t\tfinal DOMImplementation domImplementation = element.getOwnerDocument().getImplementation(); //get the DOM implementation used to create the document\n\t\t//create a new document corresponding to the element\n\t\t//TODO bring over the doctype, if needed\n\t\tfinal Document document = domImplementation.createDocument(element.getNamespaceURI(), element.getNodeName(), null);\n\t\tfinal Node importedNode = document.importNode(element, true); //import the element into our new document\n\t\tdocument.replaceChild(importedNode, document.getDocumentElement()); //set the element clone as the document element of the new document\n\t\treturn document; //return the document we created\n\t}",
"public void init() { \n\t\ttry { \n\t\t\tDocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); \n\t\t\tDocumentBuilder builder = factory.newDocumentBuilder(); \n\t\t\tthis.document = builder.newDocument(); \n\t\t\tlogger.info(\"initilize the document success.\");\n\t\t} catch (ParserConfigurationException e) { \n\t\t\t\n\t\t\tlogger.error(e.getMessage());\n\t\t} \n\t}",
"public Node createDOMSubtree(final Document doc) {\n int i;\n String aName;\n Node childNode;\n Element element;\n IBiNode tmp;\n\n element = doc.createElementNS(this.namespaceURI, this.eName);\n\n // add attributes\n if (this.attrs != null) {\n for (i = 0; i < this.attrs.getLength(); i++) {\n aName = this.attrs.getLocalName(i);\n\n if (\"\".equals(aName)) {\n aName = this.attrs.getQName(i);\n }\n\n element.setAttribute(aName, this.attrs.getValue(i));\n }\n }\n\n // create DOM-tree of children\n if (this.child != null) {\n tmp = this.child;\n\n while (tmp != null) {\n childNode = tmp.createDOMSubtree(doc);\n\n if (childNode != null) {\n element.appendChild(childNode);\n }\n\n tmp = tmp.getSibling();\n }\n }\n\n this.namespaceURI = null;\n this.eName = null;\n this.attrs = null;\n\n this.setNode(element);\n return element;\n }",
"private Document doMerge(Document[] docs) throws AbstractXmlMergeException\n {\n Document originalDoc = docs[0];\n\n for (int i = 1; i < docs.length; i++)\n {\n\n if (!m_rootMatcher.matches(originalDoc.getRootElement(), docs[i].getRootElement()))\n {\n throw new IllegalArgumentException(\"Root elements do not match.\");\n }\n\n Document output = new Document();\n if (originalDoc.getDocType() != null)\n {\n output.setDocType((DocType) originalDoc.getDocType().clone());\n }\n output.setRootElement(new Element(\"root\"));\n\n m_rootMergeAction.perform(originalDoc.getRootElement(), docs[i].getRootElement(),\n output.getRootElement());\n\n Element root = (Element) output.getRootElement().getChildren().get(0);\n root.detach();\n\n originalDoc.setRootElement(root);\n }\n\n return originalDoc;\n }",
"public Element getRootElement() {\r\n \r\n assert iRootElement!=null;\r\n \r\n return iRootElement;//here you go\r\n \r\n }",
"protected abstract Element toXmlEx(Document doc);",
"private SchemaComponent findOutermostParentElement(){\n SchemaComponent element = null;\n //go up the tree and look for the last instance of <element>\n\tSchemaComponent sc = getParent();\n while(sc != null){\n if(sc instanceof Element){\n element = sc;\n }\n\t sc = sc.getParent();\n }\n return element;\n }",
"public XMLDocument endElement() {\r\n return this.endElement(null);\r\n }",
"private Element parseRoot() {\r\n \r\n assert iMessage!=null;\r\n assert iIndex>=0;\r\n assert iIndex<=iMessage.length();\r\n \r\n while (peek()<=' ') next();//skip whitespace\r\n switch (peek()) {//switch on next character\r\n case 'n': return new ScalarElement(parseNull());//parse null \r\n case 'f': return new ScalarElement(parseBoolean());//parse false\r\n case 't': return new ScalarElement(parseBoolean());//parse true\r\n case '[': return new ArrayElement(parseArray());//parse array \r\n case '{': return new ObjectElement(parseObject());//parse object\r\n default : throw new RuntimeException(\"Invalid syntax : \"+context());//ruh roh\r\n }//switch on next character\r\n \r\n }",
"private void addSubnodes( Element root, int num ) {\r\n\t\t// element elements\r\n\t\tElement element = doc.createElement(\r\n\t\t\tUtils.replaceWhitespaces(\r\n\t\t\t\tInputs.getStr( \"¿Nombre del elemento \" + num + \"?\" ), '_'\r\n\t\t\t)\r\n\t\t);\r\n\t\telement.appendChild( \r\n\t\t\tdoc.createTextNode(\r\n\t\t\t\tInputs.getStr( \"¿Texto del elemento?\" )\r\n\t\t\t)\r\n\t\t);\r\n\t\troot.appendChild( element );\r\n\r\n\t\t// set attributes to element\r\n\t\twhile ( Inputs.confirm( \"¿Añadir un atributo?\" )) {\r\n\r\n\t\t\taddAttr( element );\r\n\t\t}\r\n\t}",
"@Override\n public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException {\n // <document>\n if (localName.equals(\"document\")) {\n curArticle = new ArticleSmallOpinion();\n curTagiot = new ArrayList<Tagit>();\n\n // add values\n if (atts.getValue(\"doc_id\") != null) curArticle.setDoc_id(atts.getValue(\"doc_id\"));\n if (atts.getValue(\"title\") != null) curArticle.setTitle(atts.getValue(\"title\"));\n if (atts.getValue(\"sub_title\") != null) curArticle.setSubTitle(atts.getValue(\"sub_title\"));\n if (atts.getValue(\"f7\") != null) curArticle.setF7(atts.getValue(\"f7\"));\n String author = atts.getValue(\"author_icon\");\n author = extractImageUrl(author);\n if (atts.getValue(\"author_icon\") != null) curArticle.setAuthorImgURL(author);\n if (atts.getValue(\"Created_On\") != null) curArticle.setCreatedOn(atts.getValue(\"Created_On\"));\n\n }\n // <f2>\n else if (localName.equals(\"f2\")) {\n if (atts.getValue(\"src\") != null) curArticle.setF2(atts.getValue(\"src\"));\n\n // currently not holding image photographer via \"title=\"\n }\n // <f3>\n if (localName.equals(\"f3\")) {\n if (atts.getValue(\"src\") != null) curArticle.setF3(atts.getValue(\"src\"));\n // currently not holding image photographer via \"title=\"\n }\n // <f4>\n else if (localName.equals(\"f4\")) {\n if (atts.getValue(\"src\") != null) curArticle.setF4(atts.getValue(\"src\"));\n // currently not holding image photographer via \"title=\"\n }\n // <tagit>\n else if (localName.equals(\"tagit\")) {\n Tagit tagit = new Tagit(atts.getValue(\"id\"), atts.getValue(\"simplified\"), \"\");\n curTagiot.add(tagit);\n }\n\n }",
"public Document fromJsoup(final net.simpleframework.lib.org.jsoup.nodes.Document in) {\n\t\tValidate.notNull(in);\n\t\tDocumentBuilder builder;\n\t\ttry {\n\t\t\tbuilder = factory.newDocumentBuilder();\n\t\t\tfinal DOMImplementation impl = builder.getDOMImplementation();\n\t\t\tDocument out;\n\n\t\t\tout = builder.newDocument();\n\t\t\tfinal net.simpleframework.lib.org.jsoup.nodes.DocumentType doctype = in.documentType();\n\t\t\tif (doctype != null) {\n\t\t\t\tfinal org.w3c.dom.DocumentType documentType = impl.createDocumentType(doctype.name(),\n\t\t\t\t\t\tdoctype.publicId(), doctype.systemId());\n\t\t\t\tout.appendChild(documentType);\n\t\t\t}\n\t\t\tout.setXmlStandalone(true);\n\n\t\t\tconvert(in, out);\n\t\t\treturn out;\n\t\t} catch (final ParserConfigurationException e) {\n\t\t\tthrow new IllegalStateException(e);\n\t\t}\n\t}",
"protected XMLElement createAnotherElement() {\n return new XMLElement(this.conversionTable,\n this.skipLeadingWhitespace,\n false,\n this.ignoreCase);\n }",
"public void loadData(){\n try {\n entities.clear();\n\n DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();\n Document document = documentBuilder.parse(fileName);\n\n Node root = document.getDocumentElement();\n NodeList nodeList = root.getChildNodes();\n for (int i = 0; i < nodeList.getLength(); i++){\n Node node = nodeList.item(i);\n if (node.getNodeType() == Node.ELEMENT_NODE){\n Element element = (Element) node;\n Department department = createDepartmentFromElement(element);\n try{\n super.save(department);\n } catch (RepositoryException | ValidatorException e) {\n e.printStackTrace();\n }\n }\n }\n } catch (SAXException | ParserConfigurationException | IOException e) {\n e.printStackTrace();\n }\n }",
"public Document augmentDocumentXml(Document document) throws IOException, SAXException {\n\t\tString fileName = getBbnFileName(document);\n\n\t\t// move to the next BBN file if necessary\n\t\t// this will be efficient if the documents are passed in WSJ order as it avoids reloading the same file\n\t\tif (!fileName.equals(currentBbnFile)) {\n\t\t\tFile xmlFile = new File(StaticConfig.bbnPath + fileName);\n\t\t\txmlReader.parse(new InputSource(xmlFile.getPath()));\n\t\t\tcurrentBbnFile = fileName;\n\t\t}\n\n\t\tList<String> tags = handler.getTags(document.docId.getFileStr());\n\t\tList<Token> tokenList = document.tokenList;\n\n\t\t// sanity check: same number of tokens?\n\t\tif (tags.size() != tokenList.size()) {\n\t\t\tthrow new Error(\"Tag and token counts differ\");\n\t\t}\n\n\t\t// align tags and tokens\n\t\tfor (int i = 0; i < tokenList.size(); i++) {\n\t\t\tToken token = tokenList.get(i);\n\t\t\tString neTag = tags.get(i);\n\t\t\ttoken.goldNer = neTag;\n\t\t}\n\n\t\treturn document;\n\t}",
"private void listChildren(Node current) {\n if(current instanceof Element){ //finds the element tags in the XML document with XOM parser\n Element temp = (Element) current;\n switch(temp.getQualifiedName()) {\n case (\"grapes\"): //grapes tag doesn't do anything in particular except instantiating the file\n break;\n\n case (\"grape\"):\n createGrape(temp);\n break;\n\n case (\"seed\"):\n createSeed(temp);\n break;\n\n default:\n throw new IllegalArgumentException(\"Invalid input in XML \" ); //any other element type is not supported in our XML formatted file\n }\n }\n\n for (int i = 0; i < current.getChildCount(); i++) {\n listChildren(current.getChild(i)); //recursive call traverses the XML document in preorder\n }\n\n }",
"static boolean XmlOpeningTagPart(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"XmlOpeningTagPart\")) return false;\n if (!nextTokenIs(b, XMLSTARTTAGSTART)) return false;\n boolean r, p;\n Marker m = enter_section_(b, l, _NONE_);\n r = consumeToken(b, XMLSTARTTAGSTART);\n p = r; // pin = 1\n r = r && report_error_(b, XmlTagName(b, l + 1));\n r = p && report_error_(b, XmlOpeningTagPart_2(b, l + 1)) && r;\n r = p && report_error_(b, XmlOpeningTagPart_3(b, l + 1)) && r;\n r = p && report_error_(b, XmlOpeningTagPart_4(b, l + 1)) && r;\n r = p && consumeToken(b, XMLTAGEND) && r;\n exit_section_(b, l, m, r, p, null);\n return r || p;\n }",
"private Doc(String documentElementName) {\n e = d.createElement(documentElementName);\n d.appendChild(e);\n }",
"private static void buildDoublesNode(Document document, NodeList childList, Node newHead) {\n Element doublNode = document.createElement(\"item\");\n Element doublID = document.createElement(\"id\");\n Element doublParent = document.createElement(\"parent\");\n doublNode.appendChild(doublID);\n doublNode.appendChild(doublParent);\n for (int i = 0; i < childList.getLength(); i++) {\n if (childList.item(i).getNodeName().equals(\"id\"))\n doublID.setTextContent(childList.item(i).getTextContent());\n if (childList.item(i).getNodeName().equals(\"parent\")) {\n NodeList parentItemList = childList.item(i).getChildNodes();\n for (int j = 0; j < parentItemList.getLength(); j++) {\n if (parentItemList.item(j).getNodeName().equals(\"item\")) {\n Element innerParentItem = document.createElement(\"item\");\n innerParentItem.setTextContent(parentItemList.item(j).getTextContent());\n doublParent.appendChild(innerParentItem);\n }\n }\n }\n }\n newHead.appendChild(doublNode);\n }",
"private Object addElement(XmlElement e, Method method, Object[] args) {\n/* 167 */ Class<?> rt = method.getReturnType();\n/* */ \n/* */ \n/* 170 */ String nsUri = \"##default\";\n/* 171 */ String localName = method.getName();\n/* */ \n/* 173 */ if (e != null) {\n/* */ \n/* 175 */ if (e.value().length() != 0)\n/* 176 */ localName = e.value(); \n/* 177 */ nsUri = e.ns();\n/* */ } \n/* */ \n/* 180 */ if (nsUri.equals(\"##default\")) {\n/* */ \n/* 182 */ Class<?> c = method.getDeclaringClass();\n/* 183 */ XmlElement ce = c.<XmlElement>getAnnotation(XmlElement.class);\n/* 184 */ if (ce != null) {\n/* 185 */ nsUri = ce.ns();\n/* */ }\n/* */ \n/* 188 */ if (nsUri.equals(\"##default\"))\n/* */ {\n/* 190 */ nsUri = getNamespace(c.getPackage());\n/* */ }\n/* */ } \n/* */ \n/* */ \n/* 195 */ if (rt == void.class) {\n/* */ \n/* */ \n/* 198 */ boolean isCDATA = (method.getAnnotation(XmlCDATA.class) != null);\n/* */ \n/* 200 */ StartTag st = new StartTag(this.document, nsUri, localName);\n/* 201 */ addChild(st);\n/* 202 */ for (Object arg : args) {\n/* */ Text text;\n/* 204 */ if (isCDATA) { text = new Cdata(this.document, st, arg); }\n/* 205 */ else { text = new Pcdata(this.document, st, arg); }\n/* 206 */ addChild(text);\n/* */ } \n/* 208 */ addChild(new EndTag());\n/* 209 */ return null;\n/* */ } \n/* 211 */ if (TypedXmlWriter.class.isAssignableFrom(rt))\n/* */ {\n/* 213 */ return _element(nsUri, localName, rt);\n/* */ }\n/* */ \n/* 216 */ throw new IllegalSignatureException(\"Illegal return type: \" + rt);\n/* */ }",
"@Override\npublic\tvoid parseInput() {\n InputStream is = new ByteArrayInputStream(this.body.toString().getBytes());\n\t\t\n\t\t\n\t\ttry {\n\t\t\tthis.domIn = new XMLInputConversion(is);\n\t\t} catch (ParserConfigurationException | SAXException | IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tthis.rootXML = this.domIn.extractDOMContent();\n\t}",
"RootNode getRootNode();",
"private HTMLElement generateHTMLElement() {\n \t\t// this is the outermost element, so it has no indent\n \t\tint indentLevel = 0;\n \t\tHTMLElement html = new FormattedHTMLElement(\n \t\t\t\tIIntroHTMLConstants.ELEMENT_HTML, indentLevel, true);\n \t\tHTMLElement head = generateHeadElement(indentLevel + 1);\n \t\tHTMLElement body = generateBodyElement(indentLevel + 1);\n \t\thtml.addContent(head);\n \t\thtml.addContent(body);\n \t\treturn html;\n \t}",
"public void parseXml(String file) {\n\n try {\n\n debug(\"\\n\\nIn the beginning God created the heaven and the world...\\n\\n\");\n\n File fXmlFile = new File(\"./levels/\" + file);\n DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();\n Document doc = dBuilder.parse(fXmlFile);\n\n doc.getDocumentElement().normalize();\n debug(\"Chosen entity: \" + doc.getDocumentElement().getNodeName());\n\n NodeList placeList = doc.getElementsByTagName(\"place\");\n NodeList passageList = doc.getElementsByTagName(\"passage\");\n NodeList furnitureList = doc.getElementsByTagName(\"furniture\");\n NodeList storyList = doc.getElementsByTagName(\"story\");\n\n // Create object arrays\n ArrayList<Place> places = new ArrayList<>();\n ArrayList<Item> items = new ArrayList<>();\n ArrayList<Passage> passages = new ArrayList<>();\n ArrayList<Furniture> furnitures = new ArrayList<Furniture>();\n\n // parse story text\n Node storyNode = storyList.item(0);\n Element storyElement = (Element) storyNode;\n debug(\"Intro: \" + storyElement.getElementsByTagName(\"introduction\").item(0).getTextContent());\n debug(\"Level: \" + storyElement.getElementsByTagName(\"name\").item(0).getTextContent());\n debug(\"Version: \" + storyElement.getElementsByTagName(\"version\").item(0).getTextContent());\n // add story elements to world\n world.setIntroduction(\n storyElement.getElementsByTagName(\"introduction\").item(0).getTextContent());\n world.setLevelName(storyElement.getElementsByTagName(\"name\").item(0).getTextContent());\n world.setLevelVersion(storyElement.getElementsByTagName(\"version\").item(0).getTextContent());\n\n // parse all existing Places\n for (int placeCounter = 0; placeCounter < placeList.getLength(); placeCounter++) {\n Node placeNode = placeList.item(placeCounter);\n\n debug(\"\\nCurrent Element: \" + placeNode.getNodeName());\n\n if (placeNode.getNodeType() == Node.ELEMENT_NODE) {\n Element placeElement = (Element) placeNode;\n\n debug(\"- Ending: \" + placeElement.getAttribute(\"end\"));\n debug(\"- id: \" + placeElement.getAttribute(\"id\"));\n debug(\"- Name: \" + placeElement.getElementsByTagName(\"name\").item(0).getTextContent());\n debug(\"- Description: \"\n + placeElement.getElementsByTagName(\"description\").item(0).getTextContent());\n\n // Create Places.\n places.add(new Place(placeElement.getElementsByTagName(\"name\").item(0).getTextContent(),\n placeElement.getElementsByTagName(\"description\").item(0).getTextContent().replace(\"\\\\n\", \"\\n\")));\n\n // add EndingPlace to World, set endingText to Places' Description\n if (placeElement.getAttribute(\"end\").equals(\"bad\")) {\n world.addBadEnding(places.get(placeCounter),\n places.get(placeCounter).getDescription());\n } else if(placeElement.getAttribute(\"end\").equals(\"good\")) {\n world.addGoodEnding(places.get(placeCounter),\n places.get(placeCounter).getDescription());\n }\n \n // parse all existing Place Items\n NodeList itemList = placeElement.getElementsByTagName(\"item\");\n\n for (int itemCounter = 0; itemCounter < itemList.getLength(); itemCounter++) {\n Node itemNode = itemList.item(itemCounter);\n\n Element itemElement = (Element) itemNode;\n\n debug(\"- Item\" + itemCounter + \":\");\n debug(\"- - Name: \" + itemElement.getElementsByTagName(\"name\").item(0).getTextContent());\n debug(\"- - Description: \"\n + itemElement.getElementsByTagName(\"description\").item(0).getTextContent());\n\n // Create items.\n items.add(new Item(itemElement.getElementsByTagName(\"name\").item(0).getTextContent(),\n itemElement.getElementsByTagName(\"description\").item(0).getTextContent()));\n // Set items in current place.\n places.get(placeCounter).addObjectToPlace(getIncludedItem(itemElement, items));\n\n }\n }\n }\n\n // parse all furniture\n for (int furnitureCounter = 0; furnitureCounter < furnitureList\n .getLength(); furnitureCounter++) {\n Node furnitureNode = furnitureList.item(furnitureCounter);\n\n Element furnitureElement = (Element) furnitureNode;\n\n debug(\"\\nCurrent Element: \" + furnitureNode.getNodeName());\n\n debug(\"- Furniture\" + furnitureCounter);\n debug(\"- - In Place: \"\n + furnitureElement.getElementsByTagName(\"in-place\").item(0).getTextContent());\n debug(\n \"- - Name: \" + furnitureElement.getElementsByTagName(\"name\").item(0).getTextContent());\n debug(\"- - Description: \"\n + furnitureElement.getElementsByTagName(\"description\").item(0).getTextContent());\n\n // Create furniture objects\n furnitures.add(\n new Furniture(furnitureElement.getElementsByTagName(\"name\").item(0).getTextContent(), // name\n furnitureElement.getElementsByTagName(\"description\").item(0).getTextContent(), // description\n furnitureElement.getElementsByTagName(\"in-place\").item(0).getTextContent()));\n\n NodeList furnitureItemList = furnitureElement.getElementsByTagName(\"content-item\");\n\n // parse all Furniture Items\n for (int furnitureItemCounter = 0; furnitureItemCounter < furnitureItemList\n .getLength(); furnitureItemCounter++) {\n Node furnitureItemNode = furnitureItemList.item(furnitureItemCounter);\n\n Element furnitureItemElement = (Element) furnitureItemNode;\n\n debug(\"- - Content Items:\");\n debug(\"- - - Name: \"\n + furnitureItemElement.getElementsByTagName(\"name\").item(0).getTextContent());\n debug(\"- - - Description: \"\n + furnitureItemElement.getElementsByTagName(\"description\").item(0).getTextContent());\n\n addItems(furnitureItemElement, furnitures, items, furnitureCounter);\n\n }\n\n NodeList furnitureObstacleList = furnitureElement.getElementsByTagName(\"obstacle\");\n\n // parse all Furniture Obstacles\n for (int furnitureObstacleCounter = 0; furnitureObstacleCounter < furnitureObstacleList\n .getLength(); furnitureObstacleCounter++) {\n Node furnitureObstacleNode = furnitureObstacleList.item(furnitureObstacleCounter);\n\n Element furnitureObstacleElement = (Element) furnitureObstacleNode;\n\n debug(\"- - Obstacle:\");\n debug(\"- - - Description: \" + furnitureObstacleElement.getElementsByTagName(\"description\")\n .item(0).getTextContent());\n debug(\"- - - Resolution: \" + furnitureObstacleElement.getElementsByTagName(\"resolution\")\n .item(0).getTextContent());\n // debug(\"- - - Requirement: \" +\n // furnitureObstacleElement.getElementsByTagName(\"requiredItem\").item(0).getTextContent());\n\n // create furniture obstacle\n if (furnitureObstacleElement.getAttribute(\"type\").equals(\"double\")) {\n // double Item obstacle\n furnitures.get(furnitureCounter)\n .setObstalce(new DoubleItemObstacle(\"\",\n furnitureObstacleElement.getElementsByTagName(\"description\").item(0)\n .getTextContent(),\n furnitureObstacleElement.getElementsByTagName(\"resolution\").item(0)\n .getTextContent(),\n getRequiredItem(items,\n furnitureObstacleElement.getElementsByTagName(\"requiredItem\").item(0)\n .getTextContent()),\n getRequiredItem(items, furnitureObstacleElement\n .getElementsByTagName(\"additionalItem\").item(0).getTextContent())));\n\n } else if (furnitureObstacleElement.getAttribute(\"type\").equals(\"riddle\")) {\n // riddle Obstacle\n furnitures.get(furnitureCounter)\n .setObstalce(new RiddleObstacle(\"\",\n furnitureObstacleElement.getElementsByTagName(\"description\").item(0)\n .getTextContent(),\n furnitureObstacleElement.getElementsByTagName(\"resolution\").item(0)\n .getTextContent(),\n furnitureObstacleElement.getElementsByTagName(\"requiredAnswer\").item(0)\n .getTextContent()));\n\n } else {\n // normal Obstacle\n furnitures.get(furnitureCounter)\n .setObstalce(new ItemObstacle(\"\",\n furnitureObstacleElement.getElementsByTagName(\"description\").item(0)\n .getTextContent(),\n furnitureObstacleElement.getElementsByTagName(\"resolution\").item(0)\n .getTextContent(),\n getRequiredItem(items, furnitureObstacleElement\n .getElementsByTagName(\"requiredItem\").item(0).getTextContent())));\n }\n // add damage points to obstacle\n if (!furnitureObstacleElement.getAttribute(\"damage\").equals(\"\")) {\n passages.get(furnitureCounter).getObstacle()\n .setDamagepoints(Integer.parseInt(furnitureObstacleElement.getAttribute(\"damage\")));\n }\n\n }\n\n }\n\n // Add current furniture to its containing Place\n setFurnitureInPlace(furnitures, places);\n\n // parse all existing passages\n for (int passageCounter = 0; passageCounter < passageList.getLength(); passageCounter++) {\n Node passageNode = passageList.item(passageCounter);\n\n debug(\"\\nCurrent Element: \" + passageNode.getNodeName());\n\n if (passageNode.getNodeType() == Node.ELEMENT_NODE) {\n Element passageElement = (Element) passageNode;\n\n debug(\"- id: \" + passageElement.getAttribute(\"id\"));\n debug(\"- Name: \" + passageElement.getElementsByTagName(\"name\").item(0).getTextContent());\n debug(\"- Description: \"\n + passageElement.getElementsByTagName(\"description\").item(0).getTextContent());\n debug(\"- Comes from: \"\n + passageElement.getElementsByTagName(\"comeFrom\").item(0).getTextContent());\n debug(\"- Connects to: \"\n + passageElement.getElementsByTagName(\"connectTo\").item(0).getTextContent());\n\n // Create Passage with connected Places.\n passages\n .add(new Passage(passageElement.getElementsByTagName(\"name\").item(0).getTextContent(),\n passageElement.getElementsByTagName(\"description\").item(0).getTextContent(),\n getFromPlace(passageElement, places), // from this Place\n getFollowPlace(passageElement, places)) // to that Place\n );\n\n // parse all existing Passage Obstacles\n NodeList obstacleList = passageElement.getElementsByTagName(\"obstacle\");\n\n for (int obstacleCounter = 0; obstacleCounter < obstacleList\n .getLength(); obstacleCounter++) {\n Node obstacleNode = obstacleList.item(obstacleCounter);\n\n Element obstacleElement = (Element) obstacleNode;\n\n debug(\"- Obstacle\" + passageCounter + \":\");\n debug(\"- - Description: \"\n + obstacleElement.getElementsByTagName(\"description\").item(0).getTextContent());\n debug(\"- - Resolution: \"\n + obstacleElement.getElementsByTagName(\"resolution\").item(0).getTextContent());\n // debug(\"- - Required Item: \" +\n // obstacleElement.getElementsByTagName(\"requiredItem\").item(0).getTextContent());\n\n // Create the obstacle for each passage.\n if (obstacleElement.getAttribute(\"type\").equals(\"double\")) {\n // double Item obstacle\n passages.get(passageCounter)\n .setObstacle(new DoubleItemObstacle(\"\",\n obstacleElement.getElementsByTagName(\"description\").item(0).getTextContent(),\n obstacleElement.getElementsByTagName(\"resolution\").item(0).getTextContent(),\n getRequiredItem(items,\n obstacleElement.getElementsByTagName(\"requiredItem\").item(0)\n .getTextContent()),\n getRequiredItem(items, obstacleElement.getElementsByTagName(\"additionalItem\")\n .item(0).getTextContent())));\n\n } else if (obstacleElement.getAttribute(\"type\").equals(\"riddle\")) {\n // riddle Obstacle\n passages.get(passageCounter).setObstacle(new RiddleObstacle(\"\",\n obstacleElement.getElementsByTagName(\"description\").item(0).getTextContent(),\n obstacleElement.getElementsByTagName(\"resolution\").item(0).getTextContent(),\n obstacleElement.getElementsByTagName(\"requiredAnswer\").item(0).getTextContent()));\n\n } else {\n // normal Obstacle\n passages.get(passageCounter)\n .setObstacle(new ItemObstacle(\"\",\n obstacleElement.getElementsByTagName(\"description\").item(0).getTextContent(),\n obstacleElement.getElementsByTagName(\"resolution\").item(0).getTextContent(),\n getRequiredItem(items, obstacleElement.getElementsByTagName(\"requiredItem\")\n .item(0).getTextContent())));\n }\n\n // add damage points to obstacle\n if (!obstacleElement.getAttribute(\"damage\").equals(\"\")) {\n passages.get(passageCounter).getObstacle()\n .setDamagepoints(Integer.parseInt(obstacleElement.getAttribute(\"damage\")));\n }\n\n\n }\n }\n }\n\n startingPlace = places.get(0);\n\n // Add Places to GameWorld\n addPlacesToWorld(places, world);\n\n // set starting Place in GameWorld\n if (world.getStartingPlace() == null) {\n world.setStartingPlace(startingPlace);\n }\n\n debug(\"\\n\\n\");\n debug(\"World has successfully been created! God saw all that he had made, and it was good.\");\n debug(\"\\n\\n\\n\\n\");\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }",
"public Document setUpDocumentToParse() throws ParserConfigurationException, SAXException, IOException{\n\t\tFile file = new File (dataFilePath);\n\t\tDocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();\n\t\tDocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();\n\t\tDocument document = documentBuilder.parse(file);\n\n\t\treturn document;\n\t}",
"@Override\r\n public FirstElement documentBodyParse(String filePath) {\n return null;\r\n }",
"private void addSubnodes( Element root, String node_name ) {\r\n\t\t// element elements\r\n\t\tElement element = doc.createElement( node_name );\r\n\t\troot.appendChild( element );\r\n\r\n\t\t// set attributes to element\r\n\t\twhile ( Inputs.confirm( \"¿Añadir un atributo?\" )) {\r\n\r\n\t\t\taddAttr( element );\r\n\t\t}\r\n\r\n\r\n\t\tint num = Inputs.getInt( \"¿Cuántos sub-elementos tiene <\" + node_name + \">?\" );\r\n\r\n\t\tfor ( int i = 0; i < num; i++ ) {\r\n\r\n\t\t\taddSubnodes( element, ( i + 1 ));\r\n\t\t}\r\n\t}",
"@Override\n public Element serialize(Node node, SerializationPosition state) {\n Element doc = state.doc;\n DefaultMutableTreeNode treeNode = state.currPos;\n \n Object value = treeNode.getUserObject();\n Element parentElement = null; \n \n parentElement = doc.getOwnerDocument().createElement(\"directory\");\n\n Directory book = (Directory) value;\n // Apply properties to root element...\n Attr attrName = doc.getOwnerDocument().createAttribute(\"name\");\n attrName.setNodeValue(book.getName());\n parentElement.getAttributes().setNamedItem(attrName);\n \n return parentElement;\n }",
"@Function DocumentFragment createDocumentFragment();",
"public WebElement expandRootElement(WebElement element) {\r\n\t\tObject result = executeScript(\"return arguments[0].shadowRoot\", element);\r\n\t\tlog.info(\"result: \", result);\r\n\t\treturn (WebElement) result;\r\n\t}",
"protected void handleStart(HtmlDocument.Tag tag) {\n if (!tag.isSelfTerminating()) {\n // Add to the stack of tags needing closing tag\n mSeenTags.push(new TagWrapper(tag, mBuilder.length()));\n }\n }",
"protected void growGrapes(){\n try {\n Builder parser = new Builder(); //new parser is created\n Document doc = parser.build(argument); //the parsed tokens are passed to a XOM document (in order to manipulate the elements accordingly)\n Element root = doc.getRootElement(); //the root element of the document is selected\n if(root.getQualifiedName().equals(\"grapes\"))\n listChildren(root); //goes onto the categorizing method\n\n else\n System.err.print(\"The root element of the XML file has to be <grapes>\");\n\n }\n catch (ParsingException ex) {\n System.out.println(argument + \" is not well-formed.\");\n System.out.println(ex.getMessage());\n }\n catch (IOException ex) {\n System.out.println(\n \"Due to an IOException, the parser could not print \"\n + argument\n );\n }\n }",
"@org.junit.Test\n public void constrCompelemDoc1() {\n final XQuery query = new XQuery(\n \"element elem {., .}\",\n ctx);\n try {\n query.context(node(file(\"prod/CompAttrConstructor/DupNode.xml\")));\n result = new QT3Result(query.value());\n } catch(final Throwable trw) {\n result = new QT3Result(trw);\n } finally {\n query.close();\n }\n test(\n assertSerialization(\"<elem><root><child1><a>text</a><!--comment--><?pi content?></child1><child2><a>text</a><!--comment--><?pi content?></child2></root><root><child1><a>text</a><!--comment--><?pi content?></child1><child2><a>text</a><!--comment--><?pi content?></child2></root></elem>\", false)\n );\n }",
"public void commit() {\n\t\ttry {\n\t\t\tTransformer transformer = TransformerFactory.newInstance().newTransformer();\n\t\t\tDOMSource domSource = new DOMSource(document);\n\t\t\tStreamResult streamResult = new StreamResult(new File(fileName));\n\t\t\ttransformer.transform(domSource, streamResult);\n\t\t\t//Reload nodes list\n\t\t\tnodes = document.getDocumentElement().getChildNodes();\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private void contentWalker(OdfFileDom content) {\n\n\t\tOdfElement root = content.getRootElement();\n\t\t//TextDocument textDoc = TextDocument.loadDocument(documentFile);\n\t\t\n\t\t//if we want just the content of the text we can treat the document\n\t\t//as a TextDocument. Then use TextDocument.loadDocument(file)\n\t\t// and getContentRoot for it\n\n\t\t\n\t\t//Node textRoot = textDoc.getContentRoot();\n\n\t\tXPathNode rootXNode = xPathRoot.addChild(root, false);\n\t\trootXNode.setParent(xPathRoot);\n\t\t\n\t\twalkNode(root, rootXNode);\n\t}"
] | [
"0.5949904",
"0.5878545",
"0.5767933",
"0.5689475",
"0.56736207",
"0.5595097",
"0.5539228",
"0.5531826",
"0.5477765",
"0.5467622",
"0.54236585",
"0.5411113",
"0.53665566",
"0.53485304",
"0.53485304",
"0.53485304",
"0.53485304",
"0.5336744",
"0.5312325",
"0.5303725",
"0.5303559",
"0.53011876",
"0.5299271",
"0.52875626",
"0.52800643",
"0.52723986",
"0.52702713",
"0.5269794",
"0.52694863",
"0.524932",
"0.5232555",
"0.5194183",
"0.5171578",
"0.5148062",
"0.5147913",
"0.5140927",
"0.5140661",
"0.5129943",
"0.5127382",
"0.5111026",
"0.5103276",
"0.5102711",
"0.5077943",
"0.50743335",
"0.50649494",
"0.5058897",
"0.5046268",
"0.50441647",
"0.5007648",
"0.5006558",
"0.50063884",
"0.50036",
"0.49873814",
"0.49731869",
"0.49616146",
"0.49484283",
"0.4943032",
"0.4939179",
"0.4934335",
"0.4928635",
"0.49253026",
"0.49222365",
"0.49218145",
"0.492148",
"0.4917197",
"0.49072143",
"0.48940492",
"0.4887666",
"0.48791668",
"0.48790616",
"0.4872881",
"0.4871527",
"0.48686764",
"0.48629025",
"0.48542896",
"0.48509184",
"0.48358262",
"0.48354495",
"0.4833124",
"0.48325622",
"0.48305812",
"0.48296934",
"0.48274326",
"0.4826799",
"0.4826547",
"0.48265082",
"0.48255727",
"0.4822876",
"0.48197418",
"0.4811865",
"0.48085386",
"0.4808065",
"0.48049527",
"0.4799724",
"0.47971517",
"0.47962233",
"0.47927588",
"0.47919646",
"0.47912234",
"0.4790007"
] | 0.66794574 | 0 |
USER CODE of InputString goes here | public void process() throws Exception {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getInput();",
"protected void handleInput(String input) {}",
"public void setInput(String input) { this.input = input; }",
"public void setInput(String input);",
"public void setInput(String input){\n this.input = input;\n }",
"@Override\r\n\tpublic void acceptInput(String input) {\n\t\t\r\n\t}",
"String getUserInput();",
"public void processInput(String text);",
"public void setInput(String input) {\n\t\t\tthis.input = input;\n\t\t}",
"String userInput(String question);",
"public String userInputString() {\n Scanner scanner = new Scanner(System.in);\n return scanner.nextLine();\n }",
"public String getInputString() {\n return inputString;\n }",
"public void setInputString(String inputString) {\r\n if (input != null) {\r\n throw new BuildException(\"The \\\"input\\\" and \\\"inputstring\\\" \" + \"attributes cannot both be specified\");\r\n }\r\n this.inputString = inputString;\r\n incompatibleWithSpawn = true;\r\n }",
"private String stringKeyBoardInput() {\n\t\tString input = \"\";\n\t\tboolean tryAgain = true;\n\t\twhile (tryAgain) {\n\t\t\ttry {\n\t\t\t\tScanner scanner = new Scanner(System.in);\n\t\t\t\tinput = scanner.nextLine();\n\t\t\t\ttryAgain = false;\n\t\t\t} catch (InputMismatchException ime) {\n\t\t\t\tSystem.out.println(\"Invalid input.\");\n\t\t\t}\n\t\t}\n\t\treturn input;\n\t}",
"public static String inputString()\n\t{\n\t\treturn(sc.next());\n\t}",
"private static String validateInputStr() {\n String str = \"\";\n Scanner genericString = new Scanner(System.in);\n if (!genericString.hasNextInt()) {\n str = genericString.nextLine();\n return str;\n }\n else {\n validateInputStr();\n }\n return str;\n }",
"public void setInputData(java.lang.String inputData) {\n this.inputData = inputData;\n }",
"public String getInput()\t\n\t{\t//start of getInput method\n\t\treturn inputMsg;\n\t}",
"public static String inputStringFromKeyboard(String input){\n System.out.println(\"Input the String: \");\n //Scanner, save the inputted from keyboard\n Scanner scanner = new Scanner(System.in);\n //The value 'scanner' is assigned to 'input'\n input = scanner.next();\n return input;\n }",
"String consoleInput();",
"private static String inputString() {\n Scanner userInput = new Scanner(System.in);\n System.out.print(\"Insert text: \");\n String inputText = userInput.nextLine();\n return inputText;\n }",
"public String input() throws Exception {\r\n\t\treturn INPUT;\r\n\t}",
"public static String acceptString() {\n\t\tString stringData = null;\r\n\t\tBufferedReader input = null;\r\n\t\ttry {\r\n\t\t\t// chaining the streams\r\n\t\t\tinput = new BufferedReader(new InputStreamReader(System.in));\r\n\r\n\t\t\t// reading data from the reader\r\n\t\t\tstringData = input.readLine();\r\n\t\t} catch (IOException ioException) {\r\n\t\t\tSystem.out.println(\"Error in accepting data.\");\r\n\t\t} finally {\r\n\t\t\tinput = null;\r\n\t\t}\r\n\t\treturn stringData;\r\n\t}",
"public void setUserinput(String userinput){\n String[] inputs = userinput.split(\" \");\n if(inputs.length > 1){\n this.userinput_var = inputs[1];\n }\n this.userinput_command = inputs[0];\n }",
"public void setInput(String M)\t\n\t{\t//start of setInput method\n\t\tinputMsg = M;\n\t}",
"public void getInput(String input) {\n ((problemGeneratorArrayListener) activity).problemGeneratorArrayActivity(input);\n }",
"public static String getStringInput() {\n Scanner in = new Scanner(System.in);\n return in.next();\n }",
"public void readFromPc(String input) {\n\n }",
"public String userStringInput(String text, Scanner inputReader) {\n\t\tSystem.out.println(text);\n\t\treturn inputReader.next();\n\t}",
"public void setInput1(final String input1) {\n this.input1 = input1;\n }",
"@Override\n\tpublic void parseInput() throws InvalidArgumentValueException {\n\t\t\n\t\t\n\t\ttry {\n\t\t\tstringArgBytes = stringToArrayOfByte(stringText.getText());\n\t\t} catch (NumberFormatException e) {\n\n\t\t\tthrow new InvalidArgumentValueException(\n\t\t\t\t\t\"This string cannot be converted to ASCII for some reason. Maybe there are non asci characters used in it\");\n\t\t}\n\t}",
"String userInputFromTextArea();",
"@Override\r\n protected Text generateInputTag(String string)\r\n {\n String ds = inputFile.substring(inputFile.lastIndexOf(\"/\") + 1).split(\"-\")[0];\r\n return new Text(ds);\r\n }",
"public static void getString()\n\t{\n\t\t\n\t\tScanner s=new Scanner(System.in);\n\t\t\n\t\t//Here Scanner is the class name, a is the name of object, \n\t\t//new keyword is used to allocate the memory and System.in is the input stream. \n\t\t\n\t\tSystem.out.println(\"Entered a string \");\n\t\tString inputString = s.nextLine();\n\t\tSystem.out.println(\"You entered a string \" + inputString );\n\t\tSystem.out.println();\n\t}",
"public void setInputCode(String inputCode) {\r\n this.inputCode = inputCode == null ? null : inputCode.trim();\r\n }",
"public static String readString(){\n\t\tstringInput = readInput();\n\t\treturn stringInput; \n\t}",
"public String doInput() throws Exception\n\t{\n\t\tstandardReplacement = \"stateYourOldSiteName=stateYourNewSiteName\";\n\n\t\treturn \"input\";\n\t}",
"public abstract void runInput(String stringFile) throws IOException;",
"public String onInputMessage(String userInput) throws QuitException{\n if (!userInput.equals(\"\"))\n System.out.println(userInput);\n\n //Enter data using BufferReader \n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); \n \n // Reading data using readLine\n String input; \n try {\n input = reader.readLine();\n } catch (IOException e) {\n return null;\n }\n if (input.equals(\"sortir\"))\n throw new QuitException();\n\n // Printing the read line \n return input;\n }",
"INPUT createINPUT();",
"public static String getUserInput() {\n\t\tif (testType == null) {\n\t\t\tuserInput = inputScanner.nextLine();\n\t\t} else if (testType.equalsIgnoreCase(\"makeReady\")) {\n\t\t\tcreateEnterTestSet();\n\t\t\tif (enterTestCount < enterCount)\n\t\t\t\tuserInput = (String) makeReadyEnters.get(enterTestCount++);\n\t\t}else if (testType.equalsIgnoreCase(\"sequenceTest\")) {\n\t\t\tcreateWrongSequenceTestSet();\n\t\t\tif (sequenceTestCount<wrongSeqCount)\n\t\t\t\tuserInput = (String) wrongSequenceAnswers.get(sequenceTestCount++);\n\t\t}\n\t\telse if (testType.equalsIgnoreCase(\"randomKeyPress\")) {\n\t\t\tcreatePlayfulSet();\n\t\t\tif (randomTestCount<randomCount)\n\t\t\t\tuserInput = (String) randomKeys.get(randomTestCount++);\n\t\t}\n\n\t\treturn userInput;\n\t}",
"@Override\n\tprotected void isValid(String input) throws DataInputException\n\t{\n\t}",
"public String Get_Input()throws IOException{\r\n\t\tString input=\"\";\r\n\t\tInputStreamReader converter = new InputStreamReader(System.in);\r\n\t\tBufferedReader in = new BufferedReader(converter);\r\n\t\t\r\n\t\tinput = in.readLine();\r\n\t\t\r\n\t\treturn input;\r\n\t}",
"String getUsersInput(String outForUser) throws IOException;",
"private void prepareInput() {\n\t\tif(input.charAt(0) == '-') input = \"0\" + input;\n\t\tfor(int i = 0; i < input.length() - 1; i++) {\n\t\t\tif(input.charAt(i) == '(' && input.charAt(i+1) == '-') input = input.substring(0, i+1) + \"0\" + input.substring(i+1); \n\t\t}\n\t}",
"public void parseInput(String userInput) {\n this.userIn = userInput;\n\n this.identifier = userIn.split(\" \")[0];\n\n switch (identifier) {\n case \"done\":\n completeTask();\n return;\n\n case \"list\":\n listAllTasks();\n return;\n\n case \"todo\":\n addToDo();\n return;\n\n case \"event\":\n addEvent();\n return;\n\n case \"deadline\":\n addDeadline();\n return;\n\n case \"delete\":\n deleteTask();\n return;\n\n case \"find\":\n findTask();\n return;\n\n default:\n ui.showListOfCommands();\n }\n }",
"@SuppressWarnings(\"resource\")\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\t//String str = \"Hello World\";\n\t\tScanner scanner = new Scanner(System.in); //create object;\n\t\tSystem.out.println(\"Enter an String input\");\n\t\tString userInput = scanner.nextLine();//iput\n\t\tSystem.out.println(userInput.toString());\n\t\n\t\t\n\t\t//System.out.println(\"First string upper case is \" + userInput.toUpperCase().charAt(0) + \" from \" + userInput);\n\t\t\n\t}",
"public String getInput() {\n return input;\n }",
"private static void readInput() { input = sc.nextLine().toLowerCase().toCharArray(); }",
"public static String inputString(String s)\n {\n if (s != null && s.length() > 0)\n {\n System.out.print(s);\n System.out.flush();\n }\n\n StringBuffer sb = new StringBuffer();\n try\n {\n InputStreamReader reader = new InputStreamReader(System.in);\n do\n {\n sb.append(new BufferedReader(reader).readLine());\n }\n while (System.in.available() > 0);\n\n return sb.toString();\n }\n catch (IOException e)\n {\n return null;\n }\n }",
"public interface Input \n{\n\t/*\n\t * Use to initialise input\n\t */\n\tboolean initialise (String args);\n\t/*\n\t * Return a line or return null\n\t */\n\tString getLine ();\n\t\n}",
"public String user_string() {\n Scanner input = new Scanner(System.in);\n boolean conditional = true;\n while (conditional) {\n boolean condition = input.hasNextInt();\n if (!condition) {\n String user_input = input.nextLine();\n conditional = false; \n return user_input; \n }\n else {\n System.out.println(\"Invalid Input!\");\n conditional = true;\n input.next();\n }\n }\n return \"0\";\n }",
"public static String stringValidation() {\n\t\tString input = \"\";\n\t\tinput = in.nextLine().trim();\n\t\treturn input;\n\t}",
"void work( String input ) {\n //TODO print \"Hello\" plus input\n printer.printLn(\"Hello \" +input);\n\n }",
"public abstract void input();",
"public void takeUserInput() {\n\t\t\r\n\t}",
"public static void processUserInput(String input){\n\t\t\n\t\t\tAlgorithm1 alg1 = new Algorithm1(input, distance, inputMap);\n\t\t\t// Calculates shortest path using distance file for distance metric\n\t\t\t// Prints the path nodes\n\t\t\t// Prints the distance\n\t\t\talg1.getShortestPath();\n\t\t\t\n\t\t\t\n\t\t\tAlgorithm2 alg2 = new Algorithm2(input, distance, inputMap);\n\t\t\t// Calculates shortest path using both input and distance file for distance metric\n\t\t\t// Prints the path nodes\n\t\t\t// Prints the distance\n\t\t\talg2.getShortestPath();\n\t\t\t\n\t\t\t\n\t}",
"public abstract String read_string();",
"public static String getInput() {\n\t\tScanner inputReader = new Scanner(System.in);\n\t\tString userInput;\n\t\tuserInput = inputReader.nextLine();\n\t\treturn userInput;\n\t}",
"public StringInputSource(String s) {\n _index = 0;\n _input = s;\n }",
"String promptString();",
"private String getClientInput() {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String input = null;\n try {\n input = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return input;\n }",
"private String insert(String input_from_user) {\n\t\tSystem.out.println(\"Enter the position you want to insert a character in the string\"+input_from_user);\n\t\tint position = in.nextInt();\n\t\tchar get_char = in.next().charAt(0);\n\t\tString result = insertCharAt(input_from_user,get_char,position);\n\t\treturn result;\n\t}",
"public void processInput() {\n\n\t}",
"protected abstract void getInput();",
"public int cmd_string(String input) {\n\t\tif (current_state == LEARN) {\r\n\t\t\t// By this point learn has hopefully been told its parent and how to send...\r\n\t\t\tcurrent_state = learningProgram.cmd_string(input);\r\n\t\t}\r\n\r\n\t\t// If we are still exploring the root menu...\r\n\t\tif (current_state == ROOT_MENU) {\r\n//\t\t\tSystem.out.print(\"\\\"\"+input+\"\\\" \\\"\"+Integer.toString(LEARN)+\"\\\"\\n\");\r\n\t\t\tif (input.equals(Integer.toString(LEARN))) {\r\n\t\t\t\tclearTerminal();\r\n\t\t\t\tsendOutput(\"You have chosen to learn!\");\r\n\t\t\t\tlearningProgram.printMenu();\r\n\t\t\t\tcurrent_state = LEARN;\r\n\t\t\t\tmessage = null;\r\n\t\t\t} else if (input.equals(Integer.toString(GAME))) {\r\n\t\t\t\tclearTerminal();\r\n\t\t\t\tif (gameProgram == null) {\r\n\t\t\t\t\tgameProgram = new GameProgram(this);\r\n\t\t\t\t\tSystem.out.println(\"New game created: \" + gameProgram);\r\n\t\t\t\t}\r\n//\t\t\t\tsend(\"You have chosen to play a game!\");\r\n\t\t\t\t// String newString = new String();\r\n\t\t\t\t// send(Integer.toString(newString.length()));\r\n\t\t\t\tsendOutput(gameProgram.getBoardString());\r\n\t\t\t\tsendOutput(\"\");\r\n\t\t\t\tsendOutput(\"Score: \" + gameProgram.getScoreString());\r\n\t\t\t\tsendOutput(\"\");\r\n\t\t\t\tsendOutput(gameProgram.getControlString());\r\n\t\t\t\tsendOutput(\"\");\r\n\t\t\t\tsendOutput(gameProgram.getKeyString());\r\n\t\t\t\tcurrent_state = GAME;\r\n\t\t\t\tmessage = null;\r\n\t\t\t} else if (input.equals(Integer.toString(EXIT))) {\r\n\t\t\t\tclearTerminal();\r\n\t\t\t\tsendOutput(\"You have chosen to quit!\");\r\n\t\t\t\tcurrent_state = EXIT;\r\n\t\t\t\tmessage = null;\r\n\t\t\t\t// Signal to quit\r\n\t\t\t\tinputSource.fireInputEvent(new InputEvent(this, \"quit\", InputEvent.SIGNAL));\r\n//\t\t\t\tmyFrame.quit();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (current_state == ROOT_MENU) {\r\n\t\t\tclearTerminal();\r\n\t\t\tif (message != null) {\r\n\t\t\t\tsendOutput(message);\r\n//\t\t\t\tmessage = null;\r\n\t\t\t}\r\n\t\t\tsendOutput(splashString);\r\n\r\n\t\t\tsendOutput(\"Version \" + versionNum);\r\n\t\t\tsendOutput(\"by \" + author);\r\n\r\n//\t\t\tsend(\"Main menu\");\r\n\t\t\tthis.printMenu();\r\n\t\t}\r\n\r\n\t\tif (current_state == EXIT) {\r\n\t\t\treturn this.EXIT;\r\n\t\t}\r\n\r\n\t\treturn this.ROOT_MENU;\r\n\r\n\t}",
"public String getUserStringInput(String tips)\n {\n Scanner console = new Scanner(System.in);\n System.out.println(tips);\n return console.nextLine();\n }",
"private void getTextFromInput() {\n firstName = firstNameField.getText();\n lastName = lastNameField.getText();\n age = ageField.getText();\n email = emailField.getText().toLowerCase();\n }",
"public static String GetInput() {\r\n\t\t// Scanner is created and a value is set for input\r\n\t\tScanner in = new Scanner(System.in);\r\n\t\tString input = in.nextLine();\r\n\t\treturn input;\r\n\r\n\t}",
"private String edit(String input_from_user, char[] input_array) {\n\t\tSystem.out.println(\"Enter the number of positions you want to change the string\"+input_from_user);\n\t\tint user_input = in.nextInt();\n\t\tString result = null;\n\t\tfor(int i=0; i <user_input; i++){\n\t\t\tSystem.out.println(\"Enter the\"+i+\"th to edit in the \"+input_from_user +\" string\");\n\t\t\tSystem.out.println(\"Position?\");\n\t\t\tint pos = in.nextInt();\n\t\t\tchar input_char = in.next().charAt(0);\n\t\t\tchar get_user_char = input_array[pos];\n\t\t\tinput_from_user = input_from_user.replace(get_user_char, input_char);\n\t\t}\n\t\treturn input_from_user;\n\t}",
"private static void printDescription(String inputFromUser) throws IllegalArgumentException{\n for(int index = 0; index < GeneralInfo.PREFIX_COMMAND_DESCRIPTION.length(); index++){\n if(inputFromUser.charAt(index) != GeneralInfo.PREFIX_COMMAND_DESCRIPTION.charAt(index)){\n throw new IllegalArgumentException(\"The input is not a correct description request. \" +\n \"This method should not have been called\");\n }\n }\n String nameCard = inputFromUser.substring(GeneralInfo.PREFIX_COMMAND_DESCRIPTION.length());\n printDescriptionCard(nameCard);\n }",
"@Override\n\tpublic String process(String input) {\n\t\treturn filter.process((String)input);\n\t}",
"public void getGamerInput() {\n\t\ttry {\n\t\t\tsCurrentCharInput = String.format(\"%s\", (consoleInput.readLine())).toUpperCase(Locale.getDefault());\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t/* ************************************* */\n\t\tconsoleLog.println(\" \");\n\t\t// System.out.println(\" Quit readline \");\n\t\t/* ************************************* */\n\t\t// if (sCurrentCharInput.length() == 0)\n\t\t// continue;\n\n\t\t// if (sCurrentCharInput.contains(sAskedWord))\n\t\t// continue;\n\n\t}",
"public String getInputCode() {\r\n return inputCode;\r\n }",
"protected static void playString (String in, FunctionalInterface functionalInterface)\n {\n try\n {\n SourceDataLine line = openLine();\n for (char c : in.toCharArray ())\n {\n functionalInterface.doForChar (c, line);\n }\n closeLine (line);\n }\n catch (Exception ignored)\n {\n }\n }",
"public InputSource getInputSource(String inputSource) {\n if (inputSource.equalsIgnoreCase(\"DEFAULT\")) \n return InputSource.DEFAULT;\n else if (inputSource.equalsIgnoreCase(\"USER\")) \n return InputSource.USER;\n else if (inputSource.equalsIgnoreCase(\"FILE\")) \n return InputSource.FILE;\n else if (inputSource.equalsIgnoreCase(\"NETWORK\"))\n \treturn InputSource.NETWORK;\n else \n return InputSource.ERROR;\n }",
"private String getAndClrInput(){\n\t\tString theReturn = userInput.getText();\n\t\tuserInput.setText(\"\");\n\t\treturn theReturn;\n\t}",
"private void inputHandler(String input) throws Exception{\n\n switch (input) {\n\n case \"/quit\":\n done = true;\n break;\n\n default:\n PduMess mess = new PduMess(input);\n outStream.writeToServer(mess.getByteArray());\n break;\n }\n }",
"String readInput() {\n Scanner scanner = new Scanner(System.in);\n return scanner.nextLine();\n }",
"@Override\n\tpublic String input() throws Exception {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String input() throws Exception {\n\t\treturn null;\n\t}",
"@Override\n\tprotected void processInput() {\n\t}",
"public static void main(String[] args) {\n\t\tString str = \"\";\n\t\t\n\t\tScanner input = new Scanner(System.in);\n\t\n\t\tSystem.out.println(\"Enter a string \");\n\t\tstr = input.next();\n\t\tbackwardChars(str);\n\t\tinput.close();\n\t\t\t\n\t}",
"public String getInput() {\n return this.input.substring(this.index);\n }",
"@Override\n\tpublic void input(String text) {\n\t\t\n\t\tname = text;\n\t}",
"void mo5871a(String str);",
"public static String readUserInput() {\n return in.nextLine();\n }",
"public static String readInput() {\r\n return SCANNER.nextLine();\r\n }",
"public static String getString (String ask)\r\n {\r\n Scanner keyboard = new Scanner(System.in);\r\n System.out.print(ask + \" -> \");\r\n String input = keyboard.nextLine();\r\n return input;\r\n }",
"private static String getInputQuery() throws IOException {\n\n String inputQuery = \"\";\n\n System.out.print(\"Please enter a search term: \");\n BufferedReader bReader = new BufferedReader(new InputStreamReader(System.in));\n inputQuery = bReader.readLine();\n\n if (inputQuery.length() < 1) {\n // Use the string \"YouTube Developers Live\" as a default.\n inputQuery = \"YouTube Developers Live\";\n }\n return inputQuery;\n }",
"public String getUserInput(String userMessage) {\n\t\tSystem.out.println(userMessage);\n\t\treturn sc.nextLine();\n\t}",
"public static void main(String[] args) {\n\t\t TextInput input = new NumericInput();\n\t\t input.add('1');\n\t\t input.add('a');\n\t\t input.add('0');\n\t\t System.out.println(input.getValue());\n\n}",
"public void setInputData(String[] inputData) {\r\n // separate input into command and parameters\r\n String command = inputData[0];\r\n String[] parameters = Arrays.copyOfRange(inputData, 1, inputData.length);\r\n this.command = command;\r\n this.parameters = parameters;\r\n }",
"public String readStringFromCmd() throws IOException {\r\n\t\tSystem.out.println(\"Enter your String:\");\r\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\r\n\t\tString string = null;\t\t\r\n\t\tstring = br.readLine();\r\n\t\treturn string;\r\n\t}",
"@Test\r\n public final void rawInputNamesShouldNotHaveSpaces() {\r\n \tString actual = proc.preprocessRawInputName(\" AndThis String\");\r\n \tassertEquals(\"AndThisString\", actual);\r\n }",
"public static void main(String[] args) {\nScanner sc=new Scanner(System.in);\r\nSystem.out.println(\"Enter the String:\");\r\nString str=sc.nextLine();\r\nString r=getImage(str);\r\n\r\n}",
"String processing();",
"int main() {\n string input_string; \n \n // Read a full line of input from stdin (cin) and save it to our variable, input_string.\n getline(cin, input_string); \n \n // Print a string literal saying \"Hello, World.\" to stdout using cout.\n cout << \"Hello, World.\" << endl;\n\n // TODO: Write a line of code here that prints the contents of input_string to stdout.\n\n return 0;\n}",
"protected abstract boolean isInputValid(@NotNull ConversationContext context, @NotNull String input);",
"public static String readString(String prompt){ \n\t\tSystem.out.print(prompt+\": \");\n\t\tstringInput = readInput();\n\t\treturn stringInput; \n\t}",
"@Override\r\n\tpublic void input(String s) {\n\t\to.parseInput(s);\r\n\t\tif (!Jframe.pr && !Jframe.nx && !Jframe.cu && !thisCurrent && !thisNext\r\n\t\t\t\t&& !thisPrevious) {\r\n\t\t\tp.track(s);\r\n\t\t\tSystem.out.println(s);\r\n\t\t}\r\n\r\n\t\tthisCurrent = thisNext = thisPrevious = false;\r\n\t\t// System.out.println(\"here\");\r\n\r\n\t}"
] | [
"0.7729315",
"0.7477089",
"0.7414232",
"0.7271127",
"0.7061413",
"0.701825",
"0.70115215",
"0.6829558",
"0.6737676",
"0.6736535",
"0.6730205",
"0.6701102",
"0.6674",
"0.66697866",
"0.66521734",
"0.6595949",
"0.65756285",
"0.6559835",
"0.65490645",
"0.65320945",
"0.64959633",
"0.64873534",
"0.6460962",
"0.6368029",
"0.63429123",
"0.6340111",
"0.6306502",
"0.6296001",
"0.62946916",
"0.62884384",
"0.62776566",
"0.62588686",
"0.6255107",
"0.6254298",
"0.6240952",
"0.6202527",
"0.6197159",
"0.61859953",
"0.6179084",
"0.6174064",
"0.61363417",
"0.61327773",
"0.612883",
"0.6121784",
"0.6116603",
"0.61156154",
"0.6111472",
"0.61059064",
"0.6097235",
"0.6097116",
"0.60864383",
"0.6083827",
"0.6062755",
"0.60515183",
"0.6029383",
"0.6000964",
"0.5996103",
"0.5988342",
"0.5980193",
"0.59782237",
"0.5968644",
"0.59534824",
"0.5951457",
"0.59454596",
"0.594191",
"0.5941107",
"0.594089",
"0.5917659",
"0.59090585",
"0.59068763",
"0.5906501",
"0.589588",
"0.58956736",
"0.5893509",
"0.58897007",
"0.58851504",
"0.5879128",
"0.587823",
"0.5878216",
"0.5868218",
"0.5868218",
"0.58676106",
"0.5864394",
"0.586389",
"0.586277",
"0.5860777",
"0.58524406",
"0.58498937",
"0.5827185",
"0.58269536",
"0.58255553",
"0.5825038",
"0.5822804",
"0.58102465",
"0.5807847",
"0.5799324",
"0.57988846",
"0.57966566",
"0.57864046",
"0.57762456",
"0.57757205"
] | 0.0 | -1 |
Initialses information specific to InputString. | public void init() {
super.init();
setDefaultInputNodes(1);
setMinimumInputNodes(1);
setMaximumInputNodes(1);
setDefaultOutputNodes(1);
setMinimumOutputNodes(1);
setMaximumOutputNodes(Integer.MAX_VALUE);
String guilines = "";
guilines += "Input your text string in the following box $title value TextField\n";
setGUIBuilderV2Info(guilines);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setInputString(String inputString) {\r\n if (input != null) {\r\n throw new BuildException(\"The \\\"input\\\" and \\\"inputstring\\\" \" + \"attributes cannot both be specified\");\r\n }\r\n this.inputString = inputString;\r\n incompatibleWithSpawn = true;\r\n }",
"public void setInput(String input) { this.input = input; }",
"public void setInput(String input);",
"public StringInputSource(String s) {\n _index = 0;\n _input = s;\n }",
"public void init(String rawInfo) {\n try {\n destination = setValue(\"Destination\", rawInfo);\n vehicleNumber = Integer.parseInt(setValue(\"VehicleNo\", rawInfo));\n longitude = Double.parseDouble(setValue(\"Longitude\", rawInfo));\n latitude = Double.parseDouble(setValue(\"Latitude\", rawInfo));\n direction = setValue(\"Direction\", rawInfo);\n } catch (IllegalStateException e) {\n // This happens if the init string is in an invalid format. Set all members to their\n // default values.\n destination = \"null\";\n vehicleNumber = -1;\n longitude = 0.0;\n latitude = 0.0;\n direction = \"West\";\n }\n }",
"@Before\n public void initValidString() {\n topHint = \"Top Baseline\";\n botHint = \"Bottom Baseline\";\n spinHint = \"Stock Refresh Rate\";\n s1 = \"5 minutes\";\n s2 = \"10 minutes\";\n s3 = \"30 minutes\";\n s4 = \"1 hour\";\n s5 = \"2 hours\";\n s6 = \"1 day\";\n s7 = \"1 week\";\n }",
"protected void init( InputSource input )\n throws SAXException, IOException\n {\n InputStream is;\n \n if ( input == null )\n throw new NullPointerException( format( \"Error001\", \"input\" ) );\n is = input.getByteStream();\n if ( is != null ) {\n try {\n if ( input.getEncoding() == null )\n _reader = new InputStreamReader( new BufferedInputStream( is ) );\n else\n _reader = new InputStreamReader( new BufferedInputStream( is ), input.getEncoding() );\n input.setCharacterStream( _reader );\n } catch ( UnsupportedEncodingException except ) {\n fatalError( new SAXException( format( \"Parser014\", input.getEncoding() ) ) );\n }\n } else if ( input.getCharacterStream() != null )\n _reader = new BufferedReader( input.getCharacterStream() );\n else {\n input = resolveEntity( input.getPublicId(), input.getSystemId() );\n if ( input == null )\n fatalError( new SAXException( message( \"Parser013\" ) ) );\n else {\n init( input );\n return;\n }\n }\n \n _inputSource = input;\n _tokenText.setLength( 0 );\n _pushBackIndex = 0;\n _lineNumber = 0;\n _columnNumber = 0;\n _lastException = null;\n }",
"public void setInput(String input){\n this.input = input;\n }",
"public void init(String inputFile) \n\t{\t\t\n\t\tif (instance != null)\n\t\t{\n\t\t\ttry {\n\t\t\t\ts = new Scanner(new FileReader(inputFile));\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tSystem.out.println(\"\\nnot a valid inputFile\");\n\t\t\t}\n\t\t\t//load mapping of reserved words and special symbols\n\t\t\tLoadCoreValues();\n\t\t\tinstance = new Tokenizer();\n\t\t}\n\t}",
"public void setInputData(java.lang.String inputData) {\n this.inputData = inputData;\n }",
"public void setInputData(String[] inputData) {\r\n // separate input into command and parameters\r\n String command = inputData[0];\r\n String[] parameters = Arrays.copyOfRange(inputData, 1, inputData.length);\r\n this.command = command;\r\n this.parameters = parameters;\r\n }",
"@Before\n public void initValidString() {\n appStateParcel = new AppStateParcel();\n sessionParcel = new SessionParcel();\n evaluationParcel = new EvaluationParcel();\n appStateParcel.setAppMode(AppStateParcel.NORMAL_MODE);\n appStateParcel.setUserType(AppStateParcel.TEACHER);\n appStateParcel.setUserId(\"1\");\n appStateParcel.setToken(TOKEN);\n }",
"@Before\n public void initValidString()\n {\n eventName = \"Espresso Test Event Name\";\n eventLocation = \"Espresso Test Event Location\";\n eventNotes = \"Espresso Test Event Description\";\n }",
"public void init(String busDestination, String input) {\n try {\n //Note: input is in the form 8122:-122.842117,-122.842117\n // Where the long/lat value is Lat, and second is Long\n String[] initialSplit = input.split(\":\");\n vehicleNumber = Integer.parseInt(initialSplit[0]);\n destination = busDestination;\n\n String longAndLat = initialSplit[1];\n latitude = Double.parseDouble(longAndLat.split(\",\")[0]);\n longitude = Double.parseDouble(longAndLat.split(\",\")[1]);\n } catch (IllegalStateException | NumberFormatException e) {\n // This happens if the init strings is in an invalid format. Set all members to their\n // default values.\n destination = \"null\";\n vehicleNumber = -1;\n longitude = 0.0;\n latitude = 0.0;\n }\n }",
"private void setInputParams(InputCommand input) throws InvalidCommand {\n if (input.getParams().length < 2) throw new InvalidCommand(\"Please enter car registration no. followed by color\");\n try {\n carRegNo = input.getParams()[0].toUpperCase();\n carColor = input.getParams()[1].toUpperCase();\n } catch (NumberFormatException e) {\n throw new InvalidCommand(\"Something went wrong.\\nMake sure the command is of the format: 'park KA-01-HH-9999 White'\");\n }\n }",
"public void setInput(String input) {\n\t\t\tthis.input = input;\n\t\t}",
"static void init(InputStream input) {\n reader = new BufferedReader(\n new InputStreamReader(input) );\n tokenizer = new StringTokenizer(\"\");\n }",
"static void init(InputStream input) {\r\n\r\n reader = new BufferedReader(new InputStreamReader(input));\r\n\r\n tokenizer = new StringTokenizer(\"\");\r\n\r\n }",
"static void init(InputStream input) {\n reader = new BufferedReader(\n new InputStreamReader(input) );\n tokenizer = new StringTokenizer(\"\");\n }",
"static void init(InputStream input) {\n reader = new BufferedReader(\n new InputStreamReader(input) );\n tokenizer = new StringTokenizer(\"\");\n }",
"static void init(InputStream input) {\n reader = new BufferedReader(\n new InputStreamReader(input) );\n tokenizer = new StringTokenizer(\"\");\n }",
"static void init(InputStream input) {\n reader = new BufferedReader(\n new InputStreamReader(input) );\n tokenizer = new StringTokenizer(\"\");\n }",
"static void init(InputStream input) {\n reader = new BufferedReader(\n new InputStreamReader(input) );\n tokenizer = new StringTokenizer(\"\");\n }",
"static void init(InputStream input) {\r\n reader = new BufferedReader(\r\n new InputStreamReader(input) );\r\n tokenizer = new StringTokenizer(\"\");\r\n }",
"static void init(InputStream input) {\r\n reader = new BufferedReader(\r\n new InputStreamReader(input) );\r\n tokenizer = new StringTokenizer(\"\");\r\n }",
"static void init(InputStream input) {\r\n reader = new BufferedReader(new InputStreamReader(input));\r\n tokenizer = new StringTokenizer(\"\");\r\n }",
"static void init(InputStream input) {\n reader = new BufferedReader(new InputStreamReader(input));\n tokenizer = new StringTokenizer(\"\");\n }",
"public void setInput1(final String input1) {\n this.input1 = input1;\n }",
"void initBeforeParsing() {\r\n }",
"public void initialize(String source);",
"public interface Input \n{\n\t/*\n\t * Use to initialise input\n\t */\n\tboolean initialise (String args);\n\t/*\n\t * Return a line or return null\n\t */\n\tString getLine ();\n\t\n}",
"public void init()\r\n {\n readFile(inputFile);\r\n writeInfoFile();\r\n }",
"protected void handleInput(String input) {}",
"private void prepareInput() {\n\t\tif(input.charAt(0) == '-') input = \"0\" + input;\n\t\tfor(int i = 0; i < input.length() - 1; i++) {\n\t\t\tif(input.charAt(i) == '(' && input.charAt(i+1) == '-') input = input.substring(0, i+1) + \"0\" + input.substring(i+1); \n\t\t}\n\t}",
"@Override\r\n\tpublic void initializeService(String input) throws Exception\r\n\t{\n\t\t\r\n\t}",
"public void initialise() {\n\t\tm_country_id = 0;\n\t\tm_country_name = \"\";\n\t\tm_error_string = \"\";\n\t}",
"public void setInput(String M)\t\n\t{\t//start of setInput method\n\t\tinputMsg = M;\n\t}",
"public abstract void fromString(String s, String context);",
"@Before\n\tpublic void StringProcessorTestInit() {\n\t\ttry {\n\t\t\tstopWordTree.importFile(\"stopWords.txt\");\n\t\t} catch (IOException e1) {\n\t\t\tfail(\"IOException: Check for stopword filename.\");\n\t\t}\n\t\ttry {\n\t\t\tScanner in = new Scanner(new File(\"stopWords.txt\"));\n\t\t\tstopWords = in.useDelimiter(\"\\\\A\").next();\n\t\t\tin.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\tfail(\"FileNoteFoundException: Check filename.\");\n\t\t}\n\t\ttry {\n\t\t\tScanner in = new Scanner(new File(\"testTextFiles/unitTest.txt\"));\n\t\t\ttestString = in.useDelimiter(\"\\\\A\").next();\n\t\t\tin.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\tfail(\"FileNoteFoundException: Check filename.\");\n\t\t}\n\t\ttry {\n\t\t\tScanner in = new Scanner(new File(\n\t\t\t\t\t\"testTextFiles/removeAlphaNum.txt\"));\n\t\t\tremoveAlphaNumTest = in.useDelimiter(\"\\\\A\").next();\n\t\t\tin.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\tfail(\"FileNoteFoundException: Check filename.\");\n\t\t}\n\t\ttry {\n\t\t\tScanner in = new Scanner(\n\t\t\t\t\tnew File(\"testTextFiles/negationParse.txt\"));\n\t\t\tnegationParseTest = in.useDelimiter(\"\\\\A\").next();\n\t\t\tin.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\tfail(\"FileNoteFoundException: Check filename.\");\n\t\t}\n\t\tbiGrams = testBiGram.split(\", \");\n\t}",
"public ProgramParser(String prog, String input) {\n ProgramParser.programCode = new java.io.StringReader(prog);\n ProgramParser.stringInput = input;\n //System.out.println(\"Program: \" + prog + \" - input: \" + programInput);\n }",
"public void readString(String inputString) {\n\t\tfor(int i = 0; i < inputString.length(); ++i) {\n\t\t\tstringList.add( inputString.charAt(i));\n\t\t}\n\t}",
"private void parseAndPopulate(String in) {\r\n\t\tIParser parser = new AbbyyOCRDataParser(in);\r\n\t\tocrData = parser.parse();\r\n\t\tStore.addData(ocrData);\r\n\t\t\r\n\t\tEditText np = (EditText)findViewById(R.id.patient_et);\r\n\t\tEditText nm = (EditText)findViewById(R.id.medicine_et);\r\n\t\tEditText cd = (EditText)findViewById(R.id.consumption_et);\r\n\t\t\r\n\t\tPatient2Medicine p2m = ocrData.getPatient2Medicine();\r\n\t\tnp.setText(ocrData.getPatient().getName());\r\n\t\tnm.setText(ocrData.getMedicine().getMedicine());\r\n\t\tcd.setText(p2m.getFrequencyOfIntake()\r\n\t\t\t\t+ \" \" + p2m.getQuantityPerIntake() + \" by \" + p2m.getMode());\r\n\t\t\r\n\t}",
"public static void beginString()\r\n\t{\r\n\t\tstr_linepos = line_;\r\n\t\tstr_charpos = char_;\r\n\t\tstr_colpos = col_;\r\n\t\tbuffer.setLength(0);\r\n\t}",
"private void setupInitialValues(){\n\t\tString testDir = getTestDir();\n\t\tsetDirectoryInfoLabel(testDir);\n\t\tlastChoosedDirectory = new File(testDir);\n\t\tregexFrom.setText(sampleRegexFrom);\n\t\tregexTo.setText(sampleRegexTo);\n\t}",
"public TextProperties(final String inputText) throws IOException {\n this.inputText = inputText;\n setWordsAndEmoticons();\n setHasYellWords(hasCapDifferential(getWordsAndEmoticons()));\n }",
"public String getInputString() {\n return inputString;\n }",
"private Input()\n {\n }",
"@Override\n\tpublic function initFromString(String s) {\n\t\treturn null;\n\t}",
"public void startInfo() {\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Enter your name:\");\n\t\tString name = this.getInputString();\n\t\tSystem.out.println(\"Enter your mobile number:\");\n\t\tint number = this.getInputInteger();\n\t\tSystem.out.println(\"Enter your email:\");\n\t\tString email = this.getInputString();\n\t}",
"public FrameworkCommand(String input, ObjectType init) \n {\n commandString = input.toUpperCase();\n initiator = init;\n\n // todo: verb as first word?\n \n /* This is a crummy timestamp.. We'll hope to do better in subclasses \n using scheduler instances. */\n lTimestamp = System.currentTimeMillis() * 1000;\n }",
"private void initState() {\n Arrays.fill(state = new char[this.mystery.length()], '_');\n }",
"@Before\n public void initValidString() {\n // Specify valid strings\n title = \"This is the best movie out there!\";\n body = \"I do not know how I have gone so long without this movie. It has literally saved my life!\";\n productUPC = \"883904333791\"; //james bond movie\n username = \"[email protected]\";\n password = \"xyxyx\";\n\n // Sign In\n ActivityTestRule<LoginActivity> mActivityRule2 = new ActivityTestRule(LoginActivity.class, false, false);\n Intent intent = new Intent();\n mActivityRule2.launchActivity(intent);\n onView(withId(R.id.email)).perform(typeText(username), closeSoftKeyboard());\n onView(withId(R.id.password)).perform(typeText(password), closeSoftKeyboard());\n onView(withId(R.id.email_sign_in_button)).perform(click());\n\n }",
"public void setInputUser(String inputUser) {\n this.inputUser = inputUser == null ? null : inputUser.trim();\n }",
"@Override\n\tpublic void processInput(Resource input, Resource output)\n\t{\n\n\t System.out.println(\"กกกก===INIT processInput SADI.skeleton===!!!\");\n\t\t String name = input.getProperty(Vocab.name).getString(); \n\t\t output.addProperty(Vocab.greeting, String.format(\"Hello, %s!\", name)); \n\t}",
"public void getInput(String input) {\n ((problemGeneratorArrayListener) activity).problemGeneratorArrayActivity(input);\n }",
"protected void readConstructorParams( DataInput in ) throws\n\t\t\t\t\t\t\tIOException {\n }",
"public void init() {\n\t\tinit(\"1,0 3,0 5,0 7,0 9,0 0,1 2,1 4,1 6,1 8,1 1,2 3,2 5,2 7,2 9,2 0,3 2,3 4,3 6,3 8,3\", \n\t\t\t \"1,6 3,6 5,6 7,6 9,6 0,7 2,7 4,7 6,7 8,7 1,8 3,8 5,8 7,8 9,8 0,9 2,9 4,9 6,9 8,9\"); \n }",
"public void parseInput(Scanner sc, String inputLine) {\n String[] input = inputLine.split(\",\");\n assert(input[0].equals(\"R\"));\n this.warehouseID = Integer.parseInt(input[1]);\n this.districtID = Integer.parseInt(input[2]);\n this.customerID = Integer.parseInt(input[3]);\n }",
"public void init(String tmpInputFile)\r\n {\n readFile(tmpInputFile);\r\n writeInfoFile();\r\n }",
"public void fill(String seqInput) throws BaseException\n {\n fill(seqInput.split(\"\"));\n }",
"private void fromString(String serverInfoString) {\n\t\tif (serverInfoString != null && !serverInfoString.isEmpty()) {\n\t\t\tString[] tokens = serverInfoString.split(\" \");\n\t\t\tif (tokens.length == 3) {\n\t\t\t\tsetServerName(tokens[0]);\n\t\t\t\tsetAddress(tokens[1]);\n\t\t\t\tsetPort(Integer.parseInt(tokens[2]));\n\t\t\t} else\n\t\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\t\"Config file is not formatted as expected. near \"\n\t\t\t\t\t\t\t\t+ serverInfoString);\n\n\t\t}\n\n\t}",
"@Override\n\tpublic void setup(NluInput nluInput) {\n\t\tthis.user = nluInput.user;\n\t\tthis.language = nluInput.language;\n\t\tthis.nlu_input = nluInput;\n\t}",
"private void init() {\n\t\t\n\t\ttry{\t\t\t\n\t\t\tinfos = new HashMap<String, VariableInfo>();\n\t\t\t\n\t\t\tfor(String var : this.problem.getMyVars()){\n\t\t\t\t\n\t\t\t\tif(this.problem.getNbrNeighbors(var) != 0){ // an isolated variable doesn't need a CryptoScheme and therefore no VariableInfo either\n\t\t\t\t\t\n\t\t\t\t\tVariableInfo info = new VariableInfo(var);\n\t\t\t\t\tinfos.put(var, info);\n\t\t\t\t\t\n\t\t\t\t\tinfo.cs = cryptoConstr.newInstance(this.cryptoParameter);\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//initialize request counter for my own variables\n\t\t\trequestCount = new HashMap<String,Integer>(); \n\t\t\tfor(String var : this.problem.getMyVars()){\n\t\t\t\trequestCount.put(var, 0);\n\t\t\t}\n\t\t\t\n\t\t\tthis.started = true;\t\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\t\t\n\t}",
"private void init(String command) {\n if (command == null) throw new IllegalArgumentException(\"Empty command\");\n this.raw = command;\n\n String[] data = this.raw.split(\" \");\n this.map = new HashMap<>();\n for ( int i = 0; i < data.length; i++) {\n map.put( Index.values()[i], data[i] );\n }\n }",
"@Override\n\tpublic void parseInput() throws InvalidArgumentValueException {\n\t\t\n\t\t\n\t\ttry {\n\t\t\tstringArgBytes = stringToArrayOfByte(stringText.getText());\n\t\t} catch (NumberFormatException e) {\n\n\t\t\tthrow new InvalidArgumentValueException(\n\t\t\t\t\t\"This string cannot be converted to ASCII for some reason. Maybe there are non asci characters used in it\");\n\t\t}\n\t}",
"INPUT createINPUT();",
"public NumberP(String input)\n\t{\n\t\tthis\n\t\t(\n\t\t\tinput, new ParseConfig()\n\t\t);\n\t}",
"public void setUserinput(String userinput){\n String[] inputs = userinput.split(\" \");\n if(inputs.length > 1){\n this.userinput_var = inputs[1];\n }\n this.userinput_command = inputs[0];\n }",
"private void assignInitPos(String init) throws InputMismatchException {\n\t\tif(init.equals(UP)) {\n\t\t\tinitPos = UP;\n\t\t}else if(init.equals(DOWN)) {\n\t\t\tinitPos = DOWN;\n\t\t}else if(init.equals(LEFT)) {\n\t\t\tinitPos = LEFT;\n\t\t}else if(init.equals(RIGHT)) {\n\t\t\tinitPos = RIGHT;\n\t\t}else {\n\t\t\tthrow new InputMismatchException(\"There is no such initial filling position.\");\n\t\t}\n\t}",
"public void loadClusterInfoString(String inputStr, String delimiter, String subDelimiter)\n\t{\n\t\tm_numericValueList = new HashMap<Integer, PDF_Features>();\n\t\tm_nominalValueList = new HashMap<Integer, HashMap<String,Double>>();\n\t\t\n\t\tString tokens[] = inputStr.split(delimiter);\n\t\t\n\t\tm_clusterId = Integer.parseInt(tokens[0]);\n\t\t\n\t\tfor(int i=1; i<tokens.length; i++)\n\t\t{\n\t\t\tint attrIndex = Integer.parseInt(tokens[i++]);\n\t\t\tString attrValue = tokens[i];\n\t\t\t\n\t\t\tString subTokens[] = attrValue.split(subDelimiter);\n\n if(CommonMethods.isNumeric(subTokens[0]))\n\t\t\t{\n\t\t\t\tPDF_Features value = new PDF_Features();\n\t\t\t\tvalue.average = Double.parseDouble(subTokens[0]);\n\t\t\t\tvalue.variance = Double.parseDouble(subTokens[1]);\n\n m_numericValueList.put(attrIndex, value);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tHashMap<String, Double> valueMap = new HashMap<String, Double>();\n\t\t\t\tfor(int k=0; k<subTokens.length; k++)\n\t\t\t\t{\n\t\t\t\t\tString subKey = subTokens[k++];\n\t\t\t\t\tdouble subValue = Double.parseDouble(subTokens[k]);\n\t\t\t\t\tvalueMap.put(subKey, subValue);\n\t\t\t\t}\n\t\t\t\tm_nominalValueList.put(attrIndex, valueMap);\n\t\t\t}\n\t\t}\n\t}",
"public void parseInput(String userInput) {\n this.userIn = userInput;\n\n this.identifier = userIn.split(\" \")[0];\n\n switch (identifier) {\n case \"done\":\n completeTask();\n return;\n\n case \"list\":\n listAllTasks();\n return;\n\n case \"todo\":\n addToDo();\n return;\n\n case \"event\":\n addEvent();\n return;\n\n case \"deadline\":\n addDeadline();\n return;\n\n case \"delete\":\n deleteTask();\n return;\n\n case \"find\":\n findTask();\n return;\n\n default:\n ui.showListOfCommands();\n }\n }",
"public Object[] getInitArgs(String[] input){\n Object result[] = new Object[input.length];\n for (int i = 0; i < input.length; i++){\n if (isNumeric(input[i])){\n result[i] = Integer.parseInt(input[i]);\n }else{\n result[i] = input[i];\n }\n }\n return result;\n }",
"@Override\r\n\tpublic void acceptInput(String input) {\n\t\t\r\n\t}",
"protected void createInputAnnotations() {\n\t\tString source = \"http://www.eclipse.org/ecl/input\";\t\t\t\t\t\t\n\t\taddAnnotation\n\t\t (getPrint_Input(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\t\t\n\t\taddAnnotation\n\t\t (getWriteCsvFile_Table(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\t\t\t\t\n\t\taddAnnotation\n\t\t (getExcludeColumns_Table(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\t\t\t\t\n\t\taddAnnotation\n\t\t (getSelectColumns_Table(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\t\t\t\t\t\t\t\t\t\t\t\n\t\taddAnnotation\n\t\t (getReadLines_Uri(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\t\t\n\t\taddAnnotation\n\t\t (getSelectRows_Table(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\t\t\t\t\t\t\n\t\taddAnnotation\n\t\t (getExcludeRows_Table(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\t\t\t\t\t\t\n\t\taddAnnotation\n\t\t (getAsTableData_Input(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\t\t\n\t}",
"@Override\n\tpublic void input(String text) {\n\t\t\n\t\tname = text;\n\t}",
"void readInput() {\n\t\ttry {\n\t\t\tBufferedReader input = new BufferedReader(new InputStreamReader(System.in));\n\t\t\t\n\t\t\tString line = input.readLine();\n\t\t\tString [] numbers = line.split(\" \");\n\n\t\t\tlenA = Integer.parseInt(numbers[0]);\n\t\t\tlenB = Integer.parseInt(numbers[1]); \n\n\t\t\twordA = input.readLine().toLowerCase(); \n\t\t\twordB = input.readLine().toLowerCase();\n\n\t\t\tg = Integer.parseInt(input.readLine());\n\n\t\t\tString key; \n\t\t\tString [] chars;\n\t\t\tpenaltyMap = new HashMap<String, Integer>();\n\n\t\t\tfor(int i=0;i<676;i++) {\n\t\t\t\tline = input.readLine();\n\t\t\t\tchars = line.split(\" \");\n\t\t\t\tkey = chars[0] + \" \" + chars[1];\n\t\t\t\tpenaltyMap.put(key, Integer.parseInt(chars[2]));\n\n\t\t\t}\n\n\t\t\tinput.close();\n\n\t\t} catch (IOException io) {\n\t\t\tio.printStackTrace();\n\t\t}\n\t}",
"public Scanner(String inString)\n {\n in = new BufferedReader(new StringReader(inString));\n eof = false;\n getNextChar();\n }",
"private static void initializeInput(String filename) {\n\t\t// Reading from specified file.\n\t\ttry\n\t\t{\n\t\t\tfileInput = new Scanner(new FileInputStream(filename));\n\t\t}\n\t\tcatch(FileNotFoundException e) \n\t\t{ \n\t\t\tSystem.err.println(\"\\nFile not found. Please re-enter.\");\n\t\t\tinitializeInput(getFilename());\n\t\t}\n\t}",
"public void setInput(File input) {\r\n if (inputString != null) {\r\n throw new BuildException(\"The \\\"input\\\" and \\\"inputstring\\\" \" + \"attributes cannot both be specified\");\r\n }\r\n this.input = input;\r\n incompatibleWithSpawn = true;\r\n }",
"@Override\r\n protected Text generateInputTag(String string)\r\n {\n String ds = inputFile.substring(inputFile.lastIndexOf(\"/\") + 1).split(\"-\")[0];\r\n return new Text(ds);\r\n }",
"static void initSample1(){\n // put values into the sField\n sField[0][0] = \"X\";\n sField[0][1] = \"X\";\n sField[0][3] = \"X\";\n sField[0][4] = \"X\";\n \n sField[1][5] = \"O\";\n sField[1][6] = \"O\";\n sField[1][7] = \"O\";\n sField[1][8] = \"O\";\n }",
"public Parser() throws IOException {\n\t\tlookahead = System.in.read();\n\t\terrorNum = 0;\n\t\tinput = \"\";\n\t\toutput = \"\";\n\t\terrorPos = \"\";\n\t\terrorList = new ArrayList<String>();\n\t\twrongState = false;\n\t}",
"private void getInitialValues() {\n mEditTextJobText.setText(SharedPrefStatic.mJobTextStr);\n mEditTextSkill.setText(SharedPrefStatic.mJobSkillStr);\n mEditTextLocation.setText(SharedPrefStatic.mJobLocationStr);\n mEditTextAge.setText(SharedPrefStatic.mJobAgeStr);\n }",
"protected void initVars() {}",
"private static void readInput() { input = sc.nextLine().toLowerCase().toCharArray(); }",
"String getInput();",
"protected void parseInitializationString(String firstLine)\n throws IOException, PiaRuntimeException\n {\n if( firstLine == null ){\n String msg = \"firstLine is null...\\n\";\n throw new PiaRuntimeException (this\n\t\t\t\t , \"parseInitializationString\"\n\t\t\t\t , msg) ;\n }\n\n StringTokenizer tokens = new StringTokenizer(firstLine, \" \");\n protocol = tokens.nextToken();\n if( protocol==null )\n throw new PiaRuntimeException(this, \"parseInitializationString\",\n\t\t\t\t \"No Protocol: '\" + firstLine + \"'\");\n\n Pia.debug(this, \"The first response line\" + firstLine);\n\n if (! protocol.toLowerCase().startsWith(\"http/\")) \n throw new PiaRuntimeException(this, \"parseInitializationString\",\n\t\t\t\t \"Bad Protocol: '\" + firstLine + \"'\");\n String majorMinor = protocol.substring(\"HTTP/\".length());\n StringTokenizer mytokens = new StringTokenizer( majorMinor, \".\" );\n String zmajor = mytokens.nextToken();\n if( zmajor!=null ){\n\tmajor = zmajor;\n\tString zminor = mytokens.nextToken();\n minor = zminor;\n }\n\n if( tokens.hasMoreTokens() )\n code = Integer.parseInt( tokens.nextToken() );\n\n if( tokens.hasMoreTokens() )\n reason = tokens.nextToken();\n\n firstLineOk = true;\n }",
"@Override\r\n public void initialize(){\r\n initialize(\"\");\r\n }",
"public InputDataHandler() {}",
"estateName initestateName(estateName iEstateName)\n {\n iEstateName.updateElementValue(\"estateName\");\n return iEstateName;\n }",
"public void setInput(Input input) {\n this.input = input;\n }",
"public int parse(String inputString) {\n manager.init();\n\n Map<String, List<String>> commandMap = new HashMap<>();\n List<String> blocks = Arrays.asList(inputString.split(\" \"));\n commandMap.put(blocks.get(0), blocks.size() > 1 ? blocks.subList(1, blocks.size()) : Collections.EMPTY_LIST);\n\n // item properties\n if (commandMap.containsKey(\"ip\")) {\n List<String> params = commandMap.get(\"ip\");\n if (params.size() > 0) {\n // set item properties\n manager.setItemParams(params);\n manager.prettyPrint(\"Successfully set Item Properties to: \" + params);\n } else {\n // get item properties\n manager.printItemParams();\n }\n }\n\n // channel properties\n if (commandMap.containsKey(\"cp\")) {\n List<String> params = commandMap.get(\"fp\");\n if (params.size() > 0) {\n // set channel properties\n manager.setChannelParams(params);\n manager.prettyPrint(\"Successfully set Channel Properties to: \" + params);\n } else {\n // get channel properties\n manager.printChannelParams();\n }\n }\n\n // rss\n if (commandMap.containsKey(\"rss\")) {\n List<String> params = commandMap.get(\"rss\");\n if (params.size() > 0) {\n switch (params.get(0)) {\n case \"add\": {\n if (params.size() != 3) {\n throw new IllegalArgumentException(\"Not enough params for -rss add\");\n }\n String rssLink = params.get(1);\n String file = params.get(2);\n manager.createFileIfNotExists(file);\n manager.associateRssToFile(rssLink, file);\n manager.prettyPrint(\n \"Successfully added new RSS Feed: \" + rssLink,\n \"Associated file is: \" + file\n );\n break;\n }\n case \"del\": {\n if (params.size() != 2) {\n throw new IllegalArgumentException(\"Not enough params for -rss del\");\n }\n String rssLink = params.get(1);\n manager.diassociateRss(rssLink);\n manager.prettyPrint(\"Successfully removed new RSS Feed: \" + rssLink);\n break;\n }\n case \"on\": {\n if (params.size() != 2) {\n throw new IllegalArgumentException(\"Not enough params for -rss on\");\n }\n String rssLink = params.get(1);\n manager.turnRSSOn(rssLink);\n manager.prettyPrint(\"Successfully turned RSS Feed \" + rssLink + \" on\");\n break;\n }\n case \"off\": {\n if (params.size() != 2) {\n throw new IllegalArgumentException(\"Not enough params for -rss off\");\n }\n String rssLink = params.get(1);\n manager.turnRSSOff(rssLink);\n manager.prettyPrint(\"Successfully turned RSS Feed \" + rssLink + \" off\");\n break;\n }\n }\n } else {\n manager.printRss();\n }\n } else if (commandMap.containsKey(\"time\")) {\n List<String> params = commandMap.get(\"time\");\n if (params.size() > 0) {\n if (params.size() != 1) {\n throw new IllegalArgumentException(\"Not enough params for -time\");\n }\n String newTimeToPoll = params.get(0);\n manager.setTimeToPoll(Long.valueOf(newTimeToPoll));\n manager.prettyPrint(\"Successfully set polling time to \" + newTimeToPoll);\n\n } else {\n manager.printTimeToPoll();\n }\n } else if (commandMap.containsKey(\"h\")) {\n manager.printHelp();\n } else if (commandMap.containsKey(\"exit\")) {\n return 1;\n }\n return 0;\n }",
"public static void processUserInput(String input){\n\t\t\n\t\t\tAlgorithm1 alg1 = new Algorithm1(input, distance, inputMap);\n\t\t\t// Calculates shortest path using distance file for distance metric\n\t\t\t// Prints the path nodes\n\t\t\t// Prints the distance\n\t\t\talg1.getShortestPath();\n\t\t\t\n\t\t\t\n\t\t\tAlgorithm2 alg2 = new Algorithm2(input, distance, inputMap);\n\t\t\t// Calculates shortest path using both input and distance file for distance metric\n\t\t\t// Prints the path nodes\n\t\t\t// Prints the distance\n\t\t\talg2.getShortestPath();\n\t\t\t\n\t\t\t\n\t}",
"public void setInitCommand (String command){\r\n //process the command \r\n initCommand = command.trim();\r\n initialize(); \r\n }",
"public MyInput() {\r\n\t\tthis.scanner = new Scanner(System.in);\r\n\t}",
"public UserInput()\n {\n try\n {\n scanner = new Scanner(System.in);\n input = new InputMethods();\n citiesTotal = new CityContainer();\n\n if(scanner != null)\n {\n askUser();\n }\n } catch(Exception ex)\n {\n }\n }",
"void setInput(com.indosat.eai.catalist.standardInputOutput.DummyInputType input);",
"@Override\n\tpublic void initialize(String source) {\n\t\tmyFirst = new Node(source);\n\t\tmyLast = new Node(\"\");\n\t\tmyLast = myFirst;\n\t\t\n\t\tmyFirst.next = myLast;\n\t\tmyLast.next = null;\n\t\t//myFirst.info = s;\n\t\t//myFirst.next = myLast;\n\t\t//myLast.info =s;\n\t\t//myLast.next = null;\n\t\tmySize = source.length();\n\t\tmyAppends = 0;\n\t\t\n\t\tmyIndex = 0;\n\t\tmyLocalIndex = 0;\n\t\tmyCurrent = myFirst;\n\t\t\n\t}",
"public NameInfo(String inFirst)\n\t{\n\t\t//Set instance data.\n\t\tfirstName = inFirst;\n\n\t}",
"private void getTextFromInput() {\n firstName = firstNameField.getText();\n lastName = lastNameField.getText();\n age = ageField.getText();\n email = emailField.getText().toLowerCase();\n }"
] | [
"0.64208907",
"0.63963854",
"0.63020784",
"0.6267628",
"0.6171753",
"0.6163333",
"0.61405253",
"0.6084896",
"0.6046929",
"0.6001224",
"0.59779084",
"0.595787",
"0.5947342",
"0.5924904",
"0.59198606",
"0.5904213",
"0.580566",
"0.58036137",
"0.5784033",
"0.5784033",
"0.5784033",
"0.5784033",
"0.57836246",
"0.57743055",
"0.57743055",
"0.5759021",
"0.5751506",
"0.5739203",
"0.5728709",
"0.57067925",
"0.56931305",
"0.56805784",
"0.56795514",
"0.5637224",
"0.5634051",
"0.5628718",
"0.56213063",
"0.5607098",
"0.5585273",
"0.5575614",
"0.55222064",
"0.55068725",
"0.5502477",
"0.54805726",
"0.5473891",
"0.5473731",
"0.54729867",
"0.5471864",
"0.5467122",
"0.54515713",
"0.5447752",
"0.5438921",
"0.5419682",
"0.54060936",
"0.5394584",
"0.5389718",
"0.538604",
"0.5373842",
"0.53656447",
"0.5351414",
"0.5345687",
"0.5328897",
"0.53216517",
"0.5318631",
"0.530883",
"0.5303852",
"0.5294735",
"0.528534",
"0.52827877",
"0.52747977",
"0.5266276",
"0.5264778",
"0.52570367",
"0.5246099",
"0.5231136",
"0.52264035",
"0.52200913",
"0.5211918",
"0.5211172",
"0.5206805",
"0.5197685",
"0.5194278",
"0.5194242",
"0.5193381",
"0.5193108",
"0.5189393",
"0.5186262",
"0.51858765",
"0.51718664",
"0.5169253",
"0.51673126",
"0.5163613",
"0.51626074",
"0.516009",
"0.51600325",
"0.51597846",
"0.51418936",
"0.5136384",
"0.51274055",
"0.5124179"
] | 0.5839742 | 16 |
Called when the reset button is pressed within the MainTriana Window | public void reset() {
super.reset();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@FXML\n\tprivate void onResetBtn() {\n\t\truleBox.setValue(\"Standard\");\n\t\twallBox.setValue(10);\n\t\tboardBox.setValue(\"9x9\");\n\t\ttileBox.setValue(50);\n\t\tindicateLabel.setSelected(true);\n\t\t//ghostTrail.setSelected(false);\n\t\tSettings.getSingleton().reset();\n\t}",
"private void btnResetActionPerformed(java.awt.event.ActionEvent evt) {\n reset(); \n }",
"private void onClickReset(ActionEvent e) {\n\n }",
"private void resetButtonPress(ActionEvent event){\n initLevel();\n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n if (e.getSource() == resetButton)\n reset();\n }",
"private void jbtn_resetActionPerformed(ActionEvent evt) {\n\t\t\t\ttxtblank();\n\t\t\t\t\n\t\t\t}",
"private void resetBtn1ActionPerformed(java.awt.event.ActionEvent evt) {\n resetBtnActionPerformed();\n }",
"void resetView();",
"public void onReset() {\n\n if (dialogFlag) {\n // enter here if resetting through the dialog that pops up at the end of the game.\n resetGame();\n } else {\n // enter here if resetButton is clicked through the fxml.\n Alert alert = createWarningAlert();\n alert.showAndWait();\n if (alert.getResult().getButtonData() == ButtonBar.ButtonData.YES) {\n resetGame();\n }\n }\n }",
"void onReset()\n {\n }",
"@Override\n\tpublic void actionPerformed(ActionEvent ae){\n\t\treset();\n\t}",
"private void resetApp() {\n\t\tthis.panelTags.setVisible(false);\n\t\tthis.panelMenu.setVisible(true);\n\t\tthis.model.clear();\n\t\tthis.btnClearAll.doClick(0);\n\t\t// textDestination jest czyszczony osobno, po JOptionPane\n\t\t// this.textDestination.setText(null);\n\t\tthis.btnDeleteAll.setEnabled(false);\n\t\tthis.btnDelete.setEnabled(false);\n\t}",
"void resetApp();",
"private void onClickResetBtn() throws IOException {\n // Send a packet of byte[3,0] to indicate the Client is done playing, and going to quit the game\n client.sendOnly(client.getSocket(), serverPackage, 3, 0);\n isRed = true;\n turnCircle.setFill(Paint.valueOf(\"Red\"));\n turnDisplay.setText(humanTurn);\n winDisplay.setText(\"\");\n // Set all the circle in the Grid's color back to black\n resetGrid();\n\n client.restartClient();\n // Re-enable the Grid\n grid.setDisable(false);\n System.out.println(\"Client has restarted...Initialize new Game\\n\");\n }",
"public void resetScreen(){\n\t\tsetFirstAttempt(\"\");\n\t\tsetSecondAttempt(\":\");\n\t\tsetFirstAttempt(\":\");\n\t\tsetFirstAttemptResult(\"\");\n\t\tsetSecondAttemptResult(\"\");\n\t\tsetDefinition(\"\");\n\t\tbtnConfirmOrNext.setText(\"Confirm\");\n\t}",
"private void initializeResetButton()\r\n {\r\n resetButton = new JButton(\"RESET\");\r\n resetButton.addActionListener(new ActionListener()\r\n {\r\n @Override\r\n public void actionPerformed(ActionEvent e)\r\n {\r\n numMoves = 0;\r\n // implementation of multi-problem choices\r\n ProblemChooser pc = null;\r\n if (problem.isMultiProblem())\r\n {\r\n if (problem.hasCanvas())\r\n {\r\n pc = new ProblemChooser(problem.getInitialStatesList(),\r\n problem.getFinalStatesList(),\r\n problem.getMoveCounts(),\r\n problem.getInitialCanvasList(),\r\n problem.getFinalCanvasList()\r\n );\r\n } else\r\n {\r\n pc = new ProblemChooser(problem.getInitialStatesList(),\r\n problem.getFinalStatesList(), problem.getMoveCounts());\r\n }\r\n\r\n initialState = pc.getStart();\r\n }\r\n problem.setCurrentState(initialState);\r\n if (pc != null) {\r\n problem.setFinalState(pc.getFinal());}\r\n problemState.setText(initialState.toString());\r\n if (canvas != null)\r\n {\r\n canvas.setCurrentState(initialState);\r\n if (problem.isMultiProblem() && pc != null)\r\n {\r\n finalStateCanvas.setCurrentState(pc.getFinal());\r\n } else\r\n {\r\n finalStateCanvas.setCurrentState(problem.getFinalState());\r\n }\r\n canvas.render();\r\n finalStateCanvas.render();\r\n }\r\n problem.resetCounters();\r\n setStats();\r\n toggleButtons(true);\r\n }\r\n });\r\n }",
"public void reset(){\r\n\t\tdialogToDisplay=0;\r\n\t\tqueuedDialog=0;\r\n\t\toptionSelection=null;\r\n\t\tdone=false;\r\n\t}",
"protected void actionPerformedReset ()\n {\n try\n {\n OpenMarkovPreferences.setDefaultPreferences ();\n this.jTableEdition.repaint ();\n this.jTreePreferences.repaint ();\n this.repaint ();\n }\n catch (Exception ex)\n {\n // ExceptionsHandler.handleException(\n // ex, \"Error reseting Preferences\", false );\n logger.error (\"Error reseting Preferences\");\n }\n }",
"public void reset(){\n }",
"public void resetButtonAction(ActionEvent event) throws IOException {\n Parent root = FXMLLoader.load(getClass().getResource(\"../ui/reset.fxml\"));\n\n Node node = (Node) event.getSource();\n Stage stage = (Stage) node.getScene().getWindow();\n stage.setScene(new Scene(root));\n stage.show();\n }",
"public abstract void onReset();",
"protected void reset()\n\t{\n\t\tretcode = JOptionPane.CANCEL_OPTION;\n\t\tfiles = null;\n\t\taliases = null;\n\t\tjPathPanel.setText(\"\");\n\t\trpFilesTextArea.setText(\"\");\n\t\tsupTextField.setText(\"\");\n\t\tconfTextField.setText(\"\");\n\t}",
"void reset();",
"void reset();",
"void reset();",
"void reset();",
"void reset();",
"void reset();",
"void reset();",
"void reset();",
"void reset();",
"void reset();",
"void reset();",
"void reset();",
"void reset();",
"void reset();",
"void reset();",
"void reset();",
"void reset();",
"void reset();",
"void reset();",
"void reset();",
"void reset()\n {\n\n }",
"public void handleReset(View view) {\n\t\t// TODO: Reset tampilan\n\t\trtReset.setOnClickListener(new View.OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View view) {\n\t\t\t\tinitRandomNumber();\n\t\t\t\tetAngka.setText(\"\");\n\t\t\t}\n\t\t});\n\t}",
"private void resetButtonActionPerformed(java.awt.event.ActionEvent evt) {\r\n\t\t\tinitializeGrid(false);\r\n\t\t}",
"public void reset();",
"public void reset();",
"public void reset();",
"public void reset();",
"public void reset();",
"public void reset();",
"public void reset();",
"public void reset();",
"public void reset();",
"public void reset();",
"public void reset();",
"public void reset();",
"public void reset();",
"public void reset();",
"public void reset();",
"private void hardReset() {\n softReset();\n // variables\n recordLap = 0; // force first query on database after race restart\n trackName = null;\n // ui\n recordLapTView.setText(\"--:--:---\");\n trackTView.setText(\"Track location\");\n carTView.setText(\"Car\");\n Log.d(TAG, \"HARD Reset: main menu\");\n }",
"protected void onReset() {\n\t\t\n\t}",
"protected void onReset() {\n // Do nothing.\n }",
"public void resetClick() {\n timeline.stop();\n startButton.setText(\"Start\");\n isRunning = false;\n isMovable = false;\n gOL.resetGenCounter();\n generationLabel.setText(Integer.toString(gOL.getGenCounter()));\n board.resetBoard();\n if (board instanceof DynamicBoard) {\n ((DynamicBoard)board).setGridSize(50);\n canvasDrawer.resetCellSize();\n }\n aliveLabel.setText(Integer.toString(board.getCellsAlive()));\n fileHandler.resetMetaData();\n canvasDrawer.resetOffset(board, canvasArea);\n draw();\n }",
"@FXML\n private void handleBtnDelSav(ActionEvent event) {\n myResult.resetM();\n }",
"public void reset() {\n\n }",
"private void resetButtonHandler(java.awt.event.MouseEvent evt)//GEN-FIRST:event_resetButtonHandler\n {//GEN-HEADEREND:event_resetButtonHandler\n this.moveTimer.stop();\n this.youWinLabel.setVisible(false);\n this.gameOverLabel.setVisible(false);\n for (int i = 0; i < numFigs; i++)\n {\n figures[i].hide();\n figures[i] = null;\n }\n this.lives = 0;\n this.time = 0;\n this.timeTextField.setText(\"\" + time);\n this.livesTextField.setText(\"\" + lives);\n this.startButton.setVisible(true);\n \n }",
"public void reset () {}",
"public void onResetClicked(View view) {\n // Hide the soft keyboard if it is present\n InputMethodManager m = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n m.hideSoftInputFromWindow(mBind.formContainer.getWindowToken(), 0);\n // Remove focus from all text fields by setting focus to the enclosing layout. This is to\n // prevent automatic scrolling to the focused text field.\n mBind.formContainer.requestFocus();\n // Load default values into text fields\n loadDefaultValues();\n // Scroll to top\n mBind.scrollView.smoothScrollTo(0, 0);\n // Remove invalid input error icon from the fields in which it was set\n for (Map.Entry<EditText, Validator> e : mValidators.entrySet()) {\n if (e.getKey().getError() != null) e.getKey().setError(null);\n }\n showToast(R.string.toast_reset_defaults);\n }",
"void reset ();",
"void reset() ;",
"public void reset()\n\t{\n\t}",
"public void reset()\n\t{\n\t}",
"public void resetUI() {\r\n\t\tframe.resetUI();\r\n\t}",
"private void reset() {\n }",
"public void reset() {\n\t\ttfLogradouro.setText(\"\");\n\t\ttfCidade.setText(\"\");\n\t\ttfBairro.setText(\"\");\n\t\ttfEmail.setText(\"\");\n\t\tftfRg.setText(\"\");\n\t\ttfEmitente.setText(\"\");\n\t\tftfCpf.setText(\"\");\n\t\tftfTipo.setText(\"\");\n\t\tdateChooser.setCalendar(null);\n\t\tftfNumero.setText(\"\");\n\t\tftfTelResidencial.setText(\"\");\n\t\tftfCep.setText(\"\");\n\t\tftfTelCelular.setText(\"\");\n\t\tftfDataCadastro.setText(getDataAtual());\n\t\ttfComplemento.setText(\"\");\n\t\ttfEmitente.requestFocus();\n\t\t\n\t}",
"@Override\r\n\tpublic void resetObjectListener(ActionEvent e) {\n\t\t\r\n\t}",
"public void resetClicked (View view){\n\n // retrieves and clears screen views\n TextView textView = findViewById(R.id.textView2);\n TextView textPlayer1 = findViewById(R.id.textView3);\n TextView textPlayer2 = findViewById(R.id.textView4);\n Button set = findViewById(R.id.button);\n EditText editText = findViewById(R.id.editText);\n\n set.setVisibility(View.VISIBLE);\n editText.setVisibility(View.VISIBLE);\n editText.setHint(\"Player\");\n editText.setText(\"\");\n textView.setText(\"\");\n textPlayer1.setText(\"\");\n textPlayer2.setText(\"\");\n\n // creates new game\n game = new Game();\n gameOver = false;\n playersCount = 0;\n\n // change board's tiles to blank\n for (int i = 0; i < 9; i++) {\n ImageButton button = findViewById(id[i]);\n button.setBackgroundResource(R.drawable.blank);\n }\n }",
"private void addHandlerForResetBtn() {\n resetBtn.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent e) {\n try {\n onClickResetBtn();\n } catch (IOException error) {\n System.out.println(\"There is a problem why tring to reset the Game: \" + error + \"\\n\");\n }\n }\n });\n }",
"public void reset() {\n }",
"public void reset() {\n }",
"public void reset() {\n }",
"public void reset() {\n }",
"@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n adaptee.btnReset_actionPerformed(e);\r\n\t}",
"public void reset() {\r\n\r\n b1.setText(\"\");\r\n b1.setEnabled(true);\r\n\r\n b2.setText(\"\");\r\n b2.setEnabled(true);\r\n\r\n b3.setText(\"\");\r\n b3.setEnabled(true);\r\n\r\n b4.setText(\"\");\r\n b4.setEnabled(true);\r\n\r\n b5.setText(\"\");\r\n b5.setEnabled(true);\r\n\r\n b6.setText(\"\");\r\n b6.setEnabled(true);\r\n\r\n b7.setText(\"\");\r\n b7.setEnabled(true);\r\n\r\n b8.setText(\"\");\r\n b8.setEnabled(true);\r\n\r\n b9.setText(\"\");\r\n b9.setEnabled(true);\r\n\r\n win = false;\r\n count = 0;\r\n }",
"public abstract void reset();",
"public abstract void reset();",
"public abstract void reset();",
"public abstract void reset();",
"public abstract void reset();",
"public abstract void reset();",
"public abstract void reset();",
"public abstract void reset();",
"public abstract void reset();",
"public abstract void reset();",
"public abstract void reset();",
"private void resetGame() {\n game.resetScores();\n this.dialogFlag = false;\n rollButton.setDisable(false);\n undoButton.setDisable(true);\n resetButton.setDisable(true);\n setDefault(\"player\");\n setDefault(\"computer\");\n }",
"@FXML\n\tprivate void resetButtonClick(ActionEvent event) {\n\t\tAlert alert = new Alert(AlertType.CONFIRMATION,\n\t\t\t\t\"Are you sure you want to reset the game? Your save will be reset to its initial status. This can not be undone.\",\n\t\t\t\tButtonType.YES, ButtonType.NO\n\t\t\t);\n\t\talert.getDialogPane().setMinHeight(Region.USE_PREF_SIZE);\n\t\talert.setTitle(\"Rest Confirmation\");\n\t\talert.setHeaderText(null);\n\t\tOptional<ButtonType> result = alert.showAndWait();\n\t\tif (result.get() == ButtonType.YES) {\n\t\t\tmodel.reset();\n\t\t}\n\t\telse {\n\t\t\tevent.consume();\n\t\t}\n\t}",
"public void reset() {\nsuper.reset();\nsetIncrease_( \"no\" );\nsetSwap_( \"tbr\" );\nsetMultrees_( \"no\" );\nsetRatchetreps_(\"200\");\nsetRatchetprop_(\"0.2\");\nsetRatchetseed_(\"0\");\n}",
"protected abstract void reset();",
"public void accountViewReset(){\n\t\taccountNameViewTextField.setText(null);\n\t\tuserRadioButton.setSelected(false);\n\t\tviewerRadioButton.setSelected(false);\n\t\t//\t\tuserClick = false;\n\t\t//\t\tviewerClick = false;\n\t\t//\t\tuserCheckBox.setSelected(userClick);\n\t\t//\t\tviewerCheckBox.setSelected(viewerClick);\n\t}"
] | [
"0.8358957",
"0.7920141",
"0.7583584",
"0.75164187",
"0.74975836",
"0.74718",
"0.7447853",
"0.7434788",
"0.7433082",
"0.74252677",
"0.7377005",
"0.7317063",
"0.72816575",
"0.72602826",
"0.72455317",
"0.71978545",
"0.7197244",
"0.7195028",
"0.71579176",
"0.7151107",
"0.71411586",
"0.71376693",
"0.71330744",
"0.71330744",
"0.71330744",
"0.71330744",
"0.71330744",
"0.71330744",
"0.71330744",
"0.71330744",
"0.71330744",
"0.71330744",
"0.71330744",
"0.71330744",
"0.71330744",
"0.71330744",
"0.71330744",
"0.71330744",
"0.71330744",
"0.71330744",
"0.71330744",
"0.71330744",
"0.71248704",
"0.7119803",
"0.7097627",
"0.7094091",
"0.7094091",
"0.7094091",
"0.7094091",
"0.7094091",
"0.7094091",
"0.7094091",
"0.7094091",
"0.7094091",
"0.7094091",
"0.7094091",
"0.7094091",
"0.7094091",
"0.7094091",
"0.7094091",
"0.7092859",
"0.709039",
"0.7064243",
"0.70511687",
"0.7039386",
"0.7035739",
"0.7031056",
"0.7024596",
"0.70178515",
"0.70142084",
"0.7007489",
"0.6999126",
"0.6999126",
"0.6986419",
"0.6985558",
"0.69563407",
"0.69535625",
"0.6925362",
"0.6912706",
"0.6909459",
"0.6909459",
"0.6909459",
"0.6909459",
"0.69005305",
"0.69000036",
"0.6894891",
"0.6894891",
"0.6894891",
"0.6894891",
"0.6894891",
"0.6894891",
"0.6894891",
"0.6894891",
"0.6894891",
"0.6894891",
"0.6894891",
"0.68917",
"0.68776387",
"0.68730855",
"0.6869852",
"0.6865218"
] | 0.0 | -1 |
Called when the stop button is pressed within the MainTriana Window | public void stopping() {
super.stopping();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void stopPressed() {\n // display\n TextLCD.print(STOP);\n // reset\n reset();\n }",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop() {}",
"void stop();",
"void stop();",
"void stop();",
"void stop();",
"void stop();",
"void stop();",
"void stop();",
"void stop();",
"void stop();",
"void stop();",
"void stop();",
"void stop();",
"void stop();",
"void stop();",
"void stop();",
"void stop();",
"void stop();",
"public void jBtnStop_actionPerformed(ActionEvent e3) {\n\t\tSystem.exit(0);\r\n\t\tcontentPane.setVisible(false);\r\n\t\t;\r\n\t}",
"@FXML\n void stopEvent(ActionEvent event) {\n \t// Hide the stop button and show the start button\n \tstartButton.setVisible(true);\n \tstopButton.setVisible(false);\n \t// Stop simulation\n \ttimeline.stop();\n \t//Clear the screen\n \tclearCanvasAndDraw();\n }",
"public void stop(){\n quit = true;\n }",
"public void stop(){\n\t\t\n\t}",
"public void stopping();",
"public void stop(){\n stop = true;\n }",
"public void stop() {\n stop = true;\n }",
"public void stop(){\n }",
"public void stop() {\n }",
"public void stop() {\n }",
"public void stop()\n {\n }",
"public void stop()\r\n\t{\r\n\t\tdoStop = true;\r\n\t}",
"private void butonStopTripActionPerformed(java.awt.event.ActionEvent evt) {\n Config.sendEvent(new events.TripEvent(false));\n\n }",
"public void stop() {\n\t\t\n\t}",
"public void stop()\n\t{\n\t\tindex = 0;\n\t\tlastUpdate = -1;\n\t\tpause();\n\t}",
"public void stop() {\n\t\tthis.stopper = true;\n\t}",
"public void stopped();",
"static void stop(){\n stop=true;\n firstPass=true;\n }",
"void stop() {\n }",
"private void stopGame() {\r\n gameThread.interrupt();\r\n gameWindow.getStartButton().setText(\"Start\");\r\n gameRunning = false;\r\n }",
"public void stop() {\n\t}",
"public void stop(){\n return;\n }",
"public boolean stop();",
"public void stop() {\n intake(0.0);\n }",
"public void stop() {\n\t\tSystem.out.println(\"Stopping application\");\n\t\trunning = false;\n\t}",
"private void stop() {\r\n\t\t\tstopped = true;\r\n\t\t}",
"public void stop() {\r\n\t\t// Tell the Gui Agent to shutdown the system\r\n\t\tGui.shutdown = true;\r\n\t}",
"public void stop()\n\t{\n\t\trunning = false;\n\t}",
"public void stop(){\n running = false;\n }",
"public final void stop() {\n running = false;\n \n \n\n }",
"public void stop() {\n System.out.println(\"stop\");\n }",
"public void stop() {\r\n running = false;\r\n }",
"public void onStop();",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tmainFrame.mainToolBar.jtb_stop.doClick();\n\t\t\t}",
"@Override\n\tpublic void stop() {\n\t\tSystem.out.println(\"TESLA has been stopped\");\n\t}",
"@Override\n public void stop() {}",
"public void stop()\n {\n running = false;\n }",
"public void stop() {\n _running = false;\n }",
"public void stop() {\r\n isRunning = false;\r\n System.out.println(\"Stop sim\");\r\n }",
"public void stopClick (View view){\n \tmHandler.removeCallbacks(startTimer);\n \tstopped = true;\n \thideStopButton();\n }",
"public void cancel() {\r\n\t\tbStop = true;\r\n\t}",
"public void stop() {\n running = false;\n }",
"@Override\r\n public void stopStage() {\n\r\n }",
"void notifyStop();",
"static void unstop(){\n stop=false;\n }",
"public synchronized void stop() {\n\t\tif (!running)\n\t\t\treturn;\n\t\ttry {\n\t\t\toptions.save();\n\t\t\twindow.dispose();\n\t\t\trunning = false;\n\t\t\tthread.join();\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t\tSystem.exit(1);\n\t}",
"public void stop() { \n System.out.println(\"Inside the stop() method.\"); \n }",
"private void startStop()\n\t\t{\n\t\tif(currentAlgo!=null)\n\t\t\t{\n\t\t\tif(isRunning())\n\t\t\t\t{\n\t\t\t\tbStartStop.setText(\"Stopping\");\n\t\t\t\tthread.toStop=true;\n\t\t\t\tcurrentAlgo.setStopping(true);\n\t\t\t\t}\n\t\t\telse\n\t\t\t\t{\n\t\t\t\tthread=new SteppingThread();\n\t\t\t\tbStartStop.setText(\"Stop\");\n\t\t\t\tthread.toStop=false;\n\t\t\t\tcurrentAlgo.setStopping(false);\n\t\t\t\tthread.start();\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"public abstract void stop();",
"public abstract void stop();",
"public abstract void stop();",
"public abstract void stop();",
"public abstract void stop();",
"public void stop() {\n\t\tthis.flag = false;\n\t\t\n\t\t\n\t}",
"public void stop() {\n setClosedLoopControl(false);\n }",
"@Override\r\n public void stop() {\r\n }",
"@Override\r\n public void stop() {\r\n }",
"@Override\r\n public void stop() {\r\n\r\n }",
"public static void stop(){\n printStatic(\"Stopped vehicle\");\n }",
"abstract public void stop();",
"public void stop() {\n System.out.println(\"STOP!\");\n xp.stop();\n }",
"public synchronized void stop() {\n stopping = true;\n }",
"@Override\n public void onStop() {\n Object object = this.mw;\n synchronized (object) {\n if (this.tV != null) {\n this.tV.cancel(true);\n }\n return;\n }\n }",
"private void stopButtonActionPerformed() {\n if(ascopy != null) {\n ascopy.stopCopy();\n }\n\n if(ascopyREC != null) {\n ascopyREC.stopCopy();\n }\n\n copyStopped = true;\n stopButton.setEnabled(false);\n }",
"public void stop() {\n\t\tthis.controller.terminate();\n\t}",
"public void onStop () {\t\t\n\t\t\n\t}",
"public void stopTimer() {\n maxAccelOutput.setText(String.valueOf(maxAccel));\n timeHandler.removeCallbacks(startTimer);\n startButton.setText(R.string.go_button);\n isRunning = false;\n }"
] | [
"0.7855083",
"0.73776644",
"0.73776644",
"0.73776644",
"0.73776644",
"0.73776644",
"0.73776644",
"0.73776644",
"0.73776644",
"0.73776644",
"0.73776644",
"0.73776644",
"0.73776644",
"0.73776644",
"0.73776644",
"0.73776644",
"0.73405427",
"0.7316555",
"0.7316555",
"0.7316555",
"0.7316555",
"0.7316555",
"0.7316555",
"0.7316555",
"0.7316555",
"0.7316555",
"0.7316555",
"0.7316555",
"0.7316555",
"0.7316555",
"0.7316555",
"0.7316555",
"0.7316555",
"0.7316555",
"0.72555923",
"0.72318274",
"0.72270775",
"0.7221537",
"0.7192495",
"0.71740633",
"0.7154768",
"0.71377623",
"0.7125766",
"0.7125766",
"0.7124118",
"0.7114934",
"0.7110775",
"0.7094342",
"0.7089918",
"0.7070401",
"0.70597816",
"0.702077",
"0.7013823",
"0.7006447",
"0.70040596",
"0.6966044",
"0.6962266",
"0.69612896",
"0.69526947",
"0.693697",
"0.6931554",
"0.692732",
"0.6904569",
"0.68929",
"0.68826705",
"0.68775696",
"0.68676764",
"0.68630654",
"0.68542415",
"0.6854151",
"0.68533015",
"0.68443406",
"0.6833624",
"0.68239504",
"0.6815373",
"0.6815059",
"0.68031573",
"0.6792989",
"0.6761668",
"0.67601746",
"0.6759591",
"0.674907",
"0.6746718",
"0.6746718",
"0.6746718",
"0.6746718",
"0.6746718",
"0.67338926",
"0.67195886",
"0.67124665",
"0.67124665",
"0.670141",
"0.66974807",
"0.66913646",
"0.6687831",
"0.6681058",
"0.66745394",
"0.6668085",
"0.66666776",
"0.6662777",
"0.66595024"
] | 0.0 | -1 |
Don't need to use this for GUI Builder units as everthing is updated by triana automatically | public void updateWidgetFor(String name) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public UpdatePerUnitCost() {\n initComponents();\n }",
"@Override\n\tprotected void UpdateUI() {\n\t\t\n\t}",
"@Override\n\tprotected void UpdateUI() {\n\t\t\n\t}",
"public void updateUI(){}",
"@Override\r\n public void updateUI() {\r\n }",
"private void updateGUIStatus() {\r\n\r\n }",
"private void updateUIAfterTick(){ \n //turn counter\n this.turnClock.setText(\"Turn: \" + this.village.getTurnCountAsString());\n \n //population\n this.populationAmount.setText(\"Population: \" + Integer.toString(this.village.getPopulation().getPopulationAmount()) );\n this.populationGrowthrate.setText(\"Growthrate: \" + Float.toString(this.village.getPopulation().getGrowthrate()));\n\n //buildings:\n this.constructedBuildingsArea.setText(this.getConstructedBuildingsAsList());\n \n //event\n this.eventText.setText(this.currentEvent.getEventText());\n this.eventOption1Btn.setText(this.currentEvent.getOption1Text());\n this.eventOption2Btn.setText(this.currentEvent.getOption2Text());\n this.eventOption3Btn.setText(this.currentEvent.getOption3Text());\n this.eventOption4Btn.setText(this.currentEvent.getOption4Text());\n \n }",
"@Override\n\tpublic void guiTinNhan() {\n\n\t}",
"public void updateUI(){\n\t\t\n\t\ttimeTV.setText(\"\"+String.format(\"\" + gameClock%10));\n\t\ttimeTV2.setText(\"\"+ gameClock/10+\".\");\n\t\tif (currentGameEngine!=null) {\n\t\t\tmultLeft.setText(\"multiplier: \"+currentGameEngine.getMultiplier()+\"X\");\n\t\t\tscoreTV.setText(\"\"+currentGameEngine.getScore());\n\t\t} else {\n\t\t\tscoreTV.setText(\"0\");\n\t\t}\n\n\t\t//errorTV.setText(\"\"+mFrameNum);\n\t\t\n\t\t\n\t}",
"public AddPowerUnitFrame() {\n initComponents();\n setLocationRelativeTo(null);\n }",
"@Override\n public void updateUi() {\n\n }",
"@Override\n public void updateUi() {\n\n }",
"@Override\n public void updateUi() {\n\n }",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n public void update() {\n jTextField1.setText(mCalculator.getDisplay());\n }",
"protected void _updateWidgets()\n\t{\n\t\t// Show the title\n\t\tString title = _spItem.getTitleAttr() ;\n\t\tif( title != null )\n\t\t\t_obsTitle.setText( title ) ;\n\t\telse\n\t\t\t_obsTitle.setText( \"\" ) ;\n\n\t\tString state = _avTab.get( \"state\" ) ;\n\t\tif( state == null )\n\t\t\t_obsState.setText( \"Not in Active Database\" ) ;\n\t\telse\n\t\t\t_obsState.setText( state ) ;\n\n\t\tignoreActions = true ; // MFO\n\n\t\tSpObs obs = ( SpObs )_spItem ;\n\t\t\n\t\t// Set the priority\n\t\tint pri = obs.getPriority() ;\n\t\t_w.jComboBox1.setSelectedIndex( pri - 1 ) ;\n\n\t\t// Set whether or not this is a standard\n\t\t_w.standard.setSelected( obs.getIsStandard() ) ;\n\n\t\t// Added for OMP (MFO, 7 August 2001)\n\t\t_w.optional.setValue( obs.isOptional() ) ;\n\n\t\tint numberRemaining = obs.getNumberRemaining();\n\t\t_w.setRemainingCount(numberRemaining);\n\n\t\t_w.unSuspendCB.addActionListener( this ) ;\n\n\t\tignoreActions = false ;\n\n\t\t_w.estimatedTime.setText( OracUtilities.secsToHHMMSS( obs.getElapsedTime() , 1 ) ) ;\n\n\t\t_updateMsbDisplay() ;\n\t}",
"public void buildGui() {\n\t}",
"@Override\r\n\tprotected void onUnitSelection(SelectionEvent e) {\n\t\tSystem.out.println(\"unit button implementation\");\r\n\t}",
"public OffertoryGUI() {\n initComponents();\n setTypes();\n }",
"private void TEMrunInfo(){\n\n int idummy;\n idummy=TEM.runcht.cht.getCd().getVegtype(); \t \n \tstateTB.setValueAt(Integer.toString(idummy), GUIconfigurer.I_VEGETATION, 1);\n idummy=TEM.runcht.cht.getCd().getDrgtype(); \t \n \tstateTB.setValueAt(Integer.toString(idummy), GUIconfigurer.I_DRAINAGE, 1);\n idummy=TEM.runcht.cht.getCd().getGrdid(); \t \n \tstateTB.setValueAt(Integer.toString(idummy), GUIconfigurer.I_GRD, 1);\n idummy=TEM.runcht.cht.getCd().getEqchtid(); \t \n \tstateTB.setValueAt(Integer.toString(idummy), GUIconfigurer.I_EQCHT, 1);\n idummy=TEM.runcht.cht.getCd().getSpchtid(); \t \n \tstateTB.setValueAt(Integer.toString(idummy), GUIconfigurer.I_SPCHT, 1);\n idummy=TEM.runcht.cht.getCd().getTrchtid(); \t \n \t stateTB.setValueAt(Integer.toString(idummy), GUIconfigurer.I_TRCHT, 1);\n \t \n float ddummy;\n ddummy=(float)TEM.runcht.initstate.getMossthick(); \t \n \tinitTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_MOSSTHICK, 1);\n ddummy=(float)TEM.runcht.initstate.getFibthick(); \t \n \tinitTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_FIBTHICK, 1);\n ddummy=(float)TEM.runcht.initstate.getHumthick(); \t \n \tinitTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_HUMTHICK, 1);\n ddummy=(float)TEM.runcht.initstate.getVegc(); \t \n \tinitTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_VEGC, 1);\n ddummy=(float)TEM.runcht.initstate.getVegn(); \t \n \tinitTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_VEGN, 1);\t\t\n ddummy=(float)TEM.runcht.initstate.getSoilc(); \t \n \tinitTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_SOILC, 1);\t \n ddummy=(float)TEM.runcht.initstate.getFibc(); \t \n \t\tinitTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_FIBSOILC, 1);\n ddummy=(float)TEM.runcht.initstate.getHumc(); \t \n \t\tinitTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_HUMSOILC, 1);\n ddummy=(float)TEM.runcht.initstate.getMinc(); \t \n \t\tinitTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_MINESOILC, 1);\n ddummy=(float)TEM.runcht.initstate.getAvln(); \t \n \tinitTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_AVAILN, 1);\n ddummy=(float)TEM.runcht.initstate.getOrgn(); \t \n \tinitTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_SOILN, 1);\n\n //\n \tvegpar_bgc vbpar = new vegpar_bgc();\n \tsoipar_bgc sbpar = new soipar_bgc();\n \tTEM.runcht.cht.getBgcPar(vbpar, sbpar);\n\n ddummy=vbpar.getM1(); \t \n \tfixparTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_m1, 1);\n ddummy=vbpar.getM2(); \t \n \tfixparTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_m2, 1);\n ddummy=vbpar.getM3(); \t \n \tfixparTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_m3, 1);\n ddummy=vbpar.getM4(); \t \n \tfixparTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_m4, 1);\n ddummy=sbpar.getFsoma(); \t \n \tfixparTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_fsoma, 1);\n ddummy=sbpar.getFsompr(); \t \n \tfixparTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_fsompr, 1);\n ddummy=sbpar.getFsomcr(); \t \n \tfixparTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_fsomcr, 1); \t\t\n ddummy=sbpar.getSom2co2(); \t \n \tfixparTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_som2co2, 1);\n \t\n //\n vegpar_cal vcpar = new vegpar_cal();\n soipar_cal scpar = new soipar_cal();\n TEM.runcht.cht.getCalPar(vcpar, scpar);\n\n ddummy=vcpar.getCmax(); \t \n \tcalparTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_CMAX, 1);\n ddummy=vcpar.getNmax(); \t \n \tcalparTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_NMAX, 1);\n ddummy=vcpar.getKrb(); \t \n \tcalparTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_KRB, 1);\n ddummy=vcpar.getCfall(); \t \n \tcalparTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_CFALL, 1);\n ddummy=vcpar.getNfall(); \t \n \tcalparTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_NFALL, 1);\n \t\n ddummy=scpar.getNup(); \t \n \tcalparTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_NUP, 1);\n ddummy=scpar.getKdcfib(); \t \n \tcalparTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_KDCFIB, 1);\n ddummy=scpar.getKdchum(); \t \n \tcalparTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_KDCHUM, 1);\n ddummy=scpar.getKdcmin(); \t \n \tcalparTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_KDCMIN, 1);\n ddummy=scpar.getKdcslow(); \t \n \tcalparTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_KDCSLOW, 1);\n\t \t\t\n }",
"public void setUnit(String unit);",
"private void change() {\n\t\tsetChanged();\n\t\t//NotifyObservers calls on the update-method in the GUI\n\t\tnotifyObservers();\n\t}",
"public void updateAmmo(){\n if(shots >= 9999)\n shots = 9999;\n ammo.setText(\"x\" + String.format(\"%04d\", shots));\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tif (typeCombox.getSelectedIndex() == 0) {\n\t\t\t\t\tunitText.setText(\"s\");\n\t\t\t\t\tunitText.setEnabled(false);\n\t\t\t\t} else {\n\t\t\t\t\tunitText.setText(\"\");\n\t\t\t\t\tunitText.setEnabled(true);\n\t\t\t\t}\n\t\t\t}",
"public void update(){\n\t\tif(saveTimer < 300) saveTimer ++;\n\t\ttimer ++;\n\t\t\n\t\tif(JudokaComponent.input.up) selectedItem --;\n\t\tif(JudokaComponent.input.down) selectedItem ++;\n\t\tif(JudokaComponent.input.right) selectedItem = 8;\n\t\tif(JudokaComponent.input.left) selectedItem = 0;\n\t\tif(JudokaComponent.input.escape) JudokaComponent.changeMenu(JudokaComponent.MAIN);\n\t\t\n\t\tif(selectedItem < -1) selectedItem = -1;\n\t\tif(selectedItem > 8) selectedItem = 8;\n\t\t\n\t\tif(selectedItem == -1) {\n\t\t\tname += JudokaComponent.input.getTypedKey();\n\t\t\tif(JudokaComponent.input.backSpace && name.length() > 0) name = name.substring(0, name.length() - 1);\n\t\t\tif(name.length() > 16) name = name.substring(0, name.length() - 1);\n\t\t}\n\t\t\n\t\tif(JudokaComponent.input.enter) {\n\t\t\tif(selectedItem > 1 && selectedItem < 5)JudokaComponent.changeMenu(JudokaComponent.TECHNIQUE_PICKER, new Object[]{0, selectedItem});\n\t\t\telse if(selectedItem > 4 && selectedItem != 8)JudokaComponent.changeMenu(JudokaComponent.TECHNIQUE_PICKER, new Object[]{1, selectedItem});\n\t\t\telse if(selectedItem == 0)JudokaComponent.changeMenu(JudokaComponent.TECHNIQUE_PICKER, new Object[]{3, selectedItem});\n\t\t\telse if(selectedItem == 1)JudokaComponent.changeMenu(JudokaComponent.TECHNIQUE_PICKER, new Object[]{4, selectedItem});\n\t\t\telse if(selectedItem == 8){\n\t\t\t\tboolean notReadyToSave = false;\n\t\t\t\tfor(Technique t: techniques) {\n\t\t\t\t\tif(t == null ) notReadyToSave = true;\n\t\t\t\t}\n\t\t\t\tif (!notReadyToSave){\n\t\t\t\t\ttry {\n\t\t\t\t\t\tJudokaComponent.propertyFileHandler.saveJudoka(techniques, name);\n\t\t\t\t\t\tsaveTimer = 0;\n\t\t\t\t\t} catch (FileNotFoundException e) { e.printStackTrace();\n\t\t\t\t\t} catch (ParserConfigurationException e) { e.printStackTrace();\n\t\t\t\t\t} catch (IOException e) { e.printStackTrace(); \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t//Overflow handler\n\t\tif(timer == Integer.MAX_VALUE) timer = 0;\n\t}",
"public mythologyBattleGui() {\n initComponents();\n labelClear();\n groupBoardArea();\n playBoard.initGame();\n initRan(18);\n }",
"public GUI_Edit_Tour(){\n init();\n }",
"@FXML\n private void updateGUI(){\n\n spriteImage.setImage(new Image(Main.gang.getCarSpriteURL()));\n\n // updating labels\n distanceLabel.setText(\"Travelled: \"+ Main.gang.getDistance() +\"Mi\");\n conditionsLabel.setText(\"Health Cond: \"+ Main.gang.getHealthConditions());\n daysLabel.setText(\"Days: \"+ Main.gang.getDays());\n\n if (Main.gang.isMoving()) {\n setOutBtn.setText(\"Speedup\");\n statusLabel.setText(\"Status: Moving\");\n } else {\n setOutBtn.setText(\"Set out\");\n statusLabel.setText(\"Status: Resting\");\n }\n }",
"@Override\n public void updateScreen() {\n if (dirty) {\n Alkahestry.logger.info(((ContainerMoleculeSplitter) container).moleculeSplitterTileEntity.progress);\n// String name = String.valueOf(((ContainerMoleculeSplitter) container).moleculeSplitterTileEntity.progress);\n// fontRenderer.drawString(name, xSize / 2 - fontRenderer.getStringWidth(name) / 2, 6, 0x404040);\n// fontRenderer.drawString(playerInv.getDisplayName().getUnformattedText(), 8, ySize - 94, 0x404040);\n dirty = false;\n }\n// ((ContainerMoleculeSplitter) container)\n// .moleculeSplitterTileEntity\n// .\n super.updateScreen();\n }",
"private void updateGUI() {\n\t\tsfrDlg.readSFRTableFromCPU();\n\t\tsourceCodeDlg.updateRowSelection(cpu.PC);\n\t\tsourceCodeDlg.getCyclesLabel().setText(\"Cycles count : \" + cpu.getCyclesCount());\n\t\tdataMemDlg.fillDataMemory();\n\t\t//ioPortsDlg.fillIOPorts();\t\t\n\t\tIterator iter = seg7DlgList.iterator();\n\t\twhile(iter.hasNext())\n\t\t\t((GUI_7SegDisplay)iter.next()).drawSeg();\n\t}",
"public void setUnit(Unit unit) {\r\n\t\tthis.unit = unit;\r\n\t}",
"public void actionPerformed( ActionEvent event )\n {\n if ( !getEnvironmentWindow().getEnvironment().getLock().equals(\n KalumetConsoleApplication.getApplication().getUserid() ) )\n {\n KalumetConsoleApplication.getApplication().getLogPane().addWarning(\n Messages.getString( \"environment.locked\" ), getEnvironmentWindow().getEnvironmentName() );\n return;\n }\n // check if the user can do it\n if ( !getEnvironmentWindow().adminPermission && !getEnvironmentWindow().softwareChangePermission )\n {\n KalumetConsoleApplication.getApplication().getLogPane().addWarning(\n Messages.getString( \"action.restricted\" ), getEnvironmentWindow().getEnvironmentName() );\n return;\n }\n // get the location object\n Location location = software.getLocation( event.getActionCommand() );\n if ( location == null )\n {\n return;\n }\n // get the location index\n int index = software.getUpdatePlan().indexOf( location );\n if ( index == -1 || index == 0 || software.getUpdatePlan().size() < 2 )\n {\n return;\n }\n // get the previous update unit\n Object previous = software.getUpdatePlan().get( index - 1 );\n // switch the update units\n software.getUpdatePlan().set( index - 1, location );\n software.getUpdatePlan().set( index, previous );\n // update the pane\n update();\n }",
"@Override\r\n\tpublic void update() {\r\n\r\n\t}",
"public void updateUI()\n\t{\n\t\tif( isRunning() == false) \n\t\t{\n\t\t\tupdateButton(\"Run\");\n\t\t\tbutton.setClickable(true);\n\t\t\tupdateTextView(Feedback.getMessage(Feedback.TYPE.NEW_TEST, null));\n\t\t}else\n\t\t{\n\t\t\tbutton.setClickable(true);\n\t\t\tupdateButton( \"Stop\" );\n\t\t\tupdateTextView(\"Tests are running.\");\n\n\t\t}\n\t}",
"@Override\r\n\tpublic void update() {\r\n\t}",
"public void refresh() {\r\n\t\tneeds.setText(needs());\r\n\t\tproduction.setText(production());\r\n\t\tjobs.setText(jobs());\r\n\t\tmarketPrices.setText(marketPrices());\r\n\t\tmarketSellAmounts.setText(marketSellAmounts());\r\n\t\tmarketBuyAmounts.setText(marketBuyAmounts());\r\n\t\tcompanies.setText(companies());\r\n\t\tmoney.setText(money());\r\n\t\ttileProduction.setText(tileProduction());\r\n\t\tcapital.setText(capital());\r\n\t\thappiness.setText(happiness());\r\n\t\tland.setText(land());\r\n\t\t//ArrayList of Agents sorted from lowest to highest in money is retrieved from Tile\r\n\t\tagents=tile.getAgentsByMoney();\r\n\t\tgui3.refresh();\r\n\t\tsliderPerson.setText(\"\"+agents.get(slider.getValue()).getMoney());\r\n\t\ttick.setText(tick());\r\n\t\tthis.pack();\r\n\t}",
"public void setUnit(Unit u)\r\n {\r\n display.setUnit(u);\r\n selectedIndex = -1;\r\n }",
"public void initGui() {\n/* 27 */ super.initGui();\n/* 28 */ updateActivePotionEffects();\n/* */ }",
"public void update() {\r\n\t\t\r\n\t}",
"public void actionPerformed( ActionEvent event )\n {\n if ( !getEnvironmentWindow().getEnvironment().getLock().equals(\n KalumetConsoleApplication.getApplication().getUserid() ) )\n {\n KalumetConsoleApplication.getApplication().getLogPane().addWarning(\n Messages.getString( \"environment.locked\" ), getEnvironmentWindow().getEnvironmentName() );\n return;\n }\n // check if the user can do it\n if ( !getEnvironmentWindow().adminPermission && !getEnvironmentWindow().softwareChangePermission )\n {\n KalumetConsoleApplication.getApplication().getLogPane().addWarning(\n Messages.getString( \"action.restricted\" ), getEnvironmentWindow().getEnvironmentName() );\n return;\n }\n // get the location object\n Location location = software.getLocation( event.getActionCommand() );\n if ( location == null )\n {\n return;\n }\n // get the location index\n int index = software.getUpdatePlan().indexOf( location );\n if ( index == -1 || index == ( software.getUpdatePlan().size() - 1 )\n || software.getUpdatePlan().size() < 2 )\n {\n return;\n }\n // get the next update unit\n Object next = software.getUpdatePlan().get( index + 1 );\n // switch the update units\n software.getUpdatePlan().set( index, next );\n software.getUpdatePlan().set( index + 1, location );\n // update the pane\n update();\n }",
"@Override\n\tprotected void setValueOnUi() {\n\n\t}",
"public void update() { \r\n // create container\r\n Element container = createContainer(root.actual(), name, \r\n wiz.getTotalWidth(), wiz.getTotalHeight());\r\n \r\n if (root.isType(OBJECTS)) {\r\n setAttributeIfMissing(container, POS_X, \"0\");\r\n setAttributeIfMissing(container, POS_Y, \"0\"); \r\n }\r\n \r\n // create background circle\r\n int startAng = wiz.getStartAngle();\r\n int endAng = wiz.getEndAngle();\r\n Element ellipse; \r\n ellipse = createEllipse(container, \"background\", wiz.getBackgroundWidth(), wiz.getBackgroundWidth(),\r\n startAng, endAng,\r\n wiz.getFillAttribute(), wiz.getLineAttribute(), !wiz.isCuttedCircle()); \r\n setIncludeAttributes(ellipse, (wiz.getTotalWidth() - wiz.getBackgroundWidth()) / 2, \r\n (wiz.getTotalHeight() - wiz.getBackgroundWidth()) / 2);\r\n \r\n //create meter \r\n int minVal = (int) (wiz.getMinValue() / wiz.getScale()) - wiz.getOffset();\r\n int maxVal = (int) (wiz.getMaxValue() / wiz.getScale()) - wiz.getOffset();\r\n Element meter = createMeter(container, \"metercomp\", wiz.getMeterWidth(), \r\n startAng, endAng, minVal, maxVal,\r\n wiz.getValue(), wiz.getTicks(), wiz.isClockwise(),\r\n wiz.getNeedleColor(), wiz.getArcAndTickColor(), wiz.getNumberReference());\r\n setIncludeAttributes(meter, (wiz.getTotalWidth() - wiz.getMeterWidth()) / 2,\r\n (wiz.getTotalHeight() - wiz.getMeterWidth()) / 2);\r\n \r\n // create numbers\r\n if (startAng > endAng) startAng -= 360;\r\n if (wiz.isClockwise()) {\r\n int temp = startAng;\r\n startAng = endAng;\r\n endAng = temp;\r\n }\r\n Element fontElement = root.getModel().getElementByName(wiz.getFontAttribute());\r\n int fontWidth = (int) BitmapFont.nameToDimension(fontElement.getAttribute(FONT_SIZE)).getWidth();\r\n int fontHeight = (int) BitmapFont.nameToDimension(fontElement.getAttribute(FONT_SIZE)).getHeight();\r\n int i;\r\n for (i = 0; i < wiz.getNumbers() && wiz.getNumbers() > 1; i++) {\r\n int value = wiz.getMinValue() + i*(wiz.getMaxValue()-wiz.getMinValue()) / (wiz.getNumbers()-1); \r\n String valueString = Integer.toString(value);\r\n int stringWidth = (fontWidth * valueString.length());\r\n \r\n Element number = createString(container, \"label\" + i, fontWidth * valueString.length(), \r\n fontHeight, valueString, wiz.getFontAttribute());\r\n \r\n double ang = Math.toRadians(startAng + i * (endAng - startAng) / (wiz.getNumbers() - 1));\r\n double rad = wiz.getMeterWidth() / 2 + wiz.getNumberDistance();\r\n int x = wiz.getTotalWidth() / 2 + (int) (Math.cos(-ang) * rad) - stringWidth / 2;\r\n int y = wiz.getTotalHeight() / 2 + (int) (Math.sin(-ang) * rad) - fontHeight / 2;\r\n setIncludeAttributes(number, x, y);\r\n }\r\n \r\n // labelX, X >= i -> poistetaan\r\n removeExtraElements(container, \"label\", i);\r\n \r\n // create a numberfield\r\n int extraSpace = wiz.getOffset() < 0 ? 1 : 0;\r\n int nroWidth = fontWidth * (Integer.toString(wiz.getMaxValue()).length() + extraSpace);\r\n Element numberfield = createNumber(container, \"number\", nroWidth, fontHeight, wiz.getValue(), \r\n wiz.getNumberReference(), wiz.getFontAttribute(), wiz.getOffset(), wiz.getScale());\r\n setIncludeAttributes(numberfield, (wiz.getTotalWidth() - nroWidth/*meterWizard.getMeterWidth()*/) / 2, \r\n wiz.getTotalHeight() / 2 + wiz.getMeterWidth() / 4);\r\n \r\n // create heading\r\n String text = wiz.getHeading();\r\n Element heading = createString(container, \"title\", fontWidth*text.length(), fontHeight, text, wiz.getFontAttribute());\r\n setIncludeAttributes(heading, (wiz.getTotalWidth() - fontWidth * text.length()) / 2, \r\n wiz.getTotalHeight() / 2 - wiz.getMeterWidth() / 4);\r\n \r\n // moves the attribute-objects to include objects with roles\r\n // System.out.println(\"finalizing...\");\r\n // Tools.createRoles(container);\r\n }",
"@Override\n public void update() {\n \n }",
"@Override\n\tpublic void update() {\n\t\t\n\t}",
"@Override\n\tpublic void update() {\n\t\t\n\t}",
"@Override\n\tpublic void update() {\n\t\t\n\t}",
"@Override\n\tpublic void update() {\n\t\t\n\t}",
"@Override\n\tpublic void update() {\n\t\t\n\t}",
"@Override\n\tpublic void update() {\n\t\t\n\t}",
"@Override\n\tpublic void update() {\n\t\t\n\t}",
"@Override\n\tpublic void update() {\n\t\t\n\t}",
"@Override\n\tpublic void update() {\n\t\t\n\t}",
"@Override\n\tpublic void update() {\n\t\t\n\t}",
"private void setupChangeSpeed() {\n\t\tFestivalSpeed[] speeds={FestivalSpeed.slow, FestivalSpeed.normal, FestivalSpeed.fast};\n\t\tfinal JComboBox speed_chooser = new JComboBox(speeds);\n\t\tspeed_chooser.setFont(new Font(\"Arial\", Font.PLAIN, 20));\n\t\tspeed_chooser.setForeground(Color.BLACK);\n\t\tspeed_chooser.setBackground(Color.WHITE);\n\n\t\t//set shown item to be the current speed\n\t\tspeed_chooser.setSelectedItem(parent_frame.getFestival().getFestivalSpeed());\n\t\tspeed_chooser.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tinput_from_user.requestFocusInWindow();//gets focus back to the spell here field\n\t\t\t\tif((FestivalSpeed)speed_chooser.getSelectedItem()!=null){\n\t\t\t\t\tparent_frame.getFestival().setFestivalSpeed((FestivalSpeed)speed_chooser.getSelectedItem());\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tspeed_chooser.setBounds(919, 658, 154, 40);\n\t\tadd(speed_chooser);\n\t}",
"@Override\n\tpublic void handleUpdateUI(String text, int code) {\n\t\t\n\t}",
"public quotaGUI() {\n initComponents();\n }",
"public void majGui(){\n gui.reset();\n ArrayList<Ball> ballsArray = balls.getBalls();\n for (Ball b: ballsArray){\n Vector location = b.getLocation();\n gui.addGraphicalElement(\n new Oval(\n (int) location.x, (int) location.y, Color.decode(\"#FF77b4\"), Color.decode(\"#00FF48\"), 50));\n }\n }",
"protected void updateUI() {\n this.runOnUiThread(new Runnable() {\n\n @Override\n public void run() {\n // TODO Auto-generated method stub\n xWakeupUncalibratedGyro.setText(\"Wakeup Uncalibrated Gyro X:\\n\"\n + mWakeupUncalibratedGyroData[0]);\n yWakeupUncalibratedGyro.setText(\"Wakeup Uncalibrated Gyro Y:\\n\"\n + mWakeupUncalibratedGyroData[1]);\n zWakeupUncalibratedGyro.setText(\"Wakeup Uncalibrated Gyro Z:\\n\"\n + mWakeupUncalibratedGyroData[2]);\n }\n });\n }",
"public void GUISetup(){\n simTime.setText(\"50\");\n qMean.setText(\"24\");\n dMean.setText(\"45\");\n pMean.setText(\"55\");\n changeNorth.add(simTime2);\n changeNorth.add(simTime);\n changeNorth.add(pMean2);\n changeNorth.add(pMean);\n changeNorth.add(dMean2);\n changeNorth.add(dMean);\n changeNorth.add(qMean2);\n changeNorth.add(qMean);\n changeSouth.add(okay);\n \n resultDisplay.setEditable(false);\n descriptionDisplay.setEditable(false);\n \n changeFrame.add(changeNorth, BorderLayout.NORTH);\n changeFrame.add(changeSouth, BorderLayout.SOUTH);\n \n center.add(totalCus, BorderLayout.CENTER);\n center.add(doorCus, BorderLayout.CENTER);\n center.add(phoneCus, BorderLayout.CENTER);\n center.add(unhelped, BorderLayout.CENTER);\n\n help.add(programDescription);\n menuBar.add(help);\n north.add(menuBar);\n \n frame.setBounds(650, 400, 500, 200);\n changeFrame.setBounds(500, 400, 1100, 145);\n resultFrame.setBounds(500, 200, 600, 500);\n dFrame.setBounds(500, 200, 600, 500);\n frame.add(north, BorderLayout.NORTH);\n frame.add(south, BorderLayout.SOUTH);\n frame.add(center, BorderLayout.CENTER);\n frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n resultFrame.add(scroll);\n dFrame.add(dScroll);\n showDetails.setEnabled(false);\n \n south.add(runSim);\n south.add(showDetails);\n south.add(changeSimProp);\n \n time = simTime.getText();\n questionT = qMean.getText();\n phoneT = pMean.getText();\n doorT = dMean.getText();\n frame.setVisible(true);\n buttonFunctions();\n }",
"@Override\n public void initGUI() {\n\n }",
"@Override\r\n\t\tpublic void update() {\n\t\t\t\r\n\t\t}",
"@Override\r\n\t\tpublic void update() {\n\t\t\t\r\n\t\t}",
"public void update() {\n\t\t\n\t}",
"@Override\n\tprotected void UpdateUI() {\n\t\tFineModulationDisplay(FineModulation);\n\t\tAutoGreaseDisplay(AutoGrease);\n\t\tQuickcouplerDisplay(Quickcoupler);\n\t\tRideControlDisplay(RideControl);\n\t\tBeaconLampDisplay(BeaconLamp);\n\t\tMirrorHeatDisplay(MirrorHeat);\n//\t\tFNKeyDisplay(ParentActivity.LockEntertainment);\n\t}",
"private void setupUI(){\n this.setupTimerSchedule(controller, 0, 500);\n this.setupFocusable(); \n this.setupSensSlider();\n this.setupInitEnable();\n this.setupDebugger();\n }",
"@Override\r\n\tpublic void update() {\n\t}",
"@Override\r\n\tpublic void update() {\n\t}",
"public void setDisplayUnit(Unit newUnit) {\n super.setDisplayUnit(newUnit);\n if (distanceUnitLabels != null) {\n for (JLabel label : distanceUnitLabels) {\n label.setText(\" (\"+newUnit+\") \");\n }\n }\n }",
"public void initGui()\n {\n Keyboard.enableRepeatEvents(true);\n this.buttons.clear();\n GuiButton guibutton = this.addButton(new GuiButton(3, this.width / 2 - 100, this.height / 4 + 24 + 12, I18n.format(\"selectWorld.edit.resetIcon\")));\n this.buttons.add(new GuiButton(4, this.width / 2 - 100, this.height / 4 + 48 + 12, I18n.format(\"selectWorld.edit.openFolder\")));\n this.buttons.add(new GuiButton(0, this.width / 2 - 100, this.height / 4 + 96 + 12, I18n.format(\"selectWorld.edit.save\")));\n this.buttons.add(new GuiButton(1, this.width / 2 - 100, this.height / 4 + 120 + 12, I18n.format(\"gui.cancel\")));\n guibutton.enabled = this.mc.getSaveLoader().getFile(this.worldId, \"icon.png\").isFile();\n ISaveFormat isaveformat = this.mc.getSaveLoader();\n WorldInfo worldinfo = isaveformat.getWorldInfo(this.worldId);\n String s = worldinfo == null ? \"\" : worldinfo.getWorldName();\n this.nameEdit = new GuiTextField(2, this.fontRenderer, this.width / 2 - 100, 60, 200, 20);\n this.nameEdit.setFocused(true);\n this.nameEdit.setText(s);\n }",
"void updateControls();",
"private void initComponentsCustom() {\n SGuiUtils.setWindowBounds(this, 480, 300);\n\n moTextUnitSymbol.setTextSettings(jlUnitSymbol.getText(), 15, 1);\n moTextUnitName.setTextSettings(jlName.getText(), 150, 1);\n moTextShortName.setTextSettings(SGuiUtils.getLabelName(jlAnalysisShortName.getText()), 10, 1);\n moTextName.setTextSettings(SGuiUtils.getLabelName(jlName.getText()), 100, 1);\n moKeyAnalysisType.setKeySettings(miClient, SGuiUtils.getLabelName(jlAnalysisType), true);\n\n moFields.addField(moTextUnitSymbol);\n moFields.addField(moTextUnitName);\n \n moFields.addField(moTextShortName);\n moFields.addField(moTextName);\n \n moFields.addField(moKeyAnalysisType);\n\n moFields.setFormButton(jbSave);\n }",
"private void createUIComponents() {\n valueTextField = new JTextField();\n FixedService f = new FixedService();\n valueTextField.setText(\"£ \" + f.getPrice(\"Fixed\"));\n valueTextField.setBorder(new EmptyBorder(0, 0, 0, 0));\n }",
"public ruser() {\n initComponents();\n update();\n }",
"@Override\r\n\tpublic void update() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void update() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void update() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void update() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void update() {\n\t\t\r\n\t}",
"public void willbeUpdated() {\n\t\t\n\t}",
"private void buildGui() {\n nifty = screen.getNifty();\n nifty.setIgnoreKeyboardEvents(true);\n nifty.loadStyleFile(\"nifty-default-styles.xml\");\n nifty.loadControlFile(\"nifty-default-controls.xml\");\n nifty.addScreen(\"Option_Screen\", new ScreenBuilder(\"Options_Screen\") {\n {\n controller((ScreenController) app);\n layer(new LayerBuilder(\"background\") {\n {\n childLayoutCenter();;\n font(\"Interface/Fonts/zombie.fnt\");\n backgroundImage(\"Backgrounds/ZOMBIE1.jpg\");\n visibleToMouse(true);\n }\n });\n layer(new LayerBuilder(\"foreground\") {\n {\n childLayoutOverlay();\n font(\"Interface/Fonts/zombie.fnt\");\n\n panel(new PanelBuilder(\"Switch_Options\") {\n {\n childLayoutVertical();\n control(new ButtonBuilder(\"\", \"Display Settings\") {\n {\n marginTop(\"42%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n interactOnClick(\"goTo(Display_Settings)\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n /*control(new ButtonBuilder(\"\", \"Graphics Settings\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(Graphics_Extension)\");\n }\n });*/\n control(new ButtonBuilder(\"\", \"Sound Settings\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(#Sound_Settings)\");\n }\n });\n control(new ButtonBuilder(\"\", \"Leaderboard\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(Leader_Board)\");\n }\n });\n control(new ButtonBuilder(\"\", \"Logout\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(#Login_Screen)\");\n }\n });\n control(new ButtonBuilder(\"\", \"Quit Game\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"quitGame()\");\n }\n });\n }\n });\n }\n });\n }\n }.build(nifty));\n nifty.addScreen(\"Graphics_Settings\", new ScreenBuilder(\"Graphics_Extension\") {\n {\n controller(settingsControl);\n layer(new LayerBuilder(\"background\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n childLayoutCenter();\n backgroundImage(\"Backgrounds/ZOMBIE1.jpg\");\n visibleToMouse(true);\n }\n });\n layer(new LayerBuilder(\"foreground\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n childLayoutOverlay();\n panel(new PanelBuilder(\"Settings\") {\n {\n childLayoutVertical();\n control(new ButtonBuilder(\"\", \"Display Settings\") {\n {\n marginTop(\"42%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(Display_Settings)\");\n }\n });\n /*control(new ButtonBuilder(\"\", \"Graphics Settings\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });*/\n control(new ButtonBuilder(\"\", \"Sound Settings\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(#Sound_Settings)\");\n }\n });\n control(new ButtonBuilder(\"\", \"Leaderboard\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(Leader_Board)\");\n }\n });\n control(new ButtonBuilder(\"\", \"Logout\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(#Login_Screen)\");\n }\n });\n control(new ButtonBuilder(\"\", \"Quit Game\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"quitGame()\");\n }\n });\n }\n });\n }\n });\n layer(new LayerBuilder(\"Settings\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n childLayoutVertical();\n panel(new PanelBuilder(\"Post_Water_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"40%\");\n marginTop(\"15%\");\n control(new LabelBuilder(\"\", \"Post Water\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n color(\"#ff0000\");\n }\n });\n control(new CheckboxBuilder(\"Post_Water_Button\") {\n {\n marginLeft(\"110%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"Water_Reflections_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"40%\");\n marginTop(\"5%\");\n control(new LabelBuilder(\"\", \"Water Reflections\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n color(\"#ff0000\");\n }\n });\n control(new CheckboxBuilder(\"Water_Reflections_Button\") {\n {\n marginLeft(\"45%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"Water_Ripples_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"40%\");\n marginTop(\"5%\");\n control(new LabelBuilder(\"\", \"Water Ripples\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n color(\"#ff0000\");\n }\n });\n control(new CheckboxBuilder(\"Water_Ripples_Button\") {\n {\n marginLeft(\"75%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"Water_Specular_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"40%\");\n marginTop(\"5%\");\n control(new LabelBuilder(\"\", \"Water Specular\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n color(\"#ff0000\");\n }\n });\n control(new CheckboxBuilder(\"Water_Specular_Button\") {\n {\n marginLeft(\"59%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"Water_Foam_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"40%\");\n marginTop(\"5%\");\n control(new LabelBuilder(\"\", \"Water Foam\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n color(\"#ff0000\");\n }\n });\n control(new CheckboxBuilder(\"Water_Foam_Button\") {\n {\n marginLeft(\"93%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"Sky_Dome_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"40%\");\n marginTop(\"5%\");\n control(new LabelBuilder(\"\", \"Sky Dome\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n color(\"#ff0000\");\n }\n });\n control(new CheckboxBuilder(\"Sky_Dome_Button\") {\n {\n marginLeft(\"128%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"Star_Motion_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"40%\");\n marginTop(\"5%\");\n control(new LabelBuilder(\"\", \"Star Motion\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n color(\"#ff0000\");\n }\n });\n control(new CheckboxBuilder(\"Star_Motion_Button\") {\n {\n marginLeft(\"106%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"Cloud_Motion_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"40%\");\n marginTop(\"5%\");\n control(new LabelBuilder(\"\", \"Cloud Motion\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n color(\"#ff0000\");\n }\n });\n control(new CheckboxBuilder(\"Cloud_Motion_Button\") {\n {\n marginLeft(\"87%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"Bloom_Light_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"40%\");\n marginTop(\"5%\");\n control(new LabelBuilder(\"\", \"Bloom Lighting\") {\n {\n color(\"#ff0000\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n control(new CheckboxBuilder(\"Bloom_Light_Button\") {\n {\n marginLeft(\"70%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"Light_Scatter_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"40%\");\n marginTop(\"5%\");\n control(new LabelBuilder(\"\", \"Light Scatter\") {\n {\n color(\"#ff0000\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n control(new CheckboxBuilder(\"Light_Scatter_Button\") {\n {\n marginLeft(\"90%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"Apply_Panel\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n childLayoutHorizontal();\n marginLeft(\"43%\");\n marginTop(\"5%\");\n control(new ButtonBuilder(\"Apply_Button\", \"Apply Settings\") {\n {\n interactOnClick(\"applySettings()\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n }\n });\n }\n });\n }\n }.build(nifty));\n nifty.addScreen(\"Display_Screen\", new ScreenBuilder(\"Display_Settings\") {\n {\n controller(settingsControl);\n layer(new LayerBuilder(\"background\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n childLayoutCenter();;\n backgroundImage(\"Backgrounds/ZOMBIE1.jpg\");\n visibleToMouse(true);\n }\n });\n layer(new LayerBuilder(\"foreground\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n childLayoutOverlay();\n panel(new PanelBuilder(\"Settings\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n childLayoutVertical();\n control(new ButtonBuilder(\"\", \"Display Settings\") {\n {\n marginTop(\"42%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n /*control(new ButtonBuilder(\"\", \"Graphics Settings\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(Graphics_Extension)\");\n }\n });*/\n control(new ButtonBuilder(\"\", \"Sound Settings\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(#Sound_Settings)\");\n }\n });\n control(new ButtonBuilder(\"\", \"Leaderboard\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(Leader_Board)\");\n }\n });\n control(new ButtonBuilder(\"\", \"Logout\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(#Login_Screen)\");\n }\n });\n control(new ButtonBuilder(\"\", \"Quit Game\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"quitGame()\");\n }\n });\n }\n });\n }\n });\n layer(new LayerBuilder(\"Settings\") {\n {\n childLayoutVertical();\n panel(new PanelBuilder(\"Resolution_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"40%\");\n marginTop(\"15%\");\n control(new LabelBuilder(\"\", \"Set Resolution\") {\n {\n color(\"#ff0000\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n control(new ListBoxBuilder(\"Resolution_Opts\") {\n {\n marginLeft(\"4%\");\n marginBottom(\"10%\");\n displayItems(1);\n showVerticalScrollbar();\n hideHorizontalScrollbar();\n selectionModeSingle();\n width(\"10%\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"Apply_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"45%\");\n marginTop(\"5%\");\n control(new ButtonBuilder(\"Apply_Button\", \"Apply Settings\") {\n {\n interactOnClick(\"displayApply()\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n }\n });\n }\n });\n }\n }.build(nifty));\n nifty.addScreen(\"Sound Settings\", new ScreenBuilder(\"#Sound_Settings\") {\n {\n controller(settingsControl);\n layer(new LayerBuilder(\"background\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n childLayoutCenter();;\n backgroundImage(\"Backgrounds/ZOMBIE1.jpg\");\n visibleToMouse(true);\n }\n });\n layer(new LayerBuilder(\"foreground\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n childLayoutOverlay();\n panel(new PanelBuilder(\"Settings\") {\n {\n font(\"Interface/Fonts/zombie.fnt\");\n childLayoutVertical();\n control(new ButtonBuilder(\"\", \"Display Settings\") {\n {\n marginTop(\"42%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(ElementBuilder.Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(Display_Settings)\");\n }\n });\n /*control(new ButtonBuilder(\"\", \"Graphics Settings\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(ElementBuilder.Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(Graphics_Extension)\");\n }\n });*/\n control(new ButtonBuilder(\"\", \"Sound Settings\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(ElementBuilder.Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n control(new ButtonBuilder(\"\", \"Leaderboard\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(ElementBuilder.Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(Leader_Board)\");\n }\n });\n control(new ButtonBuilder(\"\", \"Logout\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"goTo(#Login_Screen)\");\n }\n });\n control(new ButtonBuilder(\"\", \"Quit Game\") {\n {\n marginTop(\"2%\");\n marginLeft(\"5%\");\n height(\"50px\");\n width(\"150px\");\n align(ElementBuilder.Align.Left);\n font(\"Interface/Fonts/zombie.fnt\");\n interactOnClick(\"quitGame()\");\n }\n });\n }\n });\n }\n });\n layer(new LayerBuilder(\"Settings\") {\n {\n childLayoutVertical();\n panel(new PanelBuilder(\"#Master_Volume_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"30%\");\n marginTop(\"35%\");\n control(new LabelBuilder(\"\", \"Master Volume : \") {\n {\n color(\"#ff0000\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n control(new SliderBuilder(\"#Master_Volume\", false) {\n {\n marginLeft(\"20px\");\n min(0);\n max(100);\n width(\"25%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"#Ambient_Volume_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"30%\");\n marginTop(\"8%\");\n control(new LabelBuilder(\"\", \"Ambient Volume : \") {\n {\n color(\"#ff0000\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n control(new SliderBuilder(\"#Ambient_Volume\", false) {\n {\n marginLeft(\"20px\");\n min(0);\n max(100);\n width(\"25%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"#Combat_Volume_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"30%\");\n marginTop(\"8%\");\n control(new LabelBuilder(\"\", \"Combat Volume : \") {\n {\n color(\"#ff0000\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n control(new SliderBuilder(\"#Combat_Volume\", false) {\n {\n marginLeft(\"20px\");\n min(0);\n max(100);\n width(\"25%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"#Dialog_Volume_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"30%\");\n marginTop(\"8%\");\n control(new LabelBuilder(\"\", \"Dialog Volume : \") {\n {\n color(\"#ff0000\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n control(new SliderBuilder(\"#Dialog_Volume\", false) {\n {\n marginLeft(\"20px\");\n min(0);\n max(100);\n width(\"25%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"#Footsteps_Volume_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"30%\");\n marginTop(\"8%\");\n control(new LabelBuilder(\"\", \"Footsteps Volume : \") {\n {\n color(\"#ff0000\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n control(new SliderBuilder(\"#Footsteps_Volume\", false) {\n {\n marginLeft(\"20px\");\n min(0);\n max(100);\n width(\"25%\");\n }\n });\n }\n });\n panel(new PanelBuilder(\"Apply_Panel\") {\n {\n childLayoutHorizontal();\n marginLeft(\"45%\");\n marginTop(\"5%\");\n control(new ButtonBuilder(\"#Apply_Button\", \"Apply Settings\") {\n {\n interactOnClick(\"soundApply()\");\n font(\"Interface/Fonts/zombie.fnt\");\n }\n });\n }\n });\n }\n });\n\n }\n }.build(nifty));\n }",
"@Override\n\tpublic void update() { }",
"@Override\n\tpublic void update() {}",
"@Override\n\tpublic void update() {}",
"public void updateUI() {\n/* 393 */ setUI((ScrollPaneUI)UIManager.getUI(this));\n/* */ }",
"private void updateUi() {\n this.tabDetail.setDisable(false);\n this.lblDisplayName.setText(this.currentChild.getDisplayName());\n this.lblPersonalId.setText(String.format(\"(%s)\", this.currentChild.getPersonalId()));\n this.lblPrice.setText(String.format(\"%.2f\", this.currentChild.getPrice()));\n this.lblAge.setText(String.valueOf(this.currentChild.getAge()));\n this.dtBirthDate.setValue(this.currentChild\n .getBirthDate()\n .toInstant()\n .atZone(ZoneId.systemDefault())\n .toLocalDate());\n this.lblWeight.setText(String.format(\"%.1f kg\", this.currentChild.getWeight()));\n this.sldWeight.setValue(this.currentChild.getWeight());\n this.checkboxTrueRace.setSelected(!this.currentChild.isRace());\n this.imgChildProfile.setImage(this.currentChild.getAvatar());\n if (this.currentChild.getGender().equals(GenderType.MALE)){\n this.imgSex.setImage(FileUtils.loadImage(\"assets/image/gender/boy.png\"));\n this.lblSex.setText(\"Male\");\n }\n else {\n this.imgSex.setImage(FileUtils.loadImage(\"assets/image/gender/girl.png\"));\n this.lblSex.setText(\"Female\");\n }\n if (this.currentChild.isVirginity()){\n this.imgVirginity.setImage(FileUtils.loadImage(\"assets/image/virginity/virgin.png\"));\n this.lblVirginity.setText(\"Virgin\");\n }\n else {\n this.imgVirginity.setImage(FileUtils.loadImage(\"assets/image/virginity/not-virgin.png\"));\n this.lblVirginity.setText(\"Not Virgin\");\n }\n\n // TODO [assignment2] nastavit obrazek/avatar ditete v karte detailu\n // TODO [assignment2] nastavit spravny obrazek pohlavi v karte detailu\n // TODO [assignment2] nastavit spravny obrazek virginity atribut v v karte detailu\n }",
"public void update(){\r\n\t\t\r\n\t}",
"public void updateText() throws JUIGLELangException {\n SwingUtilities.invokeLater(new Runnable() {\n\n\n public void run() {\n fireTableStructureChanged();\n }\n });\n\n }",
"public UnitsComponent() {\n\t\ttry {\n\t\t\tsetHardwareUnitString(\"\");\n\t\t\tsetUserUnits(\"\");\n\t\t} catch (DeviceException e) {\n\t\t\tlogger.error(\"Code logic error:\", e);\n\t\t}\n\t\tuserUnitHasBeenExplicitlySet = false;\n\t\thardwareUnitHasBeenExplicitlySet = false;\n\t}",
"public void update() {}",
"@Override\n\tpublic void update() {\n\n\t}",
"@Override\n\tpublic void update() {\n\n\t}",
"@Override\n\tpublic void update() {\n\n\t}",
"@Override\n\tpublic void update() {\n\n\t}",
"@Override\n\tpublic void update() {\n\n\t}",
"@Override\n\tpublic void update() {\n\n\t}",
"@Override\r\n\tpublic void update() {\n\r\n\t}",
"@Override\r\n\tpublic void update() {\n\r\n\t}",
"public void doChanges1() {\n lm.undo(changeMark, lm.getChangeMark());\n // > UPDATE CURRENT STATE\n contInterior.put(\"Form\", new Rectangle(0, 0, 400, 300));\n compBounds.put(\"jTextField1\", new Rectangle(0, 0, 400, 20));\n baselinePosition.put(\"jTextField1-400-20\", new Integer(14));\n compBounds.put(\"jRadioButton1\", new Rectangle(0, 22, 93, 23));\n baselinePosition.put(\"jRadioButton1-93-23\", new Integer(15));\n compBounds.put(\"jRadioButton2\", new Rectangle(0, 48, 93, 23));\n baselinePosition.put(\"jRadioButton2-93-23\", new Integer(15));\n compBounds.put(\"jScrollPane1\", new Rectangle(0, 73, 35, 130));\n baselinePosition.put(\"jScrollPane1-35-130\", new Integer(0));\n compBounds.put(\"jLabel1\", new Rectangle(41, 73, 34, 14));\n baselinePosition.put(\"jLabel1-34-14\", new Integer(11));\n compBounds.put(\"jLabel2\", new Rectangle(81, 73, 34, 14));\n baselinePosition.put(\"jLabel2-34-14\", new Integer(11));\n compBounds.put(\"jTextField2\", new Rectangle(41, 93, 59, 20));\n baselinePosition.put(\"jTextField2-59-20\", new Integer(14));\n ld.updateCurrentState();\n // < UPDATE CURRENT STATE\n lc = new LayoutComponent(\"jLabel3\", false);\n // > START ADDING\n baselinePosition.put(\"jLabel3-34-14\", new Integer(11));\n {\n LayoutComponent[] comps = new LayoutComponent[]{lc};\n Rectangle[] bounds = new Rectangle[]{new Rectangle(0, 0, 34, 14)};\n String defaultContId = null;\n Point hotspot = new Point(13, 7);\n ld.startAdding(comps, bounds, hotspot, defaultContId);\n }\n // < START ADDING\n prefPaddingInParent.put(\"Form-jLabel3-1-0\", new Integer(11)); // parentId-compId-dimension-compAlignment\n prefPaddingInParent.put(\"Form-jLabel3-1-1\", new Integer(11)); // parentId-compId-dimension-compAlignment\n prefPadding.put(\"jTextField1-jLabel3-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jTextField1-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jTextField1-1-0-1\", new Integer(11)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jTextField1-1-0-2\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jTextField1-1-0-3\", new Integer(18)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jRadioButton1-jLabel3-1-0-1\", new Integer(7)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jRadioButton1-1-0-0\", new Integer(2)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jRadioButton2-jLabel3-1-0-0\", new Integer(2)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jRadioButton2-1-0-1\", new Integer(7)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel1-jLabel3-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel2-jLabel3-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jLabel1-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jLabel2-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel3-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel3-1-0-1\", new Integer(11)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel3-1-0-2\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel3-1-0-3\", new Integer(18)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jTextField2-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPaddingInParent.put(\"Form-jLabel3-0-0\", new Integer(10)); // parentId-compId-dimension-compAlignment\n prefPaddingInParent.put(\"Form-jLabel3-0-1\", new Integer(10)); // parentId-compId-dimension-compAlignment\n prefPadding.put(\"jScrollPane1-jLabel3-0-0-0\", new Integer(4)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jScrollPane1-0-0-0\", new Integer(4)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jScrollPane1-0-0-1\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jScrollPane1-0-0-2\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jScrollPane1-0-0-3\", new Integer(18)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel1-jLabel3-0-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jLabel1-0-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel2-jLabel3-0-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel2-jLabel3-0-0-1\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel2-jLabel3-0-0-2\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel2-jLabel3-0-0-3\", new Integer(18)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jLabel2-0-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel3-0-0-0\", new Integer(4)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel3-0-0-1\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel3-0-0-2\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel3-0-0-3\", new Integer(18)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jTextField2-0-0-0\", new Integer(4)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jRadioButton2-jLabel3-0-0-2\", new Integer(21)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n // > MOVE\n // > MOVE\n // > MOVE\n {\n Point p = new Point(53, 91);\n String containerId = \"Form\";\n boolean autoPositioning = true;\n boolean lockDimension = false;\n Rectangle[] bounds = new Rectangle[]{new Rectangle(39, 84, 34, 14)};\n ld.move(p, containerId, autoPositioning, lockDimension, bounds);\n }\n // < MOVE\n prefPaddingInParent.put(\"Form-jLabel3-1-0\", new Integer(11)); // parentId-compId-dimension-compAlignment\n prefPaddingInParent.put(\"Form-jLabel3-1-1\", new Integer(11)); // parentId-compId-dimension-compAlignment\n prefPadding.put(\"jTextField1-jLabel3-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jTextField1-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jTextField1-1-0-1\", new Integer(11)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jTextField1-1-0-2\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jTextField1-1-0-3\", new Integer(18)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jRadioButton1-jLabel3-1-0-1\", new Integer(7)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jRadioButton1-1-0-0\", new Integer(2)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jRadioButton2-jLabel3-1-0-0\", new Integer(2)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jRadioButton2-1-0-1\", new Integer(7)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel1-jLabel3-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel2-jLabel3-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jLabel1-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jLabel2-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel3-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel3-1-0-1\", new Integer(11)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel3-1-0-2\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel3-1-0-3\", new Integer(18)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jTextField2-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPaddingInParent.put(\"Form-jLabel3-0-0\", new Integer(10)); // parentId-compId-dimension-compAlignment\n prefPaddingInParent.put(\"Form-jLabel3-0-1\", new Integer(10)); // parentId-compId-dimension-compAlignment\n prefPadding.put(\"jScrollPane1-jLabel3-0-0-0\", new Integer(4)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jScrollPane1-0-0-0\", new Integer(4)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jScrollPane1-0-0-1\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jScrollPane1-0-0-2\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jScrollPane1-0-0-3\", new Integer(18)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel1-jLabel3-0-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jLabel1-0-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel2-jLabel3-0-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel2-jLabel3-0-0-1\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel2-jLabel3-0-0-2\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel2-jLabel3-0-0-3\", new Integer(18)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jLabel2-0-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel3-0-0-0\", new Integer(4)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel3-0-0-1\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel3-0-0-2\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel3-0-0-3\", new Integer(18)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jTextField2-0-0-0\", new Integer(4)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jRadioButton2-jLabel3-0-0-2\", new Integer(21)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n // > MOVE\n // > MOVE\n // > MOVE\n {\n Point p = new Point(52, 91);\n String containerId = \"Form\";\n boolean autoPositioning = true;\n boolean lockDimension = false;\n Rectangle[] bounds = new Rectangle[]{new Rectangle(39, 84, 34, 14)};\n ld.move(p, containerId, autoPositioning, lockDimension, bounds);\n }\n // < MOVE\n // > END MOVING\n compPrefSize.put(\"jLabel3\", new Dimension(34, 14));\n ld.endMoving(true);\n // < END MOVING\n ld.externalSizeChangeHappened();\n // > UPDATE CURRENT STATE\n contInterior.put(\"Form\", new Rectangle(0, 0, 400, 300));\n compBounds.put(\"jTextField1\", new Rectangle(0, 0, 400, 20));\n baselinePosition.put(\"jTextField1-400-20\", new Integer(14));\n compBounds.put(\"jRadioButton1\", new Rectangle(0, 22, 93, 23));\n baselinePosition.put(\"jRadioButton1-93-23\", new Integer(15));\n compBounds.put(\"jRadioButton2\", new Rectangle(0, 48, 93, 23));\n baselinePosition.put(\"jRadioButton2-93-23\", new Integer(15));\n compBounds.put(\"jScrollPane1\", new Rectangle(0, 73, 35, 130));\n baselinePosition.put(\"jScrollPane1-35-130\", new Integer(0));\n compBounds.put(\"jLabel1\", new Rectangle(41, 73, 34, 14));\n baselinePosition.put(\"jLabel1-34-14\", new Integer(11));\n compBounds.put(\"jLabel2\", new Rectangle(81, 73, 34, 14));\n baselinePosition.put(\"jLabel2-34-14\", new Integer(11));\n compBounds.put(\"jTextField2\", new Rectangle(41, 113, 59, 20));\n baselinePosition.put(\"jTextField2-59-20\", new Integer(14));\n compBounds.put(\"jLabel3\", new Rectangle(41, 93, 34, 14));\n baselinePosition.put(\"jLabel3-34-14\", new Integer(11));\n compPrefSize.put(\"jTextField1\", new Dimension(59, 20));\n compPrefSize.put(\"jRadioButton1\", new Dimension(93, 23));\n compPrefSize.put(\"jRadioButton2\", new Dimension(93, 23));\n compPrefSize.put(\"jScrollPane1\", new Dimension(35, 130));\n compPrefSize.put(\"jLabel1\", new Dimension(34, 14));\n compPrefSize.put(\"jLabel2\", new Dimension(34, 14));\n compPrefSize.put(\"jTextField2\", new Dimension(59, 20));\n compPrefSize.put(\"jLabel3\", new Dimension(34, 14));\n contInterior.put(\"Form\", new Rectangle(0, 0, 400, 300));\n compBounds.put(\"jTextField1\", new Rectangle(0, 0, 400, 20));\n baselinePosition.put(\"jTextField1-400-20\", new Integer(14));\n compBounds.put(\"jRadioButton1\", new Rectangle(0, 22, 93, 23));\n baselinePosition.put(\"jRadioButton1-93-23\", new Integer(15));\n compBounds.put(\"jRadioButton2\", new Rectangle(0, 48, 93, 23));\n baselinePosition.put(\"jRadioButton2-93-23\", new Integer(15));\n compBounds.put(\"jScrollPane1\", new Rectangle(0, 73, 35, 130));\n baselinePosition.put(\"jScrollPane1-35-130\", new Integer(0));\n compBounds.put(\"jLabel1\", new Rectangle(41, 73, 34, 14));\n baselinePosition.put(\"jLabel1-34-14\", new Integer(11));\n compBounds.put(\"jLabel2\", new Rectangle(81, 73, 34, 14));\n baselinePosition.put(\"jLabel2-34-14\", new Integer(11));\n compBounds.put(\"jTextField2\", new Rectangle(41, 113, 59, 20));\n baselinePosition.put(\"jTextField2-59-20\", new Integer(14));\n compBounds.put(\"jLabel3\", new Rectangle(41, 93, 34, 14));\n baselinePosition.put(\"jLabel3-34-14\", new Integer(11));\n ld.updateCurrentState();\n // < UPDATE CURRENT STATE\n changeMark = lm.getChangeMark();\n // > START RESIZING\n baselinePosition.put(\"jTextField2-59-20\", new Integer(14));\n compPrefSize.put(\"jTextField2\", new Dimension(59, 20));\n {\n String[] compIds = new String[]{\"jTextField2\"};\n Rectangle[] bounds = new Rectangle[]{new Rectangle(41, 113, 59, 20)};\n Point hotspot = new Point(99, 126);\n int[] resizeEdges = new int[]{1, -1};\n boolean inLayout = true;\n ld.startResizing(compIds, bounds, hotspot, resizeEdges, inLayout);\n }\n // < START RESIZING\n prefPaddingInParent.put(\"Form-jTextField2-0-1\", new Integer(10)); // parentId-compId-dimension-compAlignment\n // > MOVE\n // > MOVE\n // > MOVE\n {\n Point p = new Point(398, 133);\n String containerId = \"Form\";\n boolean autoPositioning = true;\n boolean lockDimension = false;\n Rectangle[] bounds = new Rectangle[]{new Rectangle(41, 113, 359, 20)};\n ld.move(p, containerId, autoPositioning, lockDimension, bounds);\n }\n // < MOVE\n prefPaddingInParent.put(\"Form-jTextField2-0-1\", new Integer(10)); // parentId-compId-dimension-compAlignment\n // > MOVE\n // > MOVE\n // > MOVE\n {\n Point p = new Point(399, 133);\n String containerId = \"Form\";\n boolean autoPositioning = true;\n boolean lockDimension = false;\n Rectangle[] bounds = new Rectangle[]{new Rectangle(41, 113, 359, 20)};\n ld.move(p, containerId, autoPositioning, lockDimension, bounds);\n }\n // < MOVE\n // > END MOVING\n ld.endMoving(true);\n // < END MOVING\n ld.externalSizeChangeHappened();\n // > UPDATE CURRENT STATE\n contInterior.put(\"Form\", new Rectangle(0, 0, 400, 300));\n compBounds.put(\"jTextField1\", new Rectangle(0, 0, 400, 20));\n baselinePosition.put(\"jTextField1-400-20\", new Integer(14));\n compBounds.put(\"jRadioButton1\", new Rectangle(0, 22, 93, 23));\n baselinePosition.put(\"jRadioButton1-93-23\", new Integer(15));\n compBounds.put(\"jRadioButton2\", new Rectangle(0, 48, 93, 23));\n baselinePosition.put(\"jRadioButton2-93-23\", new Integer(15));\n compBounds.put(\"jScrollPane1\", new Rectangle(0, 73, 35, 130));\n baselinePosition.put(\"jScrollPane1-35-130\", new Integer(0));\n compBounds.put(\"jLabel1\", new Rectangle(41, 73, 34, 14));\n baselinePosition.put(\"jLabel1-34-14\", new Integer(11));\n compBounds.put(\"jLabel2\", new Rectangle(81, 73, 34, 14));\n baselinePosition.put(\"jLabel2-34-14\", new Integer(11));\n compBounds.put(\"jTextField2\", new Rectangle(41, 113, 359, 20));\n baselinePosition.put(\"jTextField2-359-20\", new Integer(14));\n compBounds.put(\"jLabel3\", new Rectangle(41, 93, 34, 14));\n baselinePosition.put(\"jLabel3-34-14\", new Integer(11));\n prefPaddingInParent.put(\"Form-jRadioButton1-0-1\", new Integer(6)); // parentId-compId-dimension-compAlignment\n prefPaddingInParent.put(\"Form-jRadioButton2-0-1\", new Integer(6)); // parentId-compId-dimension-compAlignment\n compPrefSize.put(\"jTextField1\", new Dimension(59, 20));\n compPrefSize.put(\"jRadioButton1\", new Dimension(93, 23));\n compPrefSize.put(\"jRadioButton2\", new Dimension(93, 23));\n compPrefSize.put(\"jScrollPane1\", new Dimension(35, 130));\n compPrefSize.put(\"jLabel1\", new Dimension(34, 14));\n compPrefSize.put(\"jLabel2\", new Dimension(34, 14));\n compPrefSize.put(\"jTextField2\", new Dimension(59, 20));\n compPrefSize.put(\"jLabel3\", new Dimension(34, 14));\n contInterior.put(\"Form\", new Rectangle(0, 0, 400, 300));\n compBounds.put(\"jTextField1\", new Rectangle(0, 0, 400, 20));\n baselinePosition.put(\"jTextField1-400-20\", new Integer(14));\n compBounds.put(\"jRadioButton1\", new Rectangle(0, 22, 93, 23));\n baselinePosition.put(\"jRadioButton1-93-23\", new Integer(15));\n compBounds.put(\"jRadioButton2\", new Rectangle(0, 48, 93, 23));\n baselinePosition.put(\"jRadioButton2-93-23\", new Integer(15));\n compBounds.put(\"jScrollPane1\", new Rectangle(0, 73, 35, 130));\n baselinePosition.put(\"jScrollPane1-35-130\", new Integer(0));\n compBounds.put(\"jLabel1\", new Rectangle(41, 73, 34, 14));\n baselinePosition.put(\"jLabel1-34-14\", new Integer(11));\n compBounds.put(\"jLabel2\", new Rectangle(81, 73, 34, 14));\n baselinePosition.put(\"jLabel2-34-14\", new Integer(11));\n compBounds.put(\"jTextField2\", new Rectangle(41, 113, 359, 20));\n baselinePosition.put(\"jTextField2-359-20\", new Integer(14));\n compBounds.put(\"jLabel3\", new Rectangle(41, 93, 34, 14));\n baselinePosition.put(\"jLabel3-34-14\", new Integer(11));\n ld.updateCurrentState();\n // < UPDATE CURRENT STATE\n }",
"@Override\n public void update()\n {\n\n }",
"private synchronized void updateScreen(String arg){\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n setChanged();\n notifyObservers(arg);\n }\n });\n }",
"public void doAction()\n {\n if (app.getBuilderEditorPanel().getBoardViewPanel().getBoard().willPopulate())\n {\n app.getBuilderEditorPanel().getBoardViewPanel().getBoard().setPopulate(false);\n app.getBuilderEditorPanel().getBoardViewPanel().getBoard().resetBoard();\n app.getBuilderEditorPanel().getBoardViewPanel().refresh();\n }\n String levelType = app.getBuilderEditorPanel().getLevelTypeSelector().getSelectedItem().toString();\n int timeLimit = 0;\n if (!app.getBuilderEditorPanel().getTimeLimitSelector().getText().equals(\"\"))\n {\n timeLimit = Integer.parseInt(app.getBuilderEditorPanel().getTimeLimitSelector().getText());\n }\n int moveLimit = 0;\n if (!app.getBuilderEditorPanel().getMoveLimitSelector().getText().equals(\"\"))\n {\n moveLimit = Integer.parseInt(app.getBuilderEditorPanel().getMoveLimitSelector().getText());\n }\n boolean specialMoves = app.getBuilderEditorPanel().getSpecialMovesAllowedSelector().isSelected();\n int threeStar = Integer.parseInt(app.getBuilderEditorPanel().getThreeStarSelector().getText());\n int twoStar = Integer.parseInt(app.getBuilderEditorPanel().getTwoStarSelector().getText());\n int freq1 = app.getBuilderEditorPanel().getOptionsPanel().getFrequencies().get(\"1\");\n int freq2 = app.getBuilderEditorPanel().getOptionsPanel().getFrequencies().get(\"2\");\n int freq3 = app.getBuilderEditorPanel().getOptionsPanel().getFrequencies().get(\"3\");\n int freq4 = app.getBuilderEditorPanel().getOptionsPanel().getFrequencies().get(\"4\");\n int freq5 = app.getBuilderEditorPanel().getOptionsPanel().getFrequencies().get(\"5\");\n int freq6 = app.getBuilderEditorPanel().getOptionsPanel().getFrequencies().get(\"6\");\n int freqx1 = app.getBuilderEditorPanel().getOptionsPanel().getFrequencies().get(\"x1\");\n int freqx2 = app.getBuilderEditorPanel().getOptionsPanel().getFrequencies().get(\"x2\");\n int freqx3 = app.getBuilderEditorPanel().getOptionsPanel().getFrequencies().get(\"x3\");\n SquareFactory sf1 = new SquareFactory(freq1, freq2, freq3, freq4, freq5, freq6, freqx1, freqx2, freqx3);\n if (app.getBuilderEditorPanel().getCurrentLevel() != null)\n {\n if (levelType.equals(app.getBuilderEditorPanel().getCurrentLevel().getType()))\n {\n Board board = app.getBuilderEditorPanel().getBoardViewPanel().getBoard();\n board.setSquareFactory(new SquareFactory(freq1, freq2, freq3, freq4, freq5,\n freq6, freqx1, freqx2, freqx3));\n String bd = board.getBoardData();\n app.getBuilderEditorPanel().getCurrentLevel().setBoardData(bd);\n app.getBuilderEditorPanel().getCurrentLevel().saveLevel();\n } else {\n Board board = app.getBuilderEditorPanel().getBoardViewPanel().getBoard();\n board.setSquareFactory(new SquareFactory(freq1, freq2, freq3, freq4, freq5,\n freq6, freqx1, freqx2, freqx3));\n String bd = board.getBoardData();\n Level oldLevel = app.getBuilderEditorPanel().getCurrentLevel();\n int idx = game.getLevels().indexOf(oldLevel);\n if (levelType.equals(\"Release\"))\n {\n ReleaseLevel nl = new ReleaseLevel(oldLevel.getBasicLevel());\n game.replaceLevel(nl, idx);\n } else if (levelType.equals(\"Lightning\"))\n {\n LightningLevel nl = new LightningLevel(oldLevel.getBasicLevel());\n nl.setTimeLimit(timeLimit);\n game.replaceLevel(nl, idx);\n } else if (levelType.equals(\"Elimination\"))\n {\n EliminationLevel nl = new EliminationLevel(oldLevel.getBasicLevel());\n game.replaceLevel(nl, idx);\n } else if (levelType.equals(\"Puzzle\"))\n {\n PuzzleLevel nl = new PuzzleLevel(oldLevel.getBasicLevel());\n nl.setMoveLimit(moveLimit);\n game.replaceLevel(nl, idx);\n }\n app.getBuilderEditorPanel().setCurrentLevel(game.getLevels().get(idx));\n app.getBuilderEditorPanel().getCurrentLevel().setBoardData(bd);\n app.getBuilderEditorPanel().getCurrentLevel().saveLevel();\n }\n } else\n {\n Level l = null;\n File outFile = null;\n try\n {\n outFile = new File(getClass().getClassLoader().getResource(\"levels\").toURI().getPath(),\n \"level\" + (game.getLevels().size() + 1) + \".txt\");\n } catch (URISyntaxException e)\n {\n e.printStackTrace();\n }\n\n SquareFactory sf = new SquareFactory(freq1, freq2, freq3, freq4, freq5, freq6, freqx1, freqx2, freqx3);\n app.getBuilderEditorPanel().getBoardViewPanel().getBoard().setSquareFactory(sf);\n\n if (levelType.equals(\"Puzzle\"))\n {\n l = new PuzzleLevel(\"NewLevel\", game.getLevels().size() + 1, 0, twoStar,\n threeStar, \"\", true, moveLimit, specialMoves, outFile);\n } else if (levelType.equals(\"Elimination\"))\n {\n l = new EliminationLevel(\"NewLevel\", game.getLevels().size() + 1, 0, twoStar,\n threeStar, \"\", true, specialMoves, outFile);\n } else if (levelType.equals(\"Lightning\"))\n {\n l = new LightningLevel(\"NewLevel\", game.getLevels().size() + 1, 0, twoStar,\n threeStar, \"\", true, timeLimit, specialMoves, outFile);\n } else if (levelType.equals(\"Release\"))\n {\n l = new ReleaseLevel(\"NewLevel\", game.getLevels().size() + 1, 0, twoStar,\n threeStar, \"\", true, specialMoves, outFile);\n }\n app.getBuilderEditorPanel().getBoardViewPanel().getBoard().setLevel(l);\n assert l != null;\n l.setBoardData(app.getBuilderEditorPanel().getBoardViewPanel().getBoard().getBoardData());\n l.saveLevel();\n }\n game.reloadFromDisk();\n app.getBuilderLevelSelectPanel().updateLevelList(game);\n }"
] | [
"0.67090327",
"0.6590574",
"0.6590574",
"0.65773565",
"0.6542683",
"0.64939475",
"0.6347497",
"0.6285818",
"0.6263256",
"0.6160875",
"0.6128596",
"0.6128596",
"0.6128596",
"0.6016469",
"0.6011915",
"0.5993663",
"0.59793603",
"0.595969",
"0.59219193",
"0.5902911",
"0.5874526",
"0.58495516",
"0.5837471",
"0.58322126",
"0.58273464",
"0.58177483",
"0.58019817",
"0.58019364",
"0.5797642",
"0.5790109",
"0.5784856",
"0.57845515",
"0.5779731",
"0.5778547",
"0.5777735",
"0.57766426",
"0.57632405",
"0.57623434",
"0.5762193",
"0.5761017",
"0.5757549",
"0.5750063",
"0.5748458",
"0.57406867",
"0.57406867",
"0.57406867",
"0.57406867",
"0.57406867",
"0.57406867",
"0.57406867",
"0.57406867",
"0.57406867",
"0.57406867",
"0.5740607",
"0.5736504",
"0.5732631",
"0.5727019",
"0.5720896",
"0.570845",
"0.5703902",
"0.5701608",
"0.5701608",
"0.5701195",
"0.56993556",
"0.5694379",
"0.5694272",
"0.5694272",
"0.56912863",
"0.5687844",
"0.5686788",
"0.5685227",
"0.5684977",
"0.5684469",
"0.56812227",
"0.56812227",
"0.56812227",
"0.56812227",
"0.56812227",
"0.5678618",
"0.56784725",
"0.5677223",
"0.56697327",
"0.56697327",
"0.5666583",
"0.56644",
"0.5664153",
"0.5662387",
"0.5654626",
"0.5653898",
"0.5650946",
"0.5650946",
"0.5650946",
"0.5650946",
"0.5650946",
"0.5650946",
"0.5650722",
"0.5650722",
"0.5648688",
"0.56486356",
"0.56472677",
"0.5643796"
] | 0.0 | -1 |
This returns a brief! description of what the unit does. The text here is shown in a pop up window when the user puts the mouse over the unit icon for more than a second. | public String getPopUpDescription() {
return "Put InputString's brief description here";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getUnitDescription ()\n {\n return unitDescription;\n }",
"public String getUnitDescription() {\r\n\t\treturn this.unitDescription;\r\n\t}",
"public final String explainUnit () {\n\t\tStringBuffer b = new StringBuffer(120) ;\n\t\tParsing t = new Parsing(symbol);\n\t\tUnit u = new Unit();\n\t\tint ini1 = 0;\n\t\ttry { u.unitec(t, b); }\n\t\tcatch (Exception e) {\n\t\t\tif (DEBUG>0) {\n\t\t\t\tSystem.out.println(\"++++explainUnit: catched: \" + e);\n\t\t\t\ttry { Thread.sleep(2000); } catch(Exception i) {;}\n\t\t\t}\n\t\t\tif (t.currentChar() == '\"') {\t// \"picture\" unit\n\t\t\t\tb.append(Parsing.explainComplex(t.toString()));\n\t\t\t}\n\t\t\telse { String prefix = \"?***bad Unit <\";\n\t\t\tb.insert(0, prefix);\n\t\t\tb.insert(prefix.length(), symbol);\n\t\t\tb.insert(prefix.length() + symbol.length(), \"> \");\n\t\t\t}\n\t\t}\t\t\t// Should never happen!\n\t\tini1 = skipBrackets(b);\t\t\t// Remove enclosing Parentheses\n\t\tb.append(\" (\"); toSI(b, 1); b.append(\")\") ;\n\t\t// return(\"\"+b.substring(ini1));\t// Java>=1.2\n\t\treturn(b.toString().substring(ini1));\t// AnyJavaVersion\n\t}",
"@Override\r\n public String toString() {\r\n return unit.getName();\r\n }",
"public String getUnit();",
"@Override\n public String getDescription() {\n\t\treturn this.getName() + \"\\nDamage: \" + this.getWeaponDamage() + \"\\nSpeed: \" + this.getWeaponSpeed() + \"\\nRange: \" + this.getWeaponRange();\n \t\n }",
"String getUnit();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"public String getDescription();",
"java.lang.String getDescription();",
"java.lang.String getDescription();",
"java.lang.String getDescription();",
"java.lang.String getDescription();",
"java.lang.String getDescription();",
"java.lang.String getDescription();",
"java.lang.String getDescription();",
"java.lang.String getDescription();",
"java.lang.String getDescription();",
"@Override\n\tpublic String getDescription() {\n\t\treturn water.getDescription()+\"¼Ó±ù\";\n\t}",
"public String getDescription() {\n return roomType.getDescription() + \" with a spray-resistant shower\";\n }",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"public String getDescription ();",
"String description();",
"String description();",
"String description();",
"String description();",
"String description();",
"String description();",
"String description();",
"String description();",
"String description();",
"String description();",
"String description();",
"String description();",
"public String getUnit () {\n\treturn this.unit;\n }",
"public String getUnit()\n {\n return (this.unit);\n }",
"public abstract String getUnit();",
"public String getUnit() {\n\t\treturn(symbol);\n\t}",
"String getDisplay_description();",
"public static final String explainUnit (String text) {\n\t\tParsing t = new Parsing(text);\n\t\tStringBuffer b = new StringBuffer(120) ;\n\t\tUnit u = new Unit();\n\t\tint ini1 = 0;\n\t\tif (!initialized) init();\n\t\ttry { u.unitec(t, b); }\n\t\tcatch (Exception e) { \n\t\t\tif (DEBUG>0) {\n\t\t\t\tSystem.out.println(\"++++explainUnit: catched: \" + e); \n\t\t\t\ttry { Thread.sleep(2000); } catch(Exception i) {;}\n\t\t\t}\n\t\t\tif (t.currentChar() == '\"') {\t// \"picture\" unit\n\t\t\t\tb.append(Parsing.explainComplex(t.toString()));\n\t\t\t}\n\t\t\telse { String prefix = \"?***bad Unit <\";\n\t\t\tb.insert(0, prefix);\n\t\t\tb.insert(prefix.length(), text);\n\t\t\tb.insert(prefix.length() + text.length(), \"> \");\n\t\t\t}\n\t\t}\n\t\t//System.out.println(\"\\n..explainUni........<\" + b + \">\");\n\t\tini1 = skipBrackets(b);\t\t\t// Remove enclosing Parentheses\n\t\t// return(\"\"+b.substring(ini1));\t// Java>=1.2\n\t\treturn(b.toString().substring(ini1));\t// AnyJavaVersion\n\t}",
"public String description();",
"public String unit() {\n return this.unit;\n }"
] | [
"0.7571397",
"0.7308072",
"0.72858644",
"0.6939771",
"0.68205357",
"0.6798144",
"0.6796176",
"0.6749766",
"0.6749766",
"0.6749766",
"0.6749766",
"0.6749766",
"0.6749766",
"0.6749766",
"0.6749766",
"0.6749766",
"0.6749766",
"0.6749766",
"0.6749766",
"0.6749766",
"0.6749766",
"0.6749766",
"0.6749766",
"0.6749766",
"0.6749766",
"0.6749766",
"0.6749766",
"0.6749766",
"0.6749766",
"0.6749766",
"0.6749766",
"0.6695486",
"0.6695486",
"0.6695486",
"0.6695486",
"0.6695486",
"0.6695486",
"0.6695486",
"0.6695486",
"0.6695486",
"0.6609609",
"0.66059387",
"0.6596934",
"0.6596934",
"0.6596934",
"0.6596934",
"0.6596934",
"0.6596934",
"0.6596934",
"0.6596934",
"0.6596934",
"0.6596934",
"0.6596934",
"0.6596934",
"0.6596934",
"0.6596934",
"0.6596934",
"0.6596934",
"0.6596934",
"0.6596934",
"0.6596934",
"0.6596934",
"0.6596934",
"0.6596934",
"0.6596934",
"0.6596934",
"0.6596934",
"0.6596934",
"0.6596934",
"0.6596934",
"0.6596934",
"0.6596934",
"0.6596934",
"0.6596934",
"0.6596934",
"0.6596934",
"0.6596934",
"0.6596934",
"0.6596934",
"0.6596934",
"0.65812534",
"0.65755236",
"0.65755236",
"0.65755236",
"0.65755236",
"0.65755236",
"0.65755236",
"0.65755236",
"0.65755236",
"0.65755236",
"0.65755236",
"0.65755236",
"0.65755236",
"0.6535824",
"0.6525675",
"0.6525407",
"0.65202796",
"0.6518732",
"0.64954937",
"0.6483161",
"0.6470312"
] | 0.0 | -1 |
Sends report via mail | public void sendMailReport() {
mailService.sendMail("[email protected]", "ToDo report",
String.format("There are '%s' todo entries!", todoListService.getAllEntries().size()));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void SendReportAsEmail(String[] EmailIds) {\n\t\t// Recipient's email ID needs to be mentioned.\n\t\t// Sender's email ID needs to be mentioned\n\t\tString from = \"[email protected]\";\n\t\tString pass = \"Password123$\";\n\t\t// Recipient's email ID needs to be mentioned.\n\t\t;\n\t\tString host = \"smtp.mail.yahoo.com\";\n\n\t\t// Get system properties\n\t\tProperties properties = System.getProperties();\n\t\t// Setup mail server\n\t\tproperties.put(\"mail.smtp.starttls.enable\", \"true\");\n\t\tproperties.put(\"mail.smtp.host\", host);\n\t\tproperties.put(\"mail.smtp.user\", from);\n\t\tproperties.put(\"mail.smtp.password\", pass);\n\t\tproperties.put(\"mail.smtp.port\", \"587\");\n\t\tproperties.put(\"mail.smtp.auth\", \"true\");\n\n\t\t// Get the default Session object.\n\t\tSession session = Session.getDefaultInstance(properties);\n\n\t\ttry {\n\t\t\t// Create a default MimeMessage object.\n\t\t\tMimeMessage message = new MimeMessage(session);\n\n\t\t\t// Set From: header field of the header.\n\t\t\tmessage.setFrom(new InternetAddress(from));\n\n\t\t\t// Set To: header field of the header.\n\t\t\tfor (int i = 0; i < EmailIds.length; i++) {\n\t\t\t\tmessage.addRecipient(Message.RecipientType.TO, new InternetAddress(EmailIds[i]));\n\t\t\t}\n\n\t\t\t// Set Subject: header field\n\t\t\tmessage.setSubject(\"TEST REPORT\" + \" | Framework Generated Report\");\n\t\t\tDate dt = new Date();\n\t\t\tMultipart multipart = new MimeMultipart();\n\t\t\tBodyPart textpart = new MimeBodyPart();\n\t\t\t// Now set the actual message\n\t\t\tmultipart.addBodyPart(textpart);\n\n\t\t\ttextpart.setText(\"Please find the attached report\" + \"\\n\" + \"This report was generated on \" + dt.toString()\n\t\t\t\t\t+ \"\\n\" + \"Testing Team\" + \"\\n\" + \"Thank You\");\n\n\t\t\tString filename = System.getProperty(\"user.dir\") + \"/\" + \"report.html\";\n\t\t\t// Multipart multipart = new MimeMultipart();\n\n\t\t\tBodyPart messageBodyPart = new MimeBodyPart();\n\t\t\tDataSource ds = new FileDataSource(filename);\n\t\t\tmessageBodyPart.setDataHandler(new DataHandler(ds));\n\t\t\tmessageBodyPart.setFileName(filename);\n\t\t\tmultipart.addBodyPart(messageBodyPart);\n\n\t\t\t// Send the complete message parts\n\t\t\tmessage.setContent(multipart);\n\t\t\t// Send message\n\t\t\tTransport transport = session.getTransport(\"smtp\");\n\t\t\ttransport.connect(host, from, pass);\n\t\t\ttransport.sendMessage(message, message.getAllRecipients());\n\t\t\ttransport.close();\n\t\t\tSystem.out.println(\"Sent message successfully....\");\n\t\t} catch (MessagingException mex) {\n\t\t\tmex.printStackTrace();\n\t\t}\n\t}",
"public void sendEmail(String username, String password) throws Throwable {\r\n\t\tString emailSubject = \"Test Report on \" + new Date();\r\n\t\tString emailMsg = \"This is an automatically generated email for test run\";\r\n\t\tEmailAttachment attachment = new EmailAttachment();\r\n\t\tattachment.setPath(\"test-output/emailable-report.html\");\r\n\t\tattachment.setDisposition(EmailAttachment.ATTACHMENT);\r\n\t\tattachment.setDescription(\"Test Report\");\r\n\t\tMultiPartEmail email = new MultiPartEmail();\r\n\t\temail.setHostName(\"imap.gmail.com\");\r\n\t\temail.setSmtpPort(465);\r\n\t\temail.setAuthenticator(new DefaultAuthenticator(username, password));\r\n\t\temail.setSSLCheckServerIdentity(true);\r\n\t\temail.setSSLOnConnect(true);\r\n\t\tSystem.out.println(\"Connected to gmail..\");\r\n\t\tSystem.out.println(\"Sending mail to: \" + toEmails);\r\n\t\tSystem.out.println(\"Subject: \" + emailSubject + \"\\nEmail Body: \" + emailMsg);\r\n\t\temail.setFrom(username);\r\n\t\temail.setSubject(emailSubject);\r\n\t\temail.setMsg(emailMsg);\r\n\t\tString[] emails = toEmails.split(\",\");\r\n\t\temail.addTo(emails);\r\n\t\temail.attach(attachment);\r\n\t\temail.send();\r\n\t\tSystem.out.println(\"Email Sent..\");\r\n\t}",
"public void SendEmail() throws Exception {\r\n\r\n\t\t\t\r\n\t\t// Create the attachment\r\n\t\t EmailAttachment attachment = new EmailAttachment();\r\n\t\t attachment.setURL(new URL(\"file:///C:/Users/sachinsehgal2/eclipse-workspace/TeachAway/Test_Report.html\"));\r\n\t\t attachment.setDisposition(EmailAttachment.ATTACHMENT);\r\n\t\t attachment.setDescription(\"Selenium Report\");\r\n\t\t attachment.setName(\"TeachAway_Menu Navigation Automation Report.html\");\r\n\r\n\t\t // Create the email message\r\n\t\t MultiPartEmail email = new MultiPartEmail();\r\n\t\t\temail.setHostName(\"smtp.gmail.com\");\r\n\t\t\temail.setSmtpPort(465);\r\n\t\t\temail.setAuthentication(\"[email protected]\", \"password\");\r\n\t\t\temail.setSSLOnConnect(true);\r\n\t\t \temail.addCc(\"[email protected]\", \"StakeHolder\");\r\n\t\t\temail.setFrom(\"[email protected]\", \"admin\");\r\n\t\t\temail.setSubject(\"Automation Status -TeachAway Navigation Menu\");\r\n\t\t\temail.setMsg(\"PFA the results for automation of Navigation menu for Teach Away.\");\r\n\t\t \r\n\t\t // add the attachment\r\n\t\t email.attach(attachment);\r\n\t\t // send the email\r\n\t\t email.send();\r\n\t\tSystem.out.println(\"The email Sent\");\r\n\t}",
"@Override\n\tpublic void sendMail(Mail mail) {\n\t\t\n\t}",
"public static void sendEmail(SuspectionReport report,String covidLocation) throws Exception {\n\t\tlogger.info(\"--------------- sendEmailToCustomer --------------\");\n\t\ttry {\n\t\t\tProperties mailProps = new Properties();\n\t\t\tfinal String username = \"[email protected]\";\n\t final String password = \"bvhibkzgkicfdsqh\";\n\n\t Properties props = new Properties();\n\t props.put(\"mail.smtp.starttls.enable\",\"true\");\n\t props.put(\"mail.smtp.host\", \"smtp.gmail.com\"); \n\t props.put(\"mail.smtp.auth\", \"true\"); \n\t props.put(\"mail.smtp.port\", \"587\"); ; //TLS\n\t \n\t Session session = Session.getDefaultInstance(props, \n\t new javax.mail.Authenticator() { \n\t protected PasswordAuthentication getPasswordAuthentication() { \n\t return new PasswordAuthentication(username,password); \n\t } \n\t }); \n\t\t\t//mailProps.put(\"mail.smtp.host\", apiUtil.getProperty(\"spring.mail.host\"));\n\t\t\t//Session mailSession = Session.getDefaultInstance(mailProps, null);\n\t\t\tInternetAddress toAddrs = new InternetAddress(apiUtil.getProperty(\"email.to.address\"));\n\t\t\t\n\t\t\tInternetAddress fromAddr = new InternetAddress(apiUtil.getProperty(\"email.from.address\").toString().trim());\n\t\t\t// Create and initialize message\n\t\t\tjavax.mail.Message message = new MimeMessage(session);\n\t\t\tmessage.setFrom(fromAddr);\n\t\t\tmessage.setRecipient(javax.mail.Message.RecipientType.TO, toAddrs);\n\t\t\t// message.setRecipients(Message.RecipientType.CC, ccAddrs);\n\t\t\tmessage.setSubject(\"Covid Contact Suspection\" );\n\t\t\tInternetAddress[] replyTo = new InternetAddress[1];\n\t\t\treplyTo[0]=new InternetAddress(apiUtil.getProperty(\"email.from.address\").toString().trim());\n\t\t\tmessage.setReplyTo(replyTo);\n\t\t\tmessage.setContent(velocityUtil.getEmailTemplate(report,covidLocation),\"text/html\");\n\t\t\t// Send message \t\t\t\n\t\t\tTransport.send(message);\n\t\t\tlogger.info(\"--------------- Email has been sent --------------\");\n\t\t} catch (MessagingException e) {\n\t\t\tlogger.error(\"--------------- Exception --------------\" + e.getMessage());\n\t\t}\n\t}",
"public void onFinish(ISuite arg0) {\n\t\tMonitoringMail mail=new MonitoringMail();\r\n\t\t\r\n\t\ttry {\r\n\t\t\tmessageBody = \"http://\"+InetAddress.getLocalHost().getHostAddress()+\":8080/job/git-DataDriven-Framework/Extent_20reports//\";\r\n\t\t} catch (UnknownHostException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n //System.out.println(hostname);\r\n \r\n try {\r\n\t\tmail.sendMail(TestConfig.server, TestConfig.from, TestConfig.to, TestConfig.subject, messageBody);\r\n\t} catch (AddressException e) {\r\n\t\t// TODO Auto-generated catch block\r\n\t\te.printStackTrace();\r\n\t} catch (MessagingException e) {\r\n\t\t// TODO Auto-generated catch block\r\n\t\te.printStackTrace();\r\n\t}\r\n\t\t\r\n\t}",
"@Override\n public boolean sendFourBlockerReport(String to, String name, File report) throws Exception {\n\n boolean result = false;\n\n String subject = \"Your four blocker report\";\n Map<String, Object> model = new HashMap<String, Object>();\n model.put(\"username\", name);\n model.put(\"imagePath\", Util.nvl(getSparkURL()) + \"/resources/img/dealpro-logo.png\");\n String contents = VelocityEngineUtils.mergeTemplateIntoString(velocityEngine, \"emailtemplates/fourBlockerReport.vm\", \"UTF-8\", model);\n\n MimeMessage message = javaMailSender.createMimeMessage();\n\n // create the message using the specified template\n MimeMessageHelper helper;\n\n helper = new MimeMessageHelper(message, true, \"UTF-8\");\n\n helper.setFrom(new InternetAddress(getMailFrom()));\n helper.addBcc(emailList);\n helper.addTo(to + \"@mail.ad.ge.com\");\n helper.addAttachment(report.getName(), report);\n helper.setSubject(subject);\n helper.setSentDate(new Date());\n helper.setText(contents, true);\n javaMailSender.send(message);\n result = true;\n\n return result;\n\n }",
"public void sendEmailForMatchingReports(Exchange exchange) {\n logger.info(\"matching algorithm reports email started \");\n producerTemplate.sendBodyAndHeader(RecapConstants.EMAIL_Q, getEmailPayLoadForMatching(exchange), RecapConstants.EMAIL_FOR, RecapConstants.MATCHING_REPORTS);\n }",
"public void sendChecksumReportEmail() throws MessagingException \r\n\t{\t\r\n\t\tlog.debug(\"Send checksum checker report\");\r\n\t\tRepository repository = repositoryService.getRepository(Repository.DEFAULT_REPOSITORY_ID, false);\r\n\r\n\t\tif( repository != null )\r\n\t {\r\n\t\t SimpleDateFormat simpleDateFormat = new SimpleDateFormat(dateFormat);\r\n\t\t StringBuffer emailText = new StringBuffer();\r\n\t\t String reportDateStr = simpleDateFormat.format(new Date());\r\n\t\t\r\n\t\t emailText.append(\"Checksum report for \" + repository.getName() + \" as of \" + reportDateStr + \"\\n\\n\");\r\n\t\t emailText.append(\"There are: \" + fileInfoChecksumService.getChecksumInfoFailsCount() + \" checksum failures in the repository \\n\");\r\n\t\t emailText.append(\"Use this link to review the checksums \" + baseWebAppPath + \"admin/viewFileInfoChecksums.action \\n\");\r\n\t\t\r\n\t\t MimeMessage message = mailSender.createMimeMessage();\r\n\t\t MimeMessageHelper mimeMessageHelper = new MimeMessageHelper(message, false, \"UTF-8\");\r\n\t\t String subject = \"Checksum report for \" + repository.getName() + \" as of: \" + reportDateStr;\r\n\t\t mimeMessageHelper.setSubject(subject);\r\n\t\t mimeMessageHelper.setFrom(fromAddress);\r\n\t\t mimeMessageHelper.setTo(email);\r\n\t\t mimeMessageHelper.setText(emailText.toString());\r\n\t\t mailSender.send(message);\r\n\t }\r\n\t\telse\r\n\t\t{\r\n\t\t\tlog.debug(\"No repository found\");\r\n\t\t}\r\n\t}",
"private void finishSendingEmail(File reportFile, File witnessesFile)\n\t{\n\t\tArrayList<String> paths = new ArrayList<String>();\n\t\t\n\t\t// Attach report CSV file\n\t\tpaths.add(reportFile.getAbsolutePath());\n\t\t\n\t\t// Attach witnesses CSV file if the are any \n\t\tif(!incident.getWitnesses().isEmpty())\n\t\t\tpaths.add(witnessesFile.getAbsolutePath());\n\t\t\n\t\t// Attach photo files if the are any\n\t\tfor(int i=0; i<photoFiles.size(); i++)\n\t\t\tpaths.add(photoFiles.get(i).getAbsolutePath());\n\t\t\n\t\t// Attach video if there is one\n\t\tif(videoFile != null)\n\t\t\tpaths.add(videoFile.getAbsolutePath());\n\t\t\n\t\tString recipient = ParseUser.getCurrentUser().getEmail();\n\t\tString subject = \"Your DriverConnex Incident Report\";\n\t\t\n\t\t// Send email\n\t\tUtilities.sendEmail(ReviewReportActivity.this, recipient, \"\", subject, \"\", paths);\n\t\t\n\t\tloading.setVisibility(View.INVISIBLE);\t\n\t}",
"public void sendEmailForAccessionReports(Exchange exchange) {\n logger.info(\"accession reports email started \");\n producerTemplate.sendBodyAndHeader(RecapConstants.EMAIL_Q, getEmailPayLoadForAccession(exchange), RecapConstants.EMAIL_FOR, RecapConstants.ACCESSION_REPORTS);\n }",
"@Override\n\tpublic void sendMail(Mail mail, boolean flag) {\n\t\t\n\t}",
"public void send() {\n\t\tfinal String username = \"[email protected]\";\n\t\tfinal String password = \"Oneplanner2017*\";\n\n\t\tProperties props = new Properties();\n\t\tprops.put(\"mail.smtp.auth\", \"true\");\n\t\tprops.put(\"mail.smtp.starttls.enable\", \"true\");\n\t\tprops.put(\"mail.smtp.host\", \"smtp.gmail.com\");\n\t\tprops.put(\"mail.smtp.port\", \"587\");\n\n\t\ttry {\n\t\t\tSession session = Session.getInstance(props,\n\t\t\t\t\t new javax.mail.Authenticator() {\n\t\t\t\t\t\tprotected PasswordAuthentication getPasswordAuthentication() {\n\t\t\t\t\t\t\treturn new PasswordAuthentication(username, password);\n\t\t\t\t\t\t}\n\t\t\t\t\t });\n\n\t\t\t\t\tMessage message = new MimeMessage(session);\n\t\t\t\t\tmessage.setFrom(new InternetAddress(\"[email protected]\"));\n\t\t\t\t\tmessage.setRecipients(Message.RecipientType.TO,\n\t\t\t\t\t\tInternetAddress.parse(\"[email protected]\"));\n\t\t\tmessage.setSubject(\"test\");\n\t\t\tmessage.setText(\"test\");\n\t\t\t\n\t\t\tTransport.send(message);\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n }",
"private void mailLogs(Configuration config) {\r\n\t\tString smtp = config.getProps().getProperty(\"smtp.host\");\r\n\t\tString recipients = config.getProps().getProperty(\"recipients\");\r\n\r\n\t\tif (smtp == null || recipients == null) {\r\n\t\t\tlog.warn(\"Mail can't be configured. Not sending report.\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tMail mail = new Mail(smtp, recipients);\r\n\t\ttry {\r\n\t\t\tmail.send(config.getTestName() + \" : \" + config.getTestCase(),\r\n\t\t\t\t\tconfig.toString());\r\n\t\t} catch (MessagingException e) {\r\n\t\t\t// e.printStackTrace();\r\n\t\t}\r\n\t}",
"void sendEmail(Job job, String email);",
"void send(Email email);",
"@RequestMapping(value = \"/report\", method = RequestMethod.POST)\n\t@ResponseBody\n\tString getReport(HttpServletRequest request, HttpServletResponse response) {\n\n\t\t// Get the Logged in User\n\t\tString name = getLoggedUser();\n\n\t\tString email = request.getParameter(\"email\");\n\t\tRetrieveItems ri = new RetrieveItems(env);\n\t\tList<WorkItem> theList = ri.getItemsDataSQLReport(name);\n\t\tWriteExcel writeExcel = new WriteExcel();\n\t\tSendMessages sm = new SendMessages(env);\n\t\tjava.io.InputStream is = writeExcel.exportExcel(theList);\n\n\t\ttry {\n\t\t\tsm.sendReport(is, email);\n\t\t}catch (IOException e) {\n\t\t\te.getStackTrace();\n\t\t}\n\t\treturn \"Report is created\";\n\t}",
"public void sendMail(String to, String templateName, Object... parameters);",
"public void run() {\r\n\t\t\t\ttry {\r\n//\t\t\t\t\tPostMethod post = new PostMethod(Config.get(\"reportpage\"));\r\n//\t\t\t\t\tpost.addParameter(\"user\", Main.USER);\r\n//\t\t\t\t\tpost.addParameter(\"email\", email);\r\n//\t\t\t\t\tpost.addParameter(\"notes\", notes);\r\n//\t\t\t\t\tpost.addParameter(\"info\", info);\r\n\t\t\t\t String product = Config.get(\"product\", \"JMARS\");\r\n\t\t\t\t product = product.toUpperCase();\r\n\t\t\t\t \r\n\t\t\t\t\tJmarsHttpRequest request = new JmarsHttpRequest(Config.get(\"reportpage\"), HttpRequestType.POST);\r\n\t\t\t\t\trequest.addRequestParameter(\"user\", Main.USER);\r\n\t\t\t\t\trequest.addRequestParameter(\"email\", email);\r\n\t\t\t\t\trequest.addRequestParameter(\"notes\", notes);\r\n\t\t\t\t\trequest.addRequestParameter(\"info\", info);\r\n\t\t\t\t\trequest.addRequestParameter(\"product\",product);\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n//\t\t\t\t\tHttpClient http = new HttpClient();\r\n//\t\t\t\t\thttp.getHttpConnectionManager().getParams().setConnectionTimeout(timeout);\r\n\t request.setConnectionTimeout(timeout);\r\n\t request.setLaxRedirect();\r\n\t boolean successful = request.send();\r\n//\t\t\t\t\tint code = Util.postWithRedirect(http, post, 3);\r\n int code = request.getStatus();\r\n\t if (code != HttpStatus.SC_OK) {\r\n\t\t\t\t\t\terror = \"Server returned unexpected code \" + code;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tString response = new BufferedReader(\r\n\t\t\t\t\t\t\tnew InputStreamReader(\r\n\t\t\t\t\t\t\t\trequest.getResponseAsStream())).readLine();\r\n\t\t\t\t\t\tif (response.equals(\"OKAY\")) {\r\n\t\t\t\t\t\t\t// mail sent properly\r\n\t\t\t\t\t\t} else if (response.equals(\"FAILURE\")) {\r\n\t\t\t\t\t\t\terror = \"Server was unable to deliver the message: \" + response;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n//\t\t\t\t} catch (HttpException e) {\r\n//\t\t\t\t\terror = \"Error communicating with server\";\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\terror = \"Unable to establish a connection, are you connected?\";\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\terror = \"Unexpected exception occurred: \" + e.getMessage();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// get back on the AWT thread to handle the result\r\n\t\t\t\tSwingUtilities.invokeLater(new Runnable() {\r\n\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\ttimer.stop();\r\n\t\t\t\t\t\tdlg.dispose();\r\n\t\t\t\t\t\tif (error != null) {\r\n\t\t\t\t\t\t\t// failure sending report, suggest e-mail\r\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(\r\n\t\t\t\t\t\t\t\tMain.mainFrame,\r\n\t\t\t\t\t\t\t\t\"Unable to deliver message: \" + error + \"\\n\\nEmail \" + Config.get(\"email\"),\r\n\t\t\t\t\t\t\t\t\"Unable to deliver message\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tsendingThread = null;\r\n\t\t\t}",
"public static void main(String[] args) throws UnknownHostException, AddressException, MessagingException {\n\t\tSystem.out.println(InetAddress.getLocalHost().getHostAddress());\n\t\tMonitoringMail mail = new MonitoringMail();\n\t\tString messageBody=\"https://\"+InetAddress.getLocalHost().getHostAddress()+ \":8080/C:/work/Selenium/LiveProjects/PageObjectModelBasics/target/surefire-reports/html/extent.html\";\n\t\tSystem.out.println(messageBody);\n\t\tmail.sendMail(TestConfig.server, TestConfig.from, TestConfig.to, TestConfig.subject, messageBody,TestConfig.attachmentPath, TestConfig.attachmentName);\n\t}",
"public void sendMailMessage(MailMessage mailMessage) throws MailerException;",
"public void generateReportAndSendEmail(Integer bulkRequestId) {\n Optional<BulkRequestItemEntity> bulkRequestItemEntity = bulkRequestItemDetailsRepository.findById(bulkRequestId);\n if(bulkRequestItemEntity.isPresent()) {\n emailService.sendBulkRequestEmail(String.valueOf(bulkRequestItemEntity.get().getId()),\n bulkRequestItemEntity.get().getBulkRequestName(), bulkRequestItemEntity.get().getBulkRequestFileName(),\n bulkRequestItemEntity.get().getBulkRequestStatus(), new String(bulkRequestItemEntity.get().getBulkRequestFileData()),\n \"Bulk Request Process Report\");\n }\n }",
"void send(String email, Locale locale);",
"public String sendEmail() {\n String to = theModel.getEmail();\n\n // Sender's email ID needs to be mentioned\n String from = \"[email protected]\";\n\n // Assuming you are sending email from this host\n String host = \"smtp.gmail.com\";\n\n // Get system properties\n Properties properties = System.getProperties();\n\n // Setup mail server\n properties.setProperty(\"mail.smtp.host\", host);\n properties.setProperty(\"mail.smtp.starttls.enable\", \"true\");\n properties.setProperty(\"mail.smtp.auth\", \"true\");\n properties.setProperty(\"mail.smtp.port\", \"587\");\n // Get the default Session object.\n Session session = Session.getInstance(properties, new javax.mail.Authenticator() {\n protected PasswordAuthentication getPasswordAuthentication() {\n return new PasswordAuthentication(\"[email protected]\", \"itkstuadmin\");\n }\n });\n\n try {\n // Create a default MimeMessage object.\n MimeMessage message = new MimeMessage(session);\n\n // Set From: header field of the header.\n message.setFrom(new InternetAddress(from));\n\n // Set To: header field of the header.\n message.addRecipient(Message.RecipientType.TO,\n new InternetAddress(to));\n\n // Set Subject: header field\n message.setSubject( subject, \"text/html\");\n\n // Send the actual HTML message, as big as you like\n message.setContent( text , \"text/html\");\n\n // Send message\n Transport.send(message);\n System.out.println(\"Sent message successfully....\");\n } catch (MessagingException mex) {\n mex.printStackTrace();\n }\n return \"UniLog.xhtml\";\n }",
"public Historique SendMail( Historique h,String resultat ,String date,String heure) throws Exception {\n\r\n\r\n Logger log = LoggerFactory.getLogger(MailController.class);\r\n\r\n \r\n\r\n \r\n log.info(\"Spring Mail - Sending Simple Email with JavaMailSender Example\");\r\n\r\n Mail mail = new Mail();\r\n mail.setFrom(\"[email protected]\");\r\n \r\n //mail.setTo(h.get().getEmails());\r\n String [] res =h.getEmails().split(\"\\\\s\");\r\n for(int i=0; i<res.length;i++)\r\n \r\n {\r\n \tSystem.out.println(res[i]);\r\n mail.setTo(res[i]);\r\n \r\n if(resultat.equals(\"echec\"))\r\n { \t mail.setSubject(\" échec d'éxécution du test\");\r\n mail.setContent(\"Echec de test \"+h.getNom()+\" éffectué à \"+date+\"à l'heure \"+heure);}\r\n else\r\n { \t\r\n mail.setSubject(\"Retard d'éxécution du test\");\r\n mail.setContent(\"Retard d'éxecution :temps de réponse réél est \"+h.getTemps_rep_reel()+\" et le temps de réponse attendu = est:\"+h.getResultat_attendu());}\r\n emailService.sendSimpleMessage(mail);\r\n }\r\n \r\n\r\n \r\n\t\treturn null; \r\n\r\n }",
"public void sendMail(String to, String subject, String text);",
"public void sendMail(String to, String cc, String bcc, String templateName, Object... parameters);",
"private void sendEmail() {\n\n\n Log.i(TAG, \" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\");\n\n\n Log.i(TAG, \"sendEmail: \"+currentEmail);\n\n Log.i(TAG, \" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\");\n\n\n String email = currentEmail.trim();\n String subject = \"Garbage Report Handeled\";\n\n String message = textViewStreet.getText().toString() + \" \" + \"request has been handeled\" +\" \"+textViewDescription.getText().toString();\n\n// String message = textViewStreet.getText().toString() + \" \" + \"request has been handeled\" + \" \" +time+\" \"+textViewDescription.getText().toString();\n //Creating SendMail object\n SendMail sm = new SendMail(this, email, subject, message);\n\n //Executing sendmail to send email\n sm.execute();\n }",
"SendEmail() {\t\n\t}",
"public void sendMail(RegistrationData d) {}",
"private static void sendMail(String text) {\n Properties properties = System.getProperties();\n Session session = Session.getDefaultInstance(properties);\n\n //compose the message\n try{\n MimeMessage message = new MimeMessage(session);\n message.setFrom(new InternetAddress(from));\n message.addRecipient(Message.RecipientType.TO,new InternetAddress(to));\n message.setSubject(\"RAZER - AVAILABILITYT\");\n message.setText(text);\n\n // Send message\n Transport t = session.getTransport(\"smtps\");\n t.connect(\"smtp.gmail.com\", from, \"Shutting123\");\n t.sendMessage(message, message.getAllRecipients());\n log.error(\"message sent successfully....\");\n\n }catch (MessagingException mex) {\n mex.printStackTrace();\n }\n }",
"public void sendEmail(String receiver, Integer indexID){\r\n\t \r\n\t Properties props = new Properties();\r\n\t props.put(\"mail.smtp.host\", EMAIL_SERVER);\r\n\t props.put(\"mail.smtp.port\", SERVER_PORT);\r\n\t props.put(\"mail.smtp.starttls.enable\", \"true\");\r\n\t props.put(\"mail.smtp.auth\", \"true\");\r\n\t props.put(\"mail.smtp.socketFactory.port\", SERVER_PORT);\r\n\t props.put(\"mail.smtp.socketFactory.class\", \"javax.net.ssl.SSLSocketFactory\");\r\n\t props.put(\"mail.smtp.socketFactory.fallback\", \"false\");\r\n\t \r\n\t Session sess = Session.getInstance(props,\r\n\t\t\t new javax.mail.Authenticator() {\r\n\t\t \t\tprotected PasswordAuthentication getPasswordAuthentication() {\r\n\t\t \t\t\treturn new PasswordAuthentication(EMAIL_SENDER, PW_SENDER);\r\n\t\t \t\t}\r\n\t \t});\r\n\t \r\n\t try{ \r\n\t Message msg = new MimeMessage(sess);\r\n\t msg.setFrom(new InternetAddress(EMAIL_SENDER));\r\n\t msg.setRecipients(Message.RecipientType.TO,InternetAddress.parse(receiver));\r\n\t msg.setSubject(\"Notification regarding waitlist\");\r\n\t \r\n\t Transport.send(msg);\r\n\t System.out.println(\"Email has been send successfully!\"); \r\n\t }\r\n\t \r\n\t catch (MessagingException e){\r\n\t\t throw new RuntimeException(e);\r\n\t }\r\n\t \r\n\t \r\n\t }",
"public void sendHtmlEmail() throws EmailException, MalformedURLException,\n\t\t\tUnsupportedEncodingException, ParseException {\n\t\tITrustContributionServer trustContributionServer = new TrustContributionServer();\n\t\tHtmlEmail email = new HtmlEmail();\n\t\temail.setHostName(\"smtp.exmail.qq.com\");\n\n\t\t// TODO 收件人:资产管理中心全体员工;[email protected];\n\t\tString itemCode = \"v00003\";\n\t\tList<String> emailList = new ArrayList<>();\n\t\temailList = trustContributionServer.getEmailList(itemCode);\n\t\tif (emailList != null && emailList.size() != 0) {\n\t\t\tString[] toBeStored = emailList\n\t\t\t\t\t.toArray(new String[emailList.size()]);\n\t\t\temail.addTo(toBeStored);\n\t\t}\n\n\t\t// email.addTo(new String[]{\"[email protected]\",\"[email protected]\"});\n\n\t\temail.setSmtpPort(465);\n\t\temail.setAuthenticator(new DefaultAuthenticator(\"[email protected]\",\n\t\t\t\t\"Wzm910712\"));\n\t\temail.setSSLOnConnect(true);\n\t\temail.setFrom(\"[email protected]\");\n\t\tDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\tDate yestoday = getYestoday();\n\t\temail.setSubject(\"投融资部-每日中航百度报酬日报--\" + format.format(yestoday));\n\t\t/*\tString caption = new String((\"中航百度报酬日报--\").getBytes(\"GBK\"),\n\t\t\t\t\"ISO-8859-1\") + format.format(yestoday);\n\t\tString td1 = new String((\"昨日信托报酬\").getBytes(\"GBK\"), \"ISO-8859-1\");\n\t\tString td2 = new String((\"累计信托报酬\").getBytes(\"GBK\"), \"ISO-8859-1\");\n\t\tString td3 = new String((\"昨日保管费\").getBytes(\"GBK\"), \"ISO-8859-1\");\n\t\tString td4 = new String((\"累计保管费\").getBytes(\"GBK\"), \"ISO-8859-1\");\n\t\tString td5 = new String((\"昨日优先收益\").getBytes(\"GBK\"), \"ISO-8859-1\");\n\t\tString td6 = new String((\"累计优先收益\").getBytes(\"GBK\"), \"ISO-8859-1\");\n\t\tString td7 = new String((\"上月优先级本金\").getBytes(\"GBK\"), \"ISO-8859-1\");\n\t\tString td8 = new String((\"上月劣后级本金\").getBytes(\"GBK\"), \"ISO-8859-1\");\n\n\t\tString td31 = new String((\"上月差额补足金额\").getBytes(\"GBK\"), \"ISO-8859-1\");\n\t\tString td32 = new String((\"上月保证金1\").getBytes(\"GBK\"), \"ISO-8859-1\");\n\t\tString td33 = new String((\"上月客户退货款\").getBytes(\"GBK\"), \"ISO-8859-1\");\n\t\tString td34 = new String((\"上月客户主动还款\").getBytes(\"GBK\"), \"ISO-8859-1\");\n\t\tString td35 = new String((\"M3+率\").getBytes(\"GBK\"), \"ISO-8859-1\");\n\t\tString td36 = new String((\"B3\").getBytes(\"GBK\"), \"ISO-8859-1\");\n\t\tString td37 = new String((\"M2+率\").getBytes(\"GBK\"), \"ISO-8859-1\");\n\t\tString td38 = new String((\"B2\").getBytes(\"GBK\"), \"ISO-8859-1\");\n\n\t\t// TODO 查询出各个数据\n\t\tdouble custodianFee = 0;\n\t\tdouble priorityEarnings = 0;\n\t\tdouble trustremuneration = 0;\n\t\tMap<String, Object> map = new HashMap<>();\n\t\tmap = trustContributionServer.getDetailFromBenefitCheckDaily(partner);\n\t\tif (map != null) {\n\t\t\tcustodianFee = Double.parseDouble(map.get(\"CUSTODIANFEE\")\n\t\t\t\t\t.toString());\n\t\t\tpriorityEarnings = Double.parseDouble(map.get(\"PRIORITYEARNINGS\")\n\t\t\t\t\t.toString());\n\t\t\ttrustremuneration = Double.parseDouble(map.get(\"TRUSTREMUNERATION\")\n\t\t\t\t\t.toString());\n\t\t}\n\n\t\t// 累计信托报酬\n\t\tMap<String, Object> trustRemunerationMap = new HashMap<>();\n\t\tdouble sumOftrustRemuneration = 0;\n\t\ttrustRemunerationMap = trustContributionServer\n\t\t\t\t.getSumOfBenefitCheckDaily(partner);\n\t\tif (trustRemunerationMap != null) {\n\t\t\tsumOftrustRemuneration = Double.parseDouble(trustRemunerationMap\n\t\t\t\t\t.get(\"TRUSTREMUNERATION\").toString());\n\t\t}\n\n\t\t// 累计优先收益\n\t\tMap<String, Object> priorityEaringsMap = new HashMap<>();\n\t\tdouble sumOfpriorityEarings = 0;\n\t\tpriorityEaringsMap = trustContributionServer\n\t\t\t\t.getSumOfPriorityEarings(partner);\n\t\tif (priorityEaringsMap != null) {\n\t\t\tsumOfpriorityEarings = Double.parseDouble(priorityEaringsMap.get(\n\t\t\t\t\t\"PRIORITYEARINGS\").toString());\n\t\t}\n\n\t\t// 累计保管费\n\t\tMap<String, Object> custodianFeeMap = new HashMap<>();\n\t\tdouble sumOfcustodianFee = 0;\n\t\tcustodianFeeMap = trustContributionServer.getSumOfcustodianFee(partner);\n\t\tif (custodianFeeMap != null) {\n\t\t\tsumOfcustodianFee = Double.parseDouble(custodianFeeMap.get(\n\t\t\t\t\t\"CUSTODIANFEE\").toString());\n\t\t}\n\n\t\tMap<String, Object> benefitCheckMonthSummaryMap = new HashMap<>();\n\n\t\tdouble priorityPrincipal = 0;\n\t\t// 上月劣后级本金\n\t\tdouble inferiorPrincipal = 0;\n\t\t// 上月差额补足金额\n\t\tdouble differenceUpBalance = 0;\n\t\t// 上月保证金\n\t\tdouble serviceFee = 0;\n\t\t// 上月客户退货款\n\t\tdouble merchantsRetmoneyActual = 0;\n\t\t// 上月客户主动还款\n\t\tdouble customeDrivingRepayment = 0;\n\n\t\tbenefitCheckMonthSummaryMap = trustContributionServer\n\t\t\t\t.getdetailFromMonthSummary(partner);\n\t\tif (benefitCheckMonthSummaryMap != null) {\n\n\t\t\tpriorityPrincipal = Double.parseDouble(benefitCheckMonthSummaryMap\n\t\t\t\t\t.get(\"PRIORITYPRINCIPAL\").toString());\n\n\t\t\tinferiorPrincipal = Double.parseDouble(benefitCheckMonthSummaryMap\n\t\t\t\t\t.get(\"INFERIORPRINCIPAL\").toString());\n\n\t\t\tdifferenceUpBalance = Double\n\t\t\t\t\t.parseDouble(benefitCheckMonthSummaryMap.get(\n\t\t\t\t\t\t\t\"DIFFERENCEUPBALANCE\").toString());\n\n\t\t\tserviceFee = Double.parseDouble(benefitCheckMonthSummaryMap.get(\n\t\t\t\t\t\"SERVICEFEE\").toString());\n\n\t\t\tmerchantsRetmoneyActual = Double\n\t\t\t\t\t.parseDouble(benefitCheckMonthSummaryMap.get(\n\t\t\t\t\t\t\t\"MERCHANTSRETMONEYACTUAL\").toString());\n\n\t\t\tcustomeDrivingRepayment = Double\n\t\t\t\t\t.parseDouble(benefitCheckMonthSummaryMap.get(\n\t\t\t\t\t\t\t\"CUSTOMEDRIVINGREPAYMENT\").toString());\n\t\t}\n\n\t\t// B3=B2\n\t\tString partnerCode = \"\";\n\t\tif (partner.equalsIgnoreCase(\"众安\")) {\n\t\t\tpartnerCode = \"ZAYX\";\n\t\t}// 改为map为添加条件,做一下为null 时候的判断\n\t\t//partnerCode = \"HBYH\";// TODO delete when upload,and sql update\n\t\tMap<String, Object> resultB3Map = new HashMap<>();\n\n\t\tMap<String, Object> resultB2Map = new HashMap<>();\n\n\t\tdouble B3Part1 = 0;\n\t\tdouble B3Part2 = 0;\n\t\tresultB3Map = trustContributionServer\n\t\t\t\t.getB3Part1FromPayDaily(partnerCode);\n\n\t\tif (resultB3Map != null) {\n\t\t\tB3Part1 = Double.parseDouble((resultB3Map.get(\"PAYPRINCIPALAMT\")\n\t\t\t\t\t.toString()));\n\t\t}\n\t\tresultB2Map = trustContributionServer\n\t\t\t\t.getB3Part2FromPayDaily(partnerCode);\n\t\tif (resultB2Map != null) {\n\t\t\tB3Part2 = Double.parseDouble((resultB2Map.get(\"PAYPRINCIPALAMT\")\n\t\t\t\t\t.toString()));\n\t\t}\n\t\t\n\t\t * double B3Part1=\n\t\t * trustContributionServer.getB3Part1FromPayDaily(partnerCode);\n\t\t * \n\t\t * double B3Part2 =\n\t\t * trustContributionServer.getB3Part2FromPayDaily(partnerCode);\n\t\t \n\n\t\tBigDecimal d1 = new BigDecimal(String.valueOf(B3Part1));\n\n\t\tBigDecimal d2 = new BigDecimal(String.valueOf(B3Part2));\n\n\t\tdouble B3 = d1.add(d2).doubleValue();\n\n\t\t// A3\n\t\tint days = 90;\n\t\tMap<String, Object> A3Map = new HashMap<>();\n\t\tA3Map.put(\"partnerCode\", partnerCode);\n\t\tA3Map.put(\"days\", days);\n\n\t\tdouble fPayCapital = 0;\n\t\tdouble fUndueCapital = 0;\n\t\t// 获取大于 90 天的应付本金\n\t\tMap<String, Object> over90DaysCapitalMap1 = new HashMap<>();\n\t\tover90DaysCapitalMap1 = trustContributionServer\n\t\t\t\t.getOverDueDaysCapital1(A3Map);\n\t\tif (over90DaysCapitalMap1 != null) {\n\t\t\tfPayCapital = Double.parseDouble(over90DaysCapitalMap1.get(\n\t\t\t\t\t\"PAYPRINCIPALAMT\").toString());\n\t\t}\n\n\t\tMap<String, Object> over90DaysCapitalMap2 = new HashMap<>();\n\t\tover90DaysCapitalMap2 = trustContributionServer\n\t\t\t\t.getOverDueDaysCapital2(A3Map);\n\t\tif (over90DaysCapitalMap2 != null) {\n\t\t\tfUndueCapital = Double.parseDouble(over90DaysCapitalMap2.get(\n\t\t\t\t\t\"PAYPRINCIPALAMT\").toString());\n\t\t}\n\n\t\tBigDecimal d1Capital = new BigDecimal(String.valueOf(fPayCapital));\n\t\tBigDecimal d2Capital = new BigDecimal(String.valueOf(fUndueCapital));\n\t\tdouble allCapital = d1Capital.add(d2Capital).doubleValue();\n\n\t\tdouble A3 = 0;\n\t\t// 获取实付本金\n\t\tMap<String, Object> resultMap = new HashMap<>();\n\t\tresultMap = trustContributionServer.getA3Capital(A3Map);\n\t\tif (resultMap != null) {\n\t\t\tA3 = allCapital\n\t\t\t\t\t- Double.parseDouble((resultMap.get(\"PAYPRINCIPALAMT\")\n\t\t\t\t\t\t\t.toString()));\n\t\t}\n\n\t\tMap<String, Object> A2Map = new HashMap<>();\n\t\tdouble A2 = 0;\n\t\tA2Map.put(\"partnerCode\", partnerCode);\n\t\tint days2 = 60;\n\t\tA2Map.put(\"days\", days2);\n\n\t\t// 获取逾期60天以上的应付本金\n\t\tdouble fPayCapita1 = 0;\n\t\tdouble fUndueCapita1 = 0;\n\t\tMap<String, Object> over60DaysCapitalMap1 = new HashMap<>();\n\t\tover60DaysCapitalMap1 = trustContributionServer\n\t\t\t\t.getOverDueDaysCapital1(A2Map);\n\t\tif (over60DaysCapitalMap1 != null) {\n\t\t\tfPayCapita1 = Double.parseDouble(over60DaysCapitalMap1.get(\n\t\t\t\t\t\"PAYPRINCIPALAMT\").toString());\n\t\t}\n\n\t\tMap<String, Object> over60DaysCapitalMap2 = new HashMap<>();\n\t\tover60DaysCapitalMap2 = trustContributionServer\n\t\t\t\t.getOverDueDaysCapital2(A2Map);\n\t\tif (over60DaysCapitalMap2 != null) {\n\t\t\tfUndueCapita1 = Double.parseDouble(over60DaysCapitalMap2.get(\n\t\t\t\t\t\"PAYPRINCIPALAMT\").toString());\n\t\t}\n\n\t\tBigDecimal d1Capital1 = new BigDecimal(String.valueOf(fPayCapita1));\n\t\tBigDecimal d2Capital1 = new BigDecimal(String.valueOf(fUndueCapita1));\n\t\tdouble allCapital1 = d1Capital1.add(d2Capital1).doubleValue();\n\n\t\tMap<String, Object> resultMap2 = new HashMap<>();\n\t\tresultMap2 = trustContributionServer.getA3Capital(A2Map);\n\t\tif (resultMap2 != null) {\n\t\t\t// TODO\n\t\t\tA2 = allCapital1\n\t\t\t\t\t- Double.parseDouble((resultMap2.get(\"PAYPRINCIPALAMT\")\n\t\t\t\t\t\t\t.toString()));\n\t\t}\n\n\t\t// 获取格式化对象\n\t\tNumberFormat nt = NumberFormat.getPercentInstance();\n\t\t// 设置百分数精确度2即保留两位小数\n\t\tnt.setMinimumFractionDigits(2);\n\t\t// 最后格式化并输出\n\n\t\t// TODO\n\t\t\n\t\t * String M3= nt.format(A3/B3); String M2 = nt.format(A2/B3);\n\t\t \n\t\tString M3 = \"0.00%\";\n\t\tString M2 = \"0.00%\";\n\t\tif (B3 != 0) {\n\t\t\tM3 = nt.format(A3 / B3);\n\t\t\tM2 = nt.format(A2 / B3);\n\t\t}\n\t\t\n\n\t\tURL url = new URL(\"http://www.apache.org/images/asf_logo_wide.gif\");\n\t\t// String cid = email.embed(url, \"Apache logo\");\n\t\t\n\t\tString firstTable = \"<div>\"\n\t\t\t\t+ \"<table width=\\\"1150\\\" border=\\\"1\\\" cellspacing=\\\"0\\\">\"\n\t\t\t\t+ \"<caption>\"\n\t\t\t\t+ caption\n\t\t\t\t+ \"</caption>\"\n\t\t\t\t+ \"<tr style=\\\"background-color:#f47920\\\">\"\n\t\t\t\t+ \"<td align=\\\"center\\\">\"\n\t\t\t\t+ td1\n\t\t\t\t+ \"</td>\"\n\t\t\t\t+ \"<td align=\\\"center\\\">\"\n\t\t\t\t+ td2\n\t\t\t\t+ \"</td>\"\n\t\t\t\t+ \"<td align=\\\"center\\\">\"\n\t\t\t\t+ td3\n\t\t\t\t+ \"</td>\"\n\t\t\t\t+ \"<td align=\\\"center\\\">\"\n\t\t\t\t+ td4\n\t\t\t\t+ \"</td>\"\n\t\t\t\t+ \"<td align=\\\"center\\\">\"\n\t\t\t\t+ td5\n\t\t\t\t+ \"</td>\"\n\t\t\t\t+ \"<td align=\\\"center\\\">\"\n\t\t\t\t+ td6\n\t\t\t\t+ \"</td>\"\n\t\t\t\t+ \"<td align=\\\"center\\\">\"\n\t\t\t\t+ td7\n\t\t\t\t+ \"</td>\"\n\t\t\t\t+ \"<td align=\\\"center\\\">\"\n\t\t\t\t+ td8\n\t\t\t\t+ \"</td>\"\n\t\t\t\t+ \"</tr>\"\n\t\t\t\t+ \"<tr>\"\n\t\t\t\t+ \"<td align=\\\"center\\\">\"\n\t\t\t\t+ trustremuneration\n\t\t\t\t+ \"</td>\"\n\t\t\t\t+ \"<td align=\\\"center\\\">\"\n\t\t\t\t+ sumOftrustRemuneration\n\t\t\t\t+ \"</td>\"\n\t\t\t\t+ \"<td align=\\\"center\\\">\"\n\t\t\t\t+ custodianFee\n\t\t\t\t+ \"</td>\"\n\t\t\t\t+ \"<td align=\\\"center\\\">\"\n\t\t\t\t+ sumOfcustodianFee\n\t\t\t\t+ \"</td>\"\n\t\t\t\t+ \"<td align=\\\"center\\\">\"\n\t\t\t\t+ priorityEarnings\n\t\t\t\t+ \"</td>\"\n\t\t\t\t+ \"<td align=\\\"center\\\">\";*/\n\t\tStringBuilder a1RateBuilder = new StringBuilder();\n\t\ta1RateBuilder = this.getA1RateBuilder();\n\t\t\n\t\tStringBuilder a2RateBuilder = new StringBuilder();\n\t\ta2RateBuilder = this.getA2RateBuilder();\n\t\tString commonHead = \"<html>\" + \"<head>\" + \" </head>\" + \"<body>\";\n\t\tString htmlMsg = commonHead\n\t\t\t\t+ a1RateBuilder.toString()\n\t\t\t\t+\"</body>\" + \"</html>\";\n\t\temail.setHtmlMsg(htmlMsg);\n\t\temail.send();\n\t}",
"void sendMail(String receivers) throws MessagingException;",
"public static boolean generateAndSendEmail(Set<StockSymbol> stockSymbols) throws MessagingException {\n\n Properties mailServerProperties;\n Session getMailSession;\n MimeMessage generateMailMessage;\n\n //todo: in the future might have to send individual email to not leak personal emails.\n\n // Step1\n logger.info(\"1st ===> setup Mail Server Properties..\");\n mailServerProperties = System.getProperties();\n mailServerProperties.put(\"mail.smtp.port\", \"587\");\n mailServerProperties.put(\"mail.smtp.auth\", \"true\");\n mailServerProperties.put(\"mail.smtp.starttls.enable\", \"true\");\n logger.info(\"Mail Server Properties have been setup successfully..\");\n\n // Step2\n logger.info(\"2nd ===> get Mail Session..\");\n getMailSession = Session.getDefaultInstance(mailServerProperties, null);\n generateMailMessage = new MimeMessage(getMailSession);\n\n for(String email : getSubscribers()){\n generateMailMessage.addRecipient(Message.RecipientType.TO, new InternetAddress(email));\n }\n// generateMailMessage.addRecipient(Message.RecipientType.CC, new InternetAddress(\"[email protected]\"));\n generateMailMessage.setSubject(\"Simple Moving Average Crossover\");\n String emailBody = generateEmailBody(stockSymbols);\n generateMailMessage.setContent(emailBody, \"text/html\");\n logger.info(\"Mail Session has been created successfully..\");\n\n // Step3\n logger.info(\"\\n\\n 3rd ===> Get Session and Send mail\");\n Transport transport = getMailSession.getTransport(\"smtp\");\n\n // Enter your correct gmail UserID and Password\n // if you have 2FA enabled then provide App Specific Password\n transport.connect(\"smtp.gmail.com\", USERNAME, PASSWORD);\n transport.sendMessage(generateMailMessage, generateMailMessage.getAllRecipients());\n logger.info(\"Mail sent. Closing session.\");\n transport.close();\n return true;\n }",
"public void generateAndSendEmail(EmailSendingParameters emailParameters) throws AddressException, MessagingException {\r\n \r\n\t\t//Step1\t\t\r\n\t\tSystem.out.println(\"Setup Mail Server Properties..\");\r\n\t\tmailServerProperties = System.getProperties();\r\n\t\tmailServerProperties.put(\"mail.smtp.port\", \"587\");\r\n\t\tmailServerProperties.put(\"mail.smtp.auth\", \"true\");\r\n\t\tmailServerProperties.put(\"mail.smtp.starttls.enable\", \"true\");\r\n\t\tSystem.out.println(\"Mail Server Properties have been setup successfully..\");\r\n \r\n\t\t//Step2\r\n\t\tSystem.out.println(\"Get Mail Session..\");\r\n\t\tgetMailSession = Session.getDefaultInstance(mailServerProperties, null);\r\n\t\tgenerateMailMessage = new MimeMessage(getMailSession);\r\n\t\tgenerateMailMessage.addRecipient(Message.RecipientType.TO, new InternetAddress(emailParameters.getEmailReceiverAdress()));\r\n\t\tgenerateMailMessage.setSubject(\"Greetings from Crunchify..\");\r\n\t\tString emailBody = \"EMAIL CONTENT (with html tags)\";\r\n\t\tgenerateMailMessage.setContent(emailBody, \"text/html\");\r\n\t\tSystem.out.println(\"Mail Session has been created successfully..\");\r\n \r\n\t\t//Step3\t\t\r\n\t\tSystem.out.println(\"Get Session\tand Send mail\");\r\n\t\tTransport transport = getMailSession.getTransport(\"smtp\");\r\n\r\n\t\tSystem.out.println(\"Sending message\");\r\n\t\ttransport.connect(/*smtp.gmail.com\", emailReceiverAdress* emailReceiverPassword*/); \r\n\t\ttransport.sendMessage(generateMailMessage, generateMailMessage.getAllRecipients());\r\n\t\tSystem.out.println(\"Message sended properly\");\r\n\t\ttransport.close();\r\n\t}",
"public static void generateReport() {\n PrintImpl printer = new PrintImpl(realtorLogImpl, propertyLogImpl);\n printer.generateReport(REQUESTS_FILE);\n }",
"public void sendDiscrepancyEmail() throws Exception;",
"public void sendMail(String to, String cc, String templateName, Object... parameters);",
"@Override\n public void sendEmail() {\n return;\n }",
"private static void testMail() throws Exception {\n\t\tUser user=new User();\n\t\tuser.setUsername(\"若水\");\n\t\tuser.setEmail(\"[email protected]\");\n\t\tMail mail=new Mail();\n\t\tboolean b=mail.sendMail(user, \"http://www.baidu.com\", \"http://www.zzuli.edu.cn\", 2);\n\t\tSystem.out.println(b);\n\t}",
"@RequestMapping(\"/mail\")\n\tpublic String mail() throws MessagingException {\n\t\tmailsender.send(\"[email protected]\", \"A test mail\", \"body of the test mail\");\n\t\t\n\t\treturn \"mail sent by Nawaki to the localhost...........\";//result\n\t}",
"@RequestMapping(value = \"/download/userStatementReportPDF\", method = RequestMethod.GET)\n\tpublic ModelAndView doUserStatementReportPDF(ModelAndView modelAndView,\n\t\t\t@RequestParam(\"workmail\") final String email) {\n\n\t\tLOGGER.debug(\"Received request to download PDF report\");\n\t\tLOGGER.info(\"Received request to download PDF report\");\n\n\t\tboolean isValidUser = true;\n\n\t\tList<User> userList = null;\n\t\tUser user = null;\n\t\tList<Assessment> assessmentList = null;\n\t\tList<Suggestion> suggestionList = null;\n\n\t\tuserList = userServices.findByWorkMail(email);\n\n\t\tif (userList.isEmpty() || userList == null) {\n\t\t\tisValidUser = false;\n\t\t} else {\n\t\t\tuser = userList.get(0);\n\t\t}\n\n\t\tif (isValidUser) {\n\n\t\t\tassessmentList = assessmentServices.findByUserId(user.getUserId());\n\t\t\t// suggestionList = suggestionServices.findByLvlId(1);\n\n\t\t\tList statements = suggestionServices.findUserAssessmentStatement(user.getUserId());\n\t\t\t// LOGGER.info(\"dataList \"+dataList.toString());\n\n\t\t\tLOGGER.info(\"assessmentList \" + assessmentList.toString());\n\t\t\tLOGGER.info(\"assessmentList dateData \" + assessmentList.get(0).getDate());\n\n\t\t\t// Retrieve our data from a custom data provider\n\t\t\t// Our data comes from a DAO layer\n\t\t\t// DemoDAO dataprovider = new DemoDAO();\n\t\t\tstatementReportDao dataprovider = new statementReportDao();\n\n\t\t\t// Assign the datasource to an instance of JRDataSource\n\t\t\t// JRDataSource is the datasource that Jasper understands\n\t\t\t// This is basically a wrapper to Java's collection classes\n\t\t\tJRDataSource datasource = dataprovider.getDataSource(user, statements, assessmentList.get(0).getDate());\n\n\t\t\tLOGGER.info(\"datasource \" + datasource.toString());\n\n\t\t\t// In order to use Spring's built-in Jasper support,\n\t\t\t// We are required to pass our datasource as a map parameter\n\t\t\t// parameterMap is the Model of our application\n\t\t\tMap<String, Object> parameterMap = new HashMap<String, Object>();\n\t\t\t// parameterMap.put(\"username\", user.getFirstName()+\"\n\t\t\t// \"+user.getLastName());\n\t\t\tparameterMap.put(\"datasource\", datasource);\n\n\t\t\t// pdfReport is the View of our application\n\t\t\t// This is declared inside the /WEB-INF/jasper-views.xml\n\t\t\tmodelAndView = new ModelAndView(\"ilm_statement_pdfReport\", parameterMap);\n\t\t} else {\n\t\t\t// modelAndView.addObject(\"errorMessage\", \"No data found\");\n\t\t\tModelAndView mav = new ModelAndView(\"/404\");\n\t\t}\n\n\t\t// Return the View and the Model combined\n\t\treturn modelAndView;\n\t}",
"private void sendEmail() {\n String to = \"[email protected]\";\n\n // Sender's email ID needs to be mentioned\n String from = \"[email protected]\";\n\n // Assuming you are sending email from localhost\n String host = \"localhost\";\n\n // Get system properties\n Properties properties = System.getProperties();\n\n // Setup mail server\n properties.setProperty(\"mail.smtp.host\", host);\n\n // Get the default Session object.\n Session session = Session.getDefaultInstance(properties);\n\n try {\n // Create a default MimeMessage object.\n MimeMessage message = new MimeMessage(session);\n\n // Set From: header field of the header.\n message.setFrom(new InternetAddress(from));\n\n // Set To: header field of the header.\n message.addRecipient(Message.RecipientType.TO, new InternetAddress(to));\n\n // Set Subject: header field\n message.setSubject(\"This is the Subject Line!\");\n\n // Now set the actual message\n message.setText(\"This is actual message\");\n\n // Send message\n Transport.send(message);\n System.out.println(\"Sent message successfully....\");\n } catch (MessagingException mex) {\n mex.printStackTrace();\n }\n }",
"private void sendmailcartid(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException, ClassNotFoundException {\n String cardid = request.getParameter(\"cartid\");\n\n String to = \"yevhen@yevhen-Lenovo-ideapad-320-15ISK\";\n String from = \"wwwwnewbob@localhost\";\n String host = \"localhost\";\n\n Properties properties = System.getProperties();\n properties.setProperty(\"yevhen-Lenovo-ideapad-320-15ISK\", host);\n\n Session session = Session.getDefaultInstance(properties);\n response.setContentType(\"text/html\");\n PrintWriter out = response.getWriter();\n\n try{\n MimeMessage message = new MimeMessage(session);\n message.setFrom(new InternetAddress(from));\n message.addRecipients(Message.RecipientType.TO, String.valueOf(new InternetAddress(to)));\n message.setSubject(\"This is the Subject Line!\");\n message.setText(\"This is actual message from <a href=\\\"http://localhost:8080/bookstore/createpdfdoc?cartid=\" + cardid + \"\\\">Your payment</a>\");\n\n logger.info(\" user.getEmail() \" + cardid);\n\n Transport.send(message);\n String title = \"Send Email\";\n String res = \"Sent message successfully....<a href='/bookstore/shop'>Back</a>\";\n String docType = \"<!doctype html public \\\"-//w3c//dtd html 4.0 \" + \"transitional//en\\\">\\n\";\n\n out.println(docType +\n \"<html>\\n\" +\n \"<head><title>\" + title + \"</title><head>\\n\" +\n \"<body bgcolor = \\\"#f0f0f0\\\">\\n\" +\n \"<h1 align = \\\"center\\\">\" + title + \"</h1>\\n\" +\n \"<p align = \\\"center\\\">\" + res + \"</p>\\n\" +\n \"</body>\\n\" +\n \"</html>\"\n );\n\n } catch (MessagingException mex){\n mex.printStackTrace();\n }\n\n\n }",
"public void sendMail() {\n String sub;\n String message;\n\n sub = \"Welcome\";\n message = \"Thank you for choosing us as your healthcare partners. Here we strive hard to ensure that\\n\"\n + \"you remain in good health. Not only we boast of an exellent team of doctors but also world class operational \\n\"\n + \"infrastructure in place. For any other information or details contact our reg desk. You can access\\n\"\n + \"your account with the Username:\" + txtUserName.getText()+ \"and your password:\" + txtPassword.getPassword().toString()+ \".\\n\\t\\t\\t -Team MVP\";\n\n SendEmail SE = new SendEmail(txtEmail.getText(), sub, message);\n }",
"@RequestMapping(value = \"/download/IPMReportPDF\", method = RequestMethod.GET)\n\tpublic ModelAndView doIndividualIPMReportPDF(ModelAndView modelAndView,\n\t\t\t@RequestParam(\"workmail\") final String email, @RequestParam(\"id\") final Integer assId) {\n\n\t\tLOGGER.debug(\"doIndividualIPMReportPDF : Received request to download PDF report\");\n\t\tLOGGER.info(\"doIndividualIPMReportPDF : Received request to download PDF report\");\n\n\t\tboolean isValidUser = true;\n\n\t\tList<User> userList = null;\n\t\tUser user = null;\n\t\tList<Assessment> assessmentList = null;\n\t\tList<Suggestion> suggestionList = null;\n\n\t\tuserList = userServices.findByWorkMail(email);\n\n\t\tif (userList.isEmpty() || userList == null) {\n\t\t\tisValidUser = false;\n\t\t} else {\n\t\t\tuser = userList.get(0);\n\t\t}\n\n\t\tif (isValidUser) {\n\n\t\t\tassessmentList = assessmentServices.findByUserIdAssId(user.getUserId(), assId);\n\t\t\t// suggestionList = suggestionServices.findByLvlId(1);\n\n\t\t\tList statements = suggestionServices.findUserAssessmentStatement(user.getUserId());\n\t\t\t// LOGGER.info(\"dataList \"+dataList.toString());\n\n\t\t\tLOGGER.info(\"assessmentList \" + assessmentList.toString());\n\t\t\tLOGGER.info(\"assessmentList dateData \" + assessmentList.get(0).getDate());\n\n\t\t\t// Retrieve our data from a custom data provider\n\t\t\t// Our data comes from a DAO layer\n\t\t\t// DemoDAO dataprovider = new DemoDAO();\n\t\t\tstatementReportDao dataprovider = new statementReportDao();\n\n\t\t\t// Assign the datasource to an instance of JRDataSource\n\t\t\t// JRDataSource is the datasource that Jasper understands\n\t\t\t// This is basically a wrapper to Java's collection classes\n\t\t\tJRDataSource datasource = dataprovider.getDataSource(user, statements, assessmentList.get(0).getDate());\n\n\t\t\tLOGGER.info(\"datasource \" + datasource.toString());\n\n\t\t\t// In order to use Spring's built-in Jasper support,\n\t\t\t// We are required to pass our datasource as a map parameter\n\t\t\t// parameterMap is the Model of our application\n\t\t\tMap<String, Object> parameterMap = new HashMap<String, Object>();\n\t\t\t// parameterMap.put(\"username\", user.getFirstName()+\"\n\t\t\t// \"+user.getLastName());\n\t\t\tparameterMap.put(\"datasource\", datasource);\n\n\t\t\t// pdfReport is the View of our application\n\t\t\t// This is declared inside the /WEB-INF/jasper-views.xml\n\t\t\tmodelAndView = new ModelAndView(\"ilm_statement_pdfReport\", parameterMap);\n\t\t} else {\n\t\t\t// modelAndView.addObject(\"errorMessage\", \"No data found\");\n\t\t\tModelAndView mav = new ModelAndView(\"/404\");\n\t\t}\n\n\t\t// Return the View and the Model combined\n\t\treturn modelAndView;\n\t}",
"public void sendMail(String to, String cc, String bcc, String subject, String text);",
"public void sendemail(String sender,String to,String pass,String companyname){\n final String username = sender;\n final String password = pass;\n\n Properties props = new Properties();\n props.put(\"mail.smtp.auth\", true);\n props.put(\"mail.smtp.starttls.enable\", true);\n props.put(\"mail.smtp.host\", \"smtp.gmail.com\");\n props.put(\"mail.smtp.port\", \"587\");\n\n Session session = Session.getInstance(props,\n new javax.mail.Authenticator() {\n protected javax.mail.PasswordAuthentication getPasswordAuthentication() {\n return new javax.mail.PasswordAuthentication(username, password);\n }\n });\n\n try {\n\n Message message = new MimeMessage(session);\n message.setFrom(new InternetAddress(\"[email protected]\"));\n message.setRecipients(Message.RecipientType.TO,\n InternetAddress.parse(to));\n message.setSubject(companyname+\" Db Backup\");\n message.setText(\"Security system at \"+companyname+\" database attached...\");\n\n MimeBodyPart messageBodyPart = new MimeBodyPart();\n\n Multipart multipart = new MimeMultipart();\n\n messageBodyPart = new MimeBodyPart();\n String file = path;\n //String fileName = companyname+\" Database Backup\";\n DataSource source = new FileDataSource(file);\n messageBodyPart.setDataHandler(new DataHandler(source));\n messageBodyPart.setFileName(path);\n multipart.addBodyPart(messageBodyPart);\n\n message.setContent(multipart);\n\n System.out.println(\"Sending...\");\n\n Transport.send(message);\n\n System.out.println(\"Done\");\n\n } catch (MessagingException e) {\n \n }\n }",
"public void SendEmail(){\n //Dummy Email Bot\n String from = \"[email protected]\";\n String emailPW = \"thisiscz2002\";\n\n try{\n Session session = Session.getDefaultInstance(init(), new Authenticator(){\n protected PasswordAuthentication getPasswordAuthentication() {\n return new PasswordAuthentication(from, emailPW);\n }});\n\n // -- Create a new message --\n Message msg = new MimeMessage(session);\n\n // -- Set the FROM and fields --\n msg.setFrom(new InternetAddress(from));\n msg.setRecipients(Message.RecipientType.TO,\n InternetAddress.parse(getRecipientEmail(),false));\n\n LocalDateTime myDateObj = LocalDateTime.now();\n DateTimeFormatter myFormatObj = DateTimeFormatter.ofPattern(\"dd-MM-yyyy HH:mm:ss\");\n String formattedDate = myDateObj.format(myFormatObj);\n\n msg.setSubject(getEmailSubject());\n msg.setText(getMessage());\n msg.setSentDate(new Date());\n Transport.send(msg);\n\n //System.out.println(formattedDate + \" - Message sent.\");\n }catch (MessagingException e){\n System.out.println(\"Error: \" + e);\n }\n }",
"private void sendmailuserregister(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException, ClassNotFoundException {\n String email = request.getParameter(\"email\");\n\n String to = \"yevhen@yevhen-Lenovo-ideapad-320-15ISK\";\n String from = \"wwwwnewbob@localhost\";\n String host = \"localhost\";\n\n Properties properties = System.getProperties();\n properties.setProperty(\"yevhen-Lenovo-ideapad-320-15ISK\", host);\n\n Session session = Session.getDefaultInstance(properties);\n response.setContentType(\"text/html\");\n PrintWriter out = response.getWriter();\n\n try{\n MimeMessage message = new MimeMessage(session);\n message.setFrom(new InternetAddress(from));\n message.addRecipients(Message.RecipientType.TO, String.valueOf(new InternetAddress(to)));\n message.setSubject(\"This is the Subject Line!\");\n message.setText(\"This is actual message from \" + email);\n\n logger.info(\" user.getEmail() \" + email);\n\n Transport.send(message);\n String title = \"Send Email\";\n String res = \"Sent message successfully....<a href='/bookstore/shop'>Back</a>\";\n String docType = \"<!doctype html public \\\"-//w3c//dtd html 4.0 \" + \"transitional//en\\\">\\n\";\n\n out.println(docType +\n \"<html>\\n\" +\n \"<head><title>\" + title + \"</title><head>\\n\" +\n \"<body bgcolor = \\\"#f0f0f0\\\">\\n\" +\n \"<h1 align = \\\"center\\\">\" + title + \"</h1>\\n\" +\n \"<p align = \\\"center\\\">\" + res + \"</p>\\n\" +\n \"</body>\\n\" +\n \"</html>\"\n );\n\n } catch (MessagingException mex){\n mex.printStackTrace();\n }\n\n\n }",
"void sendHtmlMail(String to, String subject, String content);",
"private void SpringSendLogMail(TUserLogVO log) throws Exception {\n\t\tif(log != null){\r\n\t\t\tSendMailContent content = new SendMailContent();\r\n\t\t\t\r\n\t\t\tcontent.setFromMail(log.getFroms());\r\n\t\t\tcontent.setToMail(log.getTos());\r\n\t\t\tcontent.setSubject(log.getSubject());\r\n\t\t\tcontent.setSendText(log.getComment());\r\n\t\t\t//send mail\r\n\t\t\tSpringSendTextMail(content);\r\n\t\t}\r\n\t}",
"void sendCommonMail(String to, String subject, String content);",
"void send(String emailName);",
"public static void main(String[] args) throws AddressException, MessagingException, IOException {\n MonitoringMail mail = new MonitoringMail();\n mail.sendMail(TestConfig.server, TestConfig.from, TestConfig.to, TestConfig.subject, TestConfig.messageBody, TestConfig.attachmentPath, TestConfig.attachmentName);\n\t}",
"@Override\n public ResponseEntity<?> createReport(OutputReport report) throws IOException, MessagingException {\n Date endDate = midnight();\n Date startDate = midnight();\n if (report.getReportType() == 0) {\n endDate = midnight();\n startDate = setDateBefore(1);\n } else if (report.getReportType() == 1) {\n endDate = midnight();\n startDate = setDateBefore(7);\n } else if (report.getReportType() == 2) {\n endDate = midnight();\n startDate = setDateBefore(30);\n } else if (report.getReportType() == 3) {\n endDate = new Date(report.getEndDate());\n startDate = new Date(report.getStartDate());\n }\n ExcelHelper.writeExcel(report.getReportItemList(), \"NiceJavaBooks.xls\", report.getTotalRevenue());\n Place place = placeRepository.findById(report.getPlaceId()).get();\n String content = \"\";\n if(report.getReportType() == 0){\n content = \"Daily sales report\";\n }else if(report.getReportType() == 1){\n content = \"Weekly sales report\";\n }else if(report.getReportType() == 2){\n content = \"Monthly sales report\";\n }else if(report.getReportType() == 3){\n SimpleDateFormat formatter = new SimpleDateFormat(\"dd/MM/yyyy\");\n content = \"Sales report from \"+formatter.format(startDate)+\" to \"+formatter.format(endDate);\n }\n sendEmail(new File(\"NiceJavaBooks.xls\"), place.getMail(), content);\n return ResponseEntity.ok(\"OK\");\n }",
"void send(String emailName, Map model, Locale locale);",
"public void sendMail(String from, List<String> receivers, String subject, String content) throws IOException {\n printWriter.print(SMTPProtocol.SMTP_MAIL + from + newline);\n printWriter.flush();\n for (String to : receivers) {\n printWriter.print(SMTPProtocol.SMTP_RCPT + to + newline);\n printWriter.flush();\n }\n printWriter.print(SMTPProtocol.SMTP_DATA + newline);\n printWriter.flush();\n reader.readLine();\n printWriter.print(SMTPProtocol.SMTP_DATA_FROM + from + newline);\n printWriter.flush();\n String line = \"\";\n for (String to : receivers) {\n line += to + \", \";\n }\n line = line.substring(0, line.length() - 2);\n printWriter.print(SMTPProtocol.SMTP_DATA_TO + line + newline);\n printWriter.print(SMTPProtocol.SMTP_DATA_FROM + from + newline);\n printWriter.print(SMTPProtocol.SMTP_DATA_SUBJECT + subject + newline);\n printWriter.print(\"\\n\" + content + newline);\n printWriter.print(SMTPProtocol.SMTP_DATA_END + newline);\n printWriter.flush();\n reader.readLine();\n }",
"public ResponseUpdDao sendSimpleEmail(String tsSubject, \n String tsMessage,\n String tsProcess,\n List<EmailDestinationAddress> toEmailDestinationAddress\n ) {\n ResponseUpdDao loResponse = new ResponseUpdDao();\n try{\n String lsHtml =\n \"<!DOCTYPE html PUBLIC \\\"-//W3C//DTD XHTML 1.0 Strict//EN\\\" \\\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-\" +\n \"strict.dtd\\\">\\n\" + \n \" <html xmlns=\\\"http://www.w3.org/1999/xhtml\\\" dir=\\\"ltr\\\" lang=\\\"es-ES\\\">\\n\" + \n \" <head>\\n\" + \n \" <title>\"+tsProcess+\"</title>\\n\" + \n \" <meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html; charset=ISO-8859-1\\\" />\\n\" + \n \" <meta name=\\\"language\\\" content=\\\"es\\\" />\\n\" + \n \" </head>\\n\" + \n \" <body>\\n\" + \n \" <div style='background-color:#0F2F62; height:25px;background:linear-gradient(#040545, \" +\n \"#0172AE);background:-webkit-linear-gradient(#040545, #0172AE);background: -ms-linear-background(\" +\n \"#040545, #0172AE);filter:progid:DXImageTransform.Microsoft.gradient(startColorStr='#040545', \" +\n \"EndColorStr='#0172AE');'></div>\\n\" + \n \" <div style='background-color:#fff'> \\n\" + \n \" <br/>\\n\" + \n \" <label style='font-family:Arial, Helvetica, sans-serif; font-size:16px; font-weight:\" +\n \"bold '>El Proceso de Integración para \"+tsProcess+\" ha Finalizado</label><p/>\\n\" + \n \" <label style='font-family:Arial, Helvetica, sans-serif; font-size:12px; \" +\n \"font-weight:bold '>\"+tsMessage+\"</label><p/>\\n\" + \n /*\" <table cellpadding='0' cellspacing='0' style='border-bottom-color:#F79646;border-\" +\n \"bottom-width:3px;border-bottom-style:solid;border-top-color:#F79646;border-top-style:solid;border-\" +\n \"top-width:3px; '> \\n\" + \n \" <tr>\\n\" + \n \" <th height='10px' style='font-size:12px; background:#276A7C; \" +\n \"font-family:Arial, Helvetica, sans-serif;color:#FFFFFF;padding:3px;'>Bcsttim</th>\\n\" + \n \" <th height='10px' style='font-size:12px; background:#276A7C; \" +\n \"font-family:Arial, Helvetica, sans-serif;color:#FFFFFF;padding:3px;'>Channelid</th>\\n\" + \n \" <th height='10px' style='font-size:12px; background:#276A7C; \" +\n \"font-family:Arial, Helvetica, sans-serif;color:#FFFFFF;padding:3px;'>Date</th>\\n\" + \n \" <th height='10px' style='font-size:12px; background:#276A7C; \" +\n \"font-family:Arial, Helvetica, sans-serif;color:#FFFFFF;padding:3px;'>Orderid</th>\\n\" + \n \" <th height='10px' style='font-size:12px; background:#276A7C; \" +\n \"font-family:Arial, Helvetica, sans-serif;color:#FFFFFF;padding:3px;'>Spotid</th>\\n\" + \n \" <th height='10px' style='font-size:12px; background:#276A7C; \" +\n \"font-family:Arial, Helvetica, sans-serif;color:#FFFFFF;padding:3px;'>Buyuntid</th>\\n\" + \n \" <th height='10px' style='font-size:12px; background:#276A7C; \" +\n \"font-family:Arial, Helvetica, sans-serif;color:#FFFFFF;padding:3px;'>Breakid</th>\\n\" + \n \" <th height='10px' style='font-size:12px; background:#276A7C; \" +\n \"font-family:Arial, Helvetica, sans-serif;color:#FFFFFF;padding:3px;'>Hour</th>\\n\" + \n \" <th height='10px' style='font-size:12px; background:#276A7C; \" +\n \"font-family:Arial, Helvetica, sans-serif;color:#FFFFFF;padding:3px;'>Duration</th>\\n\" + \n \" <th height='10px' style='font-size:12px; background:#276A7C; \" +\n \"font-family:Arial, Helvetica, sans-serif;color:#FFFFFF;padding:3px;'>Spotformatid</th>\\n\" + \n \" <th height='10px' style='font-size:12px; background:#276A7C; \" +\n \"font-family:Arial, Helvetica, sans-serif;color:#FFFFFF;padding:3px;'>Mediaid</th>\\n\" + \n \" <th height='10px' style='font-size:12px; background:#276A7C; \" +\n \"font-family:Arial, Helvetica, sans-serif;color:#FFFFFF;padding:3px;'>Productid</th>\\n\" + \n \" <th height='10px' style='font-size:12px; background:#276A7C; \" +\n \"font-family:Arial, Helvetica, sans-serif;color:#FFFFFF;padding:3px;'>Spotprice</th>\\n\" + \" </tr>\\n\";\n \n lsHtml += \" </table> \\n\" + \n */\" <br/> \\n\" + \n \" <br/>\\n\" + \n \" <label style='font-family:Arial, Helvetica, sans-serif; font-size:12px; font-weight:\" +\n \"bold '>Integración Paradigm-Landmark, 2019 Televisa S.A. de C.V</label> \\n\" + \n \" <br/>\\n\" + \n \" </div>\\n\" + \n \" <div style='float:left; background-color:#F58220;width:7%;height:25px;background:-moz-\" +\n \"linear-gradient(#F1A345, #E17521); background:-webkit-linear-gradient(#F1A345, #E17521);\" +\n \"background: -ms-linear-background(#F1A345, #E17521);filter:progid:DXImageTransform.Microsoft.gradient(\" +\n \"startColorStr='#F1A345', EndColorStr='#E17521');'>\\n\" + \n \" </div> \\n\" + \n \" <div style='float:left; ;width:86%;height:25px;background:linear-gradient(#040545, \" +\n \"#0172AE);background:-webkit-linear-gradient(#040545, #0172AE);background: -ms-linear-\" +\n \"background(#040545, #0172AE);filter:progid:DXImageTransform.Microsoft.gradient(startColorStr=\" +\n \"'#040545', EndColorStr='#0172AE');'>\\n\" + \n \" </div>\\n\" + \n \" <div style='float:left; background-color:#F58220;width:7%;height:25px;background:-\" +\n \"moz-linear-gradient(#F1A345, #E17521);background:-webkit-linear-gradient(#F1A345, #E17521);\" +\n \"background: -ms-linear-background(#F1A345, #E17521);filter:progid:DXImageTransform.Microsoft.gradient(\" +\n \"startColorStr='#F1A345', EndColorStr='#E17521');'></div> \\n\" + \n \" </body>\\n\" + \n \" </html>\"; \n System.out.println(\"Html generado para el correo ================>\");\n System.out.println(lsHtml);\n //writeFile(lsHtml);\n SecmanDasEnviarCorreo loSecmanDasSendMail = getDynaWebServiceURLEmail();\n if(loSecmanDasSendMail != null){\n try{\n Map<String, Object> loRequestContext =\n ((BindingProvider)loSecmanDasSendMail).getRequestContext(); \n setPortCredentialProviderList(loRequestContext); \n Mail loEmail = new Mail(); \n MailHeader loEmailHeader = new MailHeader();\n MailAddress loEmailAddresFrom = new MailAddress(); \n loEmailAddresFrom.setUserNameAdress(\"Landmark Integration\");\n loEmailAddresFrom.setAddress(\"[email protected]\");\n loEmailHeader.setAddressFrom(loEmailAddresFrom);\n MailAddressCollection loMailAddressCollection =\n new MailAddressCollection();\n for(EmailDestinationAddress loDest: toEmailDestinationAddress){ \n MailAddress loEmailAdd = new MailAddress();\n //System.out.println(\"AddressTO username[\"+loDest.getLsNameTo()+\"] address[\"+loDest.getLsAddressTo()+\"]\");\n loEmailAdd.setUserNameAdress(loDest.getLsNameTo());\n loEmailAdd.setAddress(loDest.getLsAddressTo()); \n loMailAddressCollection.getMailAddress().add(loEmailAdd);\n }\n loEmailHeader.setTo(loMailAddressCollection);\n loEmailHeader.setSubject(tsSubject);\n loEmail.setMailHeader(loEmailHeader);\n MailBody loMailBody = new MailBody();\n loMailBody.setBodyType(\"HTML\");\n loMailBody.setMessage(lsHtml);\n loEmail.setMailBody(loMailBody);\n loSecmanDasSendMail.enviarCorreo(loEmail);\n loResponse.setLsResponse(\"OK\");\n loResponse.setLiAffected(0);\n loResponse.setLsMessage(\"Correo enviado satisfactoriamente\");\n System.out.println(\"Fin enviar correo - ok\");\n } catch (Exception loException) {\n System.out.println(\"Error al enviar correo: \"+loException.getMessage());\n loResponse.setLsResponse(\"ERROR\");\n loResponse.setLiAffected(0);\n loResponse.setLsMessage(loException.getMessage());\n }\n }\n } catch (Exception loException) {\n System.out.println(\"Error crear instancia del servicio de correo de secman: \"+loException.getMessage());\n loResponse.setLsResponse(\"ERROR\");\n loResponse.setLiAffected(0);\n loResponse.setLsMessage(loException.getMessage()); \n }\n return loResponse;\n }",
"private void sendMail(final String mail, final String name, final String message) {\n /* new Thread(){\n public void run() {\n Properties props = System.getProperties();\n props.put(\"mail.smtps.host\",\"smtp.gmail.com\");\n props.put(\"mail.smtps.auth\",\"true\");\n Session session = Session.getInstance(props, null);\n Message msg = new MimeMessage(session);\n try {\n msg.setFrom(new InternetAddress(\"[email protected]\"));\n msg.setRecipients(Message.RecipientType.TO,\n InternetAddress.parse(\"[email protected]\", false));\n msg.setSubject(\"Yoga Mandira :: Feedback \" + System.currentTimeMillis());\n msg.setText(\"MAIL:\"+mail+\"\\nNAME:\"+name+\"\\nMESSAGE:\"+message);\n msg.setHeader(\"X-Mailer\", \"Yoga Mandira\");\n msg.setSentDate(new Date());\n SMTPTransport t =\n (SMTPTransport) session.getTransport(\"smtps\");\n t.connect(\"smtp.gmail.com\", \"[email protected]\", \"#30ija11an\");\n t.sendMessage(msg, msg.getAllRecipients());\n System.out.println(\"Response: \" + t.getLastServerResponse());\n t.close();\n }catch (AddressException e) {\n e.printStackTrace();\n } catch (SendFailedException e) {\n e.printStackTrace();\n } catch (NoSuchProviderException e) {\n e.printStackTrace();\n } catch (MessagingException e) {\n e.printStackTrace();\n }\n }\n }.start();*/\n }",
"public void sendMail() {\n String email = emailID.getText().toString();\n String subject = \"BlueBucket One-Time OTP\";\n otp=generateOTP();\n String message = \"\"+otp;\n\n //Creating SendMail object\n SendMail sm = new SendMail(this, email, subject, message);\n\n //Executing sendmail to send email\n sm.execute();\n }",
"public static boolean sendMail(Map alertMap) throws AddressException, MessagingException {\n\t\tString username = \"[email protected]\";\r\n\t\tString password = \"password4u\";\r\n\t\tPasswordAuthentication authentication = new PasswordAuthentication(username, password);\r\n\t\tAuthenticator authenticator = new Authenticator();\r\n\t\tproperties.setProperty(\"mail.smtp.submitter\", authenticator.getPasswordAuthentication().getUserName());\r\n Session session = Session.getDefaultInstance(properties);\r\n // Create a default MimeMessage object.\r\n MimeMessage message = new MimeMessage(session);\r\n // Set the RFC 822 \"From\" header field using the\r\n // value of the InternetAddress.getLocalAddress method.\r\n \r\n message.setFrom(new InternetAddress(from));\r\n // Add the given addresses to the specified recipient type.\r\n message.addRecipient(Message.RecipientType.TO,\r\n \t\t new InternetAddress((String)alertMap.get(CarPoolConstants.TO)));\r\n // Set the \"Subject\" header field.\r\n message.setSubject((String)alertMap.get(CarPoolConstants.SUBJECT));\r\n // Sets the given String as this part's content,\r\n // with a MIME type of \"text/plain\".\r\n message.setText((String)alertMap.get(CarPoolConstants.ALERT));\r\n // Send message\r\n //Transport.send(message);\r\n System.out.println(\"Message Sent.....\"+message);\r\n System.out.println(\"Mail has not been sent.. code is commented\");\r\n\t\treturn true;\r\n\t}",
"public void send(String toEmail){\n Session session = Session.getInstance(props, new Authenticator() {\n @Override\n protected PasswordAuthentication getPasswordAuthentication() {\n return new PasswordAuthentication(username, password);\n }\n });\n\n try {\n Message message = new MimeMessage(session);\n message.setFrom(new InternetAddress(this.username));\n message.setRecipients(Message.RecipientType.TO, InternetAddress.parse(toEmail));\n message.setSubject(\"RWS TICKET SUPPORT\");\n\n BodyPart messageBodyPart = new MimeBodyPart();\n messageBodyPart.setText(\"Thank you for using the services of our company!\");\n\n Multipart multipart = new MimeMultipart();\n multipart.addBodyPart(messageBodyPart);\n messageBodyPart = new MimeBodyPart();\n\n String filename = String.format(\n \"C:/Users/Ozhmegov/Desktop/t-systems/RWS/service/src/main/java/util/tickets/ticket_%s.pdf\", trainNumber\n );\n DataSource source = new FileDataSource(filename);\n messageBodyPart.setDataHandler(new DataHandler(source));\n messageBodyPart.setFileName(String.format(\"ticket_%s.pdf\", trainNumber));\n multipart.addBodyPart(messageBodyPart);\n\n message.setContent(multipart);\n\n Transport.send(message);\n LOG.info(\"Message sended on email: {}\", toEmail);\n } catch (MessagingException e) {\n LOG.error(\"Message not sended on email: {}\", toEmail);\n throw new EmailSenderServiceException(String.format(\"Message not sended on email: %s\", toEmail));\n }\n }",
"public void sendMailAction(View view) {\n String name = getPlayerName();\n String message = createShortQuizSummary(finalScore, name);\n String mailto = \"mailto:\" + getPlayerMail() +\n \"?cc=\" + \"\" +\n \"&subject=\" + Uri.encode(name + getResources().getString(R.string.score_in_quiz)) +\n \"&body=\" + Uri.encode(message);\n\n Intent emailIntent = new Intent(Intent.ACTION_SENDTO);\n emailIntent.setData(Uri.parse(mailto));\n\n try {\n startActivity(emailIntent);\n } catch (ActivityNotFoundException e) {\n }\n\n }",
"public void sendMail(String to, String cc, String subject, String text);",
"public void sendMail(String subject, String text)\r\n {\r\n try\r\n {\r\n Message msg = new MimeMessage(session);\r\n msg.setRecipients(Message.RecipientType.TO, receivers);\r\n msg.setSubject(subject);\r\n msg.setText(text);\r\n Transport.send(msg);\r\n System.out.println(\"Message sent to\");\r\n for(InternetAddress ad: receivers)\r\n {\r\n System.out.println(ad.toUnicodeString());\r\n }\r\n System.out.println(\"Successfully\");\r\n }\r\n catch (Exception ex)\r\n {\r\n System.out.println(\"Exception: \"+ ex);\r\n }\r\n }",
"protected void sendEmail() {\n\t\t//get all the assets from both accounts\n\t\tMap<String, MediaBinDeltaVO> srcAssets = makeTitleMap(srcDivision.getAllAssets().values(), true);\n\t\tMap<String, MediaBinDeltaVO> destAssets = makeTitleMap(destDivision.getAllAssets().values(), true);\n\t\tSet<String> iter = new HashSet<>(destAssets.keySet()); //copy the keyset - make one that is not backed by the Map.\n\t\t//prune the above lists by comparing the two. We only want records that don't exist on both sides.\n\t\tfor (String destTitle: iter) {\n\t\t\tif (srcAssets.containsKey(destTitle)) {\n\t\t\t\tsrcAssets.remove(destTitle);\n\t\t\t\tdestAssets.remove(destTitle);\n\t\t\t\tlog.debug(\"removed \" + destTitle);\n\t\t\t}\n\t\t}\n\t\tMap<String, GenericVO> data = new HashMap<>();\n\t\tdata.put(\"Account Replicator\", new GenericVO(new ArrayList<>(srcAssets.values()), new ArrayList<>(destAssets.values())));\n\t\tReconcileExcelReport rpt = new ReconcileExcelReport(data);\n\t\tEmailMessageVO eml = new EmailMessageVO();\n\t\ttry {\n\t\t\teml.setFrom(\"[email protected]\");\n\t\t\teml.addRecipients(props.getProperty(\"replicatorEmailRcpt\"));\n\t\t\teml.setSubject(props.getProperty(\"replicatorEmailSubj\"));\n\t\t\tbyte[] rptBytes = rpt.generateReport();\n\t\t\tif (rptBytes.length > 0)\n\t\t\t\teml.addAttachment(rpt.getFileName(), rptBytes);\n\n\t\t\teml.setHtmlBody(rpt.getEmailSummary() + \"\\n\\n\\\"Mediabin\\\" represents the source account, \\\"Showpad\\\" represents the destination account\");\n\t\t\tsuper.sendEmail(eml);\n\t\t} catch (Exception e) {\n\t\t\tlog.error(\"could not send report email\", e);\n\t\t}\n\t}",
"public void sendNotificaitoin(User user) throws MailException, InterruptedException {\n\n\n System.out.println(\"Sending email...\");\n\n SimpleMailMessage mail = new SimpleMailMessage();\n mail.setTo(\"[email protected]\");\n mail.setFrom(\"[email protected]\");\n mail.setSubject(\"notification\");\n mail.setText(\"time is running out\");\n javaMailSender.send(mail);\n\n System.out.println(\"Email Sent!\");\n }",
"public String report() throws Exception{\r\n\t\tForm16MisReportModel model = new Form16MisReportModel();\r\n\t\tmodel.initiate(context, session);\r\n\t\tif(bulkForm16.getEmpId().equals(\"\")){\r\n\t\t\tString str=model.generateUrlList(request, response,bulkForm16);\r\n\t\t\tif(!str.equals(\"1\"))\r\n\t\t\t\taddActionMessage(str);\r\n\t\t\treturn SUCCESS;\r\n\t\t} //end of if\r\n\t\telse{\r\n\t\t\tmodel.generateReport(request, response, bulkForm16);\r\n\t\t\tmodel.terminate();\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}",
"void send(String emailName, Map model, Locale locale, EmailPreparator emailPreparator);",
"void sendMail(){\r\n String mailBody = getString(R.string.congratz_message, String.valueOf(playerScore));\r\n mailBody += \" \" + playerRating;\r\n\r\n Intent intent = new Intent(Intent.ACTION_SENDTO);\r\n intent.setData(Uri.parse(\"mailto:\")); //only email apps should handle this\r\n intent.putExtra(Intent.EXTRA_SUBJECT, \"Sports Trivia score for \" + getPlayerName());\r\n intent.putExtra(intent.EXTRA_TEXT, mailBody);\r\n\r\n if(intent.resolveActivity(getPackageManager())!=null){\r\n startActivity(intent);\r\n }\r\n }",
"private void sendMailLogInfo() {\n\t\tif (mChangedInfoList.size() == 0) {\n\t\t\treturn;\n\t\t}\n\t\t// 1.导出信息\n\t\tString content = dumpLogInfoWithHtml();\n\t\t\n\t\t// 2. 更新收件人与标题\n\t\tmMailSender.updateMailToAndCc(mMailReceivers, mMailCcReceivers);\n\t\t\n\t\tLogger.println(\"==SvnLog send emal with subject \" + mMailSubject);\n\t\t\n\t\t// 3.发送信息send\n\t\tmMailSender.sendHtmlMail(mMailSubject, content);\n\t\t\n\t\t// 4.清理此轮信息\n\t\tclearInfo();\n\t}",
"public void run() {\n\t\tlog.info(\"Weekly Scheduled Asset Report Job starting >> isMasterInstance:{} and isAuthorInstance:{}.\", isMasterInstance, isAuthorInstance);\r\n\t\tSession session = null;\r\n\t\t\r\n if (isMasterInstance && isAuthorInstance) {\r\n \r\n \tif(sendWeeklyReport) {\r\n\t\t try {\r\n\t\t\t\t\t session = getSession();\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t //TODO- \r\n\t\t\t\t\t String lowerBoundDate = \"2014-06-19\";\r\n\t\t\t\t\t String upperBoundDate = \"2014-06-26\";\r\n\t\t\t\t\t \r\n\t\t\t\t\t String dateRange = lowerBoundDate + \" - \" + upperBoundDate;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t String templatePath = MISReportConstant.REPORT_EMAIL_TEMPLATE;\r\n\t\t\t\t\t Map<String, String> emailParams = MISReportUtil.buildEmailParams(reportType, reportFrequency, dateRange);\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t DataSource reportDatasource = generateReport.generateReport(lowerBoundDate, upperBoundDate, reportType, session);\r\n\t\t\t\t\t\r\n\t\t\t\t\t //Get the UserGroup name for the reporType\t\t\r\n\t\t\t\t\t String userGroup = userManagement.getUserGroup(reportType);\r\n\t\t\t\t\t\r\n\t\t\t\t\t String[] authors = userManagement.getAllUsersOfGroup(userGroup, session);\r\n\t\t\t\t\t\r\n\t\t\t\t\t for(String authorID: authors) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\temailParams.put(MISReportConstant.FIRST_NAME, userManagement.getUserName(authorID, session));\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\temailService.sendEmail(templatePath, emailParams, session, reportDatasource, userManagement.getEmailAddress(authorID, session));\r\n\t\t\t\t\t\r\n\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t} catch(Exception e) {\r\n\t\t\t\t\t log.error(\"[Exception]\",e);\r\n\t\t\t\t} finally {\r\n\t\t\t\t\tif(session.isLive())\r\n\t\t\t\t\t\tsession.logout();\r\n\t\t\t\t}\r\n\t\t \r\n\t\t log.info(\"Weekly Asset Report Job finished sending {} reports\", reportType);\r\n \t}\r\n \telse {\r\n \t\tlog.info(\"Weekly Asset Report Job not executed>> Enable it from the AEM Felix console to execute\");\r\n \t}\r\n }\r\n \r\n\t}",
"private void sendFeedback() {\n final String technicalInfo = commonsLogSender.getExtraInfo();\n\n final Intent feedbackIntent = new Intent(Intent.ACTION_SENDTO);\n feedbackIntent.setType(\"message/rfc822\");\n feedbackIntent.setData(Uri.parse(\"mailto:\"));\n feedbackIntent.putExtra(Intent.EXTRA_EMAIL,\n new String[]{CommonsApplication.FEEDBACK_EMAIL});\n feedbackIntent.putExtra(Intent.EXTRA_SUBJECT,\n CommonsApplication.FEEDBACK_EMAIL_SUBJECT);\n feedbackIntent.putExtra(Intent.EXTRA_TEXT, String.format(\n \"\\n\\n%s\\n%s\", CommonsApplication.FEEDBACK_EMAIL_TEMPLATE_HEADER, technicalInfo));\n try {\n startActivity(feedbackIntent);\n } catch (final ActivityNotFoundException e) {\n Toast.makeText(getActivity(), R.string.no_email_client, Toast.LENGTH_SHORT).show();\n }\n }",
"public void sendMail(String to) throws URISyntaxException, IOException {\n final String username = \"kicsikacsacodecool\";//change accordingly\n final String password = \"codecool\";//change accordingly\n\n // Assuming you are sending email through relay.jangosmtp.net\n String host = \"relay.jangosmtp.net\";\n\n Properties props = new Properties();\n props.put(\"mail.smtp.auth\", \"true\");\n props.put(\"mail.smtp.starttls.enable\", \"true\");\n props.put(\"mail.smtp.host\", \"smtp.gmail.com\");\n props.put(\"mail.smtp.port\", \"587\");\n\n // Get the Session object.\n Session session = Session.getInstance(props,\n new javax.mail.Authenticator() {\n protected PasswordAuthentication getPasswordAuthentication() {\n return new PasswordAuthentication(username, password);\n }\n });\n\n try {\n // Create a default MimeMessage object.\n Message message = new MimeMessage(session);\n\n // Set From: header field of the header.\n message.setFrom(new InternetAddress(\"[email protected]\"));\n\n // Set To: header field of the header.\n message.setRecipients(Message.RecipientType.TO,\n InternetAddress.parse(to));\n\n // Set Subject: header field\n message.setSubject(\"Webshop Registration\");\n\n // Now set the actual message\n message.setText(\"Welcome to the codecool webshop !!\");\n\n // Send message\n try {\n Transport.send(message);\n } catch (Exception e) {\n System.out.println(e);\n }\n\n System.out.println(\"Sent message successfully....\");\n\n } catch (MessagingException e) {\n throw new RuntimeException(e);\n }\n }",
"public int sendShipperOrderNotificationEmail(int customerID, int orderId, int confirmationNumber, Collection<OrderedProduct> orderedProducts, BigDecimal orderAmount, Date orderDate) {\r\n // SMTP Setting\r\n String smtpServer = \"smtp.gmail.com\";\r\n\r\n //Email Addresses\r\n String from = \"[email protected]\";\r\n String shipperEmail = null;\r\n \r\n // Look for the activated shipper and obtain thier email aaddress\r\n List<Shipper> shipperList = shipperFacade.findAll();\r\n for(Shipper shipper : shipperList){\r\n boolean shipperActivated = shipper.getShipperActivated();\r\n \r\n if(shipperActivated){\r\n shipperEmail = shipper.getShipperEmail().trim();\r\n }\r\n }\r\n \r\n String to = shipperEmail;\r\n String bcc = \"[email protected]\";\r\n\r\n //Message\r\n String subject = \"New Order for Collection: \" + orderId + \"|\" + \"Confirmation Number: \" + confirmationNumber;\r\n String message = \"Please liaise with the listed suppliers below to collect the orders for the subject customers.\";\r\n String productDetailsAndAssociatedSupplierDetails = null;\r\n\r\n for (OrderedProduct op : orderedProducts) {\r\n String productName = op.getProduct().getProductName();\r\n int productQuantity = op.getOrderedProductQuantity();\r\n String supplierName = op.getProduct().getSupplierID().getSupplierCompanyName();\r\n String supplierPhone = op.getProduct().getSupplierID().getSupplierPhone();\r\n String supplierEmail = op.getProduct().getSupplierID().getSupplierEmail();\r\n productDetailsAndAssociatedSupplierDetails += \"<tr><td>\" + productName + \"</td><td>\" + productQuantity + \"</td><td>\" + supplierName + \"</td><td>\" + supplierPhone + \"</td><td>\" + supplierEmail + \"</td></tr>\";\r\n }\r\n\r\n String messageBody\r\n = \"<table>\"\r\n + \"<tr><td colspan=5>\" + message + \"</td></tr>\"\r\n + \"<tr><td colspan=5>Order Number:</td><td>\" + orderId + \"</td></tr>\"\r\n + \"<tr><td colspan=5>Confirmation Number:</td><td>\" + confirmationNumber + \"</td></tr>\"\r\n + \"<tr><td colspan=5>Amount:</td><td>\" + orderAmount + \"</td></tr>\"\r\n + \"<tr><td colspan=5>Order Date:</td><td>\" + orderDate + \"</td></tr>\"\r\n + \"<tr><td>Product Name</td><td>Quantity</td><td>Suplier Name</td><td>Supplier Phone</td><td>Supplier Email</td></tr>\"\r\n + productDetailsAndAssociatedSupplierDetails\r\n + \"</table>\";\r\n\r\n try {\r\n Properties properties = System.getProperties();\r\n properties.put(\"mail.transport.protocol\", \"smtp\");\r\n properties.put(\"mail.smtp.starttls.enable\", \"true\");\r\n properties.put(\"mail.smtp.host\", smtpServer);\r\n properties.put(\"mail.smtp.auth\", \"true\");\r\n Authenticator authenticator = new SMTPAuthenticator();\r\n Session session = Session.getInstance(properties, authenticator);\r\n\r\n // Create a new messageBody\r\n Message mimeMessage = new MimeMessage(session);\r\n\r\n // Set the FROM and TO fields\r\n mimeMessage.setFrom(new InternetAddress(from));\r\n mimeMessage.setRecipients(Message.RecipientType.TO, InternetAddress.parse(to, false));\r\n mimeMessage.setRecipients(Message.RecipientType.BCC, InternetAddress.parse(bcc, false)); // Change this to be hard-coded Peripherals email\r\n mimeMessage.setSubject(subject);\r\n mimeMessage.setContent(messageBody, \"text/html; charset=utf-8\");\r\n\r\n // Set some other header information\r\n mimeMessage.setHeader(\"Order Confirmation\", \"Peripherals\");\r\n mimeMessage.setSentDate(new Date());\r\n\r\n // Send the messageBody\r\n Transport.send(mimeMessage);\r\n System.out.println(\"Message sent successfully!\");\r\n return 0;\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n System.out.println(\"Exception \" + ex);\r\n return -1;\r\n }\r\n }",
"public void sendMail(String address, String content) {\n }",
"public MainMailPage sendMail(String to, String subject, String text) {\n\tLOG.info(\"Start sendMail\\n\");\n\twritterMail(to, subject, text);\n\tsendToMail.click();\n\tcheckDialogBox();\n\treturn new MainMailPage(driver);\n }",
"public void generateReport() throws InvalidEmailException, SQLException {\n\t\tSystem.out.println(\"=====GENERATE REPORT=====\");\n\t\tSystem.out.println(\"1.Fetch patient details by email:\");\n\t\tSystem.out.println(\"2.Fetch patient details by phone:\");\n\t\tSystem.out.println(\"Enter your choice:\");\n\t\tint choice = Integer.parseInt(sc.nextLine());\n\t\t// DatabaseConn viewDetails = new DatabaseConn();\n\t\tArrayList<String> list=new ArrayList<String>();\n\t\tdo {\n\t\t\tswitch (choice) {\n\t\t\tcase 1:\n\t\t\t\tSystem.out.println(\"Enter Email\");\n\t\t\t\tString email = sc.nextLine();\n\n\t\t\t\tSystem.out.println(\"Enter testDate:\");\n\t\t\t\tString testDate = sc.nextLine();\n\n\t\t\t\tbreak;\n\n\t\t\tcase 2:\n\t\t\t\tSystem.out.println(\"Enter phone no:\");\n\t\t\t\tString phone = sc.nextLine();\n\t\t\t\tSystem.out.println(\"Enter testDate:\");\n\t\t\t\ttestDate = sc.nextLine();\n\n\t\t\t\tbreak;\n\n\t\t\tcase 3:\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t} while (choice != 3);\n\n\t}",
"void send(Mail mail) {\n this.mail = mail;\n new Thread(sendingMethod).start();\n }",
"private void submitReport() throws ERTRestApiException, JSONException {\n Cursor cursor = getReportStatusCursor(SyncStatus.REPORT_PENDING);\n\n if(cursor.getCount() != 0) {\n cursor.moveToFirst();\n\n\n do {\n final Long reportBaseId = cursor.getLong(\n cursor.getColumnIndex(ReportEntry._ID)\n );\n ExpenseReport expenseReport = Utility.createExpenseReportFromCursor(cursor);\n\n ERTRestApi.apiSubmitReport(expenseReport,\n new ERTRestApi\n .ERTRestApiListener<JSONObject>() {\n\n @Override\n public void onResponse(JSONObject response) {\n Log.d(LOG_TAG, \"Report \" + reportBaseId + \" submitted\");\n updateReportSyncStatus(reportBaseId, SyncStatus.SYNCED);\n }\n },\n new ERTRestApi.ERTRestApiErrorListener() {\n @Override\n public void onErrorResponse(ERTRestApi\n .ERTRestApiError error) {\n ContentValues contentValues = new ContentValues();\n contentValues.put(ReportEntry.COLUMN_STATUS, Status.SAVED.getValue());\n\n getContext().getContentResolver().update(\n ReportEntry.buildReportUriNoNetworkSync(reportBaseId),\n contentValues,\n null,\n null\n );\n updateReportSyncStatus(reportBaseId, SyncStatus.SYNCED);\n }\n }\n\n );\n\n updateReportSyncStatus(reportBaseId, SyncStatus.SYNC_IN_PROGRESS);\n\n } while (cursor.moveToNext());\n }\n cursor.close();\n }",
"void send(String emailName, Map model, EmailPreparator emailPreparator);",
"void send(String emailName, Map model);",
"public void sendEmail() {\n\t\tSystem.out.println(\"Loading session and Authenticating\");\n\t\tfinal Session session = Session.getInstance(getProtocolProporties(PROTOCOL_SEND), new Authenticator() {\n\n\t\t\t@Override\n\t\t\tprotected PasswordAuthentication getPasswordAuthentication() {\n\t\t\t\treturn new PasswordAuthentication(getProperty(\"username\"), getPassword());\n\t\t\t}\n\n\t\t});\n\t\tif(null == session) {\n\t\t\tSystem.err.println(\"Session is null, cann't proceed\");\n\t\t\treturn ;\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Authenticated, will try to send an email\");\n\n\t\ttry {\n\t\t\tfinal Message message = new MimeMessage(session) {\n\t\t\t\t//Print the message to console\n\t\t\t\t@Override\n\t\t\t\tpublic String toString() {\n\t\t\t\t\tStringBuilder stringBuilder = new StringBuilder();\n\t\t\t\t\ttry {\n\t\t\t\t\t\tstringBuilder.append(\"\\n\").append(\"From : \").append(\"\\n\");\n\t\t\t\t\t\tfor (Address address : this.getFrom())\n\t\t\t\t\t\t\tstringBuilder.append(address).append(\"\\n\");\n\t\t\t\t\t\tstringBuilder.append(\"\\n\").append(\"To : \").append(\"\\n\");\n\t\t\t\t\t\tfor (Address address : this.getRecipients(Message.RecipientType.TO))\n\t\t\t\t\t\t\tstringBuilder.append(address).append(\"\\n\");\n\t\t\t\t\t\tstringBuilder.append(\"Subject : \").append(\"\\n\").append(this.getSubject());\n\t\t\t\t\t\tstringBuilder.append(\"\\n\").append(\"Sent Date : \").append(this.getSentDate());\n\t\t\t\t\t} catch (MessagingException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\treturn stringBuilder.toString();\n\t\t\t\t}\n\t\t\t};\n\t\t\t\n\t\t\t//Get Mail field details\n\t\t\tmessage.setFrom(new InternetAddress(getProperty(\"username\")));\n\t\t\tmessage.setRecipient(Message.RecipientType.TO, new InternetAddress(getUserInput(\"to\")));\n\t\t\tmessage.setSubject(getUserInput(\"subject\"));\n\t\t\tmessage.setText(getUserInput(\"messageContent\"));\n\t\t\tmessage.setSentDate(new Date());\n\t\t\tSystem.out.println(\"Sending the mail as details below :\");\n\t\t\tSystem.out.println(message);\n\t\t\t\n\t\t\t//Send email here, this throws exception if fails\n\t\t\tTransport.send(message);\n\t\t\t\n\t\t\tSystem.out.println(\"Email Sent\");\n\t\t} catch (final MessagingException ex) {\n\t\t\tSystem.err.println(\"Error: \" + ex.getMessage());\n\t\t\tex.printStackTrace();\n\t\t}\n\t}",
"public static void main(String[] args) throws EmailException {\n\n\t\tString text= \"<table><tr><td>EmpId</td><td>Emp name</td><td>age</td></tr><tr><td>value</td><td>value</td><td>value</td></tr></table>\";\n\t\tEmail email=new SimpleEmail();\n\t\t//MailMessage mail = new MailMessage();\n\t\t\n\t\temail.setHostName(\"smtp.googlemail.com\");\n\t\temail.setSmtpPort(465);\n\t\temail.setAuthenticator(new DefaultAuthenticator(\"[email protected]\", \"\"));\n\t\temail.setSSL(true);\n\t\temail.setFrom(\"[email protected]\");\n\t\temail.setSubject(\"TestMail\");\n\t\temail.setMsg(text);\n\t\t\n\t\temail.addTo(\"[email protected]\");\n\t\temail.send();\n\t\t\n\t\tSystem.out.println(\"Email Sent Sucessfully\");\n\t\t\n}",
"public void sendMailToQueue(MailMessage mailMessage) throws MailerException;",
"public void Send(String ToMail,int id,String name){\n String link = \"http://localhost:8080/Project/resetpassword.jsp\";\n String m_text = \"<table style=\\\"width: 100% !important\\\" >\\n\" +\n\" <tbody>\\n\" +\n\" <tr>\\n\" +\n\" <td>\\n\" +\n\" <div>\\n\" +\n\" <h2>Hello, \"+name+\"</h2>\\n\" +\n\" </div>\\n\" +\n\" <div>\\n\" +\n\" You recently took steps to reset the password for your Hanger account. Click on the link below to reset your password.\\n\" +\n\" </div>\\n\" +\n\" <br>\\n\" +\n\" <a href=\\\"\"+link+\"?id=\"+id+\"\\\">Reset Password</a>\\n\" +\n\" <br>\\n\" +\n\"\\n\" +\n\" <div>\\n\" +\n\" This link will expire in 1 days after this email was sent.\\n\" +\n\" </div>\\n\" +\n\"\\n\" +\n\" <br>\\n\" +\n\" <div>\\n\" +\n\" Sincerely,\\n\" +\n\" <h4>The Hanger Team</h4>\\n\" +\n\" </div>\\n\" +\n\" </td>\\n\" +\n\" </tr>\\n\" +\n\" </tbody>\\n\" +\n\" </table>\";\n send( d_email, d_host, d_port, ToMail, m_subject, m_text);\n }",
"private void sendEmailToSubscriberForHealthTips() {\n\n\n\n }",
"public static void generateReport()\n\t{\n\t\tlong time=System.currentTimeMillis();\n\t\tString reportPath=System.getProperty(\"user.dir\")+\"//automationReport//Report\"+time+\".html\";\n\t\t\n\t\thtmlreporter=new ExtentHtmlReporter(reportPath);\n\t\textent=new ExtentReports();\n\t\textent.attachReporter(htmlreporter);\n\t\t\n\t\tString username=System.getProperty(\"user.name\");\n\t\tString osname=System.getProperty(\"os.name\");\n\t\tString browsername=CommonFunction.readPropertyFile(\"Browser\");\n\t\tString env=CommonFunction.readPropertyFile(\"Enviornment\");\n\t\t\n\t\t\n\t\textent.setSystemInfo(\"User Name\", username);\n\t\textent.setSystemInfo(\"OS Name\", osname);\n\t\textent.setSystemInfo(\"Browser Name\", browsername);\n\t\textent.setSystemInfo(\"Enviornment\", env);\n\t\t\n\t\t\n\t\thtmlreporter.config().setDocumentTitle(\"Automation Report\");\n\t\thtmlreporter.config().setTheme(Theme.STANDARD);\n\t\thtmlreporter.config().setChartVisibilityOnOpen(true);\n \n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}",
"public void send() {\r\n String _from = \"[email protected]\";\r\n String _password = \"Ng101840\";\r\n //Get properties object\r\n Properties props = new Properties();\r\n props.put(\"mail.smtp.host\", \"smtp.gmail.com\");\r\n props.put(\"mail.smtp.socketFactory.port\", \"465\");\r\n props.put(\"mail.smtp.socketFactory.class\",\r\n \"javax.net.ssl.SSLSocketFactory\");\r\n props.put(\"mail.smtp.auth\", \"true\");\r\n props.put(\"mail.smtp.port\", \"465\");\r\n //get Session \r\n Session session = Session.getInstance(props,\r\n new javax.mail.Authenticator() {\r\n protected PasswordAuthentication getPasswordAuthentication() {\r\n return new PasswordAuthentication(_from, _password);\r\n }\r\n });\r\n //compose message \r\n try {\r\n MimeMessage message = new MimeMessage(session);\r\n message.addRecipient(Message.RecipientType.TO, new InternetAddress(_to));\r\n message.setSubject(subject);\r\n message.setText(this.message);\r\n Transport.send(message);\r\n LOG.info(\"The email was sent successfully\");\r\n } catch (MessagingException e) {\r\n throw new RuntimeException(e);\r\n }\r\n }",
"@Override\r\n\tpublic void sendEmails() {\n\t\tSystem.out.println(\"All e-mails sent from e-mail service!\");\r\n\t}",
"public static void main(String[] args) {\n MailAdapter mailAdapter = MailAdapter.getInstance();\n mailAdapter.sendEmail(\"[email protected]\", \"[email protected]\", \"We are doing Java\", true);\n mailAdapter.receiveEmail();\n\n }",
"public void sendTransactionReport(String medium) {\n }",
"void printReport();",
"void sendEmail(Task task, String taskTypeName, String plantName);",
"public void enviarCorreo() {\n try {\n\n // propuestaConvenio = propuestaConvenioService.getByIDPropuestaWithPersona(propuestaConvenio.getIdPropuesta());\n propuestaConvenio = propuestaConvenioService.getByIDPropuestaWithPersona(propuestaConvenio.getIdPropuesta());\n\n // Create data for template\n Map<String, Object> templateData = new HashMap<String, Object>();\n templateData.put(\"subJect\", \"Cambio Vigencia de Convenio\");\n\n //templateData.put(\"nameTemplate\", \"propuesta_convenio_mailTemplat.txt\");\n templateData.put(\"nameTemplate\", \"vigencia_convenio_mailTemplat.xhtml\");\n templateData.put(\"propuestaConvenio\", propuestaConvenio);\n templateData.put(\"propuestaConvenioTemp\", propuestaConvenioTemp);\n\n for (PersonaPropuesta p : propuestaConvenio.getPersonaPropuestaList()) {\n templateData.put(\"setToMail\", p.getPersona().getEmailPersona());\n mailService.sendEmailMap(templateData);\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"private void email() throws IOException {\n\t\t/*\n\t\tString emailText = \"This email includes the following Play Types: \" + playSort.getSelectedItem().toString() + \n\t\t\t\t\"\\nFrom the gameplan: \" + gamePlans.getSelectedItem().toString();\n\t\tString subject = playSort.getSelectedItem().toString() + \" from \" + gamePlans.getSelectedItem().toString();\n\t\t\t\t\n\t\t// TODO: save image to file system, and add the file paht to atachment\n\t\tArrayList<String> attachments = DigPlayDB.getInstance(getBaseContext()).getAllPlayNames();\n\t\tArrayList<String> attachmentPath = new ArrayList<String>();\n\t\tfor (int att = 0; att < attachments.size(); att++) \n\t\t{\n\t\t\tFile myFile = new File(\"/sdcard/DCIM/Play/temp.jpeg\");\n\t\t\tmyFile.setWritable(true);\n\t FileOutputStream myOutWriter =new FileOutputStream(myFile);\n\t myOutWriter.write(DigPlayDB.getInstance(getBaseContext()).getImage(attachments.get(att)));\n\t myOutWriter.flush();\n\t myOutWriter.close();\n\t myFile.setReadable(true);\n\t attachmentPath.add(myFile.getAbsolutePath());\n\t\t}\n\n\t\tEmailPlaybook.EmailAttachment(this, \"[email protected]\", subject, emailText, attachmentPath);\n\t\t*/\n\t}",
"public String generalReport() throws Exception{\r\n\t\tForm16MisReportModel model = new Form16MisReportModel();\r\n\t\tmodel.initiate(context, session);\r\n\t\tmodel.generateReport(request, response, bulkForm16);\r\n\t\tmodel.terminate();\r\n\t\treturn null;\r\n\t}",
"public int sendCustomerOrderNotificationEmail(int customerID, int orderId, int confirmationNumber, Collection<OrderedProduct> orderedProducts, BigDecimal orderAmount, Date orderDate) {\r\n // SMTP Setting\r\n String smtpServer = \"smtp.gmail.com\";\r\n\r\n //Email Addresses\r\n String from = \"[email protected]\";\r\n String customerEmail = customerFacade.find(customerID).getCustomerEmail().trim();\r\n String to = customerEmail;\r\n String bcc = \"[email protected]\";\r\n\r\n //Message\r\n String subject = \"Order Confirmation: \" + orderId + \"|\" + \"Confirmation Number: \" + confirmationNumber;\r\n String message = \"Thanks for your order. We’ll let you know once your item(s) have dispatched.\";\r\n String productNameAndQuantitySubheader = \"<tr><td>Product</td><td>Quantity</td></tr>\";\r\n String productNameAndQuantity = null;\r\n\r\n for (OrderedProduct op : orderedProducts) {\r\n String productName = op.getProduct().getProductName();\r\n int productQuantity = op.getOrderedProductQuantity();\r\n productNameAndQuantity += \"<tr><td>\" + productName + \"</td><td>\" + productQuantity + \"</td></tr>\";\r\n }\r\n\r\n String messageBody\r\n = \"<table>\"\r\n + \"<tr><td colspan=2>\" + message + \"</td></tr>\"\r\n + \"<tr><td colspan=2>Order Details</td></tr>\"\r\n + \"<tr><td>Order Number:</td><td>\" + orderId + \"</td></tr>\"\r\n + \"<tr><td>Confirmation Number:</td><td>\" + confirmationNumber + \"</td></tr>\"\r\n + \"<tr><td>Order Amount:</td><td>\" + orderAmount + \"</td></tr>\"\r\n + \"<tr><td>Order Date:</td><td>\" + orderDate + \"</td></tr>\"\r\n + productNameAndQuantitySubheader\r\n + productNameAndQuantity\r\n + \"</table>\";\r\n\r\n try {\r\n Properties properties = System.getProperties();\r\n properties.put(\"mail.transport.protocol\", \"smtp\");\r\n properties.put(\"mail.smtp.starttls.enable\", \"true\");\r\n properties.put(\"mail.smtp.host\", smtpServer);\r\n properties.put(\"mail.smtp.auth\", \"true\");\r\n Authenticator authenticator = new SMTPAuthenticator();\r\n Session session = Session.getInstance(properties, authenticator);\r\n\r\n // Create a new messageBody\r\n Message mimeMessage = new MimeMessage(session);\r\n\r\n // Set the FROM and TO fields\r\n mimeMessage.setFrom(new InternetAddress(from));\r\n mimeMessage.setRecipients(Message.RecipientType.TO, InternetAddress.parse(to, false));\r\n mimeMessage.setRecipients(Message.RecipientType.BCC, InternetAddress.parse(bcc, false)); // Change this to be hard-coded Peripherals email\r\n mimeMessage.setSubject(subject);\r\n mimeMessage.setContent(messageBody, \"text/html; charset=utf-8\");\r\n\r\n // Set some other header information\r\n mimeMessage.setHeader(\"Order Confirmation\", \"Peripherals\");\r\n mimeMessage.setSentDate(new Date());\r\n\r\n // Send the messageBody\r\n Transport.send(mimeMessage);\r\n System.out.println(\"Message sent successfully!\");\r\n return 0;\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n System.out.println(\"Exception \" + ex);\r\n return -1;\r\n }\r\n }"
] | [
"0.71072626",
"0.69530267",
"0.6935792",
"0.6860334",
"0.6847183",
"0.66513914",
"0.66049314",
"0.65573686",
"0.65314496",
"0.65026695",
"0.64957666",
"0.645365",
"0.6424219",
"0.636182",
"0.63378096",
"0.63345855",
"0.6327784",
"0.6326686",
"0.6315136",
"0.62979186",
"0.6286044",
"0.6271306",
"0.62626183",
"0.61929786",
"0.61920524",
"0.6190404",
"0.61860317",
"0.61789554",
"0.61621374",
"0.61325365",
"0.61267227",
"0.61232746",
"0.61226267",
"0.6111731",
"0.6100042",
"0.60636497",
"0.6061538",
"0.60599",
"0.6029742",
"0.60215205",
"0.6012549",
"0.6007212",
"0.5997369",
"0.5989384",
"0.59791595",
"0.59573656",
"0.59537244",
"0.5945973",
"0.59295195",
"0.5905625",
"0.5902597",
"0.58996695",
"0.5894659",
"0.58944416",
"0.58944255",
"0.5889456",
"0.5887893",
"0.5877224",
"0.587283",
"0.58704257",
"0.5870191",
"0.58616567",
"0.5853422",
"0.58480936",
"0.584079",
"0.58404744",
"0.58354026",
"0.583531",
"0.5833378",
"0.5828047",
"0.5818934",
"0.5817389",
"0.58167017",
"0.5805959",
"0.57850885",
"0.57828516",
"0.5780697",
"0.57773435",
"0.57673013",
"0.57580537",
"0.5757098",
"0.57324684",
"0.57219917",
"0.57210267",
"0.5718819",
"0.5713855",
"0.57094234",
"0.5702654",
"0.5699548",
"0.56928205",
"0.5682224",
"0.56758076",
"0.5671558",
"0.56567353",
"0.5654093",
"0.5652318",
"0.5647861",
"0.56460804",
"0.56460583",
"0.56430686"
] | 0.81404954 | 0 |
Evaluates the int amount for a given set of requirements. | @Override
public int evaluate(Map<ResourceType, Integer> requirements) {
return this.constant;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private boolean verifyTotal(ArrayList<Integer> oneSetOfChoices, ArrayList<Integer> listAllIntegers, int target) {\n\t\t\tboolean matchFound = false;\n\t\t\tint currentTotal = 0;\n\t\t\tint valueInList = 0;\n\t\t\t for (Integer positionInteger: oneSetOfChoices) {\n\t\t\t\t valueInList = listAllIntegers.get(positionInteger.intValue()).intValue();\n\t\t\t\t currentTotal += valueInList;\n\t\t\t }\n\t\t\t\n\t\t\t if (target == currentTotal) {\n\t\t\t\t matchFound = true;\n\t\t\t }\n\t\t\treturn matchFound;\n\t}",
"public void orderChecker()\n {\n System.out.print( \"Number of bolts: \" );\n int bolts = scan.nextInt();\n System.out.print( \"Number of nuts: \" );\n int nuts = scan.nextInt();\n System.out.print( \"Number of washers: \" );\n int washers = scan.nextInt();\n if ( nuts >= bolts )\n {\n if ( washers >= 2 * bolts )\n {\n System.out.println( \"Check the Order: Order is OK.\" );\n }\n else\n {\n System.out.println( \"Check the Order: Too few washers.\" );\n }\n }\n else\n {\n System.out.println( \"Check the Order: Too few nuts.\" );\n if ( ( washers < 2 * bolts ) )\n {\n System.out.println( \"Check the Order: Too few washers.\" );\n }\n }\n\n final int boltPrice = 5;\n final int nutPrice = 3;\n final int washerPrice = 1;\n int cost = boltPrice * bolts + nutPrice * nuts + washerPrice * washers;\n System.out.println( \"Total cost: \" + cost );\n }",
"@Test\n public void testPostAmountCalc() {\n //To test if it calculates the correct value.\n int carportLength = 200;\n int carportWidth = 300;\n int expResult = 4;\n int result = (int) Calculators.postsAmountCalc(carportLength, carportWidth);\n assertEquals(expResult, result);\n \n carportLength = 250;\n result = (int) Calculators.postsAmountCalc(carportLength, carportWidth);\n assertEquals(expResult, result);\n \n carportLength = 300;\n expResult = 6;\n result = (int) Calculators.postsAmountCalc(carportLength, carportWidth);\n assertEquals(expResult, result);\n \n carportLength = 400;\n expResult = 8;\n result = (int) Calculators.postsAmountCalc(carportLength, carportWidth);\n assertEquals(expResult, result);\n \n carportLength = 500;\n expResult = 10;\n result = (int) Calculators.postsAmountCalc(carportLength, carportWidth);\n assertEquals(expResult, result);\n \n }",
"private Double calculateSupport(final List<Order> orders, final ItemSet itemSet) {\n\t\tdouble support = 0;\n\n\t\tfor (Order order : orders) {\n\t\t\tif (order.getItems().containsAll(itemSet)) {\n\t\t\t\tsupport++;\n\t\t\t}\n\t\t}\n\n\t\treturn support / orders.size();\n\t}",
"private void calculateEarnings()\n {\n // get user input\n int items = Integer.parseInt( itemsSoldJTextField.getText() );\n double price = Double.parseDouble( priceJTextField.getText() );\n Integer integerObject = \n ( Integer ) commissionJSpinner.getValue();\n int commissionRate = integerObject.intValue();\n \n // calculate total sales and earnings\n double sales = items * price;\n double earnings = ( sales * commissionRate ) / 100;\n \n // display the results\n DecimalFormat dollars = new DecimalFormat( \"$0.00\" );\n grossSalesJTextField.setText( dollars.format( sales ) );\n earningsJTextField.setText( dollars.format( earnings ) );\n\n }",
"public static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in);\n\t\tSystem.out.println(\"Enter the number of units consumed: \");\n\t\tint units = input.nextInt();\n\t\tdouble amount;\n\t\tdouble totalamt = 0;\n\t\tif (units < 0 || units == 0) {\n\t\t\tSystem.out.println(\"Error! Units consumed should be more than 0\");\n\t\t} else if (units > 0 && units <= 100) {\n\t\t\tamount = 1;\n\t\t\ttotalamt = amount * units;\n\t\t} else if (units > 100 && units <= 300) {\n\t\t\tamount = 0.75;\n\t\t\ttotalamt = 100 * 1 + (amount * (units - 100));\n\t\t} else if (units > 300 && units <= 500) {\n\t\t\tamount = 0.50;\n\t\t\ttotalamt = 100 * 1 + 200 * 0.75 + (amount * (units - 300));\n\t\t} else {\n\t\t\tamount = 0.25;\n\t\t\ttotalamt = 100 * 1 + 200 * 0.75 + 200 * 0.50\n\t\t\t\t\t+ (amount * (units - 500));\n\t\t}\n\n\t\tSystem.out.println(\"Your monthly bill is: $\" + totalamt);\n\t}",
"@Test\n public void whenComputingBillForPeopleOver70WithDiagnosisXRayAndECG() {\n double result = billingService.computeBill(1);\n // 90% discount on Diagnosis (60£) = 6\n // 90% discount on X-RAY (150£) = 15\n // 90% discount on ECG (200.40£) = 20.04\n Assert.assertEquals(41.04, result, 0);\n }",
"private static double getBonus(double unitsMade,double workAmount) {\n\n if (workAmount == 1) {\n\n if (unitsMade > 250) {\n\n return unitsMade * 0.10;\n }\n return 0;\n }\n else if (workAmount == 2) {\n\n if (unitsMade > 700) {\n\n return unitsMade * 0.10;\n }\n return 0;\n }\n\n return 0;\n }",
"private void convertReqsInCriterions(){\n\t\tArrayList<Criterion> criteria = this.data.getCriteria();\n\t\t\n\t\tfor(Requirement req : this.data.getRequirements()){\n\t\t\tif(req.isCriterion()){\n\t\t\t\t//create new criterion\n\t\t\t\tCriterion crit = new Criterion();\n\t\t\t\tif(req.getQuantType() != null)\n\t\t\t\t\tcrit.setName(req.getQuantType().getValue());\n\t\t\t\telse if(req.getQualType() != null)\n\t\t\t\t\tcrit.setName(req.getQualType().getValue());\n\t\t\t\telse\n\t\t\t\t\t//this is a price requirement\n\t\t\t\t\tcrit.setName(\"price\");\n\t\t\t\t\n\t\t\t\tString[] msg = {crit.getName(), \"General\"};\n\t\t\t\tif(this.methodID == CloudAid.SAW){\n\t\t\t\t\tFloat weight = Float.parseFloat(CloudAid.askData(CloudAid.GET_WEIGHT, msg, null));\n\t\t\t\t\tcrit.setWeight(weight);\n\t\t\t\t}\n\t\t\t\t//get the criterion preference direction\n\t\t\t\tString res = CloudAid.askData(CloudAid.GET_PREFERENCE_DIRECTION, msg, null);\n\t\t\t\tif(res.equalsIgnoreCase(\"y\")){\n\t\t\t\t\tcrit.setPreferenceDirection(\"max\");\n\t\t\t\t}else if(res.equalsIgnoreCase(\"n\")){\n\t\t\t\t\tcrit.setPreferenceDirection(\"min\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcriteria.add(crit);\n\t\t\t}\n\t\t}\n\t\tthis.data.setCriteria(criteria);\n\t\t\n\t\t//convert each serpiceTemplate requirements\n\t\tfor(ServiceTemplate template : this.data.getServiceTemplates()){\n\t\t\tArrayList<Criterion> templateCriteria = template.getCriteria();\n\t\t\tfor(Requirement req: template.getRequirements()){\n\t\t\t\tif(req.isCriterion()){\n\t\t\t\t\t//create new criterion\n\t\t\t\t\tCriterion crit = new Criterion();\n\t\t\t\t\tif(req.getQuantType() != null)\n\t\t\t\t\t\tcrit.setName(req.getQuantType().getValue());\n\t\t\t\t\telse if(req.getQualType() != null)\n\t\t\t\t\t\tcrit.setName(req.getQualType().getValue());\n\t\t\t\t\telse\n\t\t\t\t\t\t//this is a price requirement\n\t\t\t\t\t\tcrit.setName(\"price\");\n\t\t\t\t\t\n\t\t\t\t\tString[] msg = {crit.getName(), template.getType()};\n\t\t\t\t\tif(this.methodID == CloudAid.SAW){\n\t\t\t\t\t\tFloat weight = Float.parseFloat(CloudAid.askData(CloudAid.GET_WEIGHT, msg, null));\n\t\t\t\t\t\tcrit.setWeight(weight);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//get the criterion preference direction\n\t\t\t\t\tString res = CloudAid.askData(CloudAid.GET_PREFERENCE_DIRECTION, msg, null);\n\t\t\t\t\tif(res.equalsIgnoreCase(\"y\")){\n\t\t\t\t\t\tcrit.setPreferenceDirection(\"max\");\n\t\t\t\t\t}else if(res.equalsIgnoreCase(\"n\")){\n\t\t\t\t\t\tcrit.setPreferenceDirection(\"min\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\ttemplateCriteria.add(crit);\n\t\t\t\t}\n\t\t\t}\n\t\t\ttemplate.setCriteria(templateCriteria);\n\t\t}\n\t}",
"public static void main(String[]args){\n\t\n\tdouble budget =500;\n\t\n\tdouble phone =250.0;\n\tdouble watch =105.5;\n\tdouble bag = 80.00;\n\t\n\t\n\tif(budget< 80.0) {\n\t\tSystem.out.println(\"Cannot buy anything\");\n\t\t\n\t}if (budget >=435.5) {\n\t\tSystem.out.println(\"You can buy all items\");\n\t\n\t\t\n\t} else if (budget >= phone + watch) {\n\t\tSystem.out.println(\"You can buy Phone +Watch OR Phone + Bag OR watch + Bag\");\n\t\t\n\t} else if (budget >= phone +bag); {\n\t\tSystem.out.println(\"You can buy Phone OR watch + bag\");\n\t\t\t\t\n\t if (budget >= watch) {\n\t\tSystem.out.println(\"You can buy a watch or a bag\");\n\t\t\n\t} else {\n\t\tSystem.out.println(\"You can buy a bag\");}\n\t\n\t}\n\t}",
"public double taxCalc(int income1, int income2, int income3, int income4, int income5) {\n int[] arr = {income1, income2, income3, income4, income5};\n double taxTotal = 0.0;\n for (int i = 0; i < arr.length; i++) {\n taxTotal += (double) (arr[i] * 7 / 100);\n }\n return taxTotal;\n }",
"@Step\n\tpublic String airmileCalculator(String numericRange) throws Exception {\n\t\tString[] range = numericRange.split(\";\");\n\t\tString firstBonus = this.getElement(rewardCalculatorFirstYrBonus).getText();\n\t\tfirstBonus = firstBonus.substring(0, firstBonus.length() - 1);\n\t\tString calculatedValue = \"\";\n\t\tint calculatedAmt;\n\t\tString retrievedValue = \"\";\n\t\tString errorLog = \"\";\n\t\tfirstBonus = firstBonus.replace(\",\", \"\");\n\t\t\n\t\tfor (int i = 0; i < range.length; i++) {\n\t\t\trange[i] = range[i].trim();\n\t\t}\n\t\ttry {\n\t\t\tfor(String testRange : range) {\n\t\t\t\tSystem.out.println (testRange);\n\t\t\t\tif (testRange.contains(\"-\")) {\n\t\t\t\t\tfor (int j = Integer.parseInt(testRange.split(\"-\")[0]); j <= Integer.parseInt(testRange.split(\"-\")[1]); j++) {\n\n\t\t\t\t\t\tcalculatedAmt = (j*12)/10;\n\t\t\t\t\t\tcalculatedAmt += Integer.parseInt(firstBonus);\n\t\t\t\t\t\tcalculatedValue = String.valueOf(calculatedAmt); //Equation: 3000 + monthly usage * 12 months; at a conversion of 1 Mile per $10 spent\n\n\t\t\t\t\t\tthis.setText(rewardCalculatorInput, String.valueOf(j));\n\t\t\t\t\t\t\n\t\t\t\t\t\tretrievedValue = this.getElement(rewardCalculatorEarnedMiles).getText();\n\t\t\t\t\t\tretrievedValue = retrievedValue.replace(\",\", \"\");\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ((j <=10000 && Integer.parseInt(calculatedValue) != Integer.parseInt(retrievedValue)) || j > 10000 && Integer.parseInt(retrievedValue) != 15000) {\n\t\t\t\t\t\t\terrorLog = errorLog +\"\\n\" + \"Value does not match at $\" + j + \". Expected: [\" + calculatedValue + \"]; Actual: [\" + retrievedValue + \"]\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t//Do Nothing\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t//try {\n\t\t\t\t\t\t//Integer.parseInt(testRange); //Test if the value is an integer\n\t\t\t\t\t\tcalculatedValue = String.valueOf(Integer.valueOf(firstBonus) + (Integer.valueOf(testRange) * 12)/10); //Equation: 3000 + monthly usage * 12 months; at a conversion of 1 Mile per $10 spent\n\t\t\t\t\t\tthis.setText(rewardCalculatorInput, testRange);\n\t\t\t\t\t\t\n\t\t\t\t\t\tretrievedValue = this.getElement(rewardCalculatorEarnedMiles).getText();\n\t\t\t\t\t\tretrievedValue = retrievedValue.replace(\",\", \"\");\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (Integer.parseInt(calculatedValue) != Integer.parseInt(retrievedValue) || Integer.parseInt(testRange) > 10000 && Integer.parseInt(retrievedValue) != 15000) {\n\t\t\t\t\t\t\terrorLog = errorLog + \"Value does not match at $\" + testRange + \". Expected: [\" + calculatedValue + \"]; Actual: [\" + retrievedValue + \"]\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t//Do Nothing\n\t\t\t\t\t\t}\n\t\t\t\t\t//} catch (NumberFormatException e) {\n\t\t\t\t\t//\terrorLog = errorLog +\"\\n\" + \"Range Item: \" + testRange + \" is not a range or numeric integer. Item Skipped\";\n\t\t\t\t\t//}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Throwable t) {\n\t\t\tLOG.ERROR(t.getMessage(), this.browserName);\n\t\t\tthrow new Exception(t.getMessage());\n\t\t}\n\t\treturn errorLog.trim();\n\t}",
"public int getConsumptionOf(List<GoodsType> goodsTypes) {\n int result = 0;\n if (goodsTypes != null) {\n for (GoodsType goodsType : goodsTypes) {\n result += getConsumptionOf(goodsType);\n }\n }\n return result;\n }",
"private int calculateInputStock_Items() {\n\t\tint total = 0;\n\t\tArrayList<Integer> stock = getAllStockValues();\n\t\tif (!stock.isEmpty()) {\n\t\t\t// get for all K\n\t\t\ttotal += (stock.get(0) * getSetUpMachine().getVending_item().get(\"K\"));\n\t\t\t// get for all S\n\t\t\ttotal += (stock.get(1) * getSetUpMachine().getVending_item().get(\"S\"));\n\t\t\t// get for all F\n\t\t\ttotal += (stock.get(2) * getSetUpMachine().getVending_item().get(\"F\"));\n\t\t\t// get for all N\n\t\t\ttotal += (stock.get(3) * getSetUpMachine().getVending_item().get(\"N\"));\n\t\t}\n\t\treturn total;\n\t}",
"static int modifierCalculatorInteger(String attributeString, int proficiency,String proficient){\n int attribute = Integer.parseInt(attributeString);\n Double modCalcDbl = Math.floor((attribute- 10) / 2);\n int modCalc = modCalcDbl.intValue();\n\n //check for a 9 attribute, this is incorrectly calculated with the above math. -1/2 returns 0\n if(attribute == 9){\n modCalc = -1;\n }\n\n int areTheyProficient = Integer.parseInt(proficient);\n if (areTheyProficient == 1){\n modCalc = modCalc + proficiency;\n }\n Log.i(\"MenuAndDatabase\",\"modifer Calculator complete. Return Value: \" + modCalc);\n return modCalc;\n }",
"public int evaluateAsInt();",
"BigDecimal calculateDailyIncome(List<Instruction> instructions);",
"public int askWhatPermitCards(List<PermitCard> cards);",
"int getEvaluations();",
"public void commissionCalc() {\n salesNumber.stream().map((_item) -> {\r\n //starts a for loop to evaluate each element of the sales value array\r\n if (salesTarget <= salesNumber.get((int) calcIteration)) { //looks for sales values that meet the sales target\r\n salesCommission.add(baseSalary + (salesNumber.get((int) calcIteration) * acceleratedPercentage)); //sets sales commission array with commission for this value\r\n } else {\r\n if (salesMinimum <= salesNumber.get((int) calcIteration)) { //looks for values that did not meet the target, but do meet the minimum\r\n salesCommission.add(baseSalary + (salesNumber.get((int) calcIteration) * commissionPercentage)); //sets sales commission array with commission for this value\r\n } else {\r\n if (salesMinimum > salesNumber.get((int) calcIteration)); { // finds those values that do not meet the minimum or target values\r\n salesCommission.add(baseSalary); //sets sales commission array with commission for this value\r\n }\r\n }\r\n }\r\n return _item;\r\n }).forEach((_item) -> {\r\n calcIteration = calcIteration + 1; //counts the iteration for the \"for\" loop\r\n });\r\n }",
"int getRequiredAmountFor(AResourceType type);",
"private void calculateIncomings(List<ClientInstructions> instructions) {\r\n\t\tgetCalculationService().calculateTotalAmount(instructions, incomingPredicate).entrySet().stream()\r\n\t\t\t\t.forEach(p -> allIncomings.merge(p.getKey(), p.getValue(), ReportingSystemProcessor::addition));\r\n\t}",
"public Integer calculateSum() {\n logger.debug(\"Calculating and returning the sum of expenses.\");\n return listOfTargets.stream().map(T::getAmount).reduce(0, Integer::sum);\n }",
"public void calculateCommission(){\r\n commission = (sales) * 0.15;\r\n //A sales Person makes 15% commission on sales\r\n }",
"List<Ranking> calculateIncomeRanks(List<Instruction> instructions);",
"public MyList<Integer> solve(int typeSelectFunc, MyList<Integer> coinValues, int amount){\n\t\tMyList<Integer> res = null;\n\n\t\t// -----------------------------\n\t\t// SET OF OPS\n\t\t// -----------------------------\n\n\t\t// OP1. Auxiliary variables:\n\n\t\t// We use 'candidates' as a MyList with the items that can be considered\n\t\t// by the selectionFunction.\n\t\tMyList<Integer> candidates = null;\n\t\tMyList<Integer> objFunValues = null;\n\n\t\t// We use res for storing the values of the items that will be in the knapsack\n\t\t//MyList<Integer> resValues = null;\n\n\t\t// We use 'capacityUsed' to state the amount of weight our bin contains\n\t\t// so far.\n\t\tint capacityUsed = 0;\n\n\t\t// OP1. We initialise all variables:\n\n\t\t// OP1.1. 'res' is initialised to be a list of the items that will be in\n\t\t// the knapsack\n\t\tres = new MyDynamicList<Integer>();\n\t\tcandidates = new MyDynamicList<Integer>();\n\t\tobjFunValues =new MyDynamicList<Integer>();\n\n\t\t// we copy all the items in the candidates list\n\t\tfor (int i = 0; i < coinValues.length(); i++) {\n\t\t\tcandidates.addElement(i, coinValues.getElement(i));\n\t\t}\n\n\n\t\t// OP2. We construct the final solution:\n\t\twhile (solutionTest(candidates) == false) {\n\t\t\t// OP2.1 Auxiliary variables:\n\t\t\t// We use 'itemSelected' to state the index of the candidate being\n\t\t\t// selected.\n\t\t\tint candidateSelected = -1;\n\n\t\t\t// OP2.1. We pick the most promising candidate\n\t\t\tswitch (typeSelectFunc) {\n\t\t\tcase 1:\n\t\t\t\tcandidateSelected = selectionFunctionDummy(candidates);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tcandidateSelected = selectionFunctionBiggestCoin(candidates);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\twhile (feasibilityTest(candidates.getElement(candidateSelected), amount, capacityUsed) == true) {\n\t\t\t\tres.addElement(res.length(), candidates.getElement(candidateSelected));\n\t\t\t\t//int n = (amount - capacityUsed) / candidates.getElement(candidateSelected);\n\t\t\t\t//capacityUsed = capacityUsed + candidates.getElement(candidateSelected) * n;\n\t\t\t\tcapacityUsed = capacityUsed + candidates.getElement(candidateSelected);\n\t\t\t\t\n\t\t\t}\n\n\t\t\tcandidates.removeElement(candidateSelected);\n\t\t}\n\n\t\t// OP3. We print the solution and its associated objective value\n\t\tobjFunValues = objectiveFunction(res, capacityUsed, amount);\n\t\tSystem.out.println(\"Solution:\");\n\t\t\n\t\tSystem.out.print(\"Coins to be givin in change:\");\n\t\tdisplayElements(res);\n\t\tp(\"accuracy = \" + objFunValues.getElement(0));\n\t\tp(\"number of coins used = \" + objFunValues.getElement(1));\n\t\t//p(\"Total number of coins used = \" + objFunValues.getElement(2));\n\t\t\n\t\t\n//\t\t\n////\t\tpNl(\"\\t\\t\\t\\t\\t\\t \");\n////\t\tfor(int i = 0; i < res.length(); i++) {\n////\t\t\tpNl(\"* \");\n////\t\t}\n////\t\tSystem.out.print(\"\\nNumber of coins to be givin:\");\n////\t\tdisplayElements(objFunValues);\n////\t\tp(\"\");\n\t\t// -----------------------------\n\t\t// Output Variable --> Return FinalValue\n\t\t// -----------------------------\n\t\treturn res;\n\t}",
"public static void main(String[] args) {\r\n\t\tScanner in = new Scanner(System.in);\r\n\t\tint N = in.nextInt();\r\n\t\tint K = in.nextInt();\r\n\t\tint luck_balance = 0;\r\n\t\tArrayList<Integer> important_contests = new ArrayList<Integer>();\r\n\t\tfor (int i = 0; i < N; i++) {\r\n\t\t\tint amount = in.nextInt();\r\n\t\t\tint importance = in.nextInt();\r\n\t\t\tluck_balance += amount;\r\n\t\t\tif (importance == 1) {\r\n\t\t\t\timportant_contests.add(amount);\r\n\t\t\t}\r\n\t\t}\r\n\t\tCollections.sort(important_contests);\r\n\t\tfor (int i = 0; i < important_contests.size() - K; i++) {\r\n\t\t\tluck_balance = luck_balance - 2 * important_contests.get(i);\r\n\t\t}\r\n\t\tSystem.out.println(luck_balance);\r\n\t}",
"@Test\r\n public void testSum() {\r\n int expResult = 5050;\r\n int result = Main.sum();\r\n \r\n assertEquals(expResult, result);\r\n }",
"private static void evaluateCase() {\n try {\n int n = SYS_IN.nextInt();\n int m = SYS_IN.nextInt();\n SYS_IN.nextLine();\n int mn = Integer.MAX_VALUE;\n long sum = 0L;\n int num;\n int sign = 1;\n for (int ni = 0; ni < n; ni++) {\n for (int mi = 0; mi < m; mi++) {\n num = SYS_IN.nextInt();\n if (num < 0) {\n sign *= -1;\n num = -num;\n }\n sum += num;\n mn = Math.min(mn, num);\n }\n SYS_IN.nextLine();\n }\n if (sign == -1) {\n sum -= 2 * mn;\n }\n System.out.println(sum);\n } catch (Exception e) {}\n }",
"@Test\n public void testSumAllNumbersWithManyNumbers(){\n assertEquals(Integer.valueOf(15), calculator.sumAllNumbers(new Integer[]{1, 2, 3, 4, 5}));\n }",
"public int calculateReinforcements(int inputPlayerId) {\n\t\t//calculate correct amount of reinforcements based on what territories players control\n\t\tint countTerr=0;\n\t\tint countContinents=0;\n\t\tint[] countConin = new int [6];\n\t\tfor(int i=0;i<Constants.NUM_COUNTRIES;i++) {\n\t\t\tif(isPlayerOwned(inputPlayerId,i)==true) {\n\t\t\t\tcountTerr++;\n\t\t\t\tcountConin[Constants.CONTINENT_IDS[i]]++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(countConin[0]==9) {\n\t\t\tcountContinents=countContinents+5;\n\t\t}\n\t\tif(countConin[1]==7) {\n\t\t\tcountContinents=countContinents+5;\n\t\t}\n\t\tif(countConin[2]==12) {\n\t\t\tcountContinents=countContinents+7;\n\t\t}\n\t\tif(countConin[3]==4) {\n\t\t\tcountContinents=countContinents+2;\n\t\t}\n\t\tif(countConin[4]==4) {\n\t\t\tcountContinents=countContinents+2;\n\t\t}\n\t\tif(countConin[5]==6) {\n\t\t\tcountContinents=countContinents+3;\n\t\t}\n\t\t\t\n\t\tint reinf=countTerr/3;\n\t\tif(reinf<3)\n\t\t\treinf=3;\n\t\treturn reinf+countContinents;\n\t}",
"public long getAmountRequested();",
"public static void main (String[] args) throws java.lang.Exception\n\t{\n Scanner sc = new Scanner(System.in);\n int t= Integer.parseInt(sc.next());\n \n while(t-->0)\n {\n int[] arr = new int[5];\n int sum=0;\n for(int i=0;i<5;i++)\n {\n arr[i]=Integer.parseInt(sc.next());\n sum+=arr[i];\n }\n \n int p =Integer.parseInt(sc.next());\n if(p*sum>120)\n {\n System.out.println(\"Yes\");\n }\n else\n {\n System.out.println(\"No\");\n }\n } \n }",
"public void compute(){\r\n\r\n\t\ttotalCost=(capAmount*CAPCOST)+(hoodyAmount*HOODYCOST)+(shirtAmount*SHIRTCOST);\r\n\t}",
"@Test\n public void testGetInts() throws SolverException, InterruptedException {\n requireIntegers();\n for (String name : VARIABLE_NAMES) {\n testModelGetters(\n imgr.equal(imgr.makeVariable(name), imgr.makeNumber(1)),\n imgr.makeNumber(1),\n BigInteger.ONE,\n name);\n }\n }",
"int main()\n{\n int units,r;\n cin>>units;\n if (units<=200) {\n r=units*0.5;\n cout<<\"Rs.\"<<r;\n }\n else if (units>=200 && units<=400){\n r=0.65*units+100;\n cout<<\"Rs.\"<<r;\n }\n else if (units>=400 && units<=600){\n r=0.8*units+200;\n cout<<\"Rs.\"<<r;\n }\n else{\n r=1.25*units+425;\n cout<<\"Rs.\"<<r;\n }\n}",
"private int calculate() {\n double grade = 0;\n double average = 0;\n\n if (weight1.getText().length() != 0) {\n for (int n : grades1)\n average += n;\n average /= grades1.size();\n average /= 100;\n grade += (Integer.parseInt(String.valueOf(weight1.getText())) * average);\n average = 0;\n }\n if (weight2.getText().length() != 0) {\n for (int n : grades2)\n average += n;\n average /= grades2.size();\n average /= 100;\n grade += (Integer.parseInt(String.valueOf(weight2.getText())) * average);\n average = 0;\n }\n if (weight3.getText().length() != 0) {\n for (int n : grades3)\n average += n;\n average /= grades3.size();\n average /= 100;\n grade += (Integer.parseInt(String.valueOf(weight3.getText())) * average);\n average = 0;\n }\n if (weight4.getText().length() != 0) {\n for (int n : grades4)\n average += n;\n average /= grades4.size();\n average /= 100;\n grade += (Integer.parseInt(String.valueOf(weight4.getText())) * average);\n average = 0;\n }\n if (weight5.getText().length() != 0) {\n for (int n : grades5)\n average += n;\n average /= grades5.size();\n average /= 100;\n grade += (Integer.parseInt(String.valueOf(weight5.getText())) * average);\n }\n int intGrade = (int) Math.round(grade);\n return intGrade;\n }",
"@Test\n public void testMoreRequired() throws VendingMachineInventoryException{\n service.addFunds(\"1.00\");\n Item testitem = new Item(\"testitem\", \"1.50\", \"5\");\n service.addItem(\"testitem\", testitem);\n BigDecimal moneyRequired = service.moreRequired(\"testitem\");\n BigDecimal expectedMoneyRequired = new BigDecimal(\"0.50\");\n assertEquals(moneyRequired, expectedMoneyRequired);\n }",
"@Test\n public void sumOfMultiplesBelow_isCorrect_test1() {\n int actual = sut.sumOfMultiplesBelow(10, 3, 5);\n assertThat(actual, equalTo(23));\n }",
"public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n n = in.nextInt();\n m = in.nextLong();\n initFactorSets();\n long total = 0;\n\n boolean add = true;\n for (ArrayList<Integer> factorSet : factorSets) {\n for (int factor : factorSet) {\n if (add) {\n total += m / factor;\n } else {\n total -= m / factor;\n }\n }\n add = !add;\n }\n System.out.println(total);\n }",
"public static void main(String[] args) {\n\t\t\t\tint complexity = 0;\n\n\t\t\tcomplexity == (temps < 30) && (ingredients < 5) ;\n\n\t\tSystem.out.println(complexity);\n\n\n\n\n\t\t\tif (complexity < 30 && ingredients < 5) {\n\t\t\tSystem.out.println(\"easy\");\n\t\t\t\tSystem.out.println(\"\");\n\t\t\t}\n\t\t\t\n\t\t\telse if(complexity < 60 && ingredients < 10) {\n\t\t\t\tSystem.out.println(\"medium\");\n\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t}\n\n\t\t\telse if(complexity >= 60 && ingredients >= 10) {\n\t\t\t\tSystem.out.println(\"hard\");\n\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t}\n\n\t\t\n\t\t\t\n\t}",
"private int calculatePrice(boolean addWhippedCream, boolean addChocolate, boolean addCinnamon, boolean addMarshmallows) {\n int basePrice = 5;\n if (addWhippedCream){\n basePrice = basePrice + 1;\n }\n if (addChocolate){\n basePrice = basePrice + 1;\n }\n if (addCinnamon){\n basePrice = basePrice + 1;\n }\n if (addMarshmallows){\n basePrice = basePrice + 1;\n }\n return quantity * basePrice;\n\n }",
"public static void main(String args[]) {\n Scanner s = new Scanner(System.in);\n int T = s.nextInt();\n\n for(int i = 0; i < T; i++) {\n \n int hardness = s.nextInt();\n float carbon = s.nextFloat();\n int ts = s.nextInt();\n \n int grade = 5;\n \n boolean a = hardness > 50;\n boolean b = carbon < 0.7f;\n boolean c = ts > 5600;\n \n if (a && b && c) {\n grade = 10;\n } else if(a && b) {\n grade = 9;\n } else if(b && c) {\n grade = 8;\n } else if(a && c) {\n grade = 7;\n } else if(a || b || c) {\n grade = 6;\n }\n \n System.out.println(grade);\n }\n }",
"@Test\n public void testMultiplyAllNumbersWithManyNumbers() {\n assertEquals(Integer.valueOf(120), calculator.multiplyAllNumbers(new Integer[]{1, 2, 3, 4, 5}));\n }",
"public int askpermitToUse(String[] permits);",
"public static void main(String[] args) {\n int moneyAmount = 10;\n\n int capuccinoPrice = 180;\n int lattePrice = 120;\n int espressoPrice = 80;\n int pureWaterPrise = 20;\n\n var canBuyAnything = false;\n var isMilkEnough = true;\n\n if(moneyAmount >= capuccinoPrice && isMilkEnough) {\n System.out.println(\"Вы можете купить капуччино\");\n canBuyAnything = true;\n }\n\n if(moneyAmount >= lattePrice && isMilkEnough) {\n System.out.println(\"Вы можете купить латте\");\n canBuyAnything = true;\n }\n\n if(moneyAmount >= espressoPrice) {\n System.out.println(\"Вы можете купить еспрессо\");\n canBuyAnything = true;\n }\n\n if(moneyAmount >= pureWaterPrise) {\n System.out.println(\"Вы можете купить воду\");\n canBuyAnything = true;\n }\n\n if(canBuyAnything == false) {\n System.out.println(\"Недостаточно денег\");\n }\n }",
"public boolean meetsRequirement(String sId, String sName, CCode sColor, Type sType, int sLevel, int sCost, Trigger sTrigger, int sPower, int sSoul, String sTrait, String sAbility) {\n \n \t\tboolean isMet = true;\n \n \t\tif (!id.isEmpty()) {\n \n \t\t\tString[] parts = sId.split(\" \");\n \n \t\t\tfor (int i = 0; i < sameID.length; i++) {\n \t\t\t\tisMet = true;\n \t\t\t\tfor (int j = 0; j < parts.length; j++) {\n \t\t\t\t\tisMet = isMet && sameID[i].toLowerCase().contains(parts[j].toLowerCase());\n \t\t\t\t\t/*\n \t\t\t\t\t * if (sameID[i].toLowerCase()\n \t\t\t\t\t * .contains(parts[j].toLowerCase()))\n \t\t\t\t\t * System.out.println(sameID[i] + \"???\" + parts[j]);\n \t\t\t\t\t */\n \t\t\t\t}\n \t\t\t\tif (isMet) {\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \n \t\t\t}\n \t\t\tisMet = true;\n \t\t\tfor (int j = 0; j < parts.length; j++) {\n \t\t\t\tisMet = isMet && id.toLowerCase().contains(parts[j].toLowerCase());\n \t\t\t\t/*\n \t\t\t\t * if (id.toLowerCase().contains(parts[j].toLowerCase()))\n \t\t\t\t * System.out.println(id + \"::CONTAINS::\" + parts[j]);\n \t\t\t\t */\n \t\t\t}\n \n \t\t\t/*\n \t\t\t * if (isMet) { for (int i = 0; i < sameID.length; i++) {\n \t\t\t * System.out.print(\"[(\" + i + \")\" + sameID[i] + \"]\"); }\n \t\t\t * System.out.println(); }\n \t\t\t */\n \t\t}\n \n \t\tif (!sName.isEmpty()) {\n \t\t\tisMet = isMet && (cardName.toLowerCase().contains(sName.toLowerCase()) || cardName_e.toLowerCase().contains(sName.toLowerCase()));\n \t\t}\n \n \t\tif (sColor != null && sColor != CCode.ALL) {\n \t\t\tisMet = isMet && (sColor == c);\n \t\t}\n \n \t\tif (sType != null && sType != CardAssociation.Type.ALL) {\n \t\t\tisMet = isMet && (sType == t);\n \t\t}\n \n \t\tif (sLevel > -1) {\n \t\t\tisMet = isMet && (sLevel == level);\n \t\t}\n \n \t\tif (sCost > -1) {\n \t\t\tisMet = isMet && (sCost == cost);\n \t\t}\n \n \t\tif (sTrigger != null && sTrigger != Trigger.ALL) {\n \t\t\tisMet = isMet && (sTrigger == trigger);\n \t\t}\n \n \t\tif (sPower > -1) {\n \t\t\tisMet = isMet && (sPower == power);\n \t\t}\n \n \t\tif (sSoul > -1) {\n \t\t\tisMet = isMet && (sSoul == soul);\n \t\t}\n \n \t\tif (!sTrait.isEmpty()) {\n \t\t\tisMet = isMet && (trait1.toLowerCase().contains(sTrait) || trait2.toLowerCase().contains(sTrait) || trait1_e.toLowerCase().contains(sTrait) || trait2_e.toLowerCase().contains(sTrait));\n \t\t}\n \n \t\tif (!sAbility.isEmpty()) {\n \n \t\t\tString[] parts = sAbility.split(\" \");\n \n \t\t\tfor (int i = 0; i < parts.length; i++) {\n \t\t\t\tisMet = isMet && (getEffects().toLowerCase().contains(parts[i].toLowerCase()) || getEffects_e().toLowerCase().contains(parts[i].toLowerCase()));\n \t\t\t}\n \t\t}\n \n \t\treturn isMet;\n \t}",
"@Test\n\tpublic void id700_2_3() throws Exception {\n\t\tString insuredPersonPaymentProportion = changeCompanyInfo(driver,\"other\");\n\t\tchangeEmployeeInfo(driver,\"other\");\n\t\t\n\t\tint id390 = (int)(Math.random()*10000000);\n\t\tint id410 = (int)(Math.random()*10000000);\n\t\tint id430 = (int)(Math.random()*10000000);\n\t\tint id450 = (int)(Math.random()*10000000);\n\t\tint id470 = (int)(Math.random()*10000000);\n\t\tint id490 = (int)(Math.random()*10000000);\n\t\tint id510 = (int)(Math.random()*10000000);\n\t\tint id530 = (int)(Math.random()*10000000);\n\t\tint id550 = (int)(Math.random()*10000000);\n\t\tint id570 = (int)(Math.random()*10000000);\n\t\tint id590 = (int)(Math.random()*10000000);\n\t\tint id610 = (int)(Math.random()*10000000);\n\t\tint id620 = (int)(Math.random()*10000000);\n\t\tint id630 = (int)(Math.random()*10000000);\n\t\tint id640 = (int)(Math.random()*10000000);\n\t\tint sum = id390+id410+id430+id450+id470+id490+id510+id530+id550+id570+id590+id610+id620+id630-id640;\n\t\t\n\t\t//input the value\n\t\tCommon.clear(driver,paymentStatements.baseSalary.xpath);\t\t\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalary.xpath)).sendKeys(String.valueOf(id390));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance.xpath)).sendKeys(String.valueOf(id410));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance2.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance2.xpath)).sendKeys(String.valueOf(id430));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance3.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance3.xpath)).sendKeys(String.valueOf(id450));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance4.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance4.xpath)).sendKeys(String.valueOf(id470));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance5.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance5.xpath)).sendKeys(String.valueOf(id490));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance6.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance6.xpath)).sendKeys(String.valueOf(id510));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance7.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance7.xpath)).sendKeys(String.valueOf(id530));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance8.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance8.xpath)).sendKeys(String.valueOf(id550));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance9.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance9.xpath)).sendKeys(String.valueOf(id570));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance10.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance10.xpath)).sendKeys(String.valueOf(id590));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance11.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance11.xpath)).sendKeys(String.valueOf(id610));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.travelAllowance.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.travelAllowance.xpath)).sendKeys(String.valueOf(id620));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.overtimePay.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.overtimePay.xpath)).sendKeys(String.valueOf(id630));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.nonEmploymentDeduction.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.nonEmploymentDeduction.xpath)).sendKeys(String.valueOf(id640));\n\t\tThread.sleep(1000);\n\t\tfor(int a = 0;a<30;a++){\n\t\t\tif(!driver.findElement(By.xpath(paymentStatements.sumPay.xpath)).getText().equals(Common.formatNum(String.valueOf(sum)))){\n\t\t\t\tdriver.findElement(By.xpath(paymentStatements.overFourtyFiveMinute.xpath)).click();\n\t\t\t\tThread.sleep(1000);\n\t\t\t}\n\t\t}\n\t\t//#id700 = (#id390(basic salary)+ T + #id620(commuting allowance)+#id630(overtime work allowance)-#id640)×{the latest ClientUnemploymentBenefit#insuredPersonPaymentProportion that ClientUnemploymentBenefit#useStartMont <= year and month of the selected PayrollMonth#paymentDate} rounded to the nearest whole number according to PayrollCalculationSetting#laborInsuranceCalcRoundingMethod.(*1)\n\t\tint T = id410+id430+id450+id470+id490+id510;\n\t\tint expected = Common.roundHalfDown(String.valueOf((id390+T+id620+id630-id640)),insuredPersonPaymentProportion);\n\t\t//get value\n\t\tString actual = driver.findElement(By.xpath(paymentStatements.employeeInsurance.xpath)).getAttribute(\"value\");\n\t\t//check the data\n\t\tif(Common.formatNum(String.valueOf(expected)).equals(actual)){\n\t\t\tSystem.out.println(\"id700_2_3 Pass\");\n\t\t}else{\n\t\t\tSystem.out.println(\"id700_2_3 Failed\");\n\t\t\tthrow new Exception(\"Error of calculation, expected: <[\"+Common.formatNum(String.valueOf(expected))+\"]> but was: <[\"+actual+\"]> , \" +\n\t\t\t\t\t\"Please refer to input and output values below: \"+\"\\r\\n\"+\n\t\t\t\t\t\"expected = \"+ Common.formatNum(String.valueOf(expected))+\"\\r\\n\"+\n\t\t\t\t\t\"actual = \"+ actual+\"\\r\\n\"+\n\t\t\t\t\t\"id390 =\"+ id390+\"\\r\\n\"+\n\t\t\t\t\t\"id410 =\"+ id410+\"\\r\\n\"+\n\t\t\t\t\t\"id430 =\"+ id430+\"\\r\\n\"+\n\t\t\t\t\t\"id450 =\"+ id450+\"\\r\\n\"+\n\t\t\t\t\t\"id470 =\"+ id470+\"\\r\\n\"+\n\t\t\t\t\t\"id490 =\"+ id490+\"\\r\\n\"+\n\t\t\t\t\t\"id510 =\"+ id510+\"\\r\\n\"+\n\t\t\t\t\t\"id530 =\"+ id530+\"\\r\\n\"+\n\t\t\t\t\t\"id550 =\"+ id550+\"\\r\\n\"+\n\t\t\t\t\t\"id570 =\"+ id570+\"\\r\\n\"+\n\t\t\t\t\t\"id590 =\"+ id590+\"\\r\\n\"+\n\t\t\t\t\t\"id610 =\"+ id610+\"\\r\\n\"+\n\t\t\t\t\t\"id620 =\"+ id620+\"\\r\\n\"+\n\t\t\t\t\t\"id630 =\"+ id630+\"\\r\\n\"+\n\t\t\t\t\t\"id640 =\"+ id640+\"\\r\\n\"+\n\t\t\t\t\t\"insuredPersonPaymentProportion = \"+ insuredPersonPaymentProportion);\n\t\t}\n\t\t//close\n\t\tdriver.findElement(By.xpath(paymentStatements.close.xpath)).click();\n\t\tThread.sleep(2000);\n\t\tdriver.findElement(By.xpath(paymentStatements.cancelPayment.xpath)).click();\n\t\tThread.sleep(2000);\n\t}",
"public void collectAndVerifyTarget() {\n System.out.println(\"Enter the total no of targets that needs to be achieved\");\n Scanner sc = new Scanner(System.in);\n int tCount = sc.nextInt();\n for (int i = 0; i < tCount; i++) {\n System.out.println(\"Enter the value of target \");\n double d = sc.nextDouble();\n double aTarget = 0;\n for (int j = 0; j < tranCount; j++) {\n aTarget = aTarget + transactions[j];\n if (aTarget >= d) {\n System.out.println(\"Target achieved after \" + (j + 1) + \" transactions \\n\");\n break;\n }\n }\n if (aTarget < d) {\n System.out.println(\"Given target is not achieved\");\n }\n }\n }",
"int computeNutritionalScore(Map<String, Object> product);",
"public static void main(String[] args) {\r\n Scanner scanner = new Scanner(System.in);\r\n \r\n long n = scanner.nextLong();\r\n int d = scanner.nextInt();\r\n List<Integer> expenditureList = new ArrayList<>();\r\n for(long i = 0; i < n; i++){\r\n int Ei = scanner.nextInt();\r\n expenditureList.add(Ei);\r\n }\r\n System.out.println(getSolution(expenditureList, d));\r\n }",
"private void checkAmount() throws IOException {\n //System.out.println(\"The total amount in the cash machine is: \" + amountOfCash);\n for (int i : typeOfCash.keySet()) {\n Integer r = typeOfCash.get(i);\n if (r < 20) {\n sendAlert(i);\n JOptionPane.showMessageDialog(null, \"$\" + i + \"bills are out of stock\");\n }\n }\n }",
"private static int getBonus(int sales) {\n if (sales > 5000) {\n\n return sales / 10;\n\n }\n return 0;\n }",
"public void determineWeeklyPay(){\r\n weeklyPay = commission*sales;\r\n }",
"@Test\n public void shouldCalculatePaymentWhen24MonthsIsSelected() {\n\n\n //1. Select '24'\n //2. Enter 7 in the Interest Rate field\n //3. Enter 25000 in the Price field.\n //4. Enter 1500 in the Down Payment Field.\n //5. Inter 3000 in the Trade in Value field.\n //6. Enter 593.86 in the Amount owed on Trade field.\n //7. Select the Calculate button.\n //8. Verify that Estimated Payment - $945 / month for 24 months at 7.0%.\n\n\n //1. Select '36'\n //2. Enter 4 in the Interest Rate field\n //3. Enter 35000 in the Price field.\n //4. Enter 2500 in the Down Payment Field.\n //5. Inter 2000 in the Trade in Value field.\n //6. Enter 593.86 in the Amount owed on Trade field.\n //7. Select the Calculate button.\n //8. Verify that Estimated Payment - $919 / month for 36 months at 4.0%.\n\n\n //1. Select '48'\n //2. Enter 5 in the Interest Rate field\n //3. Enter 45000 in the Price field.\n //4. Enter 3500 in the Down Payment Field.\n //5. Inter 3000 in the Trade in Value field.\n //6. Enter 593.86 in the Amount owed on Trade field.\n //7. Select the Calculate button.\n //8. Verify that Estimated Payment - $901 / month for 48 months at 5.0%.\n\n\n //1. Select '60'\n //2. Enter 6 in the Interest Rate field\n //3. Enter 55000 in the Price field.\n //4. Enter 4500 in the Down Payment Field.\n //5. Inter 4000 in the Trade in Value field.\n //6. Enter 593.86 in the Amount owed on Trade field.\n //7. Select the Calculate button.\n //8. Verify that Estimated Payment - $911 / month for 60 months at 6.0%.\n\n\n //1. Select '72'\n //2. Enter 8 in the Interest Rate field\n //3. Enter 65000 in the Price field.\n //4. Enter 5500 in the Down Payment Field.\n //5. Inter 5000 in the Trade in Value field.\n //6. Enter 593.86 in the Amount owed on Trade field.\n //7. Select the Calculate button.\n //8. Verify that Estimated Payment - $966 / month for 72 months at 8.0%.\n\n\n }",
"public static void main(String args[]){\n System.out.println(\"Enter the no. of sales you make\");\n Scanner sc = new Scanner(System.in);\n int sale = sc.nextInt();\n System.out.println(\"Entern the no of experince in current Job\");\n int year = sc.nextInt();\n int pay=1000;\n int requiredSales =10;\n int requiredExp = 2;\n\n if (sale>=requiredSales) {\n if (year>=requiredExp) {\n // Calculate the pay\n pay = pay + 250;\n // Display the pay\n System.out.println(\"Your pay is \" + pay);\n }\n else\n System.out.println(\"Sorry you are not qualified, your experince is less\");\n }\n else\n {\n System.out.println(\"Sorry you are not qualified, fuck your self mc\");\n }\n\n }",
"protected void evaluateConditions()\n {\n ensureConditionContinuity() ;\n checkComponentList() ;\n\n for ( int liCondCtr = 1 ; liCondCtr <= 5 ; liCondCtr++ )\n {\n checkCondition( liCondCtr ) ;\n } /* end for */\n\n }",
"Solution computeChange(Cash cashAvailable, int changeAmount);",
"private boolean verifyAmountPayable(String adjustmentOption, HashMap<String, String> testData,\n\t\t\tExtentTest extentedReport, boolean screenshot) {\n\t\tboolean isOk = false;\n\t\t\n\t\tint totalInstallments = adjustmentOption.contains(\"spread\") ? 12\n\t\t\t\t: (adjustmentOption.contains(\"single\") ? 13 : 12);\n\t\t//List<WebElement> lstDueDates = driver.findElements(By.cssSelector(cssPaySchedDueDates));\n\t\tList<WebElement> lstCalculatedPremium = driver.findElements(By.cssSelector(cssPaySchedCalculatedPremium));\n\t\tList<WebElement> lstTaxes = driver.findElements(By.cssSelector(cssPaySchedTaxes));\n\t\tList<WebElement> lstCharges = driver.findElements(By.cssSelector(cssPaySchedCharges));\n\t\tList<WebElement> lstChargesTax = driver.findElements(By.cssSelector(cssPaySchedChargesTax));\n\t\tList<WebElement> lstInstallments = driver.findElements(By.cssSelector(cssPaySchedInstallments));\n\t\tList<WebElement> lstAmountPayable = driver.findElements(By.cssSelector(cssPaySchedAmountPayable));\n\t\tfloat expectedTotalAmountPayable = 0;\n\t\tString actualTotalAmountPayable = divTotalAmountPayable.getText().trim();\n\t\tString totalPayment = (adjustmentOption.contains(\"spread\") || adjustmentOption.contains(\"single\"))\n\t\t\t\t? spnNewPremiumAcceptanceTab.getText().trim() : spnTotalPaymentAcceptanceTab.getText().trim();\n\t\t\n\t\tboolean isOkRowCount = lstAmountPayable.size() == totalInstallments;\n\t\tLog.message(\"Row count: [\" + lstCalculatedPremium.size() + \"]; totalInstallments: [\" + totalInstallments\n\t\t\t\t+ \"]; isOkRowCount: [\" + isOkRowCount + \"]\", extentedReport);\n\t\tboolean isOkRowData = false;\n\t\tboolean isOkTotalAmountPayable = false;\n\t\t\n\t\tfor (int i = 0; i < totalInstallments; i++) {\n\t\t\tfloat rowCalculatedPremium = Float.parseFloat(lstCalculatedPremium.get(i).getText().trim());\n\t\t\tfloat rowTaxes = Float.parseFloat(lstTaxes.get(i).getText().trim());\n\t\t\tfloat rowCharges = Float.parseFloat(lstCharges.get(i).getText().trim());\n\t\t\tfloat rowChargesTax = Float.parseFloat(lstChargesTax.get(i).getText().trim());\n\t\t\tfloat rowInstallments = Float.parseFloat(lstInstallments.get(i).getText().trim());\n\t\t\tString rowAmountPayable = lstAmountPayable.get(i).getText().trim();\n\t\t\tString rowTotal = String.format(\"%.2f\", (rowCalculatedPremium + rowTaxes + rowCharges + rowChargesTax + rowInstallments));\n\t\t\texpectedTotalAmountPayable += Float.parseFloat(rowAmountPayable);\n\t\t\tboolean isOkCurrentRow = rowAmountPayable.equals(rowTotal);\n\t\t\tLog.message(\"Row #\" + (i + 1) + \": rowAmountPayable: [\" + rowAmountPayable + \"]; rowTotal: [\" + rowTotal\n\t\t\t\t\t+ \"]; isOkCurrentRow: [\" + isOkCurrentRow + \"]\", extentedReport);\n\t\t\tif (i > 0 && !isOkRowData) {\n\t\t\t\tcontinue;\n\t\t\t} else {\n\t\t\t\tisOkRowData = isOkCurrentRow;\n\t\t\t}\n\t\t}\n\t\t\n\t\tisOkTotalAmountPayable = actualTotalAmountPayable.equals(String.format(\"%.2f\", expectedTotalAmountPayable))\n\t\t\t\t&& actualTotalAmountPayable.equals(totalPayment);\n\t\tLog.message(\n\t\t\t\t\"actualTotalAmountPayable: [\" + actualTotalAmountPayable + \"]; expectedTotalAmountPayable: [\"\n\t\t\t\t\t\t+ String.format(\"%.2f\", expectedTotalAmountPayable) + \"]; totalPayment: [\" + totalPayment + \"]\",\n\t\t\t\textentedReport);\n\t\t\n\t\tisOk = isOkRowCount && isOkRowData && isOkTotalAmountPayable;\n\t\tLog.message(\"isOkRowCount: [\" + isOkRowCount + \"]; isOkRowData: [\" + isOkRowData\n\t\t\t\t+ \"]; isOkTotalAmountPayable: [\" + isOkTotalAmountPayable + \"]\", extentedReport);\n\t\t\t\t\n\t\t\n\t\treturn isOk;\n\t}",
"public static void main(String[] args) {\n Scanner myScanner = new Scanner(System.in); //allows to prompt user for input\n System.out.print(\"Enter the original cost of the check in the form xx.xx \");\n //using method within Scanner class\n double checkCost = myScanner.nextDouble();\n System.out.print(\"Enter the percentage tip that you wish to pay as\"+\n \"a whole number (in the form xx): \" ); \n double tipPercent = myScanner.nextDouble(); //promt user to enter tip perecentage\n tipPercent /= 100; //We want to convert the percentage into a decimal value\n System.out.print(\"Enter the number of people who went out to dinner: \"); \n int numPeople = myScanner.nextInt(); //promt user to enter number of people\n double totalCost; \n double costPerPerson;\n int dollars, //whole dollar amount of cost \n dimes, pennies; //for storing digits\n //to the right of the decimal point \n //for the cost$ \n totalCost = checkCost * (1 + tipPercent);\n costPerPerson = totalCost / numPeople;\n //get the whole amount, dropping decimal fraction\n dollars=(int)costPerPerson;\n //get dimes amount, e.g., \n // (int)(6.73 * 10) % 10 -> 67 % 10 -> 7\n // where the % (mod) operator returns the remainder\n // after the division: 583%100 -> 83, 27%5 -> 2 \n dimes=(int)(costPerPerson * 10) % 10;\n pennies=(int)(costPerPerson / 100);\n System.out.println(\"Each person in the group owes $\" + dollars + \".\" + dimes + pennies);\n \n \n }",
"public void Reinforcements()\n{\n\tSystem.out.println(\"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\");\n\tSystem.out.println(\"$$$$$$$$$$$$$ REINFORCEMENTS $$$$$$$$$$$$$$$$$\\n\\n\");\n\t int answer=1;\n do\n {\n\t System.out.println(name+\", you have \"+wealth+\" gold coins.\\n\" );\n\t System.out.println(\"$$$$$$$$ RATES $$$$$$$$\");\n\t System.out.println(\"1 health potions for 1 gold coin\");\n\t System.out.println(\"An improved weapon for 150 gold coins\");\n\t System.out.println(\"Non-refundable :)\");\n\t System.out.println(\"$$$$$$$$$$$$$$$$$$$$$$$$$\\n\");\n\t\tScanner scan=new Scanner(System.in);\n\n\n\t do\n\t{\n\t if(answer!=0&&answer!=1&&answer!=2)\n\t \tSystem.out.print(\"Error in Input! \");\n\t \tSystem.out.println(\"What would you like to buy (0=nothing/done, 1=health potions, 2=better weapon)?\");\n\t answer=scan.nextInt();\n }while(answer!=0&&answer!=1&&answer!=2);\n\n\n\tif (answer==1)\n\t{\n\t\tint exchange=0;\n\t\t\tdo\n\t\t{\n\t\t\tif(exchange<0||exchange>wealth)\n\t\t\t\tSystem.out.print(\"Error in Input! \");\n\n\t\t\tSystem.out.println(\"How many health potions would you like?(cannot be negative or more than your gold coins)\");\n\t exchange=scan.nextInt();\n\t\t}while(exchange<0||exchange>wealth);\n\n\t\t\twealth-=exchange;\n\t\t\thealth+=exchange;\n\t\t\tSystem.out.println(name+\" increases health by \"+exchange+\" potions.\");\n\t\t\tSystem.out.println(name+\" decreases wealth by \"+exchange+\" gold coins.\\n\");\n\n\t}\n\telse if(answer==2)\n\t{\n\t\tif(weapon<8)\n\t {\n\n\t\t\t weapon++;\n\n\n\t\tif(wealth>=150)\n\t\t{\n\t\t\twealth-=150;\n\n\t\t\tSystem.out.println(name+\"\\'s weapon has been improved to \"+WeaponName(weapon)+\".\");\n\t\t\tSystem.out.println(name+\" decreases wealth by 150 gold coins.\\n\" );\n\t\t}\n\t\telse\n\t\t{\n\t\t\tint temp=wealth;\n\t\t\thealth+=temp-150;\n\t\t\twealth=0;\n\n\t\tSystem.out.println(name+\"\\'s weapon has been improved to \"+WeaponName(weapon));\n\t\tSystem.out.println(name+\" decreases wealth by \"+temp+\" gold coins.\" );\n\t\tSystem.out.println(name+\" decreases health by \"+(150-temp)+\" portions.\\n\");\n\t\t}\n\t }\n\t \telse\n\t {\n\t \t\tweapon=8;\n\t \t\tSystem.out.println(\"You have updated to the most powerful weapon!!!-----\"+WeaponName(weapon)+\".\\n\" );\n\t }\n\n\t }\n\t else\n\t \tanswer=0;\n\n } while(answer!=0);\n}",
"public abstract int getAmount(Fluid fluid);",
"void calculateTheCart(Cart cart, Set<Promotion> promotions);",
"public int totalEffetInventaire() {\n\t\tint limiteInventaire = 0;\n\t\tif (bonusForce >0) limiteInventaire+= bonusForce;\n\t\tif (bonusDefense >0) limiteInventaire+= bonusDefense;\n\t\tif (bonusVie >0) limiteInventaire+= bonusVie;\n\t\tif (bonusEsquive >0) limiteInventaire+= bonusEsquive;\n\t\tif (bonusInventaire >0) limiteInventaire+= bonusInventaire;\n\t\treturn limiteInventaire*3/4;\n\t}",
"boolean hasAmount();",
"boolean hasAmount();",
"public void testSumAtSelectionOnOthersAccount() {\r\n addAccount();\r\n addAccount2();\r\n solo.pressSpinnerItem(0, 1);\r\n addOp();\r\n tools.printCurrentTextViews();\r\n assertTrue(solo.getText(FIRST_SUM_AT_SEL_IDX).getText().toString().contains(Formater.getSumFormater().format(2000.50 - 10.50)));\r\n }",
"static int getMoneySpent(int[] keyboards, int[] drives, int b) {\n\t\tint sumPrize = -1;\n\t\tfor(int i=0; i < keyboards.length; i++) {\n\t\t\tfor(int j=0; j < drives.length; j++) {\n\t\t\t\tint sum = keyboards[i] + drives[j];\n\t\t\t\tsumPrize = validateRule(sumPrize, sum, b);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn sumPrize;\n\n\t}",
"@Test\n public void testGetIntUfs() throws SolverException, InterruptedException {\n requireIntegers();\n // Some names are specificly chosen to test the Boolector model\n // Use 1 instead of 0 or max bv value, as solvers tend to use 0, min or max as default\n for (String ufName : VARIABLE_NAMES) {\n testModelGetters(\n bmgr.and(\n imgr.equal(imgr.makeVariable(\"var\"), imgr.makeNumber(123)),\n imgr.equal(\n imgr.makeNumber(1),\n fmgr.declareAndCallUF(\n ufName,\n FormulaType.IntegerType,\n ImmutableList.of(imgr.makeVariable(\"var\"))))),\n imgr.makeNumber(1),\n BigInteger.ONE,\n ufName,\n false,\n ImmutableList.of(BigInteger.valueOf(123)));\n }\n }",
"public void run(){\n ArrayList<ArrayList<Furniture>> all = getSubsets(getFoundFurniture());\n ArrayList<ArrayList<Furniture>> valid = getValid(all);\n ArrayList<ArrayList<Furniture>> ordered = comparePrice(valid);\n ArrayList<ArrayList<Furniture>> orders = produceOrder();\n checkOrder(orders, false);\n }",
"@Test\n\tpublic void id700_2_1() throws Exception {\n\t\tString insuredPersonPaymentProportion = changeCompanyInfo(driver,\"general\");\n\t\tchangeEmployeeInfo(driver,\"general\");\n\t\t\n\t\tint id390 = (int)(Math.random()*10000000);\n\t\tint id410 = (int)(Math.random()*10000000);\n\t\tint id430 = (int)(Math.random()*10000000);\n\t\tint id450 = (int)(Math.random()*10000000);\n\t\tint id470 = (int)(Math.random()*10000000);\n\t\tint id490 = (int)(Math.random()*10000000);\n\t\tint id510 = (int)(Math.random()*10000000);\n\t\tint id530 = (int)(Math.random()*10000000);\n\t\tint id550 = (int)(Math.random()*10000000);\n\t\tint id570 = (int)(Math.random()*10000000);\n\t\tint id590 = (int)(Math.random()*10000000);\n\t\tint id610 = (int)(Math.random()*10000000);\n\t\tint id620 = (int)(Math.random()*10000000);\n\t\tint id630 = (int)(Math.random()*10000000);\n\t\tint id640 = (int)(Math.random()*10000000);\n\t\tint sum = id390+id410+id430+id450+id470+id490+id510+id530+id550+id570+id590+id610+id620+id630-id640;\n\t\t\n\t\t//input the value\n\t\tCommon.clear(driver,paymentStatements.baseSalary.xpath);\t\t\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalary.xpath)).sendKeys(String.valueOf(id390));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance.xpath)).sendKeys(String.valueOf(id410));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance2.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance2.xpath)).sendKeys(String.valueOf(id430));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance3.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance3.xpath)).sendKeys(String.valueOf(id450));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance4.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance4.xpath)).sendKeys(String.valueOf(id470));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance5.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance5.xpath)).sendKeys(String.valueOf(id490));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance6.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance6.xpath)).sendKeys(String.valueOf(id510));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance7.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance7.xpath)).sendKeys(String.valueOf(id530));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance8.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance8.xpath)).sendKeys(String.valueOf(id550));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance9.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance9.xpath)).sendKeys(String.valueOf(id570));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance10.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance10.xpath)).sendKeys(String.valueOf(id590));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance11.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance11.xpath)).sendKeys(String.valueOf(id610));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.travelAllowance.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.travelAllowance.xpath)).sendKeys(String.valueOf(id620));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.overtimePay.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.overtimePay.xpath)).sendKeys(String.valueOf(id630));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.nonEmploymentDeduction.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.nonEmploymentDeduction.xpath)).sendKeys(String.valueOf(id640));\n\t\tThread.sleep(1000);\n\t\tfor(int a = 0;a<30;a++){\n\t\t\tif(!driver.findElement(By.xpath(paymentStatements.sumPay.xpath)).getText().equals(Common.formatNum(String.valueOf(sum)))){\n\t\t\t\tdriver.findElement(By.xpath(paymentStatements.overFourtyFiveMinute.xpath)).click();\n\t\t\t\tThread.sleep(1000);\n\t\t\t}\n\t\t}\n\t\t//#id700 = (#id390(basic salary)+ T + #id620(commuting allowance)+#id630(overtime work allowance)-#id640)×{the latest ClientUnemploymentBenefit#insuredPersonPaymentProportion that ClientUnemploymentBenefit#useStartMont <= year and month of the selected PayrollMonth#paymentDate} rounded to the nearest whole number according to PayrollCalculationSetting#laborInsuranceCalcRoundingMethod.(*1)\n\t\tint T = id410+id430+id450+id470+id490+id510;\n\t\tint expected = Common.roundHalfDown(String.valueOf((id390+T+id620+id630-id640)),insuredPersonPaymentProportion);\n\t\t//get value\n\t\tString actual = driver.findElement(By.xpath(paymentStatements.employeeInsurance.xpath)).getAttribute(\"value\");\n\t\t//check the data\n\t\tif(Common.formatNum(String.valueOf(expected)).equals(actual)){\n\t\t\tSystem.out.println(\"id700_2_1 Pass\");\n\t\t}else{\n\t\t\tSystem.out.println(\"id700_2_1 Failed\");\n\t\t\tthrow new Exception(\"Error of calculation, expected: <[\"+Common.formatNum(String.valueOf(expected))+\"]> but was: <[\"+actual+\"]> , \" +\n\t\t\t\t\t\"Please refer to input and output values below: \"+\"\\r\\n\"+\n\t\t\t\t\t\"expected = \"+ Common.formatNum(String.valueOf(expected))+\"\\r\\n\"+\n\t\t\t\t\t\"actual = \"+ actual+\"\\r\\n\"+\n\t\t\t\t\t\"id390 =\"+ id390+\"\\r\\n\"+\n\t\t\t\t\t\"id410 =\"+ id410+\"\\r\\n\"+\n\t\t\t\t\t\"id430 =\"+ id430+\"\\r\\n\"+\n\t\t\t\t\t\"id450 =\"+ id450+\"\\r\\n\"+\n\t\t\t\t\t\"id470 =\"+ id470+\"\\r\\n\"+\n\t\t\t\t\t\"id490 =\"+ id490+\"\\r\\n\"+\n\t\t\t\t\t\"id510 =\"+ id510+\"\\r\\n\"+\n\t\t\t\t\t\"id530 =\"+ id530+\"\\r\\n\"+\n\t\t\t\t\t\"id550 =\"+ id550+\"\\r\\n\"+\n\t\t\t\t\t\"id570 =\"+ id570+\"\\r\\n\"+\n\t\t\t\t\t\"id590 =\"+ id590+\"\\r\\n\"+\n\t\t\t\t\t\"id610 =\"+ id610+\"\\r\\n\"+\n\t\t\t\t\t\"id620 =\"+ id620+\"\\r\\n\"+\n\t\t\t\t\t\"id630 =\"+ id630+\"\\r\\n\"+\n\t\t\t\t\t\"id640 =\"+ id640+\"\\r\\n\"+\n\t\t\t\t\t\"insuredPersonPaymentProportion = \"+ insuredPersonPaymentProportion);\n\t\t}\n\t\t//close\n\t\tdriver.findElement(By.xpath(paymentStatements.close.xpath)).click();\n\t\tThread.sleep(2000);\n\t\tdriver.findElement(By.xpath(paymentStatements.cancelPayment.xpath)).click();\n\t\tThread.sleep(2000);\n\t}",
"@Test(enabled = false)\n @JIRATestKey(key = \"TEST-4\")\n public void checkMultipleFlightsTotalSum() {\n SearchResultPage searchResultPage = new WelcomePage()\n .getHomePage()\n .addMultipleDestinations()\n .setOutboundInformation(\"Bologna, Italy\", \"Eindhoven, Netherlands\", \"24 Nov 2017\")\n .setInboundInformation(\"Amsterdam (Schiphol), Netherlands\", \"Casablanca, Morocco\", \"30 Nov 2017\")\n .search()\n .selectFirstOutbound()\n .selectFirstInbound();\n\n Assert.assertEquals(searchResultPage.getTotalPrice(), \"102.00\");\n }",
"@Test\n public void amountGreatherThanItemsPrice() {\n Coupon coupon = couponService.calculateCoupon(Arrays.asList(MLA1),PRICE_MLA1+PRICE_MLA2);\n assertEquals(1, coupon.itemsIds().size());\n assertEquals(MLA1, coupon.itemsIds().get(0));\n assertEquals(PRICE_MLA1, coupon.total());\n }",
"int getChestsAmount();",
"@Override\n\tpublic void evaluar(int resistencia, int capacidad, int velocidad) {\n\t\t\n\t}",
"public static void main(String[] args)\n\t{\n \n\t\tSystem.out.println(\"Enter the size of transaction array\");\n int trSize = sc.nextInt();\n\n // creating an array of provided size\n int[] transactions = new int[trSize];\n \n // get the elements of the array (in a loop)\n System.out.println(\"Enter the values of array\");\n for (int i = 0; i < transactions.length; i++) {\n transactions[i] = sc.nextInt();\n }\n // get the number of targets\n System.out.println(\"Enter the total no of targets that needs to be achieved\");\n int numTargets = sc.nextInt();\n \n // get in target one-by-one (loop)\n for (int i = 0; i < numTargets; i++) {\n \n \t// Get TargetValue\n System.out.println(\"Enter the value of target\");\n int target = sc.nextInt();\n \n int sum =0;\n for ( int j=0; j < transactions.length; j++) {\n \tsum = sum + transactions[j];\n \t\n \tif ( sum >= target) {\n \tSystem.out.println(\"Target achieved after \" + (j+1) + \" transactions\" );\n \tbreak; // break out of the innermost for loop\n \t}\n \t\n \t//we come to the last transactions, yet target is not achieved\n \tif (j == transactions.length - 1) {\n \t\tSystem.out.println( \"Given target is not achieved\");\n \t}\n \t\n }\n \n \n\t}\n\n}",
"static boolean sumChecker( int[] arrayOfNumbers) {\n\t\tint intArraySum = 0; \n\t\tfor (int i : arrayOfNumbers) { \n\t\t\tintArraySum += arrayOfNumbers[i];\n\t\t}\n\t\tif (intArraySum >= 100) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t\t \n\t\t}\n\t}",
"private static float getBonus(float unitSales) {\n\n if (unitSales >= 25) {\n return unitSales * 20;\n\n }\n else if (unitSales > 0) {\n\n return unitSales * 10;\n }\n\n return 0;\n }",
"@Test\n\tpublic void testCharge() throws Exception {\n\t\tfor (int i = 0; i <= 500; i += 25) {\n\t\t\tint expense = d.dispense(50 + i, 2);\n\t\t\tassertEquals(50, expense);\n\t\t}\n\t}",
"private String bulkorderqtycalculation() {\n String strSubtotal = estimatedSubTotalPriceDisplayShoppingCart.getText();\n float intSubtotal = Float.parseFloat(strSubtotal.replaceAll(\"[^0-9.]\", \"\"));\n DecimalFormat df = new DecimalFormat(\"#\");\n String forSubtotal = df.format(intSubtotal);\n int forIntSubtotal = Integer.parseInt(forSubtotal);\n System.out.println(\"=== Subtotal after trimming: \" + forIntSubtotal);\n int reqqty = 0;\n reqqty = (3000 / forIntSubtotal);\n System.out.println(\"=== Qty Require is: \" + reqqty);\n String qtystr = String.valueOf(reqqty);\n return qtystr;\n }",
"@Test(dependsOnMethods = {\"shouldBeAbleToClick72Months\"})\n public void shouldBeAbleToInputNumericCharactersInInterestRateField() {\n //1. Enter 6 in the Interest Rate Field\n calculatePaymentPage.setInterestRateInput(\"6\");\n //2. Enter 11 in the Interest Rate Field\n calculatePaymentPage.setInterestRateInput(\"11\");\n }",
"public double calculateSatisfaction(){\n\n\t\tdouble satisfaction=0;\n\t\tif(calculateSurveyQuantity()>=10){\n\n\t\t\tfor(int i=0; i<surveys.length; i++){\n\n\t\t\t\tif(surveys[i]!=null){\n\n\t\t\t\t\tsatisfaction+=surveys[i].calculateSatisfaction();\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tsatisfaction/=calculateSurveyQuantity();\n\n\t\t}\n\n\t\treturn satisfaction;\n\n\t}",
"public void id700_1() throws Exception {\n\t\tString insuredPersonPaymentProportion = changeCompanyInfo(driver,\"general\");\n\t\tchangeEmployeeInfo(driver,\"general\");\n\t\t\n\t\tint id390 = (int)(Math.random()*10000000);\n\t\tint id410 = (int)(Math.random()*10000000);\n\t\tint id430 = (int)(Math.random()*10000000);\n\t\tint id450 = (int)(Math.random()*10000000);\n\t\tint id470 = (int)(Math.random()*10000000);\n\t\tint id490 = (int)(Math.random()*10000000);\n\t\tint id510 = (int)(Math.random()*10000000);\n\t\tint id530 = (int)(Math.random()*10000000);\n\t\tint id550 = (int)(Math.random()*10000000);\n\t\tint id570 = (int)(Math.random()*10000000);\n\t\tint id590 = (int)(Math.random()*10000000);\n\t\tint id610 = (int)(Math.random()*10000000);\n\t\tint id620 = (int)(Math.random()*10000000);\n\t\tint id630 = (int)(Math.random()*10000000);\n\t\tint id640 = (int)(Math.random()*10000000);\n\t\tint sum = id390+id410+id430+id450+id470+id490+id510+id530+id550+id570+id590+id610+id620+id630-id640;\n\t\t\n\t\t//input the value\n\t\tCommon.clear(driver,paymentStatements.baseSalary.xpath);\t\t\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalary.xpath)).sendKeys(String.valueOf(id390));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance.xpath)).sendKeys(String.valueOf(id410));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance2.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance2.xpath)).sendKeys(String.valueOf(id430));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance3.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance3.xpath)).sendKeys(String.valueOf(id450));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance4.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance4.xpath)).sendKeys(String.valueOf(id470));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance5.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance5.xpath)).sendKeys(String.valueOf(id490));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance6.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance6.xpath)).sendKeys(String.valueOf(id510));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance7.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance7.xpath)).sendKeys(String.valueOf(id530));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance8.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance8.xpath)).sendKeys(String.valueOf(id550));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance9.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance9.xpath)).sendKeys(String.valueOf(id570));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance10.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance10.xpath)).sendKeys(String.valueOf(id590));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance11.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance11.xpath)).sendKeys(String.valueOf(id610));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.travelAllowance.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.travelAllowance.xpath)).sendKeys(String.valueOf(id620));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.overtimePay.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.overtimePay.xpath)).sendKeys(String.valueOf(id630));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.nonEmploymentDeduction.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.nonEmploymentDeduction.xpath)).sendKeys(String.valueOf(id640));\n\t\tThread.sleep(1000);\n\t\tfor(int a = 0;a<30;a++){\n\t\t\tif(!driver.findElement(By.xpath(paymentStatements.sumPay.xpath)).getText().equals(Common.formatNum(String.valueOf(sum)))){\n\t\t\t\tdriver.findElement(By.xpath(paymentStatements.overFourtyFiveMinute.xpath)).click();\n\t\t\t\tThread.sleep(1000);\n\t\t\t}\n\t\t}\n\t\t//#id700 = (#id390(basic salary)+ T + #id620(commuting allowance)+#id630(overtime work allowance)-#id640)×{the latest ClientUnemploymentBenefit#insuredPersonPaymentProportion that ClientUnemploymentBenefit#useStartMont <= year and month of the selected PayrollMonth#paymentDate} rounded to the nearest whole number according to PayrollCalculationSetting#laborInsuranceCalcRoundingMethod.(*1)\n\t\tint T = id410+id430+id450+id470+id490+id510;\n\t\tint expected = Common.roundHalfDown(String.valueOf((id390+T+id620+id630-id640)),insuredPersonPaymentProportion);\n\t\t//get value\n\t\tString actual = driver.findElement(By.xpath(paymentStatements.employeeInsurance.xpath)).getAttribute(\"value\");\n\t\t//check the data\n\t\tif(Common.formatNum(String.valueOf(expected)).equals(actual)){\n\t\t\tSystem.out.println(\"id700_1 Pass\");\n\t\t}else{\n\t\t\tSystem.out.println(\"id700_1 Failed\");\n\t\t\tthrow new Exception(\"Error of calculation, expected: <[\"+Common.formatNum(String.valueOf(expected))+\"]> but was: <[\"+actual+\"]> , \" +\n\t\t\t\t\t\"Please refer to input and output values below: \"+\"\\r\\n\"+\n\t\t\t\t\t\"expected = \"+ Common.formatNum(String.valueOf(expected))+\"\\r\\n\"+\n\t\t\t\t\t\"actual = \"+ actual+\"\\r\\n\"+\n\t\t\t\t\t\"id390 =\"+ id390+\"\\r\\n\"+\n\t\t\t\t\t\"id410 =\"+ id410+\"\\r\\n\"+\n\t\t\t\t\t\"id430 =\"+ id430+\"\\r\\n\"+\n\t\t\t\t\t\"id450 =\"+ id450+\"\\r\\n\"+\n\t\t\t\t\t\"id470 =\"+ id470+\"\\r\\n\"+\n\t\t\t\t\t\"id490 =\"+ id490+\"\\r\\n\"+\n\t\t\t\t\t\"id510 =\"+ id510+\"\\r\\n\"+\n\t\t\t\t\t\"id530 =\"+ id530+\"\\r\\n\"+\n\t\t\t\t\t\"id550 =\"+ id550+\"\\r\\n\"+\n\t\t\t\t\t\"id570 =\"+ id570+\"\\r\\n\"+\n\t\t\t\t\t\"id590 =\"+ id590+\"\\r\\n\"+\n\t\t\t\t\t\"id610 =\"+ id610+\"\\r\\n\"+\n\t\t\t\t\t\"id620 =\"+ id620+\"\\r\\n\"+\n\t\t\t\t\t\"id630 =\"+ id630+\"\\r\\n\"+\n\t\t\t\t\t\"id640 =\"+ id640+\"\\r\\n\"+\n\t\t\t\t\t\"insuredPersonPaymentProportion = \"+ insuredPersonPaymentProportion);\n\t\t}\n\t\t//close\n\t\tdriver.findElement(By.xpath(paymentStatements.close.xpath)).click();\n\t\tThread.sleep(2000);\n\t\tdriver.findElement(By.xpath(paymentStatements.cancelPayment.xpath)).click();\n\t\tThread.sleep(2000);\n\t}",
"public boolean adjust_satisfy(int satisfy) {\n boolean flag = false;\n switch (satisfy) {\n case 0: {//none satisfied\n this.relax_cpu += 0.1;\n this.relax_memory += 0.1;\n this.relax_qpi += 0.1;\n this.relax_cores += 1;\n break;\n }\n case 1: {//only CPU satisfied\n this.relax_memory += 0.1;\n this.relax_qpi += 0.1;\n this.relax_cores += 1;\n break;\n }\n case 2: {//only memory satisfied\n this.relax_cpu += 0.1;\n this.relax_qpi += 0.1;\n this.relax_cores += 1;\n break;\n }\n case 4: {//only qpi satisfied\n this.relax_memory += 0.1;\n this.relax_cpu += 0.1;\n this.relax_cores += 1;\n break;\n }\n case 8: {//only cores satisfied\n this.relax_cpu += 0.1;\n this.relax_memory += 0.1;\n this.relax_qpi += 0.1;\n }\n case 3: {//cpu and memory satisfied\n this.relax_qpi += 0.1;\n this.relax_cores += 1;\n break;\n }\n case 5: {//cpu and qpi satisfied\n this.relax_memory += 0.1;\n this.relax_cores += 1;\n break;\n }\n case 6: {//memory and qpi satisfied\n this.relax_cpu += 0.1;\n this.relax_cores += 1;\n break;\n }\n case 7: {//all except cores\n this.relax_cores += 1;\n break;\n }\n case 9: {//cpu and cores satisfied\n this.relax_qpi += 0.1;\n this.relax_memory += 0.1;\n break;\n }\n case 10: {//memory and cores satisfied\n this.relax_cpu += 0.1;\n this.relax_qpi += 0.1;\n break;\n }\n case 11: {//all except qpi\n this.relax_qpi += 0.1;\n break;\n }\n case 12: {//qpi and cores satisfied\n this.relax_cpu += 0.1;\n this.relax_memory += 0.1;\n break;\n }\n case 13: {//all except memory\n this.relax_memory += 0.1;\n break;\n }\n case 14: {//all except cpu\n this.relax_cpu += 0.1;\n break;\n }\n }\n\n// if (this.relax_cpu > 1 || this.relax_memory > 1.5 || this.relax_qpi > 1.5) {\n// SOURCE_RATE = SOURCE_RATE * 0.9;\n// flag = true;\n// }\n\n// if (this.relax_cpu > 2) {\n// this.relax_cpu = 2;\n// }\n// if (this.relax_memory > 2) {\n// this.relax_memory = 2;\n// }\n// if (this.relax_qpi > 2) {\n// this.relax_qpi = 2;\n// }\n\n setRelax_cpu(this.relax_cpu);\n setRelax_memory(this.relax_memory);\n setRelax_qpi(this.relax_qpi);\n setRelax_cores(this.relax_cores);\n return flag;\n }",
"public static boolean checkRequestAmountLimit(String requestType, int clientID, double maxAmount, int range) throws SQLException\r\n {\r\n // calculate begginning date of range to check within\r\n LocalDate searchStart = LocalDate.now().minusMonths(range);\r\n \r\n Connection connection = DBConnection.getConnection();\r\n String query = \"select sum(amount) as total from scm.tcf_requestassist where \" +\r\n \"clientid = ? and datedisbursed > ? and assistanceid in \" +\r\n \"(select assistanceid from scm.tcf_assistance where description = ?)\";\r\n\r\n \r\n PreparedStatement ps = connection.prepareStatement(query); \r\n \r\n ps.setInt(1, clientID); \r\n \r\n DateTimeFormatter dtf = DateTimeFormatter.ofPattern(\"yyyy-MM-dd\");\r\n ps.setString(2, searchStart.format(dtf));\r\n \r\n mapDbNames(); \r\n String desc = dbMap.get(requestType);\r\n ps.setString(3, desc); \r\n \r\n ResultSet rs = ps.executeQuery();\r\n\r\n if (rs.next()) \r\n {\r\n double total = rs.getDouble(\"total\"); \r\n closeResources(ps, rs, connection);\r\n return total < maxAmount;\r\n }\r\n else \r\n {\r\n closeResources(ps, rs, connection);\r\n throw new SQLException();\r\n }\r\n }",
"public static void main(String[] args) {\r\n\t\tcalculateSum(3.4, 1.8);\r\n\t\tcalculation(2, 3);\r\n\t\tcalculation(2, 3, 4);\r\n\t\tcalculation(5, \"7\");\r\n\t\t\r\n\t\t// If you change the number of parameters, or the data type of parameters\r\n\t}",
"@Test\n public void increaseWithDiscardLessThan4() throws Exception {\n gm.setPlayerInfo(clientPlayer4);\n gm.setThisPlayerIndex(clientPlayer4.getPlayerIndex());\n for (ResourceType type : ResourceType.values()) {\n assertEquals(0, getAmounts().getOfType(type));\n }\n assertFalse(dc.getMaxDiscard() >= 4);\n dc.increaseAmount(ResourceType.WHEAT);\n assertNotEquals(1, getAmounts().getOfType(ResourceType.WHEAT));\n assertEquals(0, getAmounts().getOfType(ResourceType.WOOD));\n dc.increaseAmount(ResourceType.WOOD);\n assertNotEquals(1, getAmounts().getOfType(ResourceType.WOOD));\n }",
"@Test\n public void testCalcMedAmount() {\n \n //Test case 1\n \n System.out.println(\"calcMedAmount Test Case 1 - Dose is correct\");\n \n //Input Values for Test Case 1\n \n double weightInPounds = 100;\n double numberOfPills = 1;\n \n AntidoteControl instance = new AntidoteControl();\n \n double expResult = 227;\n double result = AntidoteControl.calcMedAmount(weightInPounds);\n assertEquals(expResult, result, 0.0);\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n \n \n //Test case 2\n \n System.out.println(\"calcMedAmount Test Case 2 Invalid weight\");\n \n //Input Values for Test Case 2\n \n weightInPounds = 0;\n numberOfPills = 1;\n \n // AntidoteControl instance = new AntidoteControl();\n \n expResult = -1;\n result = AntidoteControl.calcMedAmount(weightInPounds);\n assertEquals(expResult, result, 0.0);\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n \n \n //Test case 3\n \n System.out.println(\"calcMedAmount Test Case 3 Underdose\");\n \n //Input Values for Test Case 3\n \n weightInPounds = 10001;\n numberOfPills = 0;\n \n // AntidoteControl instance = new AntidoteControl();\n \n expResult = -2;\n result = AntidoteControl.calcMedAmount(weightInPounds);\n assertEquals(expResult, result, 0.0);\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n \n \n //Test case 4\n \n System.out.println(\"calcMedAmount Test Case 4 Overdose\");\n \n //Input Values for Test Case 4\n \n weightInPounds = 100;\n numberOfPills = 4;\n \n // AntidoteControl instance = new AntidoteControl();\n \n expResult = 227;\n result = AntidoteControl.calcMedAmount(weightInPounds);\n assertEquals(expResult, result, 0.0);\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }",
"@Test\n\tpublic void id700_2_2() throws Exception {\n\t\tString insuredPersonPaymentProportion = changeCompanyInfo(driver,\"construction\");\n\t\tchangeEmployeeInfo(driver,\"construction\");\n\t\t\n\t\tint id390 = (int)(Math.random()*10000000);\n\t\tint id410 = (int)(Math.random()*10000000);\n\t\tint id430 = (int)(Math.random()*10000000);\n\t\tint id450 = (int)(Math.random()*10000000);\n\t\tint id470 = (int)(Math.random()*10000000);\n\t\tint id490 = (int)(Math.random()*10000000);\n\t\tint id510 = (int)(Math.random()*10000000);\n\t\tint id530 = (int)(Math.random()*10000000);\n\t\tint id550 = (int)(Math.random()*10000000);\n\t\tint id570 = (int)(Math.random()*10000000);\n\t\tint id590 = (int)(Math.random()*10000000);\n\t\tint id610 = (int)(Math.random()*10000000);\n\t\tint id620 = (int)(Math.random()*10000000);\n\t\tint id630 = (int)(Math.random()*10000000);\n\t\tint id640 = (int)(Math.random()*10000000);\n\t\tint sum = id390+id410+id430+id450+id470+id490+id510+id530+id550+id570+id590+id610+id620+id630-id640;\n\t\t\n\t\t//input the value\n\t\tCommon.clear(driver,paymentStatements.baseSalary.xpath);\t\t\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalary.xpath)).sendKeys(String.valueOf(id390));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance.xpath)).sendKeys(String.valueOf(id410));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance2.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance2.xpath)).sendKeys(String.valueOf(id430));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance3.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance3.xpath)).sendKeys(String.valueOf(id450));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance4.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance4.xpath)).sendKeys(String.valueOf(id470));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance5.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance5.xpath)).sendKeys(String.valueOf(id490));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance6.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance6.xpath)).sendKeys(String.valueOf(id510));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance7.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance7.xpath)).sendKeys(String.valueOf(id530));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance8.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance8.xpath)).sendKeys(String.valueOf(id550));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance9.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance9.xpath)).sendKeys(String.valueOf(id570));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance10.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance10.xpath)).sendKeys(String.valueOf(id590));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.baseSalaryAllowance11.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.baseSalaryAllowance11.xpath)).sendKeys(String.valueOf(id610));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.travelAllowance.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.travelAllowance.xpath)).sendKeys(String.valueOf(id620));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.overtimePay.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.overtimePay.xpath)).sendKeys(String.valueOf(id630));\n\t\tThread.sleep(1000);\n\t\tCommon.clear(driver,paymentStatements.nonEmploymentDeduction.xpath);\n\t\tdriver.findElement(By.xpath(paymentStatements.nonEmploymentDeduction.xpath)).sendKeys(String.valueOf(id640));\n\t\tThread.sleep(1000);\n\t\tfor(int a = 0;a<30;a++){\n\t\t\tif(!driver.findElement(By.xpath(paymentStatements.sumPay.xpath)).getText().equals(Common.formatNum(String.valueOf(sum)))){\n\t\t\t\tdriver.findElement(By.xpath(paymentStatements.overFourtyFiveMinute.xpath)).click();\n\t\t\t\tThread.sleep(1000);\n\t\t\t}\n\t\t}\n\t\t//#id700 = (#id390(basic salary)+ T + #id620(commuting allowance)+#id630(overtime work allowance)-#id640)×{the latest ClientUnemploymentBenefit#insuredPersonPaymentProportion that ClientUnemploymentBenefit#useStartMont <= year and month of the selected PayrollMonth#paymentDate} rounded to the nearest whole number according to PayrollCalculationSetting#laborInsuranceCalcRoundingMethod.(*1)\n\t\tint T = id410+id430+id450+id470+id490+id510;\n\t\tint expected = Common.roundHalfDown(String.valueOf((id390+T+id620+id630-id640)),insuredPersonPaymentProportion);\n\t\t//get value\n\t\tString actual = driver.findElement(By.xpath(paymentStatements.employeeInsurance.xpath)).getAttribute(\"value\");\n\t\t//check the data\n\t\tif(Common.formatNum(String.valueOf(expected)).equals(actual)){\n\t\t\tSystem.out.println(\"id700_2_2 Pass\");\n\t\t}else{\n\t\t\tSystem.out.println(\"id700_2_2 Failed\");\n\t\t\tthrow new Exception(\"Error of calculation, expected: <[\"+Common.formatNum(String.valueOf(expected))+\"]> but was: <[\"+actual+\"]> , \" +\n\t\t\t\t\t\"Please refer to input and output values below: \"+\"\\r\\n\"+\n\t\t\t\t\t\"expected = \"+ Common.formatNum(String.valueOf(expected))+\"\\r\\n\"+\n\t\t\t\t\t\"actual = \"+ actual+\"\\r\\n\"+\n\t\t\t\t\t\"id390 =\"+ id390+\"\\r\\n\"+\n\t\t\t\t\t\"id410 =\"+ id410+\"\\r\\n\"+\n\t\t\t\t\t\"id430 =\"+ id430+\"\\r\\n\"+\n\t\t\t\t\t\"id450 =\"+ id450+\"\\r\\n\"+\n\t\t\t\t\t\"id470 =\"+ id470+\"\\r\\n\"+\n\t\t\t\t\t\"id490 =\"+ id490+\"\\r\\n\"+\n\t\t\t\t\t\"id510 =\"+ id510+\"\\r\\n\"+\n\t\t\t\t\t\"id530 =\"+ id530+\"\\r\\n\"+\n\t\t\t\t\t\"id550 =\"+ id550+\"\\r\\n\"+\n\t\t\t\t\t\"id570 =\"+ id570+\"\\r\\n\"+\n\t\t\t\t\t\"id590 =\"+ id590+\"\\r\\n\"+\n\t\t\t\t\t\"id610 =\"+ id610+\"\\r\\n\"+\n\t\t\t\t\t\"id620 =\"+ id620+\"\\r\\n\"+\n\t\t\t\t\t\"id630 =\"+ id630+\"\\r\\n\"+\n\t\t\t\t\t\"id640 =\"+ id640+\"\\r\\n\"+\n\t\t\t\t\t\"insuredPersonPaymentProportion = \"+ insuredPersonPaymentProportion);\n\t\t}\n\t\t//close\n\t\tdriver.findElement(By.xpath(paymentStatements.close.xpath)).click();\n\t\tThread.sleep(2000);\n\t\tdriver.findElement(By.xpath(paymentStatements.cancelPayment.xpath)).click();\n\t\tThread.sleep(2000);\n\t}",
"public FeeCalculation calculateFee(SendRequest req, Coin value, List<TransactionInput> originalInputs,\n boolean needAtLeastReferenceFee, List<TransactionOutput> candidates) throws InsufficientMoneyException {\n FeeCalculation result;\n Coin fee = Coin.ZERO;\n while (true) {\n result = new FeeCalculation();\n UldTransaction tx = new UldTransaction(params);\n addSuppliedInputs(tx, req.tx.getInputs());\n\n Coin valueNeeded = value;\n if (!req.recipientsPayFees) {\n valueNeeded = valueNeeded.add(fee);\n }\n if (req.recipientsPayFees) {\n result.updatedOutputValues = new ArrayList<Coin>();\n }\n for (int i = 0; i < req.tx.getOutputs().size(); i++) {\n TransactionOutput output = new TransactionOutput(params, tx,\n req.tx.getOutputs().get(i).ulordSerialize(), 0);\n if (req.recipientsPayFees) {\n // Subtract fee equally from each selected recipient\n output.setValue(output.getValue().subtract(fee.divide(req.tx.getOutputs().size())));\n // first receiver pays the remainder not divisible by output count\n if (i == 0) {\n output.setValue(\n output.getValue().subtract(fee.divideAndRemainder(req.tx.getOutputs().size())[1])); // Subtract fee equally from each selected recipient\n }\n result.updatedOutputValues.add(output.getValue());\n if (output.getMinNonDustValue().isGreaterThan(output.getValue())) {\n throw new CouldNotAdjustDownwards();\n }\n }\n tx.addOutput(output);\n }\n CoinSelector selector = req.coinSelector == null ? coinSelector : req.coinSelector;\n // selector is allowed to modify candidates list.\n CoinSelection selection = selector.select(valueNeeded, new LinkedList<TransactionOutput>(candidates));\n result.bestCoinSelection = selection;\n // Can we afford this?\n if (selection.valueGathered.compareTo(valueNeeded) < 0) {\n Coin valueMissing = valueNeeded.subtract(selection.valueGathered);\n throw new InsufficientMoneyException(valueMissing);\n }\n Coin change = selection.valueGathered.subtract(valueNeeded);\n if (change.isGreaterThan(Coin.ZERO)) {\n // The value of the inputs is greater than what we want to send. Just like in real life then,\n // we need to take back some coins ... this is called \"change\". Add another output that sends the change\n // back to us. The address comes either from the request or currentChangeAddress() as a default.\n Address changeAddress = req.changeAddress;\n TransactionOutput changeOutput = new TransactionOutput(params, tx, change, changeAddress);\n if (req.recipientsPayFees && changeOutput.isDust()) {\n // We do not move dust-change to fees, because the sender would end up paying more than requested.\n // This would be against the purpose of the all-inclusive feature.\n // So instead we raise the change and deduct from the first recipient.\n Coin missingToNotBeDust = changeOutput.getMinNonDustValue().subtract(changeOutput.getValue());\n changeOutput.setValue(changeOutput.getValue().add(missingToNotBeDust));\n TransactionOutput firstOutput = tx.getOutputs().get(0);\n firstOutput.setValue(firstOutput.getValue().subtract(missingToNotBeDust));\n result.updatedOutputValues.set(0, firstOutput.getValue());\n if (firstOutput.isDust()) {\n throw new CouldNotAdjustDownwards();\n }\n }\n if (changeOutput.isDust()) {\n // Never create dust outputs; if we would, just\n // add the dust to the fee.\n // Oscar comment: This seems like a way to make the condition below \"if\n // (!fee.isLessThan(feeNeeded))\" to become true.\n // This is a non-easy to understand way to do that.\n // Maybe there are other effects I am missing\n fee = fee.add(changeOutput.getValue());\n } else {\n tx.addOutput(changeOutput);\n result.bestChangeOutput = changeOutput;\n }\n }\n\n for (TransactionOutput selectedOutput : selection.gathered) {\n TransactionInput input = tx.addInput(selectedOutput);\n // If the scriptBytes don't default to none, our size calculations will be thrown off.\n checkState(input.getScriptBytes().length == 0);\n }\n\n int size = tx.unsafeUlordSerialize().length;\n size += estimateBytesForSigning(selection);\n\n Coin feePerKb = req.feePerKb;\n if (needAtLeastReferenceFee && feePerKb.compareTo(UldTransaction.REFERENCE_DEFAULT_MIN_TX_FEE) < 0) {\n feePerKb = UldTransaction.REFERENCE_DEFAULT_MIN_TX_FEE;\n }\n Coin feeNeeded = feePerKb.multiply(size).divide(1000);\n\n if (!fee.isLessThan(feeNeeded)) {\n // Done, enough fee included.\n break;\n }\n\n // Include more fee and try again.\n fee = feeNeeded;\n }\n return result;\n\n }",
"BigDecimal calculateDailyOutcome(List<Instruction> instructions);",
"@Test\r\n public void testNumberOfGetAmountMethodCalled() {\r\n // recipe that is being used\r\n recipes[0] = mock(Recipe.class);\r\n // another recipe that is not being used\r\n recipes[1] = mock(Recipe.class);\r\n when(recipeBook.getRecipes()).thenReturn(recipes);\r\n // make coffee with recipe 1\r\n coffeeMaker2.makeCoffee(0, 50);\r\n\r\n // the recipe that being used\r\n verify(recipes[0], atLeastOnce()).getAmtChocolate();\r\n verify(recipes[0], atLeastOnce()).getAmtCoffee();\r\n verify(recipes[0], atLeastOnce()).getAmtMilk();\r\n verify(recipes[0], atLeastOnce()).getAmtSugar();\r\n verify(recipes[0], atLeastOnce()).getPrice();\r\n\r\n // the recipe1 will never be called\r\n verify(recipes[1], never()).getAmtChocolate();\r\n verify(recipes[1], never()).getAmtCoffee();\r\n verify(recipes[1], never()).getAmtMilk();\r\n verify(recipes[1], never()).getAmtSugar();\r\n verify(recipes[1], never()).getPrice();\r\n\r\n }",
"@Then(\"^I should be able to see the Total Amount$\")\n\tpublic void i_should_be_able_to_see_the_Total_Amount() throws Throwable {\n\t bc = pgm.getBookConPage();\n\t\tbc.checkTotal();\n\t}",
"@Override\n public BigDecimal calculate(List<String> skuIds) {\n Collection<PricingRule> items = pricingRulesReader.fetchPricingRules();\n Map<String, PricingRule> pricingRuleMap = items.stream().collect(Collectors.toMap(PricingRule::getSkuId, Function.identity()));\n\n // Step 2: Map of SKUID and number of items for the SKUID\n Map<String, Long> itemsSkuAndQuantity = skuIds.stream().collect(Collectors.groupingBy(Function.identity(), Collectors.counting()));\n\n // Step 3: Calculate total price of items based on pricing rule and the number of items in the list\n return itemsSkuAndQuantity.entrySet().stream().reduce(BigDecimal.ZERO, (currentSum, entry) ->\n currentSum.add(pricingRuleMap.get(entry.getKey()).calculatePriceFor(entry.getValue())), BigDecimal::add);\n }",
"private void calcCoins() {\n\t\tint changeDueRemaining = (int) Math.round((this.changeDue - (int) this.changeDue) * 100);\n\n\t\tif (changeDueRemaining >= 25) {\n\t\t\tthis.quarter += changeDueRemaining / 25;\n\t\t\tchangeDueRemaining = changeDueRemaining % 25;\n\t\t}\n\t\tif (changeDueRemaining >= 10) {\n\t\t\tthis.dime += changeDueRemaining / 10;\n\t\t\tchangeDueRemaining = changeDueRemaining % 10;\n\t\t}\n\t\tif (changeDueRemaining >= 5) {\n\t\t\tthis.nickel += changeDueRemaining / 5;\n\t\t\tchangeDueRemaining = changeDueRemaining % 5;\n\t\t}\n\t\tif (changeDueRemaining >= 1) {\n\t\t\tthis.penny += changeDueRemaining / 1;\n\t\t}\n\t}",
"private int calculateTotal(boolean oneAnswer, boolean twoAnswer, boolean threeAnswer, boolean fourAnswer, String fiveAnswer, boolean sixAnswer) {\n int calculateTotal = 0;\n\n if (oneAnswer) {\n calculateTotal = calculateTotal + 1;\n }\n if (twoAnswer) {\n calculateTotal = calculateTotal + 1;\n }\n if (threeAnswer) {\n calculateTotal = calculateTotal + 1;\n }\n if (fourAnswer) {\n calculateTotal = calculateTotal + 1;\n }\n if (fiveAnswer.equalsIgnoreCase(\"Decatur Staleys\")) {\n calculateTotal = calculateTotal + 1;\n }\n if (sixAnswer) {\n calculateTotal = calculateTotal + 1;\n }\n\n return calculateTotal;\n }",
"public void calculerSatisfaction(AgentState etat) {\n\n int nb = this.getConstraints().size();\n if (GeographicAgentGeneralisation.logger.isDebugEnabled()) {\n GeographicAgentGeneralisation.logger\n .debug(\"calcul de satisfaction de l'agent \" + this\n + \" (nb contraintes=\" + nb + \")\");\n }\n\n // si l'agent n'a pas de contrainte ou qu'il est supprime, il est\n // parfaitement satisfait\n if (nb == 0 || this instanceof GeographicObjectAgent\n && ((GeographicObjectAgentGeneralisation) this).isDeleted()) {\n if (GeographicAgentGeneralisation.logger.isDebugEnabled()) {\n GeographicAgentGeneralisation.logger.debug(\" S=100\");\n }\n\n this.setSatisfaction(100.0);\n etat.setSatisfaction(100);\n\n // stocke les valeurs de satisfaction des contraintes\n for (Constraint cont : this.getConstraints()) {\n etat.getValeursMesures().put(cont.getClass().getSimpleName(),\n new Double(100));\n }\n return;\n }\n\n // calcul de la moyenne des satisfactions des contrainte ponderee par leur\n // importance\n double sommeSatisfactions = 0.0;\n double sommeImportances = 0.0;\n for (Constraint cont : this.getConstraints()) {\n // calcul de satisfaction de la contrainte\n GeographicConstraint cont_ = (GeographicConstraint) cont;\n cont_.computeSatisfaction();\n\n // stocke la valeur de satisfaction\n etat.getValeursMesures().put(cont.getClass().getSimpleName(),\n new Double(cont_.getSatisfaction()));\n\n sommeSatisfactions += cont_.getImportance() * cont_.getSatisfaction();\n sommeImportances += cont_.getImportance();\n\n if (GeographicAgentGeneralisation.logger.isTraceEnabled()) {\n GeographicAgentGeneralisation.logger\n .trace(\" Cont: \" + cont_.getClass().getSimpleName() + \" imp=\"\n + cont_.getImportance() + \" s=\" + cont_.getSatisfaction());\n }\n }\n if (sommeImportances == 0) {\n this.setSatisfaction(100.0);\n } else {\n this.setSatisfaction(sommeSatisfactions / sommeImportances);\n }\n etat.setSatisfaction(this.getSatisfaction());\n if (GeographicAgentGeneralisation.logger.isDebugEnabled()) {\n GeographicAgentGeneralisation.logger\n .debug(\" S=\" + this.getSatisfaction());\n }\n }",
"@Override\n public int getRequirementTotal() {\n return mutants.length;\n }",
"public static void main(String[] args) throws IOException {\n\n int N = readInt(), M = readInt(), D = readInt(), day = 0;\n\n requiredFor = new int [N+1];\n itemsNeeded = new int [N+1];\n\n for (int i = 0; i<M; i++) {\n int target = readInt(), req = readInt();\n itemsNeeded[target] = req;\n\n for (int j = 0; j<req; j++) {\n int item = readInt();\n requiredFor[item] = target;\n }\n\n }\n\n while (itemsNeeded[1]>0 && day<D) {\n int item = readInt();\n itemsNeeded[item] = 0;\n\n if (requiredFor[item]!=0) {\n check(item);\n }\n\n day++;\n\n }\n\n if (itemsNeeded[1]>0) {\n System.out.println(-1);\n } else {\n System.out.println(day);\n }\n\n }",
"@Test\n\tpublic void testSum() {\n\t\tassertEquals(155, g1.sum(), .0001);\n\t\tassertEquals(226, g2.sum(), .0001);\n\t\tassertEquals(298, g3.sum(), .0001);\n\t}"
] | [
"0.58624804",
"0.5478685",
"0.5403867",
"0.53693056",
"0.53231305",
"0.52808404",
"0.52635187",
"0.5246829",
"0.51624393",
"0.5151227",
"0.514408",
"0.5142919",
"0.5105123",
"0.5078108",
"0.50647557",
"0.50637877",
"0.50635415",
"0.50593215",
"0.50501883",
"0.5043619",
"0.5034644",
"0.50337815",
"0.5020769",
"0.5014126",
"0.50122684",
"0.50079036",
"0.50033975",
"0.50009924",
"0.4992702",
"0.4987961",
"0.49810663",
"0.49683094",
"0.49658415",
"0.4954263",
"0.494633",
"0.493876",
"0.49385855",
"0.4935138",
"0.4934653",
"0.49322027",
"0.49313167",
"0.49283746",
"0.49194437",
"0.49182582",
"0.49178994",
"0.49124888",
"0.4905395",
"0.49039912",
"0.49023134",
"0.49010867",
"0.48989835",
"0.48941705",
"0.48907396",
"0.48609692",
"0.4854435",
"0.48495075",
"0.4846528",
"0.48390934",
"0.48322624",
"0.48314404",
"0.48299217",
"0.48239434",
"0.48206228",
"0.4820121",
"0.48170036",
"0.48170036",
"0.48147705",
"0.48089764",
"0.48075145",
"0.4804722",
"0.4803574",
"0.48019645",
"0.48006886",
"0.47925672",
"0.47896168",
"0.4789535",
"0.47836953",
"0.47814667",
"0.47811332",
"0.4780843",
"0.47755107",
"0.47747812",
"0.47720233",
"0.47716844",
"0.4767342",
"0.47650138",
"0.47567552",
"0.47533262",
"0.47529706",
"0.47513932",
"0.47512925",
"0.47425798",
"0.4741981",
"0.47408095",
"0.47401702",
"0.47371587",
"0.47336298",
"0.47309625",
"0.47264606",
"0.47256124"
] | 0.55553305 | 1 |
Gets an Entitymanager from the static EntityManagerFactory. This method can be used of any extending class. | protected EntityManager getEntityManager() {
return emf.createEntityManager();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected abstract EntityManagerFactory getEntityManagerFactory();",
"static EntityManager getEntityManager(){\n return ENTITY_MANAGER_FACTORY.createEntityManager();\n }",
"public static EntityManager getEntityManager() {\n EntityManager em = tl.get();\n return em;\n }",
"public EntityManager getEntityManager() {\n return getFactory().createEntityManager();\n }",
"public final static EntityManager getEntityManager() {\r\n\t\treturn entityManager;\r\n\t}",
"protected abstract EntityManager getEntityManager();",
"@Override\n\tpublic EntityManagerFactory getEntityManagerFactory() {\n\t\treturn null;\n\t}",
"public static EntityManagerFactory getEntityManagerFactory()\n\t\t\tthrows PersistenceException, UnsupportedUserAttributeException, NamingException {\n\t\tif (emf == null)\n\t\t\temf = createNewEntityManagerFactory();\n\t\treturn emf;\n\t}",
"public EntityManagerFactory newEMFactory() {\n emFactory = Persistence.createEntityManagerFactory(\"Exercici1-JPA\");\n return emFactory;\n }",
"public static final EntityManager getDefaultEntityManager() {\n\t\tEntityManagerFactory entityManagerFactory = Persistence.createEntityManagerFactory(ConfigurationReader.getDatabasePersistenceUnitName());\n\t\treturn entityManagerFactory.createEntityManager();\n\t}",
"protected EntityManager getEntityManager() {\n return em;\n }",
"@Bean\n @Scope(SCOPE_PROTOTYPE)\n EntityManager entityManagerProvider(EntityManagerFactory emf) {\n EntityManagerHolder holder = (EntityManagerHolder) getResource(emf);\n if (holder == null) {\n return emf.createEntityManager();\n }\n return holder.getEntityManager();\n }",
"public EntityManager getEntityManager() {\r\n return entityManager;\r\n }",
"public EntityManager getEntityManager() {\r\n\t\treturn entityManager;\r\n\t}",
"public EntityManager getEntityManager() {\r\n\t\treturn entityManager;\r\n\t}",
"public EntityManager getEntityManager() {\r\n\t\treturn entityManager;\r\n\t}",
"public EntityManager getEntityManager() {\n\t\treturn entityManager;\n\t}",
"public EntityManager getEntityManager() {\n\t\treturn entityManager;\n\t}",
"public EntityManager getEntityManager() {\n\t\treturn entityManager;\n\t}",
"public EntityManager getEntityManager() {\n\t\treturn entityManager;\n\t}",
"public static EntityManagerFactory getConnection() {\r\n return emf;\r\n }",
"@Override\n public EntityManager getEntityManager() {\n return entityManager;\n }",
"protected EntityManager getEntityManager() {\n return this.entityManager;\n }",
"public PersistenceManagerFactory getPersistenceManagerFactory() {\n return pmf;\n }",
"abstract E getEntityManager();",
"@Override\n\tpublic EntityManager getEntityManager() {\n\t return em;\n\t}",
"EntityManager createEntityManager();",
"@Override\n\tprotected EntityManager getEntityManager() {\n\t\treturn entityManager;\n\t}",
"@Override\r\n\tpublic EntityManager getEntityManger() {\n\t\treturn em;\r\n\t}",
"@Override\n\tprotected EntityManager getEntityManager() {\n\t\treturn em;\n\t}",
"@Override\n\tprotected EntityManager getEntityManager() {\n\t\treturn em;\n\t}",
"@Override\n protected EntityManager getEntityManager() {\n return em;\n }",
"public EntityManager getEntityManager() {\n\t\treturn this.entityManager;\n\t}",
"public interface IEntityManagerFactory {\r\n\r\n\t/**\r\n\t * Called when entity manager factory will help to create DAO objects.\r\n\t * \r\n\t * @return\r\n\t */\r\n\tEntityManager createEntityManager();\r\n}",
"private EntityManager getEM() {\n\t\tif (emf == null || !emf.isOpen())\n\t\t\temf = Persistence.createEntityManagerFactory(PUnit);\n\t\tEntityManager em = threadLocal.get();\n\t\tif (em == null || !em.isOpen()) {\n\t\t\tem = emf.createEntityManager();\n\t\t\tthreadLocal.set(em);\n\t\t}\n\t\treturn em;\n\t}",
"public static EntityAttributeManager instance() {\r\n\t\tif (instance == null) {\r\n\t\t\tinstance = new EntityAttributeManager();\r\n\t\t}\r\n\t\treturn instance;\r\n\t}",
"public EntityManager getEntityManager() {\n return this.em;\n }",
"private PersistenceManager getPersistenceManager() {\n if(pmf==null) {\n getFacetHolder().getServiceInjector().injectServicesInto(this);\n }\n return pmf.getPersistenceManagerFactory().getPersistenceManager();\n }",
"@Override\n\tprotected EntityManager getEntityManager() {\n\t return em;\n\t}",
"@SuppressWarnings(\"unchecked\")\n\tprivate static XmlEntityObjectFactory getFactory() {\n\t\tif (factory == null) {\n\t\t\tfactory = new XmlEntityObjectFactory();\n\t\t\ttry {\n\t\t\t\tClass<IXmlEntityResolverLoader> loaderClass = (Class<IXmlEntityResolverLoader>) Class\n\t\t\t\t\t\t.forName(defaulEntityResolverLoaderClassName);\n\t\t\t\tIXmlEntityResolverLoader loader;\n\t\t\t\tloader = loaderClass.newInstance();\n\t\t\t\tloader.loadTo(factory);\n\t\t\t} catch (Exception ex) {\n\t\t\t\tthrow new UnexpectedRuntimeException(ex);\n\t\t\t}\n\t\t}\n\t\treturn factory;\n\t}",
"@Bean(name = \"masterEntityManager\")\n\tpublic LocalContainerEntityManagerFactoryBean entityManagerFactory() {\n\t\tJpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter();\n\t\tLocalContainerEntityManagerFactoryBean em = new LocalContainerEntityManagerFactoryBean();\n\t\tem.setDataSource(dataSource());\n\t\tem.setPackagesToScan(\"model\");\n\t\tem.setJpaVendorAdapter(vendorAdapter);\n\t\tem.setJpaProperties(new Properties());\n\t\tem.setPersistenceUnitName(\"master\");\n\t\treturn em;\n\t}",
"ManagerFactory getManagerFactory();",
"EMInitializer() {\r\n try {\r\n emf = Persistence.createEntityManagerFactory(\"pl.polsl_MatchStatist\"\r\n + \"icsWeb_war_4.0-SNAPSHOTPU\");\r\n em = emf.createEntityManager();\r\n } catch (Exception e) {\r\n em = null;\r\n emf = null;\r\n }\r\n\r\n }",
"public EmployeeManager getEmployeeManager() {\n\t\tif (employeeManager == null) {\n\t\t\tIEmployeeDAO emplDAO = new EmployeeDAOSqlite(dbHelper);\n\t\t\temployeeManager = new EmployeeManager(emplDAO);\n\t\t\temployeeManager.setManagerHolder(this);\n\t\t}\n\t\treturn employeeManager;\n\t}",
"@Bean\n @DependsOn(\"flyway\")\n public LocalContainerEntityManagerFactoryBean entityManagerFactory() {\n LocalContainerEntityManagerFactoryBean entityManagerFactoryBean = new LocalContainerEntityManagerFactoryBean();\n entityManagerFactoryBean.setDataSource(dataSource());\n entityManagerFactoryBean.setPackagesToScan(env.getRequiredProperty(ENTITY_PACKAGES_TO_SCAN));\n\n JpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter();\n entityManagerFactoryBean.setJpaVendorAdapter(vendorAdapter);\n entityManagerFactoryBean.setJpaProperties(hibernateProperties());\n\n return entityManagerFactoryBean;\n }",
"Manager getManager() {\n return Manager.getInstance();\n }",
"Manager getManager() {\n return Manager.getInstance();\n }",
"Manager getManager() {\n return Manager.getInstance();\n }",
"private static PersistenceManager getPersistenceManager() {\n\t\treturn PMF.get().getPersistenceManager();\n\t}",
"public static DatabaseManager getDatabaseManager() {\r\n return dbManager;\r\n }",
"@Bean\n\tpublic LocalContainerEntityManagerFactoryBean entityManagerFactory() {\n\t\tLocalContainerEntityManagerFactoryBean entityManagerFactory = new LocalContainerEntityManagerFactoryBean();\n\t\tentityManagerFactory.setDataSource(dataSource);\n\t\tentityManagerFactory.setJpaDialect(hibernateJpaDialect());\n\t\tentityManagerFactory.setJpaVendorAdapter(hibernateJpaVendorAdapter());\n\t\tentityManagerFactory.setJpaProperties(getJpaProperties());\n\t\tentityManagerFactory.setPackagesToScan(\"com.bouacheria.ami.domain\");\n\t\treturn entityManagerFactory;\n\t}",
"@Bean\n EntityManagerFactory entityManagerFactoryProvider() {\n \tEntityManagerFactory emf = Persistence.createEntityManagerFactory(DATA_SOURCE_NAME);\n return emf;\n }",
"public static RestaurantManager getManagerInstance () {\n if (managerInstance == null) {\n managerInstance = new RestaurantManager();\n }\n return managerInstance;\n }",
"public EntityManager getEM() {\n\t\treturn this.entity;\n\t}",
"@Override\n\tprotected EntityManager getEntityManager() {\n\t\treturn null;\n\t}",
"@Bean\n\tpublic LocalContainerEntityManagerFactoryBean entityManagerFactory() {\n\t\tProperties jpaProperties = new Properties();\n\t\tjpaProperties.put(org.hibernate.cfg.AvailableSettings.HBM2DDL_AUTO, this.env.getProperty(\"hibernate.hbm2ddl.auto\"));\n\t\tjpaProperties.put(org.hibernate.cfg.AvailableSettings.CACHE_REGION_FACTORY, SingletonEhCacheRegionFactory.class.getCanonicalName());\n\t\tjpaProperties.put(\"hibernate.cache.use_structured_entries\", Boolean.TRUE);\n\t\tjpaProperties.put(\"hibernate.cache.use_second_level_cache\", Boolean.TRUE);\n\n\t\tHibernateJpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter();\n\t\tvendorAdapter.setGenerateDdl(Boolean.valueOf(this.env.getProperty(\"hibernate.ddl_create\")).booleanValue());\n\t\tvendorAdapter.setShowSql(Boolean.valueOf(this.env.getProperty(\"hibernate.show_sql\")).booleanValue());\n\t\tvendorAdapter.getJpaPropertyMap().put(\"databasePlatform\", this.env.getProperty(\"hibernate.dialect\"));\n\n\t\tLocalContainerEntityManagerFactoryBean factory = new LocalContainerEntityManagerFactoryBean();\n\t\tfactory.setDataSource(this.dataSource());\n\t\tfactory.setJpaVendorAdapter(vendorAdapter);\n\t\tfactory.setPackagesToScan(PersistenceConfiguration.ENTITIES_PACKAGE);\n\t\tfactory.setJpaProperties(jpaProperties);\n\t\tfactory.afterPropertiesSet();\n\t\tfactory.setLoadTimeWeaver(new InstrumentationLoadTimeWeaver());\n\t\tfactory.setPersistenceProvider(new HibernatePersistenceProvider());\n\n\t\treturn factory;\n\t}",
"public static ReferenceLoginManager getInstance() {\n if (instance == null) {\n throw new RuntimeException(\"Persistence not configured yet!\");\n } else return instance;\n }",
"public interface EntityManagerCreator {\n EntityManager createEntityManager();\n}",
"public static DataManager getInstance()\n\t{\n\t\tDataManager pManager = null;\n\t\tObject pObject = UiStorage.getEntity(DataManager.class);\n\t\tif ( null == pObject )\n\t\t{\n\t\t\tpManager = new DataManager();\n\t\t\tUiStorage.setEntity(pManager);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tpManager = (DataManager)pObject;\n\t\t}\n\t\t\n\t\treturn pManager;\n\t}",
"@Bean\n\tpublic LocalContainerEntityManagerFactoryBean entityManagerFactory() {\n\t\tLocalContainerEntityManagerFactoryBean entityManagerFactory = new LocalContainerEntityManagerFactoryBean();\n\t\tentityManagerFactory.setDataSource(dataSource());\n\t\t// Classpath scanning of @Component, @Service, etc annotated class\n\t\tentityManagerFactory.setPackagesToScan(\"com.jpa\");\n\t\t// Vendor adapter\n\t\tHibernateJpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter();\n\t\tentityManagerFactory.setJpaVendorAdapter(vendorAdapter);\n\t\t// Hibernate properties\n\t\tProperties additionalProperties = new Properties();\n\t\tadditionalProperties.put(\"hibernate.show_sql\", \"true\");\n\t\tadditionalProperties.put(\"hibernate.hbm2ddl.auto\", \"none\");\n\t\tadditionalProperties.put(\"hibernate.jdbc.batch_size\", \"10\");\n\t\tadditionalProperties.put(\"hibernate.order_inserts\", \"true\");\n\t\tadditionalProperties.put(\"hibernate.order_updates\", \"true\");\n\t\tadditionalProperties.put(\"hibernate.jdbc.batch_versioned_data\", \"true\");\n\t\tentityManagerFactory.setJpaProperties(additionalProperties);\n\t\treturn entityManagerFactory;\n\t}",
"@Override\n public GenericManager<Societe, Long> getManager() {\n return manager;\n }",
"private static void init() {\n\t\tif (factory == null) {\n\t\t\tfactory = Persistence.createEntityManagerFactory(\"hibernatePersistenceUnit\");\n\t\t}\n\t\tif (em == null) {\n\t\t\tem = factory.createEntityManager();\n\t\t}\n\t}",
"public EntityManager getEm() {\n\t\treturn em;\n\t}",
"protected FullTextEntityManager getFullTextEntityManager() {\n\t if (ftem == null) {\n\t ftem = Search.getFullTextEntityManager(getEntityManager());\n\t try {\n\t\t\t\t/* Como o banco de dados é resetado a cada vez que\n\t\t\t\t * a aplicação inicializa (banco em memória), é preciso reconstruir\n\t\t\t\t * os índices de busca utilizados pelo hibernate-search.*/\n\t\t\t\tftem.createIndexer().startAndWait();\n\t\t\t} catch (InterruptedException e) {//TODO: tratar exceção\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t }\n\t return ftem;\n\t}",
"public static EventManager getEventManager(){\r\n\t\treturn manager;\r\n\t}",
"public ServiceManager getServiceManager( UUID applicationId ) {\n if ( emf == null ) {\n logger.error(\"EntityManagerFactory is null\");\n }\n if ( qmf == null ) {\n logger.error(\"QueueManagerFactory is null\");\n }\n\n EntityManager em = null;\n if ( emf != null ) {\n em = emf.getEntityManager( applicationId );\n }\n QueueManager qm = null;\n if ( qmf != null ) {\n qm = qmf.getQueueManager( applicationId );\n }\n ServiceManager sm = new ServiceManager();\n sm.init( this, em, properties, qm );\n return sm;\n }",
"@Bean\n public LocalContainerEntityManagerFactoryBean entityManagerFactory() throws NamingException {\n LocalContainerEntityManagerFactoryBean factoryBean = new LocalContainerEntityManagerFactoryBean();\n factoryBean.setDataSource(dataSource());\n factoryBean.setPackagesToScan(new String[]{\"com.group.project.entities\"});\n factoryBean.setJpaVendorAdapter(jpaVendorAdapter());\n factoryBean.setJpaProperties(jpaProperties());\n return factoryBean;\n }",
"public static DBManager getInstance() {\n return DB_MANAGER;\n }",
"public void setEntityManagerFactory(EntityManagerFactory entityManagerFactory) {\r\n\t\tLOG.info(DOLLAR + INSIDE_METHOD + DOLLAR);\r\n\t\tthis.entityManagerFactory = entityManagerFactory;\r\n\t\tLOG.info(DOLLAR + OUTSIDE_METHOD + DOLLAR);\r\n\t}",
"public static EntityFactory init() {\n\t\ttry {\n\t\t\tEntityFactory theEntityFactory = (EntityFactory)EPackage.Registry.INSTANCE.getEFactory(EntityPackage.eNS_URI);\n\t\t\tif (theEntityFactory != null) {\n\t\t\t\treturn theEntityFactory;\n\t\t\t}\n\t\t}\n\t\tcatch (Exception exception) {\n\t\t\tEcorePlugin.INSTANCE.log(exception);\n\t\t}\n\t\treturn new EntityFactoryImpl();\n\t}",
"private static AdapterManager getAdapterManager() {\r\n return getPersistenceSession().getAdapterManager();\r\n }",
"public VehicleManager getVehicleManager() {\n\t\tif (vehicleManager == null) {\n\t\t\tIVehicleDAO vehicleDAO = new VehicleDAOSqlite(dbHelper);\n\t\t\tvehicleManager = new VehicleManager(vehicleDAO);\n\t\t\tvehicleManager.setManagerHolder(this);\n\t\t}\n\t\treturn vehicleManager;\n\t}",
"public ContentManager getManager() {\r\n\t\treturn manager;\r\n\t}",
"public final T getManager() {\n return this.manager;\n }",
"public static FBLoginManager getInstance() {\n if (instance == null) {\n synchronized (FBLoginManager.class) {\n if (instance == null) {\n instance = new FBLoginManager();\n }\n }\n }\n\n return instance;\n }",
"public Manager getManager() {\n return this.manager;\n }",
"@Override\n public AppEntity getByManagerId(int managerId) {\n return (AppEntity) appDao.getByManagerId(managerId);\n }",
"@Bean\r\n public LocalContainerEntityManagerFactoryBean entityManagerFactory() {\r\n String message = messageSource.getMessage(\"begin\", null, \"locale not found\", Locale.getDefault())\r\n + \" \" + messageSource.getMessage(\"config.data.entity\", null, \"locale not found\", Locale.getDefault());\r\n logger.info(message);\r\n LocalContainerEntityManagerFactoryBean entityManagerFactoryBean = new LocalContainerEntityManagerFactoryBean();\r\n entityManagerFactoryBean.setDataSource(dataSource());\r\n entityManagerFactoryBean.setPersistenceProviderClass(HibernatePersistenceProvider.class);\r\n entityManagerFactoryBean.setPackagesToScan(propEntityManagerPackagesToScan);\r\n entityManagerFactoryBean.setJpaProperties(getHibernateProperties());\r\n message = messageSource.getMessage(\"end\", null, \"locale not found\", Locale.getDefault())\r\n + \" \" + messageSource.getMessage(\"config.data.entity\", null, \"locale not found\", Locale.getDefault());\r\n logger.info(message);\r\n return entityManagerFactoryBean;\r\n }",
"public UserManager getUserManager() {\n return userManager;\n }",
"public static DbManager getInstance() {\n \t\treturn INSTANCE;\n \t}",
"public static synchronized DatabaseManager getInstance() {\n\n if (instance == null) {\n System.err.println(\"DatabaseManager is not initialized. \" +\n \"Call DatabaseManager.initializeInstance(...) first.\");\n }\n\n return instance;\n }",
"public static DatabaseManager getInstance(Context context) {\n if (databaseManager == null) {\n databaseManager = new DatabaseManager(context);\n }\n\n return databaseManager;\n }",
"public EventManager getEventManager() {\n return eventManager;\n }",
"public DBManager getDBManager() {\n\t\treturn dbManager;\n\t}",
"TransactionalRepositoryManager getTransactionalRepositoryManager() throws DaoException;",
"public static Manager getInstance() {\n if (instance == null) {\n instance = new Manager();\n }\n return instance;\n }",
"@Bean(name = \"serviceEntityManagerFactory\")\n public LocalContainerEntityManagerFactoryBean serviceEntityManagerFactory() {\n final LocalContainerEntityManagerFactoryBean bean = new LocalContainerEntityManagerFactoryBean();\n\n bean.setJpaVendorAdapter(jpaServiceVendorAdapter());\n bean.setPersistenceUnitName(\"jpaServiceRegistryContext\");\n bean.setPackagesToScan(jpaServicePackagesToScan());\n bean.setDataSource(dataSourceService());\n\n final Properties properties = new Properties();\n properties.put(\"hibernate.dialect\", this.hibernateDialect);\n properties.put(\"hibernate.hbm2ddl.auto\", this.hibernateHbm2DdlAuto);\n properties.put(\"hibernate.jdbc.batch_size\", this.hibernateBatchSize);\n bean.setJpaProperties(properties);\n return bean;\n }",
"public LoginManager getLoginManager() {\n AppMethodBeat.m2504i(92680);\n if (this.loginManager == null) {\n this.loginManager = LoginManager.getInstance();\n }\n LoginManager loginManager = this.loginManager;\n AppMethodBeat.m2505o(92680);\n return loginManager;\n }",
"public static UserManager getUserManager() {\n return getSecuritySupport().getUserManager();\n }",
"public static DepartmentManager getInstance() {\n if (instance == null) {\n instance = new DepartmentManager();\n }\n return instance;\n }",
"public static DBManager getInstance() {\n if (instance == null) {\n try {\n instance = new DBManager();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n return instance;\n }",
"public RouteManager getRouteManager() {\n\t\tif (routeManager == null) {\n\t\t\tIRouteDAO routeDAO = new RouteDAOSqlite(dbHelper);\n\t\t\trouteManager = new RouteManager(routeDAO);\n\t\t\trouteManager.setManagerHolder(this);\n\t\t}\n\t\treturn routeManager;\n\t}",
"public EventManager getEventManager() {\r\n return eventManager;\r\n }",
"private static EntityManagerFactory createNewEntityManagerFactory()\n\t\t\tthrows NamingException, PersistenceException, UnsupportedUserAttributeException {\n\n\t\tInitialContext ctx = new InitialContext();\n\t\tDataSource ds = (DataSource) ctx.lookup(DATA_SOURCE_NAME);\n\n\t\tMap<String, Object> properties = new HashMap<String, Object>();\n\t\tproperties.put(PersistenceUnitProperties.NON_JTA_DATASOURCE, ds);\n\n\t\t// As replication will change the underlying database without\n\t\t// notifying the hub the JPA cache needs to be disabled.\n\t\t// Else the hub might provide outdated data\n\t\tproperties.put(PersistenceUnitProperties.CACHE_SHARED_DEFAULT, \"false\");\n\n\t\treturn Persistence.createEntityManagerFactory(PERSISTENCE_UNIT_NAME, properties);\n\t}",
"@BeforeClass\n public static void initTestFixture() throws Exception {\n entityManagerFactory = Persistence.createEntityManagerFactory(\"test\");\n entityManager = entityManagerFactory.createEntityManager();\n }",
"@Bean\n public LocalContainerEntityManagerFactoryBean managerFactory() {\n HibernateJpaVendorAdapter adapter = new HibernateJpaVendorAdapter();\n adapter.setGenerateDdl(false);\n\n Properties jpaProps = new Properties();\n jpaProps.put(\"hibernate.dialect\",\"org.hibernate.dialect.H2Dialect\");\n\n LocalContainerEntityManagerFactoryBean factory = new LocalContainerEntityManagerFactoryBean();\n factory.setJpaVendorAdapter(adapter);\n factory.setPackagesToScan(\"com.webmvc.mywebmvc\");\n factory.setDataSource(dataSource);\n factory.setJpaProperties(jpaProps);\n\n\n return factory;\n }",
"public ObjectManager getObjectManager() {\n\treturn this.objectManager;\n }",
"public static ContactManager Instance() {\n if (instance == null) {\n instance = new ContactManager();\n }\n return instance;\n }",
"public final PersistenceManager getPersistenceManager (){\n//\t\tSystem.out.println (\"returning persistent manager for properties \"+\tthis._dataStoreEnvironment.getDataStoreProperties ());\n\t\treturn this.pm;\n\t}",
"public static synchronized LocaleManager getInstance() {\n\t\t\n\t\tif(manager == null) {\n\t\t\tmanager = new LocaleManager();\n\t\t}\n\t\t\n\t\treturn manager;\n\t}"
] | [
"0.7722735",
"0.76791066",
"0.73589563",
"0.7262315",
"0.72398543",
"0.686924",
"0.6853994",
"0.6793875",
"0.66574365",
"0.66499436",
"0.6617053",
"0.65841043",
"0.6557139",
"0.65417683",
"0.65417683",
"0.65417683",
"0.65335286",
"0.65335286",
"0.65335286",
"0.65335286",
"0.6476116",
"0.64713335",
"0.6460612",
"0.64569896",
"0.64019966",
"0.64004207",
"0.6370632",
"0.63508517",
"0.63288075",
"0.63032156",
"0.63032156",
"0.62946737",
"0.62928957",
"0.62718785",
"0.626122",
"0.62515616",
"0.6247054",
"0.6224749",
"0.6194134",
"0.61025494",
"0.60996807",
"0.60676676",
"0.6030902",
"0.59918374",
"0.5942796",
"0.59251696",
"0.59251696",
"0.59251696",
"0.59194267",
"0.58718264",
"0.5832705",
"0.58189344",
"0.58036965",
"0.57887787",
"0.5770935",
"0.5732725",
"0.570798",
"0.56917566",
"0.56825763",
"0.567473",
"0.56727964",
"0.56595695",
"0.5653637",
"0.565148",
"0.5647889",
"0.5633147",
"0.5563745",
"0.55464196",
"0.5513748",
"0.5473857",
"0.5460451",
"0.5440275",
"0.54262173",
"0.5414779",
"0.54105747",
"0.5408903",
"0.53924257",
"0.5389882",
"0.53645694",
"0.5360326",
"0.5358036",
"0.53561914",
"0.5354492",
"0.53543425",
"0.53531706",
"0.5326207",
"0.5322986",
"0.5319021",
"0.5317095",
"0.5304499",
"0.5300342",
"0.52968967",
"0.5288418",
"0.5267239",
"0.52647144",
"0.5250863",
"0.524752",
"0.52271473",
"0.5213451",
"0.52111506"
] | 0.72447234 | 4 |
Creates a given entity in the database | protected Object create(Object object) {
EntityManager em = getEntityManager();
em.getTransaction().begin();
try {
em.persist(object);
em.getTransaction().commit();
LOG.debug("Persisted " + object);
} catch (Exception e) {
LOG.error("Could not persist Object", e);
em.getTransaction().rollback();
} finally {
em.close();
}
return object;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"E create(E entity);",
"E create(E entity);",
"Entity createEntity();",
"void create(E entity);",
"void create(T entity);",
"@Override\n public void create(T entity) throws SQLException {\n\n this.dao.create(entity);\n\n }",
"void create(T entity) throws Exception;",
"public T create(T entity) {\n\t \tgetEntityManager().getTransaction().begin();\n\t getEntityManager().persist(entity);\n\t getEntityManager().getTransaction().commit();\n\t getEntityManager().close();\n\t return entity;\n\t }",
"void create(Student entity);",
"ID create(T entity);",
"public abstract boolean create(T entity) throws SQLException;",
"T createEntity();",
"@Override\n\t@Transactional\n\tpublic T create(T entity) {\n\t\tif (entity == null) {\n\t\t\treturn null;\n\t\t}\n\t\thibernateTemplate.save(entity);\n\t\treturn entity;\n\t}",
"Entity save(Entity entity);",
"public abstract boolean create(T entity) throws ServiceException;",
"protected Object create(Object entity, Class clazz) {\r\n\r\n try {\r\n EntityTransaction transaction = entityManager.getTransaction();\r\n transaction.begin();\r\n entityManager.persist(entity);\r\n transaction.commit();\r\n return entity;\r\n } catch (Exception e) {\r\n System.err.println(\"Erro ao criar Entidade \" + e.getMessage());\r\n }\r\n return null;\r\n }",
"E create(E entity, RequestContext context)\n throws TechnicalException, ConflictException;",
"public void createNewObject(Representation entity) throws ResourceException {\r\n\t\tT entry = createObjectFromHeaders(null, entity);\r\n\t\texecuteUpdate(entity, entry, createUpdateObject(entry));\r\n\r\n\t}",
"public UserEntity create(String userId) throws CreateException;",
"public void save(E entity){\n transaction.begin();\n entityManager.persist(entity);\n transaction.commit();\n }",
"E save(E entity);",
"@Override\r\n public void createNewEntity(String entityName) {\n\r\n }",
"@Transactional\n public void create(TaskInstanceEntity taskInstanceEntity) {\n entityManagerProvider.get().persist(taskInstanceEntity);\n }",
"void createOrUpdate(T entity);",
"public EspecieEntity inserta(EspecieEntity entity){\r\n em.persist(entity);\r\n return entity;\r\n }",
"T create() throws PersistException;",
"User create(final User user) throws DatabaseException;",
"public CompradorEntity create(CompradorEntity compradorEntity) {\r\n em.persist(compradorEntity);\r\n return compradorEntity;\r\n }",
"@Override\n @LogMethod\n public T create(T entity) throws InventoryException {\n \tInventoryHelper.checkNull(entity, \"entity\");\n repository.persist(entity);\n return repository.getByKey(entity.getId());\n }",
"public ViajeroEntity create (ViajeroEntity viajeroEntity){\n LOGGER.log(Level.INFO, \"Creando un review nuevo\");\n em.persist(viajeroEntity);\n return viajeroEntity;\n }",
"@WebMethod(operationName = \"create\")\n @Oneway\n public void create(@WebParam(name = \"entity\") User entity) {\n ejbRef.create(entity);\n }",
"protected abstract ENTITY createEntity();",
"@Override\r\n\tpublic void create(T t) {\n\t\tsuper.getSessionFactory().getCurrentSession().save(t);\r\n\t\tsuper.getSessionFactory().getCurrentSession().flush();\r\n\t}",
"@Override\n public E insert(E entity) {\n LOG.info(\"[insert] Start: entity = \" + entity.getClass().getSimpleName());\n entityManager.persist(entity);\n LOG.info(\"[insert] End\");\n return entity;\n }",
"protected abstract EntityBase createEntity() throws Exception;",
"T insert(T entity) throws Exception;",
"User create(User user);",
"@Override\n\tpublic void createStudent(Student student) {\n\t\tem.persist(student);\n\t}",
"T save(T entity);",
"T save(T entity);",
"T save(T entity);",
"default E create(E entity)\n throws TechnicalException, ConflictException {\n return create(entity, null);\n }",
"T makePersistent(T entity);",
"WriteRequest insert(PiEntity entity);",
"@Override\n\tpublic T create(T entity) {\n\t\t//TODO al anotar un metodo como transaccional spring de encarga de la transaccion por lo que no hay que \n\t\t//abrir la transaccion ni hacer commit, se encarga spring. Es más si lo intentas da un error, no se \n\t\t//pueden crear transacciones en una transaccion conpartida\n\t\t//Not allowed to create transaction on shared EntityManager - use Spring transactions\n\t\t//em.getTransaction().begin();\n\t\t\n\t\tSystem.out.println(em.contains(entity));\n\t\tem.persist(entity);\n\t\tSystem.out.println(em.contains(entity));\n\t\t//em.getTransaction().commit();\n\t\t\n\t\t//Session session = (Session) em.getDelegate();\n\t\t//Transaction tx = session.beginTransaction();\n\t\t//session.saveOrUpdate(entity);\n\t\t//session.flush();\n\t\t//tx.commit();\n\t\treturn entity;\n\t}",
"public QuestionEntity createQuestion(QuestionEntity questionEntity) {\n entityManager.persist(questionEntity);\n return questionEntity;\n }",
"int insert(UserEntity record);",
"@Transactional\n\tpublic T create(T newInstance) {\n\t\tthis.em.persist(newInstance);\n\t\treturn newInstance;\n\t}",
"public void insert(EmployeeEntity entity){\n EmployeeDB.getInstance().insertOrUpdate(entity);\n }",
"void save(Object entity);",
"@Override\r\n public void crearCliente(Cliente cliente) throws Exception {\r\n entity.getTransaction().begin();//inicia la creacion\r\n entity.persist(cliente);//se crea el cliente\r\n entity.getTransaction().commit();//finaliza la creacion\r\n }",
"@Override\n public void createRecipe(RecipeEntity recipeEntity)\n {\n this.save(recipeEntity);\n }",
"public Participacao createParticipacao(Participacao model) {\n return participacaoRepository.save(model);\n}",
"void create(Feedback entity);",
"public void create(GameSet entity) {\r\n\t\tgetDatabase().beginTransaction();\r\n\t\ttry {\r\n\t\t\tString sql = \"insert into GAME_SET (\" + GameSet.DbField.ID + \",\" + GameSet.DbField.GAME_ID + \",\" + GameSet.DbField.NAME + \",\" + GameSet.DbField.IMAGE\r\n\t\t\t\t\t+ \") values (?,?,?,?)\";\r\n\t\t\tObject[] params = new Object[4];\r\n\t\t\tparams[0] = entity.getId();\r\n\t\t\tparams[1] = entity.getGame().getId();\r\n\t\t\tparams[2] = entity.getName();\r\n\t\t\tparams[3] = entity.getImageName();\r\n\r\n\t\t\texecSQL(sql, params);\r\n\r\n\t\t\tgetDatabase().setTransactionSuccessful();\r\n\t\t\tentity.setState(DbState.LOADED);\r\n\r\n\t\t} finally {\r\n\t\t\tgetDatabase().endTransaction();\r\n\t\t}\r\n\t}",
"public static TestEntity createEntity(EntityManager em) {\n TestEntity testEntity = new TestEntity();\n // Add required entity\n User user = UserResourceIntTest.createEntity(em);\n em.persist(user);\n em.flush();\n testEntity.setUserOneToMany(user);\n return testEntity;\n }",
"@PostConstruct\n protected void initNewEntity() {\n setNewEntity(getService().create());\n }",
"public void create(final Object obj) {\n txTemplate.execute(new TransactionCallbackWithoutResult() {\n @Override\n public void doInTransactionWithoutResult(TransactionStatus status) {\n getHibernateTemplate().save(obj);\n }\n });\n }",
"@SuppressWarnings(\"UnnecessaryLocalVariable\")\r\n private int create(T o) throws PersistenceException {\r\n String query = PREFIX_INSERT_QUERY + this.type.getSimpleName();\r\n Integer status = getSqlSession().insert(query, o);\r\n // ne doit pas être utilisé avec une session Spring\r\n // getSqlSession().commit();\r\n return status;\r\n }",
"@Override\n\t@Transactional\n\tpublic DetalleCarrito create(DetalleCarrito entity) throws Exception {\n\t\treturn detalleCarritoRepository.save(entity);\n\t}",
"void save(E entity);",
"public int insert(IEntity entity) throws SQLException;",
"public UserEntity save(UserEntity userEntity);",
"public void create(Book book) {\n\t\tentityManager.persist(book);\n\t\tSystem.out.println(\"BookDao.create()\" +book.getId());\n\t\t\n\t}",
"@Override\n\tpublic void create(Board board) throws Exception {\n\t\tdao.insert(board);\n\t}",
"T save(T entity) throws DataConcurrencyException, DataIntegrityViolationException;",
"int insert(StudentEntity record);",
"public DisponibilidadEntity create(DisponibilidadEntity entity) {\r\n\r\n em.persist(entity);\r\n\r\n return entity;\r\n }",
"void validateCreate(T entity);",
"User createUser(User user);",
"@Override\n\tpublic void insert(UploadDF entity) {\n\t\tSession session = factory.openSession();\n\t\ttry{\n\t\t\tsession.beginTransaction();\n\t\t\tsession.save(entity);\n\t\t\tsession.getTransaction().commit();\n\t\t}catch(HibernateException exception){\n\t\t\tsession.getTransaction().rollback();\n\t\t\tthrow exception;\n\t\t}finally{\n\t\t\tsession.close();\n\t\t}\n\t}",
"public void insert(T... entity) throws NoSQLException;",
"@Override\n\tpublic EmploieType creer(EmploieType entity) throws InvalideTogetException {\n\t\treturn emploieTypeRepository.save(entity);\n\t}",
"public static Prestamo createEntity(EntityManager em) {\n Prestamo prestamo = new Prestamo().observaciones(DEFAULT_OBSERVACIONES).fechaFin(DEFAULT_FECHA_FIN);\n // Add required entity\n Libro libro;\n if (TestUtil.findAll(em, Libro.class).isEmpty()) {\n libro = LibroResourceIT.createEntity(em);\n em.persist(libro);\n em.flush();\n } else {\n libro = TestUtil.findAll(em, Libro.class).get(0);\n }\n prestamo.setLibro(libro);\n // Add required entity\n Persona persona;\n if (TestUtil.findAll(em, Persona.class).isEmpty()) {\n persona = PersonaResourceIT.createEntity(em);\n em.persist(persona);\n em.flush();\n } else {\n persona = TestUtil.findAll(em, Persona.class).get(0);\n }\n prestamo.setPersona(persona);\n // Add required entity\n User user = UserResourceIT.createEntity(em);\n em.persist(user);\n em.flush();\n prestamo.setUser(user);\n return prestamo;\n }",
"public boolean insert(T entity) {\r\n // code to save entity details to database\r\n Session session = HibernateUtil.getInstance().getFactory().openSession();\r\n try {\r\n System.out.println(\"\" + entity.toString());\r\n\r\n Transaction transaction = session.getTransaction();\r\n transaction.begin();\r\n// Approval app=(Approval) entity;\r\n session.persist(entity);\r\n transaction.commit();\r\n session.close();\r\n return true;\r\n } catch (HibernateException ex) {\r\n ex.printStackTrace();\r\n System.out.println(\"\" + ex.getMessage());\r\n session.close();\r\n return false;\r\n }\r\n\r\n }",
"@Override\n\tpublic User Create(User t) {\n\t\tsessionFactory.getCurrentSession().save(t);\n\t\t\n\t\treturn t;\n\t}",
"public T create(T object) throws SQLException;",
"public <T> T save(T entity);",
"@Test\n\n public void create() {\n User user = new User();\n user.setAccount(\"TestUser03\");\n user.setEmail(\"[email protected]\");\n user.setPhoneNumber(\"010-1111-3333\");\n user.setCreatedAt(LocalDateTime.now());\n user.setCreatedBy(\"TestUser3\");\n\n User newUser = userRepository.save(user);\n System.out.println(\"newUser : \" + newUser);\n }",
"void save(T entity);",
"@Override\r\n\tpublic void createFournisseur(Fournisseur fournisseur) {\n\t\tthis.sessionFactory.getCurrentSession().save(fournisseur);\r\n\t}",
"public LugarEntity create(LugarEntity p){\n em.persist(p);\n return p;\n }",
"protected abstract T createNewEntry(PersistentEntity persistentEntity);",
"@Override\n\tpublic ImageEntity insert(Object entity) {\n\t\tDatabaseContext.insertRecord(entity);\n\t\treturn (ImageEntity) entity;\n\t}",
"void add(E entity) throws ValidationException, RepositoryException;",
"@Override\r\n\tpublic Adress createAdress(Adress adress) {\n\t\tem.persist(adress);\r\n\t\treturn adress;\r\n\t}",
"Purchase create(Purchase purchase) throws SQLException, DAOException;",
"@Transactional void add(E entity);",
"public ReservaEntity createReserva(ReservaEntity reservaEntity) throws BusinessLogicException \n {\n LOGGER.log(Level.INFO, \"Inicia proceso de creación de la reserva\");\n UsuarioEntity usuario = persistenceUser.findUsuario(reservaEntity.getUsuario().getId());\n reservaEntity.setUsuario(usuario);\n persistence.create(reservaEntity);\n LOGGER.log(Level.INFO, \"Termina proceso de creación de la reserva\");\n return reservaEntity;\n }",
"int insert(TestEntity record);",
"CounselorBiographyTemp create(CounselorBiographyTemp entity);",
"public PokemonEntity create(PokemonEntity pokemon )\n {\n em.persist(pokemon);\n return pokemon;\n }",
"public void create(SpecificProduct specificProduct) {\n specific_product_dao.create(specificProduct);\n }",
"@Transactional(isolation=Isolation.READ_COMMITTED, \n\t\t\tpropagation=Propagation.REQUIRED,\n\t\t\trollbackFor=Exception.class)\n\tpublic void create(Object object) {\n\t\tsessionFactory.getCurrentSession().save(object);\n\t}",
"Boolean save(T entity);",
"public void save(PtJJdwcy entity);",
"void save(Cartera entity);",
"LoginHistory create(LoginHistory entity);",
"@Override\n\tpublic Penguin createPenguin(Penguin penguin) {\n\t\tPenguin saved = this.repo.save(penguin);\n\t\treturn saved; // penguin with an id (has been saved)\n\t}",
"public void createUtente(Utente u)\n\t{\n\t\tem.persist(u);\n\t}"
] | [
"0.80436486",
"0.80436486",
"0.781273",
"0.77948713",
"0.7712897",
"0.7701939",
"0.7614533",
"0.76074123",
"0.7549487",
"0.75457",
"0.75396883",
"0.7249",
"0.72375304",
"0.72257996",
"0.70629984",
"0.6990665",
"0.6975112",
"0.6932782",
"0.6894707",
"0.68267477",
"0.6784107",
"0.6757708",
"0.67567956",
"0.674185",
"0.67413867",
"0.67125326",
"0.66762066",
"0.66606086",
"0.66563445",
"0.66546863",
"0.6622523",
"0.6615865",
"0.6604747",
"0.66029537",
"0.660185",
"0.6598496",
"0.6545381",
"0.65356773",
"0.6530349",
"0.6530349",
"0.6530349",
"0.65139455",
"0.6501597",
"0.6498244",
"0.6478568",
"0.6469048",
"0.6445986",
"0.6445121",
"0.64326423",
"0.6430244",
"0.6405957",
"0.6394557",
"0.6384089",
"0.6368732",
"0.63663685",
"0.63568294",
"0.63567513",
"0.6353005",
"0.6350281",
"0.6344044",
"0.6340911",
"0.6335314",
"0.63301575",
"0.6315657",
"0.62967324",
"0.6286389",
"0.62789273",
"0.62764317",
"0.62464076",
"0.6244423",
"0.62406254",
"0.6237086",
"0.62347275",
"0.6230875",
"0.6214779",
"0.6203851",
"0.6201546",
"0.6200918",
"0.6197016",
"0.617754",
"0.61740947",
"0.6170141",
"0.61684585",
"0.61629945",
"0.6159055",
"0.61571413",
"0.61561275",
"0.61485696",
"0.61460555",
"0.61418784",
"0.6130781",
"0.612122",
"0.6113144",
"0.61062014",
"0.6104648",
"0.6101721",
"0.60915846",
"0.60910505",
"0.6063676",
"0.60621476"
] | 0.65171885 | 41 |
Reads an Entity from databse | public Object read(Object object) {
EntityManager em = getEntityManager();
em.getTransaction().begin();
Object result = null;
try {
result = em.find(object.getClass(), "id");
LOG.debug("Found " + object);
} catch (Exception e) {
LOG.error("Could not find Object", e);
} finally {
em.close();
}
return result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void read(Object entidade) {\n\t\t\n\t}",
"@Override\n public GameLogEntity readEntity(final GameLogEntity entity) {\n return this.getEntityManager().\n find(GameLogEntity.class, entity.getId());\n }",
"public abstract Object get(String entityName, Serializable id);",
"public void readEntityFromNBT(NBTTagCompound tagCompund) {}",
"private DataRelationModelEntity readEntityForcely(UserDto userDto, String drmId) throws LogicException {\n\t\tDataRelationModelEntity entity = entityOperator.selectByPk(ENTITY_CLASS, drmId);\n\t\tif (entity == null) {\n\t\t\tthrow new LogicException(String.format(\"Data not found.: (drmId,)=(%s,)\", drmId), Status.NOT_FOUND.getStatusCode());\t\n\t\t}\n\t\treturn entity;\n\t}",
"Alimento loadAlimentoById(Long id) throws EntityNotFoundException;",
"protected abstract E parseEntity(ResultSet rs) throws DAOException;",
"protected abstract Serializable getEntity();",
"protected Entity readEntity(final UriInfoResource uriInfo) throws ODataApplicationException {\n return readEntity(uriInfo, false);\n }",
"Entity getEntityById(Long id);",
"private void loadData(){\n try (BufferedReader br = new BufferedReader(new FileReader(this.fileName))) {\n String line;\n while((line=br.readLine())!=null){\n E e = createEntity(line);\n super.save(e);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void readEntityFromNBT(NBTTagCompound compound)\n {\n super.readEntityFromNBT(compound);\n this.setProfession(compound.getByte(\"Profession\"));\n }",
"@Override\r\npublic Detalle_pedido read(int id) {\n\treturn detalle_pedidoDao.read(id);\r\n}",
"protected abstract T getEntityById(Long id);",
"@Override\r\n\tpublic CEntity read(CEntity entity, String ID) {\n\t\twhile (scanner.hasNext()) {\r\n\t\t\tentity.read(scanner);\r\n\t\t\tif (entity.getID().equals(ID))\r\n\t\t\t\treturn entity;\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public abstract void loadFromDatabase();",
"private static void readDatabase(String path) {\n try {\n FileInputStream fileIn = new FileInputStream(path + \"/database.ser\");\n ObjectInputStream inStream = new ObjectInputStream(fileIn);\n database = (Database) inStream.readObject();\n inStream.close();\n fileIn.close();\n } catch (IOException i) {\n i.printStackTrace();\n } catch (ClassNotFoundException c) {\n c.printStackTrace();\n }\n }",
"public Entity getEntity() {\n\t\treturn DodgeBlawk.getDataManager().getEntity(getId());\n\t}",
"public Entity2 findEntity2ById(String id) throws DaoException;",
"E getObject(int ID) throws DatabaseObjectNotFoundException, DatabaseNotAccessibleException;",
"public E getEntity();",
"EntityData<?> getEntityData();",
"public Record readRecord(Long id);",
"public PlayerEntity getPlayerEntity(String name){\n Session session = HibernateUtil.getSessionFactory().openSession();\n session.beginTransaction();\n PlayerEntity playerE = new PlayerEntity();\n session.load(playerE , name);\n session.getTransaction().commit();\n return playerE;\n }",
"Object deserialize() throws SQLException {\n\ttry {\n\t ByteArrayInputStream bi = new ByteArrayInputStream(data);\n\t ObjectInputStream is = new ObjectInputStream(bi);\n\n\t return is.readObject();\n\t} catch (Exception e) {\n\t throw Trace.error(Trace.SERIALIZATION_FAILURE, e.getMessage());\n\t}\n }",
"private Entity getObjectByObject(final Entity entity){\n\t\tDBProperty dbProperty = entity.getDbProperty();\t\n\t\tEntity result = entity;\n\t\tAbstractDao<Entity> aDao = new AbstractDao<Entity>() {\n\t\t\t\t@Override\n\t\t\t\tpublic Class getEntityClass() {\n\t\t\t\t\treturn entity.getClass();\n\t\t\t\t}\n\t\t\t};\n\t\t\ttry {\n\t\t\t\tresult = aDao.findById(entity.getId());\n\t\t\t} catch (DAOTechnicalException e) {\n\t\t\t\tLOG.debug(e.getMessage());\n\t\t\t}\n\t\t\treturn result;\n\t\t}",
"String getEntity();",
"String getEntity();",
"String getEntityName() throws DatabaseNotAccessibleException;",
"@Override\r\n\tpublic Libro read(int id) {\n\t\treturn libroRepository.findById(id).get();\r\n\t}",
"protected abstract byte[] getEntity(EntityType entityType, String entityName, int entityVersion) throws IOException;",
"EntityType getEntity();",
"private void read(Session session) {\n\t\t\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<Aluno> AlunoList = session.createQuery(\"FROM Aluno\").getResultList();\n\t\t\n\t\t\n\t\t\n\t\tSystem.out.println(\"Reading Aluno records...\");\n\t\tSystem.out.printf(\"%-30.30s %-30.30s%n\", \"Model\", \"Price\");\n\t\tfor (Aluno al : AlunoList) {\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.printf(\"%-30.30s %-30.30s%n\", al.getNome(), al.getRa());\n\t\t}\n\t}",
"public EncogPersistedObject readObject(final String name) {\r\n\r\n\t\t// did we find the object?\r\n\t\tif (advance(name)) {\r\n\t\t\tfinal String objectType = this.in.getTag().getName();\r\n\t\t\tfinal Persistor persistor = PersistorUtil\r\n\t\t\t\t\t.createPersistor(objectType);\r\n\r\n\t\t\tif (persistor == null) {\r\n\t\t\t\tthrow new PersistError(\"Do not know how to load: \" + objectType);\r\n\t\t\t}\r\n\t\t\treturn persistor.load(this.in);\r\n\t\t} else {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}",
"public User read(String id);",
"@Override\r\n public void read() {\n System.out.println('\\n' + \"DB repo: \");\r\n //Idk, probably search for a person and read data??\r\n\r\n }",
"@Override\n\tpublic Image loadEntity() {\n\t\ttry {\n\t\t\tImage entityImage = new Image(new FileInputStream(IMAGE_LOCATION));\n\t\t\treturn entityImage;\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"Image file not found\");\n\t\t\treturn null;\n\t\t}\n\t}",
"protected E getEntityByQuerry(PreparedStatement statement) throws DAOException {\n\t\tE result = null;\n\n\t\ttry (ResultSet rs = statement.executeQuery()) {\n\n\t\t\tif (rs.next())\n\t\t\t\tresult = parseEntity(rs);\n\n\t\t} catch (SQLException cause) {\n\t\t\tthrow new DAOException(cause);\n\t\t}\n\t\treturn result;\n\t}",
"public void read(NetInput in)\r\n/* 35: */ throws IOException\r\n/* 36: */ {\r\n/* 37:35 */ this.entityId = in.readInt();\r\n/* 38:36 */ this.metadata = NetUtil.readEntityMetadata(in);\r\n/* 39: */ }",
"public T get(int objectId) throws SQLException;",
"EmployeeDetail getById(long identifier) throws DBException;",
"@Override\n\tpublic T getEntityById(String id) {\n\t\treturn null;\n\t}",
"public void readEntityFromNBT(NBTTagCompound nbttagcompound)\n {\n super.readEntityFromNBT(nbttagcompound);\n angerLevel = nbttagcompound.getShort(\"Anger\");\n bumgave = nbttagcompound.getBoolean(\"BumGave\");\n timetopee = nbttagcompound.getInteger(\"TimeToPee\");\n bumrotation = nbttagcompound.getFloat(\"BumRotation\");\n modelsize = nbttagcompound.getFloat(\"ModelSize\");\n\n if (bumgave)\n {\n texture = new ResourceLocation(Reference.MODID, Reference.TEXTURE_PATH_ENTITES +\n \t\tReference.TEXTURE_BUM_DRESSED);\n }\n }",
"T readOne(int id);",
"Blog read(int id);",
"public List<? extends OggettoCeleste> read(OggettoCeleste oggetto) throws SQLException, DAOException {\n\t\tthrow new DAOException(\"Not implemented\");\n\t}",
"Note getOneEntity(Long id);",
"@Override\n\tprotected void readEntityFromNBT(NBTTagCompound tag) {\n\t\tthis.fuse = tag.getByte(\"Fuse\");\n\t\tthis.variant = tag.getByte(\"Variant\");\n\t}",
"User loadUser(int id) throws DataAccessException;",
"Table8 getById(Integer table8Id) throws EntityNotFoundException;",
"public List<DcSquadDO> load() throws DataAccessException;",
"public abstract T findEntityById(int id);",
"public DcSquadDO loadById(long id) throws DataAccessException;",
"T load(PK id);",
"Module getById(Long identifier) throws DBException;",
"com.google.cloud.videointelligence.v1p2beta1.Entity getEntity();",
"public void readEntityFromNBT(NBTTagCompound tagCompund) {\n/* 182 */ this.fireworkAge = tagCompund.getInteger(\"Life\");\n/* 183 */ this.lifetime = tagCompund.getInteger(\"LifeTime\");\n/* 184 */ NBTTagCompound var2 = tagCompund.getCompoundTag(\"FireworksItem\");\n/* */ \n/* 186 */ if (var2 != null) {\n/* */ \n/* 188 */ ItemStack var3 = ItemStack.loadItemStackFromNBT(var2);\n/* */ \n/* 190 */ if (var3 != null)\n/* */ {\n/* 192 */ this.dataWatcher.updateObject(8, var3);\n/* */ }\n/* */ } \n/* */ }",
"public Entity getEntity() {\n if (entity != null) {\n return entity;\n }\n return entity = NMSUtils.getEntityById(this.entityID);\n }",
"public Entity getByPrimaryKey(Id id) throws RepositoryException{\n\t\treturn (Entity)DatanucleusCRUDUtils.getById(getEntity(), id);\n\t}",
"@SuppressWarnings(\"unchecked\")\n\tpublic static <T> T loadAs(InputStream stream) throws SlickException {\n\t\tT object = null;\n\t\tObjectInputStream inStream;\n\t\ttry {\n\t\t\tinStream = new ObjectInputStream(stream);\n\t\t\tobject = (T) inStream.readObject();\n\t\t\tinStream.close();\n\t\t\treturn object;\n\t\t} catch (Exception ex) {\n\t\t\tthrow new SlickException(ex.getMessage(), ex.getCause());\n\t\t}\n\t}",
"public ZEntity getEntity() {\r\n return entity;\r\n }",
"@Override\r\n\tpublic BoardDto read(int bno) throws Exception {\n\t\treturn dao.read(bno);\r\n\t}",
"public EvaluetingListDO findById(long formId) throws DataAccessException;",
"public Entity getEntity() {\n if (entity != null) {\n return entity;\n }\n return entity = NMSUtils.getEntityById(this.entityID);\n }",
"public Entity getEntity() {\n if (entity != null) {\n return entity;\n }\n return entity = NMSUtils.getEntityById(this.entityID);\n }",
"public Entity getEntity() {\n if (entity != null) {\n return entity;\n }\n return entity = NMSUtils.getEntityById(this.entityID);\n }",
"ReferenceData findById(ReferenceDataId id) throws DataException;",
"List<BookStoreElement> load(Reader reader);",
"<T> T get(Class<T> entityClass, Serializable id);",
"private ClothingItem readItem() {\n System.out.println(\"Read item {id,name,designer,price}\");\n\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n try {\n Long id = Long.valueOf(bufferRead.readLine());\n String name = bufferRead.readLine();\n String designer = bufferRead.readLine();\n int price = Integer.parseInt(bufferRead.readLine());\n ClothingItem item = new ClothingItem(name, designer, price);\n item.setId(id);\n\n return item;\n\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n return null;\n }",
"M getById(Serializable id) throws DataAccessException;",
"@Override\r\n\tpublic CEntity readNext(CEntity entity) {\n\t\tentity.read(scanner);\r\n\t\treturn entity;\r\n\t}",
"protected void readEntityFromNBT(NBTTagCompound compound) {\n this.casterUuid = compound.getUniqueId(\"OwnerUUID\");\n }",
"@Override\n public SideDishEntity load(Long id, Number revision) throws ObjectNotFoundException {\n return null;\n }",
"@Test\r\n public void testRead() throws Exception {\r\n System.out.println(\"read\");\r\n int idbureau = 0;\r\n BureauDAO instance = new BureauDAO();\r\n instance.setConnection(dbConnect);\r\n Bureau obj = new Bureau(0,\"Test\",\"000000000\",\"\");\r\n Bureau expResult = instance.create(obj);\r\n idbureau=expResult.getIdbur();\r\n Bureau result = instance.read(idbureau);\r\n assertEquals(\"sigles différents\",expResult.getSigle(), result.getSigle());\r\n assertEquals(\"tel différents\",expResult.getTel(), result.getTel());\r\n //etc\r\n assertEquals(\"id différents\",expResult.getIdbur(),result.getIdbur());\r\n try{\r\n result=instance.read(0);\r\n fail(\"exception d'id inconnu non générée\");\r\n }\r\n catch(SQLException e){}\r\n instance.delete(result);\r\n }",
"@Override\n\tpublic Map<String, Object> read(int bno) throws Exception {\n\t\treturn boardDao.read(bno);\n\t}",
"T read(int id);",
"T read(int id);",
"public List<Person> read() {\n Session session = getSessionFactory().openSession();\n List<Person> persons = session.createQuery(\"FROM Person\").list();\n session.close();\n LOGGER.log(Level.INFO,\"Found \" + persons.size() + \" persons\");\n return persons;\n }",
"public Entity getEntity(int index){\n return entityList.get(index);\n }",
"Product getProductDetails(int idproduct) throws DataBaseException;",
"@Override\n\tpublic Tags read(int tagID) {\n\t\treturn entityMgr.find(Tags.class, tagID);\n\t}",
"public TEntity getById(int id){\n String whereClause = String.format(\"Id = %1$s\", id);\n Cursor cursor = db.query(tableName, columns, whereClause, null, null, null, null);\n\n if (cursor.getCount() == 1) {\n cursor.moveToFirst();\n return fromCursor(cursor);\n }\n return null;\n }",
"public Estado ReadEstado(int estadoID){\r\n SQLiteDatabase sqLiteDatabase = conn.getReadableDatabase();\r\n String query = \"select * from estados WHERE estadoID=?\";\r\n Cursor c= sqLiteDatabase.rawQuery(query, new String[]{String.valueOf(estadoID)});\r\n if (c.moveToFirst()) return new Estado(estadoID,c.getString(c.getColumnIndex(\"descripcion\")));\r\n return null;\r\n\r\n\r\n }",
"protected void readEntityFromNBT(NBTTagCompound var1)\n {\n this.fuse = var1.getByte(\"Fuse\");\n }",
"public Entity getEntityByName(String name) {\n return this.entity_list_.get(name);\n }",
"ProductEntity findById(long id);",
"public Book read(int bookId){\n System.out.println(\"looking for Book with id \" + bookId);\n Book b = new Book();\n \n try (DBIterator keyIterator = dbmanager.getDB().iterator()) {\n keyIterator.seekToFirst();\n\n while (keyIterator.hasNext()) {\n String key = asString(keyIterator.peekNext().getKey());\n String[] splittedString = key.split(\"-\");\n\n if(!\"book\".equals(splittedString[0])){\n keyIterator.next();\n continue;\n }\n\n String resultAttribute = asString(dbmanager.getDB().get(bytes(key)));\n JSONObject jbook = new JSONObject(resultAttribute);\n\n if(jbook.getInt(\"idBOOK\") == bookId){\n b = new Book(jbook);\n break;\n }\n keyIterator.next(); \n }\n }\n catch(Exception ex){\n ex.printStackTrace();\n } \n return b;\n }",
"public Entity getEntity(int index)\n\t{\n\t\treturn this.entities.get(index);\n\t}",
"AccessModelEntity selectByPrimaryKey(String id);",
"@Override\r\n\tprotected Entity getEntityByFields() throws SQLException {\n\t\t\r\n\t\tint id = rs.getInt(\"id\");\r\n\t\tint productId = rs.getInt(\"id_product\");\r\n\t\tString productName = super.getString(\"productName\");\t// From INNER JOIN\r\n\t\tString productUnit = super.getString(\"productUnit\");\t// From INNER JOIN\r\n\t\tfloat quantity = rs.getFloat(\"quantity\");\r\n\t\tfloat price = rs.getFloat(\"price\");\r\n\t\tfloat summa = rs.getFloat(\"summa\");\r\n\t\t\r\n\t\treturn new DocInvoiceItem(id, productId, productName, productUnit, quantity, price, summa);\r\n\t}",
"public ActiveRecord read(Object id) {\n StringBuilder sql = new StringBuilder();\n sql.append(\"SELECT * FROM \").append(getTableName()).append(\" WHERE id = \").append(id);\n Row row = getAdapter().selectOne(sql.toString());\n if (row == null) throw new RecordNotFoundException(\"No record found with id \" + id);\n for (Column column : getColumns()) {\n String name = column.getName();\n Classes.setFieldValue(this, name, row.get(name));\n }\n\n readAssociations();\n readAggregations();\n\n newRecord = false;\n return this;\n }",
"public void loadData () {\n // create an ObjectInputStream for the file we created before\n ObjectInputStream ois;\n try {\n ois = new ObjectInputStream(new FileInputStream(\"DB/Guest.ser\"));\n\n int noOfOrdRecords = ois.readInt();\n Guest.setMaxID(ois.readInt());\n System.out.println(\"GuestController: \" + noOfOrdRecords + \" Entries Loaded\");\n for (int i = 0; i < noOfOrdRecords; i++) {\n guestList.add((Guest) ois.readObject());\n //orderList.get(i).getTable().setAvailable(false);\n }\n } catch (IOException | ClassNotFoundException e1) {\n // TODO Auto-generated catch block\n e1.printStackTrace();\n }\n }",
"private void loadFromDB() throws SQLException {\n\t\tif (rev_page != -1)\n\t\t\treturn;\n\t\t\n\t\tPreparedStatement stmt = dbc.prepareStatement(\n\t\t\t\t\"SELECT rev_page, rev_text_id, rev_timestamp, rev_comment, user_name \" +\n\t\t\t\t\"FROM revision, users WHERE rev_id = ? AND rev_user = user_id\");\n\t\tstmt.setInt(1, rev_id);\n\t\tstmt.execute();\n\n\t\tResultSet rs = stmt.getResultSet();\n\t\tif (!rs.next()) {\n\t\t\t/*\n\t\t\t * Shouldn't happen?\n\t\t\t */\n\t\t\tstmt.close();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\trev_page = rs.getInt(1);\n\t\trev_text_id = rs.getInt(2);\n\t\trev_timestamp = rs.getTimestamp(3);\n\t\trev_comment = rs.getString(4);\n\t\trev_user_text = rs.getString(5);\n\t\tstmt.close();\n\t}",
"public abstract T getEntityByColumnName(String columnName, String value);",
"@Override\n public Product read(int produktid) {\n Product productToReturn = new Product();\n try {\n PreparedStatement getSingleProdukt = conn.prepareStatement(\"SELECT * FROM produkter WHERE produktID=?\");\n getSingleProdukt.setInt(1, produktid);\n System.out.println(\"Vi er i read i linie 115\");\n ResultSet rs = getSingleProdukt.executeQuery();\n while (rs.next()) {\n productToReturn = new Product();\n productToReturn.setproduktID(rs.getInt(\"produktID\"));\n productToReturn.setNavn(rs.getString(2));\n productToReturn.setPris(rs.getDouble(3));\n productToReturn.setBeskrivelse(rs.getString(4));\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return productToReturn;\n //return null;\n }",
"protected SourceInterestMap getEntity() {\n EntityManager em = PersistenceService.getInstance().getEntityManager();\n try {\n return (SourceInterestMap) em.createQuery(\"SELECT e FROM SourceInterestMap e where e.id = :id\").setParameter(\"id\", id).getSingleResult();\n } catch (NoResultException ex) {\n throw new WebApplicationException(new Throwable(\"Resource for \" + uriInfo.getAbsolutePath() + \" does not exist.\"), 404);\n }\n }",
"public Receta read(Long codigo);",
"public void readEntityFromNBT(NBTTagCompound var1)\n {\n super.readEntityFromNBT(var1);\n this.speedy = var1.getFloat(\"Speedy\");\n this.moveTimer = var1.getShort(\"MoveTimer\");\n this.direction = var1.getShort(\"Direction\");\n this.gotMovement = var1.getBoolean(\"GotMovement\");\n this.setReformed(var1.getBoolean(\"Reformed\"));\n this.setOrgX(var1.getInteger(\"OrgX\"));\n this.setOrgY(var1.getInteger(\"OrgY\"));\n this.setOrgZ(var1.getInteger(\"OrgZ\"));\n }",
"public Entity getEntity(String name) {\r\n\r\n for (int i = 0; i < entities.size(); i++) {\r\n if (name.equals(entities.get(i).nume)) {\r\n\r\n return entities.get(i);\r\n }\r\n }\r\n return null;\r\n }"
] | [
"0.70632374",
"0.66922396",
"0.6150312",
"0.61293495",
"0.6123412",
"0.607974",
"0.6066528",
"0.606633",
"0.6037813",
"0.59780383",
"0.5905899",
"0.58891916",
"0.58808297",
"0.58719546",
"0.58335966",
"0.58281916",
"0.5804456",
"0.57810444",
"0.57417524",
"0.57408756",
"0.5730338",
"0.5700485",
"0.5700253",
"0.5691749",
"0.56880796",
"0.5684634",
"0.5682528",
"0.5682528",
"0.56637406",
"0.56627953",
"0.56534433",
"0.56503975",
"0.5645042",
"0.56333554",
"0.5623872",
"0.56230587",
"0.5612008",
"0.561015",
"0.5607688",
"0.5603126",
"0.55955976",
"0.5533275",
"0.5520631",
"0.54951537",
"0.5489919",
"0.5479311",
"0.54784954",
"0.5477238",
"0.54695934",
"0.54681474",
"0.5464167",
"0.54612833",
"0.5459975",
"0.54582494",
"0.5440176",
"0.54383796",
"0.5436831",
"0.54347473",
"0.5430019",
"0.54263145",
"0.5423903",
"0.54000986",
"0.5393033",
"0.5389668",
"0.5389668",
"0.5389668",
"0.5386826",
"0.5383539",
"0.53773314",
"0.5375166",
"0.5372399",
"0.53700095",
"0.53682214",
"0.53671765",
"0.5366471",
"0.5357191",
"0.5354205",
"0.5354205",
"0.5349827",
"0.534622",
"0.53447455",
"0.5343876",
"0.5323837",
"0.53226817",
"0.5316624",
"0.53094214",
"0.5303995",
"0.52978253",
"0.5297287",
"0.5296689",
"0.52930784",
"0.5288078",
"0.5286586",
"0.5273129",
"0.5270994",
"0.52690166",
"0.5268529",
"0.5266739",
"0.52641386",
"0.5262862"
] | 0.6101137 | 5 |
Updates an entity in the databse | protected void update(Object object) {
EntityManager em = getEntityManager();
em.getTransaction().begin();
try {
em.merge(object);
em.getTransaction().commit();
} catch (Exception e) {
LOG.error("Could not update Object", e);
em.getTransaction().rollback();
} finally {
em.close();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void updateEntity();",
"E update(E entity);",
"E update(E entity);",
"public void update(IEntity entity) throws SQLException;",
"public void update(E entity);",
"@Override\n\tpublic void update(DomainEntity entity) throws SQLException {\n\t\t\n\t}",
"T update(T entity);",
"T update(T entity);",
"void update(CE entity);",
"public <T> T update(T entity);",
"void update(Student entity);",
"E update(ID id, E entity, RequestContext context);",
"void update(T entity) throws Exception;",
"@Override\n public void update(T entity) throws SQLException {\n\n this.dao.update(entity);\n\n }",
"E update(E entiry);",
"boolean update(T entity) throws Exception;",
"void update(T entity);",
"void update(T entity);",
"E update(E entity) throws ValidationException;",
"public void update(T entity) {\n\t\tsessionFactory.getCurrentSession().update(entity);\n\t}",
"@Override\n\tpublic void updateEntity(T t) {\n\t\tgetSession().update(t);\n\t}",
"@Override\n\tpublic void update(Object entidade) {\n\t\t\n\t}",
"public void update() {\n\t\tSession session = DBManager.getSession();\n\t\tsession.beginTransaction();\n\t\tsession.update(this);\n\t\tsession.getTransaction().commit();\n\t}",
"@Override\r\n public void updateEntity(String entityName, DataStoreEntity dataStoreEntity) {\n\r\n }",
"@Override\n\tpublic void update(Users entity) {\n\t\tSession session = this.sessionFactory.getCurrentSession();\n \tsession.save(entity);\n\t}",
"public Address update(Address entity);",
"public void update(Book entity)\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tbookdao.openCurrentSessionwithTransation();\r\n\t\t\tbookdao.update(entity);\r\n\t\t\tbookdao.closeSessionwithTransaction();\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public T update(T entity) throws DataAccessException;",
"public PtJJdwcy update(PtJJdwcy entity);",
"public abstract boolean update(T entity) throws ServiceException;",
"Table8 update(Table8 table8) throws EntityNotFoundException;",
"boolean updateById(T entity);",
"@Override\n\tpublic void update(T entity) {\n\t\tbaseDaoImpl.update(entity);\n\t}",
"void update(T obj) throws PersistException;",
"public HrJBorrowcontract update(HrJBorrowcontract entity);",
"@Override\r\n\tpublic Long update(Producto entity) throws Exception {\n\t\treturn productRepository.update(entity);\r\n\t}",
"CounselorBiographyTemp update(CounselorBiographyTemp entity);",
"public void updateByEntity(Paciente paciente) {\n\t\n}",
"void updateUser(User entity) throws UserDaoException;",
"@Override\n\tpublic void update(EmpType entity) {\n\t\t\n\t}",
"@Update\n void update(UsersEntity usersEntity);",
"Product update(Product product, long id);",
"@Override\n\tpublic void updateEntityByHql(String hql, Object... param) {\n\t\tgetQuery(hql,param).executeUpdate();\n\t}",
"void update(EmployeeDetail detail) throws DBException;",
"public void update(Employee employee){\n employeeRepository.save(employee);\n }",
"public void update(TdiaryArticle obj) throws SQLException {\n\r\n\t}",
"public void update(T obj) {\n\t\tSession session = sessionFactory.getCurrentSession();\n\t\tsession.update(obj);\n\t\t\n\t}",
"public void Update(StokContract entity) {\n\t\t\n\t}",
"int updateByPrimaryKey(StudentEntity record);",
"@Test\r\n\tpublic void testUpdate() {\r\n\t\tList<E> entities = dao.findAll();\r\n\t\tE updated = supplyUpdated(entities.get(0));\r\n\t\tdao.update(entities.get(0));\r\n\t\tentities = dao.findAll();\r\n\t\tassertEquals(updated, entities.get(0));\r\n\t}",
"@Override\n\tpublic void Update(PersonelContract entity) {\n\n\t}",
"public void update(T obj) {\n\t\tSession session = this.sessionFactory.getCurrentSession();\n\t\tsession.update(obj);\n\t}",
"@Override\r\n public void update(Answer entity) {\n\r\n }",
"@Override\n\tpublic ImageEntity update(Object entity) {\n\t\tDatabaseContext.merge(entity);\n\t\treturn (ImageEntity) entity;\n\t}",
"UserEntity updateUser(UserEntity userEntity);",
"public void doUpdate(T objectToUpdate) throws SQLException;",
"public void update(T object) throws SQLException;",
"@Override\r\n\tpublic void update(Object obj) throws DAOException {\n\r\n\t}",
"@Override\r\n\tpublic void update(Botany botany) {\n\t\tdao.update(botany);\r\n\t}",
"@Override\r\n\tpublic void update(T t) {\n\t\tsuper.getSessionFactory().getCurrentSession().update(t);\r\n\t\tsuper.getSessionFactory().getCurrentSession().flush();\r\n\t}",
"@Override\n\t\tpublic boolean update(Carrera entity, int id) {\n\t\t\t\treturn false;\n\t\t}",
"@Override\r\n\tpublic T update(T entity) throws Exception {\n\t\ttry {\r\n\t\t\tthis.getcurrentSession().update(entity);\r\n\t\t\treturn entity;\r\n\t\t}catch (NonUniqueObjectException e) {\r\n\t\t\tthis.getcurrentSession().merge(entity);\r\n\t\t\treturn entity;\r\n\t\t} catch (DataAccessException e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\tthrow new Exception(\"更新\" + entity.getClass().getName() + \"实例失败\", e);\r\n\t\t}\r\n\t}",
"@Override\n public void update(Object object, Object id) throws DAOException {\n\n }",
"@Override\n\tpublic void update(UploadDF entity) {\n\t\tSession session = factory.openSession();\n\t\ttry{\n\t\t\tsession.beginTransaction();\n\t\t\tsession.update(entity);\n\t\t\tsession.getTransaction().commit();\n\t\t}catch(HibernateException exception){\n\t\t\tsession.getTransaction().rollback();\n\t\t\tthrow exception;\n\t\t}finally{\n\t\t\tsession.close();\n\t\t}\n\t}",
"Product updateProductInStore(Product product);",
"public E saveUpdate(E entity){\n EntityTransaction transaction = entityManager.getTransaction();\n transaction.begin();\n E e = entityManager.merge(entity);\n transaction.commit();\n return e;\n }",
"void updateOfProductById(long id);",
"private void updateObject(Object object) {\n Connection connection = ConnectionPoll.getConnection();\n CRUDService crudService = new CRUDService(connection, object.getClass());\n\n try {\n crudService.update((SimpleORMInterface) object);\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n }\n\n ConnectionPoll.releaseConnection(connection);\n\n try {\n connection.close();\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n }\n }",
"@Override\n public E update(E entity) {\n LOG.info(\"[update] Start: entity = \" + entity.getClass().getSimpleName());\n entityManager.merge(entity);\n LOG.info(\"[update] End\");\n return entity;\n }",
"public long update(Entity entity){\r\n\t\ttry {\r\n\t\t\tthis.prepareFields(entity, true);\r\n\t\t\tString tableName = this.getTableName();\r\n\t\t\tTransferObject to = new TransferObject(\r\n\t\t\t\t\t\ttableName,\r\n\t\t\t\t\t\tprimaryKeyTos,\r\n\t\t\t\t\t\tfieldTos, \r\n\t\t\t\t\t\tTransferObject.UPDATE_TYPE);\r\n\t\t\treturn transactStatements(to);\r\n\t\t} catch (Exception e) {\r\n\t\t\tLog.e(\"GPALOG\" , e.getMessage(),e); \r\n\t\t}\r\n\t\treturn 0;\r\n\t}",
"@Override\n\tpublic int update(Subordination entity) throws DBOperationException {\n\t\treturn 0;\n\t}",
"@Override\n\tpublic void update(Recipe entity) {\n\t\t\n\t}",
"@Test\r\n public void testUpdate() throws Exception {\r\n MonitoriaEntity entity = data.get(0);\r\n PodamFactory pf = new PodamFactoryImpl();\r\n MonitoriaEntity nuevaEntity = pf.manufacturePojo(MonitoriaEntity.class);\r\n nuevaEntity.setId(entity.getId());\r\n persistence.update(nuevaEntity);\r\n// Assert.assertEquals(nuevaEntity.getName(), resp.getName());\r\n }",
"public void crudOperationStudent(){\n //Retrieve Student\n Student student=entityManager.find(Student.class,2L);\n // persistence Context have Student\n //Retrieve Passport\n Passport passport=student.getPassport();\n // persistence Context have Student,passport\n //Update passport number for student\n passport.setPassportNo(\"ZX132322\");\n // persistence Context have Student, updated-passport\n //update Student details\n student.setAge(25);\n // persistence Context have updated-Student, updated-passport\n entityManager.persist(student);\n\n }",
"int updateByPrimaryKey(UserEntity record);",
"public Client update(Client updated) throws EntityNotFoundException;",
"<T> void update(T persistentObject);",
"public CbmCItemFininceItem update(CbmCItemFininceItem entity);",
"@Override\n public void update(Etiqueta etiqueta) {\n String updateSql = \"UPDATE etiqueta SET etiqueta = :etiqueta\" +\n \"where id = :id;\";\n try (Connection con = sql2o.open()) {\n con.createQuery(updateSql)\n .addParameter(\"etiqueta\", etiqueta.getEtiqueta())\n .addParameter(\"id\", etiqueta.getId())\n .executeUpdate();\n }\n }",
"void updateEntry(BlogEntry entry) throws DAOException;",
"int updateByPrimaryKey(Dormitory record);",
"int updateByPrimaryKey(AccessModelEntity record);",
"public void update(Expence expence)\r\n/* 169: */ {\r\n/* 170:174 */ this.expenceDao.update(expence);\r\n/* 171: */ }",
"@Override\r\n\tpublic void update() throws SQLException {\n\r\n\t}",
"@Override\n\tpublic User updateEntity(long id, User Entity) throws Exception {\n\t\treturn null;\n\t}",
"public void updateEntity2(Entity2 entity2) throws DaoException;",
"@Override\n\tpublic Comprobante update(Comprobante entity) throws Exception {\n\t\treturn comproRepository.save(entity);\n\t}",
"default E update(ID id, E entity) {\n return update(id, entity, null);\n }",
"int updateByPrimaryKey(Goods record);",
"int updateByPrimaryKey(Goods record);",
"public int updateById(EvaluetingListDO evaluetingList) throws DataAccessException;",
"public void update(SgfensBancoPk pk, SgfensBanco dto) throws SgfensBancoDaoException;",
"int updateByPrimaryKey(TestEntity record);",
"@Override\n\tpublic int updateObject(Evaluate entity) {\n\t\treturn evaluateMapper.updateObject(entity);\n\t}",
"public void update(RutaPk pk, Ruta dto) throws RutaDaoException;",
"int updateByPrimaryKey(GoodsPo record);",
"@Override\n\t@Transactional\n\tpublic T update(T entity) {\n\t\tif (entity == null) {\n\t\t\treturn null;\n\t\t}\n\t\thibernateTemplate.update(entity);\n\t\thibernateTemplate.getSessionFactory().getCurrentSession().flush();\n\t\thibernateTemplate.getSessionFactory().getCurrentSession().clear();\n\t\treturn getById(entity.getId());\n\t}",
"@Override\n public void update(Curso entity) {\n Connection c = null;\n PreparedStatement pstmt = null;\n\n try {\n c = DBUtils.getConnection();\n pstmt = c.prepareStatement(\"UPDATE curso SET idprofesor = ?, nombrecurso = ?, claveprofesor = ?, clavealumno = ? WHERE idcurso = ?\");\n\n pstmt.setInt(1, entity.getIdProfesor());\n pstmt.setString(2, entity.getNombre());\n pstmt.setString(3, entity.getClaveProfesor());\n pstmt.setString(4, entity.getClaveAlumno());\n pstmt.setInt(5, entity.getIdCurso());\n \n pstmt.executeUpdate();\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n try {\n if (pstmt != null) {\n pstmt.close();\n }\n DBUtils.closeConnection(c);\n } catch (SQLException ex) {\n Logger.getLogger(JdbcCursoRepository.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }",
"public void update(E model) {\n\t\tgetHibernateTemplate().update(model);\r\n\t}",
"int updateByPrimaryKey(Pet record);",
"@Override\r\npublic int update(Detalle_pedido d) {\n\treturn detalle_pedidoDao.update(d);\r\n}"
] | [
"0.8454669",
"0.82874477",
"0.82874477",
"0.8159577",
"0.7961549",
"0.78471637",
"0.78431344",
"0.78431344",
"0.7837038",
"0.77965456",
"0.778916",
"0.7782585",
"0.774406",
"0.7731855",
"0.7689666",
"0.76660883",
"0.7598838",
"0.7598838",
"0.7550068",
"0.74755126",
"0.7407786",
"0.7405153",
"0.7363775",
"0.735088",
"0.73102397",
"0.7307939",
"0.7304708",
"0.7288543",
"0.7268739",
"0.72606915",
"0.72467893",
"0.7242594",
"0.72356075",
"0.7233054",
"0.71605873",
"0.7158106",
"0.71474844",
"0.71379566",
"0.7121112",
"0.709913",
"0.7090495",
"0.70642173",
"0.7053348",
"0.70498765",
"0.703923",
"0.70105183",
"0.69979525",
"0.6974619",
"0.6955318",
"0.6953223",
"0.69272834",
"0.6923944",
"0.69157153",
"0.6915286",
"0.6905269",
"0.69001794",
"0.6888065",
"0.6868708",
"0.6868228",
"0.68679893",
"0.68581915",
"0.6857065",
"0.68542784",
"0.68482345",
"0.68452793",
"0.6838672",
"0.6828599",
"0.6826301",
"0.68195575",
"0.68188876",
"0.6814722",
"0.6812558",
"0.68050003",
"0.6792922",
"0.6783986",
"0.67678005",
"0.675385",
"0.6740538",
"0.67383784",
"0.6734841",
"0.6734437",
"0.67308617",
"0.6726968",
"0.67255694",
"0.6718666",
"0.671863",
"0.67097306",
"0.67091584",
"0.67014164",
"0.67014164",
"0.6687156",
"0.66824055",
"0.66556686",
"0.66406846",
"0.66398877",
"0.6633954",
"0.6631986",
"0.663006",
"0.6629605",
"0.6627927",
"0.6623427"
] | 0.0 | -1 |
Deletes an entity from the database | protected void delete(Object object) {
EntityManager em = getEntityManager();
em.getTransaction().begin();
try {
em.remove(object);
em.getTransaction().commit();
} catch (Exception e) {
LOG.error("Could not delete Object", e);
em.getTransaction().rollback();
} finally {
em.close();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@DELETE\n public void delete() {\n PersistenceService persistenceSvc = PersistenceService.getInstance();\n try {\n persistenceSvc.beginTx();\n deleteEntity(getEntity());\n persistenceSvc.commitTx();\n } finally {\n persistenceSvc.close();\n }\n }",
"void deleteEntityById(Long id);",
"void delete(Entity entity);",
"public void delete(E entity){\n Object idEntity = HibernateUtil.getIdEntity(entity);\n EntityTransaction entityTransaction = entityManager.getTransaction();\n entityTransaction.begin();\n entityManager.createNativeQuery(\"delete from \" + entity.getClass().getSimpleName().toLowerCase() +\n \" where id = \" + idEntity).executeUpdate();\n entityTransaction.commit();\n }",
"public void delete() throws EntityPersistenceException {\n\n }",
"void delete(int entityId);",
"void delete(E entity);",
"void delete(E entity);",
"public void delete(T entity) {\n\t\tsessionFactory.getCurrentSession().delete(entity);\n\t}",
"public void deleteEntity(AnnexDetail entity) throws Exception {\n\t\t\n\t}",
"protected void delete(Object entity) {\r\n try {\r\n entityManager.getTransaction().begin();\r\n entityManager.remove(entity);\r\n entityManager.getTransaction().commit();\r\n } catch (Exception e) {\r\n System.err.println(\"Erro ao remover Entidade \" + e.getMessage());\r\n }\r\n }",
"public void delete(E entity) {\n Session session = DAOUtils.getSession();\n Transaction trans = session.beginTransaction();\n\n session.delete(entity);\n\n trans.commit();\n }",
"void delete(Object entity);",
"public void delete(T entity) throws Exception{\n\t\tem.remove(entity);\n\t}",
"public <T> boolean delete(T entity);",
"void delete(T entity);",
"void delete(T entity);",
"public void delete(EmployeeEntity entity){\n EmployeeDB.getInstance().delete(entity);\n }",
"boolean delete(T entity) throws Exception;",
"Boolean delete(T entity);",
"@Override\n public E delete(final E entity) {\n LOG.info(\"[delete] Start: entity = \" + entity.getClass().getSimpleName());\n entityManager.remove(entity);\n LOG.info(\"[delete] End\");\n return entity;\n }",
"@Override\n\tpublic void delete(T entity) {\n\t\tbaseDaoImpl.delete(entity);\n\t}",
"@Override\n\tpublic void delete(T entity) {\n\t\tbaseDaoImpl.delete(entity);\n\t}",
"@Override\r\n\tpublic void delete(T entity) throws Exception {\n\t\ttry {\r\n\t\t\tthis.getcurrentSession().delete(entity);\r\n\t\t} catch (DataAccessException e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\tthrow new Exception(\"删除\" + entity.getClass().getName() + \"实例失败\", e);\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void delete(UploadDF entity) {\n\t\tSession session = factory.openSession();\n\t\ttry{\n\t\t\tsession.beginTransaction();\n\t\t\tsession.delete(entity);\n\t\t\tsession.getTransaction().commit();\n\t\t}catch(HibernateException exception){\n\t\t\tsession.getTransaction().rollback();\n\t\t\tthrow exception;\n\t\t}finally{\n\t\t\tsession.close();\n\t\t}\n\t}",
"@Override\r\n public void deleteEntity(String entityName) {\n\r\n }",
"@DELETE\n public void delete() {\n try {\n dao.delete(dao.retrieveById(id));\n } catch (EntityInUse eiu) {\n throw new WebApplicationException(WSUtils.buildError(400, EntityInUse.ERROR_MESSAGE));\n }\n }",
"@Override\n\tpublic ImageEntity delete(Object entity) {\n\t\tDatabaseContext.delete(entity);\n\t\treturn (ImageEntity) entity;\n\t}",
"@Transactional\n\t@Override\n\tpublic void delete(T entity) {\n\t\tregistroDao.delete((Registro) entity);\n\t\t\n\t}",
"@Override\n\tpublic void delete(T entity) {\n\t}",
"@Override\n\tpublic void delete(Object entidade) {\n\t\t\n\t}",
"@Override\n\tpublic void delete(Translator entity) {\n\t\t\n\t}",
"ApiResponse deleteEntityById(Integer id);",
"@Override\n\t@Transactional\n\tpublic T delete(T entity) {\n\t\tif (entity == null) {\n\t\t\treturn null;\n\t\t}\n\t\thibernateTemplate.delete(entity);\n\t\treturn entity;\n\t}",
"@Override\n\tpublic void delete(Field entity) {\n\t\t\n\t}",
"public void delete(HrJBorrowcontract entity);",
"@Override\n\tpublic int deleteObject(Evaluate entity) {\n\t\treturn evaluateMapper.deleteObject(entity);\n\t}",
"boolean deleteById(T entity);",
"@Transactional\n\t@Override\n\tpublic void deleteById(Integer entityId) {\n\t\tregistroDao.deleteById(entityId);\n\t}",
"public void delete() throws Exception\n {\n dao.delete(this);\n }",
"@DeleteMapping(name = \"delete\")\n\tpublic ResponseEntity<?> delete(@ModelAttribute Entity entity) {\n\t\tgetService().delete(entity);\n\t\treturn ResponseEntity.ok().build();\n\t}",
"@Override\n\tpublic int deleteByPk(BaseEntity entity) throws DaoException {\n\t\treturn 0;\n\t}",
"public void delete(Address entity);",
"@Override\n\tpublic void delete(EntityManagerFactory emf, Stop entity) {\n\t\t\n\t}",
"public void doDelete(T entity)\n {\n preDoDelete(entity);\n session.delete(entity);\n postDoDelete(entity);\n }",
"@Override\r\n\tpublic void delete(Plate entity) {\n\t\t\r\n\t}",
"void delete(E entity, RequestContext context)\n throws TechnicalException, ResourceNotFoundException;",
"void delete(T obj) throws PersistException;",
"public final void delete() {\n\t\tOllie.delete(this);\n\t\tOllie.removeEntity(this);\n\t\tnotifyChange();\n\t\tid = null;\n\t}",
"public long delete(Entity entity){\r\n\t\ttry {\r\n\t\t\tthis.prepareFields(entity, true);\r\n\t\t\tString tableName = this.getTableName();\r\n\t\t\tTransferObject to = new TransferObject(\r\n\t\t\t\t\t\ttableName,\r\n\t\t\t\t\t\tprimaryKeyTos,\r\n\t\t\t\t\t\tfieldTos, \r\n\t\t\t\t\t\tTransferObject.DELETE_TYPE);\r\n\t\t\t\r\n\r\n\t\t\t\r\n\t\t\treturn transactStatements(to);\r\n\t\t} catch (Exception e) {\r\n\t\t\tLog.e(\"GPALOG\" , e.getMessage(),e); \r\n\t\t}\r\n\t\treturn 0;\r\n\t}",
"@Override\n\tpublic void delete(Audit entity) {\n\t\t\n\t}",
"@Override\n\tpublic void delete(User entity) {\n\t\t\n\t}",
"public void delete(ControlAcceso entity) {\n\n\t}",
"public void delete(Employee employee){\n employeeRepository.delete(employee);\n }",
"@Override\n public void delete(SideDishEntity entity) {\n\n }",
"public int delete(GenericEntity entity) throws GenericEntityException {\n SQLProcessor sqlP = new AutoCommitSQLProcessor(helperName);\n\n try {\n return deleteImpl(entity, sqlP.getConnection());\n } catch (GenericDataSourceException e) {\n sqlP.rollback();\n throw new GenericDataSourceException(\"Exception while deleting the following entity: \" + entity.toString(), e);\n } finally {\n closeSafely(entity, sqlP);\n }\n }",
"@Override\r\n\tpublic void delete(Empregado entity) throws Exception {\n\t\tentity.setAtivo(false);\r\n\t\tem.unwrap(Session.class).update(entity);\r\n\t}",
"public void delete(Contract entity) {\n\r\n\t}",
"public void deleteGeominas(Geominas entity) throws Exception;",
"@Override\n\t@Transactional\n\tpublic void delete(Long id) {\n\t\tem.remove(findOne(id));\n\t\t\n\t}",
"@Override\n\tpublic void delete(Recipe entity) {\n\t\t\n\t}",
"public <T> boolean delete(Class<T> entityClass, String id);",
"public void delete(E model) {\n\t\tgetHibernateTemplate().delete(model);\r\n\t}",
"default void delete(E entity)\n throws TechnicalException, ResourceNotFoundException {\n delete(entity, null);\n }",
"public void delete(HrCStatitem entity);",
"@SuppressWarnings(\"unchecked\")\n public void delete(T entity) throws EntityNotFoundException, DAOException {\n Helper.checkNull(entity, \"entity\");\n Helper.checkEntityManager(entityManager);\n\n try {\n Id id = ((Id) ((Long) entity.getId()));\n T persitedEntity = retrieveById(id);\n persitedEntity.setDeleted(true);\n entityManager.merge(persitedEntity);\n } catch (Exception e) {\n throw Helper.wrapWithDAOException(e,\n \"Failed to delete entity.\");\n }\n }",
"public void delete(Object bo) {\r\n getPersistenceBrokerTemplate().delete(bo);\r\n }",
"public void delete(SecRole entity);",
"public void deletePhysical(final T entity)\n\t{\n\t\tem.remove(entity);\n\t}",
"@Override\n\tpublic Result delete(CurriculumVitae entity) {\n\t\treturn null;\n\t}",
"@Override\r\n\t@Transactional\r\n\tpublic void deleteById(Long id) {\n\t\tordenRepository.deleteById(id);\r\n\t}",
"@Override\n\t@Transactional\n\tpublic T deleteSafe(T entity) {\n\t\tif (entity == null) {\n\t\t\treturn null;\n\t\t}\n\t\tentity = getById(entity.getId()); // Retrieve a copy of the entity from the database before trying to delete it.\n\t\thibernateTemplate.delete(entity);\n\t\treturn entity;\n\t}",
"@Override\r\n\tpublic void delete(T t) {\n\t\tsuper.getSessionFactory().getCurrentSession().delete(t);\r\n\t\tsuper.getSessionFactory().getCurrentSession().flush();\r\n\t}",
"@Override\n\tpublic void delete(T t) {\n\t\thibernateTemplate.delete(t);\n\t}",
"public void deleteById(Long id);",
"@DELETE\n public void delete() {\n }",
"@DELETE\n public void delete() {\n }",
"public void delete( T obj) {\n\t\tSession session = this.sessionFactory.getCurrentSession();\n\t\t\n\t\tsession.delete(obj);\n\t}",
"@RequestMapping(value = \"/delete\", method = RequestMethod.DELETE)\n\tpublic void delete(@RequestBody User entity) {\n\t\tdao.delete(entity);\n\t}",
"@Test\n public void deleteComentarioTest(){\n ComentarioEntity entity = data.get(0);\n comentarioPersistence.delete(entity.getId());\n ComentarioEntity eliminado = em.find(ComentarioEntity.class,entity.getId());\n Assert.assertNull(eliminado);\n }",
"@Override\n\tpublic void delete(FxzfLane entity) {\n\t\t\n\t}",
"@Override\n\t@Transactional\n\tpublic void delete(int theId) {\n\t\tSession currentSession = entityManager.unwrap(Session.class);\n\t\t// delete object with primary key\n\t\tQuery theQuery = currentSession.createQuery(\"delete from Student where id=:studentId\");\n\t\ttheQuery.setParameter(\"studentId\", theId);\n\n\t\ttheQuery.executeUpdate();\n\t}",
"public abstract boolean delete(PK id);",
"@Override\n\tpublic void delete(List<Field> entity) {\n\t\t\n\t}",
"@Override\n\tpublic void delete(Long primaryKey) {\n\t\t\n\t}",
"@Override\n public void deleteById(long id) {\n\n Query theQuery = entityManager.createQuery(\"DELETE FROM Employee WHERE id=:employeeId\");\n \n theQuery.setParameter(\"employeeId\", id);\n \n theQuery.executeUpdate();\n }",
"public void eliminarEntidad(E entidad) {\n logger.debug(\"Eliminando la entidad: [\" + clasePersistente + \"]\" + entidad);\n getSesion().delete(entidad);\n }",
"@DELETE\n @Path(\"/\")\n public Response delete() {\n\n if (entityDefinition == null) {\n return Response.status(Status.NOT_FOUND).build();\n }\n entityDefinition.getService().deleteCustom(entityId);\n return Response.status(Status.NO_CONTENT).build();\n }",
"void deleteById(Long Id);",
"@Delete\n void delete(UsersEntity usersEntity);",
"public void delete(final T entity)\n\t{\n\t\tentity.setDeleted(true);\n\t\t em.merge(entity);\n\t}",
"public void remove(T entity) throws DataAccessException;",
"public void delete() {\r\n\t\tCampLeaseDAO leaseDao = (CampLeaseDAO) getApplicationContext().getBean(\"leaseDaoBean\", CampLeaseDAO.class);\r\n\t\tleaseDao.delete(this);\r\n\t}",
"@Override\n\tpublic void delete(Category entity) {\n\t\t\n\t}",
"@Override\n\tpublic boolean delete(Message entity) throws SQLException {\n\t\treturn false;\n\t}",
"public void delete(Book entity) {\n\t\tentityManager.remove(entityManager.contains(entity) ? entity : entityManager.merge(entity));\n\t}",
"public void delete(SgfensBancoPk pk) throws SgfensBancoDaoException;",
"@Override\r\n\tpublic void deletePost(Post post) {\n\t\tgetHibernateTemplate().delete(post);\r\n\t}",
"@Override\r\n\tpublic void deleteEntity(TypeModePaiement entity) {\n\t\trepository.deleteById(entity.getIdTypeMdp());\r\n\t}",
"void deleteById(Long id);",
"void deleteById(Long id);"
] | [
"0.83607006",
"0.8321758",
"0.82401305",
"0.81812394",
"0.81774116",
"0.8020754",
"0.7987374",
"0.7987374",
"0.7904617",
"0.7898728",
"0.78969055",
"0.78906673",
"0.7879374",
"0.78227514",
"0.7752682",
"0.77522933",
"0.77522933",
"0.7735946",
"0.7719033",
"0.7707974",
"0.7699342",
"0.7643159",
"0.7643159",
"0.7608343",
"0.7579022",
"0.7565841",
"0.7559274",
"0.7543134",
"0.7536132",
"0.7520799",
"0.7510106",
"0.75064886",
"0.7500492",
"0.74550384",
"0.7448142",
"0.7414808",
"0.74068546",
"0.7351247",
"0.73149383",
"0.73073244",
"0.72843415",
"0.7250042",
"0.7236431",
"0.72258884",
"0.7216772",
"0.7205345",
"0.7193628",
"0.7166133",
"0.71656233",
"0.71588767",
"0.71498215",
"0.7143554",
"0.7132675",
"0.7117469",
"0.71150756",
"0.71115625",
"0.7109928",
"0.708151",
"0.706165",
"0.7051722",
"0.70505494",
"0.704402",
"0.70365",
"0.70258474",
"0.70125884",
"0.70016444",
"0.69826996",
"0.6958008",
"0.6951996",
"0.69472",
"0.6946747",
"0.69300306",
"0.6925456",
"0.69216835",
"0.6916401",
"0.6911878",
"0.6911878",
"0.69090295",
"0.69061303",
"0.6905555",
"0.6894446",
"0.6892063",
"0.6883758",
"0.6862009",
"0.6860144",
"0.685485",
"0.68544805",
"0.68486756",
"0.684661",
"0.6844553",
"0.6843332",
"0.6840921",
"0.6825037",
"0.6810828",
"0.6809347",
"0.6806848",
"0.678637",
"0.6785441",
"0.6780503",
"0.67760646",
"0.67760646"
] | 0.0 | -1 |
Back up old jar file | private void updateJar(){
Path currentFile = Paths.get(".\\"+APPLICATION_JAR_NAME);
Path backupFile = Paths.get(".\\"+APPLICATION_JAR_BK_NAME);
try {
if (Files.exists(currentFile)){
Files.copy(currentFile, backupFile, StandardCopyOption.REPLACE_EXISTING);
}
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
logger.info("Backed up current jar file.");
// Download new jar
logger.info("Downloading new jar file...");
getNewJarFromServer();
// Restart tomcat
logger.info("Restart application...");
Path executionFile = Paths.get(".\\startConnector.bat");
String command = executionFile.toString();
ProcessBuilder builder = new ProcessBuilder(command);
builder.redirectErrorStream(true); // redirect error stream to output stream
builder.redirectOutput(ProcessBuilder.Redirect.INHERIT);
try {
builder.start();
System.exit(0);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
logger.error(e.getMessage());
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected static void instrumentJarFile(String pathToFile) throws IOException {\n File jarFile = new File(pathToFile);\n // Use tmp file for output (in the same directory).\n File newFile = File.createTempFile(\"any\", \".jar\", jarFile.getParentFile());\n ZipInputStream zis = null;\n ZipOutputStream zos = null;\n try {\n zis = new ZipInputStream(new FileInputStream(jarFile));\n zos = new ZipOutputStream(new FileOutputStream(newFile));\n for (ZipEntry entry = zis.getNextEntry(); entry != null; entry = zis.getNextEntry()) {\n String name = entry.getName();\n zos.putNextEntry(new ZipEntry(name));\n if (name.endsWith(\".class\")) {\n // We instrument classfiles and then write them to\n // new jar.\n byte[] classfileBuffer = FileUtil.loadBytes(zis, false);\n byte[] newClassfileBuffer = instrumentClassFile(classfileBuffer);\n zos.write(newClassfileBuffer);\n } else {\n int data;\n while ((data = zis.read()) != -1) {\n zos.write(data);\n }\n }\n zos.closeEntry();\n }\n } finally {\n FileUtil.closeAndIgnoreExceptions(zis);\n FileUtil.closeAndIgnoreExceptions(zos);\n }\n\n // Move new jar to old jar.\n // Files.move(newFile, jarFile, StandardCopyOption.REPLACE_EXISTING);\n FileUtil.copyBytes(newFile, jarFile);\n newFile.delete();\n }",
"private void endEntry() {\n\t\tif (lastImageFile!=null) {\r\n\t\t\tSystem.out.println(\"Dealing with image file: \" + lastImageLumpName);\r\n\t\t\t//Add an entry for it\r\n\t\t\ttry {\r\n\t\t\t\tZipEntry dir = new ZipEntry(\"ohrrpgce/games/\" + newRPGName + \"/\" + lastImageLumpName);\r\n\t\t\t\t//System.out.println(\"Entry opened: \" + dir.getName());\r\n\t\t\t\ttempJar.putNextEntry(dir);\r\n\t\t\t} catch (IOException ex) {\r\n\t\t\t\tSystem.out.println(\"Error adding entry for image file: \" + lastImageLumpName);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//Copy it.\r\n\t\t\ttry {\r\n\t\t\t\tBufferedInputStream in = new BufferedInputStream(new FileInputStream(lastImageFile));\r\n\t\t\t\tbyte[] lin = new byte[1024];\r\n\t\t\t\tint len = 0;\r\n\t\t\t\tfor(;;) {\r\n\t\t\t\t\tlen = in.read(lin);\r\n\t\t\t\t\tif (len <= 0)\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\ttempJar.write(lin, 0, len);\r\n\t\t\t\t}\r\n\t\t\t\tin.close();\r\n\t\t\t} catch (IOException ex) {\r\n\t\t\t\tSystem.out.println(\"Error copying raw image data: \" + ex.toString());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tlastImageFile.delete();\r\n\t\t\tlastImageFile=null;\r\n\t\t} \r\n\t\t\r\n\t\t//Close the entry\r\n\t\ttry {\r\n\t\t\t//System.out.println(\" + Entry closed\");\r\n\t\t\ttempJar.closeEntry();\r\n\t\t} catch (IOException ex) {\r\n\t\t\tSystem.out.println(\"Error closing jar entry: \" + ex.toString());\r\n\t\t}\r\n\t}",
"static FilePath copyJar( PrintStream log, FilePath dst, Class<?> representative, String seedName )\n {\n try\n {\n // in normal execution environment, the master should be loading 'representative' from this jar, so\n // in that way we can find it.\n File jar = Which.jarFile( representative );\n FilePath copiedJar = dst.child( seedName + \".jar\" );\n\n if ( jar.isDirectory() )\n {\n // but during the development and unit test environment, we may be picking the class up from the classes dir\n Zip zip = new Zip();\n zip.setBasedir( jar );\n File t = File.createTempFile( seedName, \"jar\" );\n t.delete();\n zip.setDestFile( t );\n zip.setProject( new Project() );\n zip.execute();\n jar = t;\n }\n else if ( copiedJar.exists() //\n && copiedJar.digest().equals( Util.getDigestOf( jar ) ) ) //\n // && copiedJar.lastModified() == jar.lastModified() )\n {\n log.println( seedName + \".jar already up to date\" );\n return copiedJar;\n }\n\n // Theoretically could be a race condition on a multi-executor Windows slave; symptom would be an IOException during the build.\n // Could perhaps be solved by synchronizing on dst.getChannel() or similar.\n new FilePath( jar ).copyTo( copiedJar );\n log.println( \"Copied \" + seedName + \".jar\" );\n return copiedJar;\n }\n catch ( IOException | InterruptedException e )\n {\n throw new RuntimeException( e.getMessage(), e);\n }\n }",
"private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {\nif (clsread != null)\n{\n try\n {\nString bakfilename = utils.ClasswithouthExtension(filePath)+\".bak\";\nutils.WriteBytesToFile(bakfilename,array);\n\nbyte[] classbytes = null;\n\nif (patches.containsKey(filePath))\n{\nclassbytes = patches.get(filePath);\n}\nelse\n{\nclsread.MethodsFromArray();\nClassWriter clswrite = new ClassWriter();\nclassbytes = clswrite.GetClassBytes(clsread);\n}\n\nif (classbytes!=null&&classbytes.length>0)\n{\n String saveFileName = \"\";\n if (filePath.contains(PathSeparator))\n {\n String JarName = filePath.substring(0, filePath.lastIndexOf(PathSeparator));\n String DirectoryName = JarName.substring(0, JarName.lastIndexOf(\"\\\\\"));\n saveFileName = DirectoryName+\"\\\\\"+GetFileName(filePath);\n }\n else\n {\n saveFileName = filePath;\n }\n \nutils.WriteBytesToFile(saveFileName,classbytes); // write the new file!\n}\nelse\n{\nJOptionPane.showMessageDialog(null,\n\"Error while writting the class!\", \"Fatal error!\", JOptionPane.ERROR_MESSAGE);\n\n}\n\n }\n catch (Exception ex)\n {\n\n }\n}\n }",
"public void ExtractFileFromJar()\n\t{\n\t\tString thisDir = getClass().getResource(\"\").getPath();\n\t\t\n\t\tif(thisDir.contains(\"file:\")) //Mac system path\n\t\t\tthisDir= thisDir.replace(\"file:\", \"\");\n\t\telse //Windows system path \"/C:/\", we need to get rid of the first '/'\n\t\t\tthisDir= thisDir.substring(1);\n\t\t\n\t\t//System.out.println(\"thisDir is \"+thisDir);\n\t\tString jarPath = thisDir.replace(\"!/data/\", \"\"); //Get path of jar file\n\t\tint lastSlashIndex = jarPath.lastIndexOf(\"/\");\n\t\tjarFileName = new String(jarPath.substring(lastSlashIndex+1));\n\t\tdestDir = thisDir.replace(jarFileName+\"!/data/\", \"\"); //Set destDir as the current folder in which jar file sits\n\n\t\t//Find Jar file\n\t\ttry {\n\t\t\tFile jarFile = new File(jarPath);\n\t\t\tif (jarFile.isDirectory() || !jarFile.exists()) { //If we cant find jar File in this jarPath\n\t\t\t\t//In windows it is like this \"C:/Users/Esheen/Desktop/ConnChem_1.1.0/Simulation/data/\" \n\t\t\t\tFile newJarfile = new File(jarPath);\n\t\t\t\tString parent = newJarfile.getParentFile().getParent();\n\t\t\t\tparent = parent.concat(new String(\"\\\\\"+jarFileName));\n\t\t\t\t\n\t\t\t\tjarPath= new String(parent);\n\t\t\t\t\n\t\t\t} \n\t\t\tjava.util.jar.JarFile jar = new java.util.jar.JarFile(jarPath);\n\t\t\t\n\t\t\t//Unzip database from jar file\n\t\t\tZipEntry entry = jar.getEntry(\"data/chemdb\");\n\t\t\tFile outputFile = new File(destDir, dbFileName);\n\t\t\t\n\t\t\t\tif (entry.isDirectory()) { // if its a directory, create it\n\t\t\t\t\toutputFile.mkdir();\n\t\t\t\t}\n\t\t\t\tInputStream in = jar.getInputStream(entry);\n\t\t\t\tFileOutputStream fos = new java.io.FileOutputStream(outputFile);\n\t\t\t\twhile (in.available() > 0) { // write contents of 'is' to 'fos'\n\t\t\t\t\tfos.write(in.read());\n\t\t\t\t}\n\t\t\t\tfos.close();\n\t\t\t\tin.close();\n\n\t\t\t\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private void copyNGClientJar(File file, File targetLibDir) throws IOException\n\t{\n\t\tFile dest = new File(targetLibDir, file.getName());\n\t\tZipInputStream zin = new ZipInputStream(new FileInputStream(file));\n\t\tZipOutputStream zout = new ZipOutputStream(new FileOutputStream(dest));\n\t\tbyte[] buf = new byte[1024];\n\n\t\tZipEntry entry = zin.getNextEntry();\n\t\twhile (entry != null)\n\t\t{\n\t\t\tString name = entry.getName();\n\t\t\tboolean toBeDeleted = false;\n\t\t\tfor (String f : EXCLUDE_FROM_NG_JAR)\n\t\t\t{\n\t\t\t\tif (name.startsWith(f))\n\t\t\t\t{\n\t\t\t\t\ttoBeDeleted = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!toBeDeleted)\n\t\t\t{\n\t\t\t\t// Add ZIP entry to output stream.\n\t\t\t\tzout.putNextEntry(new ZipEntry(name));\n\t\t\t\t// Transfer bytes from the ZIP file to the output file\n\t\t\t\tint len;\n\t\t\t\twhile ((len = zin.read(buf)) > 0)\n\t\t\t\t{\n\t\t\t\t\tzout.write(buf, 0, len);\n\t\t\t\t}\n\t\t\t}\n\t\t\tentry = zin.getNextEntry();\n\t\t}\n\t\t// Close the streams\n\t\tzin.close();\n\t\t// Compress the files\n\t\t// Complete the ZIP file\n\t\tzout.close();\n\t}",
"private static void makeJar(String jarPath, String classPath) throws IOException {\n File jarFile = new File(jarPath);\n File parent = jarFile.getParentFile();\n if (parent != null) {\n parent.mkdirs();\n }\n jarFile.createNewFile();\n String newClassPath = classPath.substring(classPath.indexOf(\"tmp/\") + 4);\n FileOutputStream fout = new FileOutputStream(jarFile);\n Manifest manifest = new Manifest();\n manifest.getMainAttributes().put(Attributes.Name.MANIFEST_VERSION, \"1.0\");\n JarOutputStream jarOut = new JarOutputStream(fout, manifest);\n jarOut.putNextEntry(new ZipEntry(newClassPath));\n FileInputStream fit = new FileInputStream(classPath);\n BufferedInputStream bis = new BufferedInputStream(fit);\n byte[] buff = new byte[10000];\n int bytesRead;\n while ((bytesRead = bis.read(buff)) != -1) {\n jarOut.write(buff, 0, bytesRead);\n }\n jarOut.closeEntry();\n jarOut.close();\n fout.close();\n }",
"public static void copyInContentsOfJar(JarFile jar, JarOutputStream jarOutputStream, String name) throws IOException\n\t{\n\t\t// Copy contents of Go Bible JAR into new JAR\n\t\tfor (Enumeration e = jar.entries(); e.hasMoreElements(); )\n\t\t{\n\t\t\tJarEntry jarEntry = (JarEntry) e.nextElement();\n\t\t\t\n\t\t\t//System.out.println(\"Reading entry from GoBible.jar: \" + jarEntry.getName());\n\t\t\t\n\t\t\tString entryName = jarEntry.getName();\n\t\t\tString sFilepath = \"\";\n\t\t\t// Ignore existing manifest, and ui.properties file if\n\t\t\t// the Collections file has specified UI properties\n\t\t\tif (!entryName.startsWith(\"META-INF\") && !entryName.equals(UI_PROPERTIES_FILE_NAME) && (name == null || entryName.startsWith(name)))\n\t\t\t{\n boolean bNewIcon = false;\n if (entryName.equals(\"Icon.png\") && phoneIconFilepath != null)\n {\n //check for file existance first\n File oFile = new File(baseSourceDirectory, phoneIconFilepath);\n if (oFile.exists())\n {\n bNewIcon = true;\n sFilepath = oFile.getPath();\n }\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"Error: Icon file doesn't exist <\"+phoneIconFilepath+\">.\");\n\n }\n \n InputStream inputStream;\n if (!bNewIcon)\n {\n // Add entry to new JAR file\n jarOutputStream.putNextEntry(jarEntry);\n //copy over the resource from the jar\n inputStream = new BufferedInputStream(jar.getInputStream(jarEntry));\n // Read all of the bytes from the Go Bible JAR file and write them to the new JAR file\n byte[] buffer = new byte [100000];\n int length;\n\n while ((length = inputStream.read(buffer)) != -1)\n {\n jarOutputStream.write(buffer, 0, length);\n }\n\n // Close the input stream\n inputStream.close();\n }\n else\n {\n //add in the replacement icon\n byte[] buffer = new byte[100000]; \n FileInputStream fi = new FileInputStream(sFilepath); \n inputStream = new BufferedInputStream(fi, 100000) ; \n ZipEntry entry = new ZipEntry(\"Icon.png\"); \n jarOutputStream.putNextEntry ( entry ) ; \n\n int count; \n while ((count=inputStream.read(buffer, 0, 100000)) != -1 )\n { \n jarOutputStream.write ( buffer, 0, count ) ; \n } \n inputStream.close(); \n }\n }\n\t\t}\t\t\n\t}",
"public void backup(String filename) throws IOException, RemoteException, Error;",
"public String[] moveBundleToJar(Bundle bundle, String filename, boolean forceScanBundle)\n \t{\n File fileOut = context.getDataFile(filename);\n boolean createNewJar = true;\n if (fileOut.exists())\n if (bundle.getLastModified() <= (fileOut.lastModified() + ONE_SEC_IN_MS)) // File sys is usually accurate to sec \n {\n createNewJar = false;\n if (!forceScanBundle)\n return null; // Use cached jar file\n }\n \n Set<String> packages = new HashSet<String>();\n \t\ttry {\n \t\t\tManifest manifest = null;\n \t\t\tString path = MANIFEST_PATH;\n \t\t\tURL url = bundle.getEntry(path);\n \t\t\tJarOutputStream zos = null;\n \t\t\tif (createNewJar)\n \t\t\t{\n \t\t\tInputStream in = null;\n \t\t\tif (url != null)\n \t\t\t{\n \t\t\t\ttry {\n \t\t\t\t\tin = url.openStream();\n \t\t\t\t} catch (Exception e) {\n \t\t\t\t\te.printStackTrace();\n \t\t\t\t}\n \t\t\t}\n \t\t\tif (in != null)\n \t\t\t{\n manifest = new Manifest(new BufferedInputStream(in));\n } else {\n manifest = new Manifest();\n }\n \t\t\t\n \t\t\tFileOutputStream out = new FileOutputStream(fileOut);\n \t\t\t\n \t zos = new JarOutputStream(out);\n \t if (manifest != null) {\n \t JarEntry e = new JarEntry(MANIFEST_DIR);\n \t e.setTime(System.currentTimeMillis());\n \t e.setSize(0);\n \t e.setCrc(0);\n \t zos.putNextEntry(e);\n \t e = new JarEntry(MANIFEST_NAME);\n \t e.setTime(System.currentTimeMillis());\n \t zos.putNextEntry(e);\n \t manifest.write(zos);\n \t zos.closeEntry();\n \t }\n \t\t\t}\n \t\t\tString paths = \"/\";\n \t\t\tString filePattern = \"*\";\n \t\t\t@SuppressWarnings(\"unchecked\")\n \t\t\tEnumeration<URL> entries = bundle.findEntries(paths, filePattern, true);\n \t\t\twhile (entries.hasMoreElements())\n \t\t\t{\n \t\t\t\turl = entries.nextElement();\n \t\t\t\tString name = url.getPath();\n \t\t\t\tif (name.startsWith(\"/\"))\n \t\t\t\t\tname = name.substring(1);\n \t\t name = entryName(name);\n \t if (name.equals(\"\") || name.equals(\".\"))\n \t continue;\n \t if ((name.equalsIgnoreCase(MANIFEST_DIR)) || (name.equalsIgnoreCase(MANIFEST_PATH)))\n \t\tcontinue;\n \t if (createNewJar)\n \t {\n \t boolean isDir = name.endsWith(\"/\");\n \t long size = isDir ? 0 : -1; // ***????**** file.length();\n \t JarEntry e = new JarEntry(name);\n \t e.setTime(fileOut.lastModified()); //???\n \t if (size == 0) {\n \t e.setMethod(JarEntry.STORED);\n \t e.setSize(0);\n \t e.setCrc(0);\n \t }\n \t zos.putNextEntry(e);\n \t if (!isDir) {\n \t\t InputStream inStream = url.openStream();\n \t\t copyStream(inStream, zos);\n \t inStream.close();\n \t }\n \t zos.closeEntry();\n \t }\n \t \n \t if (!(name.toUpperCase().startsWith(MANIFEST_DIR)))\n \t \t\tpackages.add(getPackageFromName(name));\n \t\t\t}\n \t\t\tif (zos != null)\n \t\t\t zos.close();\n \t\t} catch (FileNotFoundException e) {\n \t\t\te.printStackTrace();\n \t\t} catch (IOException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t\treturn packages.toArray(EMPTY_ARRAY);\n \t}",
"private static void backupSafely(File file) throws IOException {\n File parent = file.getParentFile();\n String name = file.getName();\n\n File backup = new File(parent, name + \".bak\");\n for (int i = 2; backup.exists(); i++) {\n backup = new File(parent, name + \".\" + i + \".bak\");\n }\n\n log.info(\"Backing up \" + file + \" to \" + backup.getName());\n if (!file.renameTo(backup)) {\n log.warn(\"Renaming failed, so using copy to backup {}\", file);\n FileUtils.copyFile(file, backup);\n if (!file.delete()) {\n throw new IOException(\n \"Could not remove broken tar file \" + file);\n }\n }\n }",
"public static File extractTmpFileFromJar(String path, boolean deleteOnExit) throws IOException{\n \t\n // Prepare temporary file\n File temp = File.createTempFile(\"abcd\", \"efgh\");\n temp.delete();\n temp = new File(temp.getParentFile().getAbsolutePath() + path);\n if(deleteOnExit) temp.deleteOnExit();\n if(temp.exists()) return temp;\n \n // Prepare buffer for data copying\n byte[] buffer = new byte[1024];\n int readBytes;\n \n // Open and check input stream\n InputStream is = NativeUtils.class.getResourceAsStream(path);\n if (is == null) {\n throw new FileNotFoundException(\"File \" + path + \" was not found inside JAR.\");\n }\n \n // Open output stream and copy data between source file in JAR and the temporary file\n OutputStream os = new FileOutputStream(temp);\n try {\n while ((readBytes = is.read(buffer)) != -1) {\n os.write(buffer, 0, readBytes);\n }\n } finally {\n // If read/write fails, close streams safely before throwing an exception\n os.close();\n is.close();\n }\n \n return temp;\n }",
"public void addFromJAR() {\n btAddFromJAR().push();\n }",
"private static Path copyFileFromJar(String path) {\n try {\n Path file = Files.createTempFile(\"configme-\", \"-democonfig.yml\");\n Files.copy(TestUtils.class.getResourceAsStream(path), file, REPLACE_EXISTING);\n return file;\n } catch (IOException e) {\n throw new IllegalStateException(e);\n }\n }",
"@Override\r\n public void pack() {\r\n super.pack();\r\n JkFileTree.of(this.classDir()).exclude(\"**/*.jar\").zip().to(packer().jarFile(\"lean\"));\r\n distrib();\r\n }",
"private void backUpDb() throws FileNotFoundException, IOException {\n backUpDb(Options.toString(Options.DATABASE));\n }",
"public static void replaceJar(byte[] jarImage, String jarName,\n\t\tboolean redeploy) throws SQLException\n\t{\n\t\treplaceJar(\"streamed byte image\", jarName, redeploy, jarImage);\n\t}",
"private static byte[] transform(final URL url) throws Exception {\n String name = url.getPath();\n final int idx = name.lastIndexOf('/');\n if (idx >= 0) {\n name = name.substring(idx + 1);\n }\n final String[] nameVersionStr = DeployerUtils.extractNameVersionType(name);\n\n final Manifest manifest = new Manifest();\n manifest.getMainAttributes().putValue(\"Manifest-Version\", \"1.0\");\n manifest.getMainAttributes().putValue(Constants.BUNDLE_MANIFESTVERSION, \"2\");\n manifest.getMainAttributes().putValue(Constants.BUNDLE_SYMBOLICNAME, nameVersionStr[0]);\n manifest.getMainAttributes().putValue(Constants.BUNDLE_VERSION, nameVersionStr[1]);\n\n // Put content\n try (ByteArrayOutputStream os = new ByteArrayOutputStream(1024);\n JarOutputStream out = new JarOutputStream(os)) {\n\n ZipEntry e = new ZipEntry(JarFile.MANIFEST_NAME);\n out.putNextEntry(e);\n manifest.write(out);\n out.closeEntry();\n e = new ZipEntry(\"META-INF/\");\n out.putNextEntry(e);\n e = new ZipEntry(\"META-INF/\" + FEATURE_JSON_PATH + \"/\");\n out.putNextEntry(e);\n out.closeEntry();\n e = new ZipEntry(JSON_FEATURE_DESCRIPTOR_PATH);\n out.putNextEntry(e);\n try (InputStream fis = url.openStream()) {\n StreamUtils.copy(fis, out);\n }\n out.closeEntry();\n out.close();\n return os.toByteArray();\n }\n }",
"public void preArchive() {\n // update version number\n setVersionNumber(CURRENT_VERSION_NO);\n }",
"public abstract void doBackup();",
"private static JarFile createTempJar(File temp, JarFile parentJar, ZipEntry entry) throws IOException\n {\n InputStream inputStream = parentJar.getInputStream(entry);\n try\n {\n FileOutputStream outputStream = new FileOutputStream(temp);\n try\n {\n byte[] buffer = new byte[8096];\n int read = inputStream.read(buffer);\n while (read != -1)\n {\n outputStream.write(buffer, 0, read);\n read = inputStream.read(buffer);\n }\n }\n finally\n {\n outputStream.close();\n }\n }\n finally\n {\n try\n {\n inputStream.close();\n }\n catch (IOException ignored)\n {\n }\n }\n \n return new JarFile(temp);\n }",
"public synchronized static void cleanOldFiles() {\n\t\tGregorianCalendar yesterday = new GregorianCalendar();\n\t\tyesterday.roll(GregorianCalendar.HOUR_OF_DAY,-4);\n\t\tcleanOldFiles(yesterday.getTime());\n\t}",
"public void forceBackup() {\n // If you configures storage support as a file,\n // method push() send all data from memory into file referenced into properties file.\n // Before writing, all expired data will be flushed.\n DacasTransaction.push();\n\n }",
"private void saveApplication(InputStream stream, ApplicationDescription desc,\n boolean isSelfContainedJar)\n throws IOException {\n String name = desc.name() + (isSelfContainedJar ? JAR : OAR);\n Files.write(toByteArray(stream), appFile(desc.name(), name));\n }",
"public void actionPerformed( ActionEvent e )\r\n\t{\n\t\t// | CREATE JAR FILE\r\n\t\t// +---------------------------------------------------+\r\n\t\tif ( e.getActionCommand().equals( CREATE_JAR_ACTION ) )\r\n\t\t{\r\n\t\t\tOwlFileChooser fileChooser =\r\n\t\t\t\t\t\tnew OwlFileChooser( new File( jarFilePath ),\r\n\t\t\t\t\t\t\t\t\t\t\t\"jar\" );\r\n\r\n\t\t\tif ( fileChooser.saveDialog() )\r\n\t\t\t{\r\n\t\t\t\tVector<String> cmdVec = new Vector<String>();\r\n\r\n\t\t\t\tjarFilePath = fileChooser.getSelectedFile().getParent();\r\n\r\n\t\t\t\tif ( fileChooser.getSelectedFile().exists() )\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( !fileChooser.getSelectedFile().delete() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tMainApp.warn( \"Failed to delete existing file: \" +\r\n\t\t\t\t\t\t\t\t\t fileChooser.getSelectedFile() );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcmdVec.add( \"jar\" );\r\n\t\t\t\tcmdVec.add( \"cf\" );\r\n\t\t\t\tcmdVec.add( fileChooser.getSelectedFile().getPath() );\r\n\r\n\t\t\t\tif ( !dllVec.isEmpty() )\r\n\t\t\t\t{\r\n\t\t\t\t\tfor ( int i=0; i<dllVec.size(); i++ )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tcmdVec.add( \"-C\" );\r\n\t\t\t\t\t\tcmdVec.add( OwlUtilities.getPath( dllVec.get( i ) ) );\r\n\r\n\t\t\t\t\t\tcmdVec.add( dllVec.get( i ).substring( dllVec.get( i ).lastIndexOf(\r\n\t\t\t\t\t\t\t\t\tSystem.getProperty( \"file.separator\" ) ) + 1 ) );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ( !pkgVec.isEmpty() )\r\n\t\t\t\t{\r\n\t\t\t\t\tPkgInfo pkgInfo = ( PkgInfo )null;\r\n\r\n\t\t\t\t\tfor ( int i=0; i<pkgVec.size(); i++ )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tpkgInfo = pkgVec.get( i );\r\n\r\n\t\t\t\t\t\tcmdVec.add( \"-C\" );\r\n\t\t\t\t\t\tcmdVec.add( pkgInfo.sPkgPath );\r\n\t\t\t\t\t\tcmdVec.add( pkgInfo.sClassName );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ( !classVec.isEmpty() )\r\n\t\t\t\t{\r\n\t\t\t\t\tfor ( int i=0; i<classVec.size(); i++ )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif ( !( new File( classVec.get( i ) ) ).isDirectory() )\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tcmdVec.add( \"-C\" );\r\n\t\t\t\t\t\t\tcmdVec.add( OwlUtilities.getPath( classVec.get( i ) ) );\r\n\r\n\t\t\t\t\t\t\tcmdVec.add( classVec.get( i ).substring( classVec.get( i ).lastIndexOf(\r\n\t\t\t\t\t\t\t\t\t\tSystem.getProperty( \"file.separator\" ) ) + 1 ) );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\tProcess proc =\r\n\t\t\t\t\t\tRuntime.getRuntime().exec( cmdVec.toArray( new String[ cmdVec.size() ] ) );\r\n\t\t\t\t}\r\n\t\t\t\tcatch ( Exception ex )\r\n\t\t\t\t{\r\n\t\t\t\t\tMainApp.error( ex );\r\n\t\t\t\t}\r\n\r\n\t\t\t\tMainApp.info( \"JAR successfully built!\" );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// +---------------------------------------------------+\r\n\t\t// | ADD DLL(S)\r\n\t\t// +---------------------------------------------------+\r\n\t\telse if ( e.getActionCommand().equals( DLL_ADD_ACTION ) )\r\n\t\t{\r\n\t\t\tOwlIconedFileChooser fileChooser\r\n\t\t\t\t\t= new OwlIconedFileChooser(\r\n\t\t\t\t\t\t\t new File( dllFilePath ),\r\n\t\t\t\t\t\t\t new String[] { \"dll\" },\r\n\t\t\t\t\t\t\t new String[] { \"Native Library ( *.dll )\" },\r\n\t\t\t\t\t\t\t new ImageIcon[] { new ImageIcon( MainApp.getBitmapPath() +\r\n\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t \"libs.gif\" ) } );\r\n\r\n\t\t\tif ( !System.getProperty( \"os.name\" ).toLowerCase().contains( \"win\" ) )\r\n\t\t\t{\r\n\t\t\t\tfileChooser = new OwlIconedFileChooser( new File( System.getProperty( \"user.dir\" ) ),\r\n\t\t\t\t\t\t \t new String[] { \"so\" },\r\n\t\t\t\t\t\t \t new String[] { \"Native Library ( *.so )\" },\r\n\t\t\t\t\t\t \t new ImageIcon[] { new ImageIcon( MainApp.getBitmapPath() + \"libs.gif\" ) } );\r\n\t\t\t}\r\n\r\n\t\t\tfileChooser.setMultiSelectionEnabled( true );\r\n\r\n\t\t\tif ( fileChooser.openDialog() )\r\n\t\t\t{\r\n\t\t\t\tFile[] files = fileChooser.getSelectedFiles();\r\n\r\n\t\t\t\tif ( files != null )\r\n\t\t\t\t{\r\n\t\t\t\t\tdllFilePath = files[ 0 ].getParent();\r\n\t\r\n\t\t\t\t\tfor ( int i=0; i<files.length; i++ )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tdllVec.add( files[ i ].getAbsolutePath() );\r\n\t\t\t\t\t}\r\n\t\r\n\t\t\t\t\tdllList.setListData( dllVec );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// +---------------------------------------------------+\r\n\t\t// | DELETE DLL ( from list )\r\n\t\t// +---------------------------------------------------+\r\n\t\telse if ( e.getActionCommand().equals( DLL_DEL_ACTION ) )\r\n\t\t{\r\n\t\t\tdllVec.removeAll( Arrays.asList( dllList.getSelectedValues() ) );\r\n\t\t\tdllList.setListData( dllVec );\r\n\t\t}\r\n\r\n\t\t// +---------------------------------------------------+\r\n\t\t// | ADD CLASS(ES)\r\n\t\t// +---------------------------------------------------+\r\n\t\telse if ( e.getActionCommand().equals( CLASS_ADD_ACTION ) )\r\n\t\t{\r\n\t\t\tOwlIconedFileChooser fileChooser\r\n\t\t\t\t\t= new OwlIconedFileChooser(\r\n\t\t\t\t\t\t\t new File( classFilePath ),\r\n\t\t\t\t\t\t\t new String[] { \"class\" },\r\n\t\t\t\t\t\t\t new String[] { \"Java Class ( *.class )\" },\r\n\t\t\t\t\t\t\t new ImageIcon[] { new ImageIcon( MainApp.getBitmapPath() +\r\n\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t \"class.gif\" ) } );\r\n\r\n\t\t\tfileChooser.setMultiSelectionEnabled( true );\r\n\r\n\t\t\tif ( fileChooser.openDialog() )\r\n\t\t\t{\r\n\t\t\t\tFile[] files = fileChooser.getSelectedFiles();\r\n\r\n\t\t\t\tif ( files != null )\r\n\t\t\t\t{\r\n\t\t\t\t\tclassFilePath = files[ 0 ].getParent();\r\n\r\n\t\t\t\t\tfor ( int i=0; i<files.length; i++ )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tclassVec.add( files[ i ].getAbsolutePath() );\r\n\t\t\t\t\t}\r\n\t\r\n\t\t\t\t\tclassList.setListData( classVec );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// +---------------------------------------------------+\r\n\t\t// | ADD PACKAGE\r\n\t\t// +---------------------------------------------------+\r\n\t\telse if ( e.getActionCommand().equals( PKG_ADD_ACTION ) )\r\n\t\t{\r\n\t\t\tOwlDirChooser dirChooser =\r\n\t\t\t\t\t\tnew OwlDirChooser( new File( pkgFilePath ) );\r\n\r\n\t\t\tif ( dirChooser.openDialog() )\r\n\t\t\t{\r\n\t\t\t\tFile pkgDir = dirChooser.getSelectedFile();\r\n\r\n\t\t\t\tif ( pkgDir != null )\r\n\t\t\t\t{\r\n\t\t\t\t\tpkgFilePath = pkgDir.getPath();\r\n\r\n\t\t\t\t\treadPackageDir( pkgDir );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// +---------------------------------------------------+\r\n\t\t// | DELETE CLASS(ES)/JARS ( from list )\r\n\t\t// +---------------------------------------------------+\r\n\t\telse if ( e.getActionCommand().equals( CLASS_DEL_ACTION ) )\r\n\t\t{\r\n\t\t\tclassVec.removeAll( Arrays.asList( classList.getSelectedValues() ) );\r\n\t\t\tclassList.setListData( classVec );\r\n\t\t}\r\n\r\n\t\t// +---------------------------------------------------+\r\n\t\t// | PASS TO SUPER\r\n\t\t// +---------------------------------------------------+\r\n\t\telse\r\n\t\t{\r\n\t\t\tsuper.actionPerformed( e );\r\n\t\t}\r\n\t}",
"void publishPlugin(byte[] jarFile);",
"private static File extractFromJar(String resource, String fileName, String suffix) throws IOException {\n URL res = Main.class.getResource(resource);\n\n // put this jar in a file system so that we can load jars from there\n File tmp;\n try {\n tmp = File.createTempFile(fileName,suffix);\n } catch (IOException e) {\n String tmpdir = System.getProperty(\"java.io.tmpdir\");\n IOException x = new IOException(\"Hudson has failed to create a temporary file in \" + tmpdir);\n x.initCause(e);\n throw x;\n }\n InputStream is = res.openStream();\n try {\n OutputStream os = new FileOutputStream(tmp);\n try {\n copyStream(is,os);\n } finally {\n os.close();\n }\n } finally {\n is.close();\n }\n tmp.deleteOnExit();\n return tmp;\n }",
"private static void decompressJarFile(String destDirectory, String jarFilePath) throws IOException {\n File destDir = new File(destDirectory);\n if (!destDir.exists()) {\n destDir.mkdir();\n }\n JarInputStream jarIn = new JarInputStream(new FileInputStream(jarFilePath));\n JarEntry entry = jarIn.getNextJarEntry();\n // iterates over all the entries in the jar file\n while (entry != null) {\n String filePath = destDirectory + \"/\" + entry.getName();\n if (!entry.isDirectory()) {\n new File(filePath).getParentFile().mkdirs();\n // if the entry is a file, extracts it\n extractFile(jarIn, filePath);\n }/* else {\n System.out.println(\"New dir: \" + filePath);\n // if the entry is a directory, make the directory\n File dir = new File(filePath);\n dir.mkdir();\n System.out.println(dir.canWrite());\n }*/\n jarIn.closeEntry();\n entry = jarIn.getNextJarEntry();\n }\n jarIn.close();\n }",
"private void compressArchive() throws Exception {\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(\"Compressing archive: \" + path);\n\t\t}\n\n\t\tFileOutputStream fout = new FileOutputStream(path + \".gz\");\n\t\tGZIPOutputStream gout = new GZIPOutputStream(fout);\n\t\tFileInputStream fin = new FileInputStream(path);\n\t\tbyte[] buf = new byte[blockSize];\n\t\tint len;\n\t\twhile ((len = fin.read(buf)) > 0) {\n\t\t\tgout.write(buf, 0, len);\n\t\t}\n\t\tfin.close();\n\n\t\t// flush and close gzip file\n\t\tgout.finish();\n\t\tgout.close();\n\n\t\t// unlink original archive\n\t\tFile file = new File(path);\n\t\tfile.delete();\n\t}",
"public void restore() {\n\t\ttry {\n\t\t\tFile latest = null;\n\t\t\t// restore the last file back into memory\n\t\t\tList<File> files = FindFile.find(getName(), \"shouts.*.js\", false, false);\n\n\t\t\tfor (int i = 0; i < files.size(); ++i) {\n\t\t\t\tFile f = files.get(i);\n\t\t\t\tif (latest == null) {\n\t\t\t\t\tlatest = f;\n\t\t\t\t}\n\t\t\t\tif (f.lastModified() > latest.lastModified()) {\n\t\t\t\t\tlatest = f;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (latest == null) {\n\t\t\t\tlog.info(\"no files found to restore\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tinfo(\"loading latest file %s\", latest);\n\n\t\t\tString json = String.format(\"[%s]\", FileIO.fileToString(latest.getAbsoluteFile()));\n\n\t\t\tShout[] saved = Encoder.fromJson(json, Shout[].class);\n\n\t\t\tfor (int i = 0; i < saved.length; ++i) {\n\t\t\t\tshouts.add(saved[i]);\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\tLogging.logError(e);\n\t\t}\n\t}",
"public static void backupAutoSave() throws DatabaseWrapperOperationException {\t\t\r\n \t\tString programVersion = BuildInformationManager.instance().getApplicationName() \r\n \t\t\t\t+ \"_\" + BuildInformationManager.instance().getVersion()\r\n \t\t\t\t+ \"_\" + BuildInformationManager.instance().getBuildTimeStamp();\r\n \t\tString timeStamp = Long.toString(getLastDatabaseChangeTimeStamp());\t\t\r\n \t\r\n \t\tString autoSaveFilePath = FileSystemLocations.getBackupDir() + \r\n \t\t\t\tFile.separator + \"PERIODICAL_BACKUP_\" + programVersion + \"_\";\r\n \t\r\n \t\tList<File> previousAutoSaveList = getAllAutoSaves();\r\n \t\r\n \t\tif (previousAutoSaveList.isEmpty()) {\r\n \t\t\t// When no changes were made then the timestamp is the current time\r\n \t\t\tif (getLastDatabaseChangeTimeStamp() == -1) {\r\n \t\t\t\ttimeStamp = Long.toString(System.currentTimeMillis());\r\n \t\t\t}\r\n \t\t\tautoSaveFilePath = autoSaveFilePath + timeStamp + \".\" + DatabaseIntegrityManager.AUTO_SAVE_EXTENSION;\r\n \t\t\ttry {\r\n \t\t\t\tFileSystemAccessWrapper.copyFile(new File(FileSystemLocations.getDatabaseFile()), new File(autoSaveFilePath));\r\n \t\t\t} catch (IOException e) {\r\n \t\t\t\tLOGGER.error(\"Autosave - backup failed\");\r\n \t\t\t\tthrow new DatabaseWrapperOperationException(DBErrorState.ERROR_DIRTY_STATE, e);\r\n \t\t\t}\r\n \t\t// Auto-saves detected\r\n \t\t} else {\r\n \t\t\t// No need to overwrite the last auto-save when no changes were made.\r\n \t\t\tif (getLastDatabaseChangeTimeStamp() == -1) {\r\n \t\t\t\treturn;\r\n \t\t\t}\r\n \t\r\n \t\t\t// Auto save limit reached, delete the oldest\r\n \t\t\tif (previousAutoSaveList.size() >= DatabaseIntegrityManager.AUTO_SAVE_LIMIT) {\r\n \t\t\t\tFile oldestAutoSave = previousAutoSaveList.get(previousAutoSaveList.size()-1);\r\n \t\t\t\tif (oldestAutoSave.exists() && !oldestAutoSave.delete()) {\r\n \t\t\t\t\tLOGGER.error(\"Autosave - cannot delete old autosave\");\r\n \t\t\t\t\tthrow new DatabaseWrapperOperationException(DBErrorState.ERROR_DIRTY_STATE);\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\tautoSaveFilePath = autoSaveFilePath + timeStamp + \".\" + DatabaseIntegrityManager.AUTO_SAVE_EXTENSION;\r\n \t\r\n \t\t\ttry {\r\n \t\t\t\tFileSystemAccessWrapper.copyFile(new File(FileSystemLocations.getDatabaseFile()), new File(autoSaveFilePath));\r\n \t\t\t} catch (IOException e) {\r\n \t\t\t\tLOGGER.error(\"Autosave - backup failed\");\r\n \t\t\t\tthrow new DatabaseWrapperOperationException(DBErrorState.ERROR_DIRTY_STATE, e);\r\n \t\t\t}\r\n \t\t}\r\n \t}",
"private void stageSelfContainedJar(InputStream stream, ApplicationDescription desc)\n throws IOException {\n // First extract the bundle coordinates\n String coords = getSelfContainedBundleCoordinates(desc);\n if (coords == null) {\n return;\n }\n\n // Split the coordinates into segments and build the file name.\n String[] f = coords.substring(4).split(\"/\");\n String base = \"m2/\" + f[0].replace('.', '/') + \"/\" + f[1] + \"/\" + f[2] + \"/\" + f[1] + \"-\" + f[2];\n String jarName = base + (f.length < 4 ? \"\" : \"-\" + f[3]) + \".jar\";\n String featuresName = base + \"-features.xml\";\n\n // Create the file directory structure and copy the file there.\n File jar = appFile(desc.name(), jarName);\n boolean ok = jar.getParentFile().exists() || jar.getParentFile().mkdirs();\n if (ok) {\n Files.write(toByteArray(stream), jar);\n Files.copy(appFile(desc.name(), FEATURES_XML), appFile(desc.name(), featuresName));\n if (!appFile(desc.name(), FEATURES_XML).delete()) {\n log.warn(\"Unable to delete self-contained application {} features.xml\", desc.name());\n }\n } else {\n throw new IOException(\"Unable to save self-contained application \" + desc.name());\n }\n }",
"public void done(IProgressMonitor monitor) throws JarException\n\t{\n\t\tInputStream jarIFileStream = null;\n\t\ttry\n\t\t{\n\t\t\tZipEntry e = new ZipEntry(JarFile.MANIFEST_NAME);\n\t\t\tjarStream.putNextEntry(e);\n\t\t\tmanifest.write(jarStream);\n\t\t\tjarStream.closeEntry();\n\t\t\tjarStream.flush();\n\t\t\tjarStream.close();\n\n\t\t\tif (jarIFile != null)\n\t\t\t{\n\t\t\t\tjarIFileStream = new ByteArrayInputStream(outByteStream.toByteArray());\n\t\t\t\tif (jarIFile.exists())\n\t\t\t\t{\n\t\t\t\t\tjarIFile.setContents(jarIFileStream, IResource.FORCE, monitor);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tjarIFile.create(jarIFileStream, true, monitor);\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tthrow (JarException) new JarException().initCause(e);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tif (outByteStream != null)\n\t\t\t\t{\n\t\t\t\t\toutByteStream.close();\n\t\t\t\t}\n\n\t\t\t\tif (jarIFileStream != null)\n\t\t\t\t{\n\t\t\t\t\tjarIFileStream.close();\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (IOException e)\n\t\t\t{\n\t\t\t\tthrow (JarException) new JarException().initCause(e);\n\n\t\t\t}\n\t\t}\n\t}",
"public boolean backupResource(File src) {\n File backup = new File(src.getParent() + \"/deleted/\" + src.getName());\r\n\r\n try {\r\n if (backup.exists()) {\r\n return true;\r\n }\r\n Files.copy(src.toPath(), backup.toPath());\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n return false;\r\n }\r\n\r\n return true;\r\n }",
"public static void backupWallet() {\n\t\ttry {\n\t\t\tDate date = new Date();\n\t\t\tBITCOIN.backupWallet(Config.BACKUP_DESTINATION + \"_\" + date.toString());\n\t\t\tLOGGER.info(\"Successfully saved wallet backup.\");\n\t\t} catch (BitcoinException e) {\n\t\t\tLOGGER.error(\"Saving wallet backup failed. ErrorMessage: \" + e.getMessage());\n\t\t}\n\t}",
"public static void setFromJar() \r\n\t{\r\n\t\tfromJar = true;\r\n\t}",
"private File download( final File workDir, final URL url, final String displayName, final Boolean overwrite,\n final boolean checkAttributes, final boolean downloadFeeback )\n throws PlatformException\n {\n LOGGER.debug( \"Downloading [\" + url + \"]\" );\n File downloadedBundlesFile = new File( workDir, \"bundles/downloaded_bundles.properties\" );\n Properties fileNamesForUrls = loadProperties( downloadedBundlesFile );\n \n String downloadedFileName = fileNamesForUrls.getProperty( url.toExternalForm() );\n String hashFileName = \"\" + url.toExternalForm().hashCode();\n if( downloadedFileName == null )\n {\n // destination will be made based on the hashcode of the url to be downloaded\n downloadedFileName = hashFileName + \".jar\";\n \n }\n File destination = new File( workDir, \"bundles/\" + downloadedFileName );\n \n // download the bundle only if is a forced overwrite or the file does not exist or the file is there but is\n // invalid\n boolean forceOverwrite = overwrite || !destination.exists();\n if( !forceOverwrite )\n {\n try\n {\n String newFileName = validateBundleAndGetFilename( url, destination, hashFileName, checkAttributes );\n if( !destination.getName().equals( newFileName ) )\n {\n throw new PlatformException( \"File \" + destination + \" should have name \" + newFileName );\n }\n }\n catch( PlatformException ignore )\n {\n forceOverwrite = true;\n }\n }\n if( forceOverwrite )\n {\n try\n {\n LOGGER.debug( \"Creating new file at destination: \" + destination.getAbsolutePath() );\n destination.getParentFile().mkdirs();\n destination.createNewFile();\n BufferedOutputStream os = null;\n try\n {\n os = new BufferedOutputStream( new FileOutputStream( destination ) );\n StreamUtils.ProgressBar progressBar = null;\n if( LOGGER.isInfoEnabled() )\n {\n if( downloadFeeback )\n {\n progressBar = new StreamUtils.FineGrainedProgressBar( displayName );\n }\n else\n {\n progressBar = new StreamUtils.CoarseGrainedProgressBar( displayName );\n }\n }\n StreamUtils.streamCopy( url, os, progressBar );\n LOGGER.debug( \"Succesfully downloaded to [\" + destination + \"]\" );\n }\n finally\n {\n if( os != null )\n {\n os.close();\n }\n }\n }\n catch( IOException e )\n {\n throw new PlatformException( \"[\" + url + \"] could not be downloaded\", e );\n }\n }\n \n wrapNonBundleJar( destination, url );\n String newFileName = validateBundleAndGetFilename( url, destination, hashFileName, checkAttributes );\n File newDestination = new File( destination.getParentFile(), newFileName );\n if( !newFileName.equals( destination.getName() ) )\n {\n if( newDestination.exists() )\n {\n if( !newDestination.delete() )\n {\n throw new PlatformException( \"Cannot delete \" + newDestination );\n }\n }\n if( !destination.renameTo( newDestination ) )\n {\n throw new PlatformException( \"Cannot rename \" + destination + \" to \" + newDestination );\n }\n fileNamesForUrls.setProperty( url.toExternalForm(), newFileName );\n saveProperties( fileNamesForUrls, downloadedBundlesFile );\n }\n \n return newDestination;\n }",
"public void testChangeZIPArchive1() throws Exception {\n String externalLib = Util.getOutputDirectory() + File.separator + \"externalLib.abc\";\n IPath projectPath = env.addProject(\"Project\");\n try {\n org.eclipse.jdt.core.tests.util.Util.createJar(new String[] { \"p/X.java\", \"package p;\\n\" + \"public class X {\\n\" + \" public void foo() {\\n\" + \" }\\n\" + \"}\" }, externalLib, \"1.4\");\n env.addExternalJars(projectPath, Util.getJavaClassLibs());\n env.addExternalJars(projectPath, new String[] { externalLib });\n //$NON-NLS-1$\n IPath root = env.getPackageFragmentRootPath(projectPath, \"\");\n env.setOutputFolder(projectPath, \"\");\n IPath classY = env.addClass(root, \"q\", \"Y\", \"package q;\\n\" + \"public class Y {\\n\" + \" void bar(p.X x) {\\n\" + \" x.foo();\\n\" + \" }\\n\" + \"}\");\n fullBuild(projectPath);\n expectingNoProblems();\n org.eclipse.jdt.core.tests.util.Util.createJar(new String[] { \"p/X.java\", \"package p;\\n\" + \"public class X {\\n\" + \"}\" }, externalLib, \"1.4\");\n IJavaProject p = env.getJavaProject(projectPath);\n p.getJavaModel().refreshExternalArchives(new IJavaElement[] { p }, null);\n incrementalBuild(projectPath);\n expectingProblemsFor(classY, \"Problem : The method foo() is undefined for the type X [ resource : </Project/q/Y.java> range : <54,57> category : <50> severity : <2>]\");\n } finally {\n new File(externalLib).delete();\n env.removeProject(projectPath);\n }\n }",
"public void save()\n\t{\n\t\ttry\n\t\t{\n\t\t\tgetConnection().commit();\n\t\t\tgetPreparedStatement(\"SET FILES SCRIPT FORMAT COMPRESSED\").execute();\n\t\t\t// causes a checkpoint automatically.\n\t\t} catch (SQLException e)\n\t\t{\n\t\t\tm_logger.error(\"Couldn't cleanly save.\", e);\n\t\t}\n\t}",
"private void unCompress()\n\t{\n\t\ttry\n\t\t{\n\t\t\tbyte[] buffer = new byte[4096];\n\t\t\tint bytesIn;\n\t\t\tZipFile rfoFile = new ZipFile(path + fileName);\n\t\t\tEnumeration<? extends ZipEntry> allFiles = rfoFile.entries();\n\t\t\twhile(allFiles.hasMoreElements())\n\t\t\t{\n\t\t\t\tZipEntry ze = (ZipEntry)allFiles.nextElement();\n\t\t\t\tInputStream is = rfoFile.getInputStream(ze);\n\t\t\t\tString fName = processSeparators(ze.getName());\n\t\t\t\tFile element = new File(tempDir + fName);\n\t\t\t\torg.reprap.Main.ftd.add(element);\n\t\t\t\tFileOutputStream os = new FileOutputStream(element);\n\t\t\t\twhile((bytesIn = is.read(buffer)) != -1) \n\t\t\t\t\tos.write(buffer, 0, bytesIn);\n\t\t\t\tos.close();\n\t\t\t}\n\t\t} catch (Exception e)\n\t\t{\n\t\t\tDebug.e(\"RFO.unCompress(): \" + e);\n\t\t}\n\t}",
"public void removeOldArchive(long timestamp) throws PersistenceException {\n super.removeOldObjectsInArchive(timestamp);\n }",
"public void actionPerformed(ActionEvent e) {\n\t\t\tJarLevel jar = gui.saveJarLevel();\n\t\t\tif(jar != null) AddonManager.addJarLevel(jar.getFile());\n\t\t}",
"private void saveButtonActionPerformed(java.awt.event.ActionEvent evt) {\n \n if(!validateFileName())\n return;\n if(props != null) {\n\n FileOutputStream fout = null;\n try {\n String sjn = serviceJarTf.getText();\n props.setProperty(SERVICE_JAR_NAME, sjn);\n \n boolean isCopyToServerCp = copyJarCB.isSelected();\n if(isCopyToServerCp)\n props.setProperty(COPY_JAR_TO_SERVERCLASSPATH,Boolean.toString(isCopyToServerCp));\n else\n props.remove(COPY_JAR_TO_SERVERCLASSPATH);\n \n fout = new FileOutputStream(serviceProps);\n props.store(fout, sjn);\n fout.flush();\n \n } catch (Exception ex) {\n Exceptions.printStackTrace(ex);\n } finally {\n try {\n fout.close();\n } catch (Exception ex) {\n Exceptions.printStackTrace(ex);\n }\n }\n } else {\n\n FileOutputStream fout = null;\n try {\n String sjn = serviceJarTf.getText();\n props = new Properties();\n props.setProperty(SERVICE_JAR_NAME, sjn);\n fout = new FileOutputStream(serviceProps);\n props.store(fout, sjn);\n fout.flush();\n \n } catch (Exception ex) {\n Exceptions.printStackTrace(ex);\n } finally {\n try {\n fout.close();\n } catch (IOException ex) {\n Exceptions.printStackTrace(ex);\n }\n }\n }\n \n dispose();\n}",
"private void undoVersionInRoot() throws IOException {\n Put p = new Put(HRegionInfo.FIRST_META_REGIONINFO.getRegionName());\n\n p.add(HConstants.CATALOG_FAMILY, HConstants.META_VERSION_QUALIFIER,\n Bytes.toBytes(META_VERSION_092));\n\n // TODO wire this MetaEditor.putToRootTable(ct, p);\n LOG.info(\"Downgraded -ROOT- meta version=\" + META_VERSION_092);\n }",
"private void moveBundle(InputStream in, File newFile) {\n String fileName = newFile.getName();\n try {\n FileOutputStream out = new FileOutputStream(newFile);\n byte[] buffer = new byte[1024];\n int read;\n while ((read = in.read(buffer)) != -1) {\n out.write(buffer, 0, read);\n }\n in.close();\n out.flush();\n out.close();\n Log.i(\"BundleMover\", fileName + \" copied to \" + bundleLocation);\n } catch (Exception e) {\n Log.e(\"BundleMover\", \"ERROR: \" + e.getMessage());\n e.printStackTrace();\n }\n }",
"public static void backup(String filename, String path)\r\n\t\t\tthrows IOException {\n\t\tString backup = path + \"\\\\backup\\\\\" + filename;\r\n\t\tpath = path + \"\\\\\" + filename;\r\n\t\tlogger.fatal(backup);\r\n\t\tif (!new File(backup).isDirectory()) {\r\n\r\n\t\t\tlogger.fatal(\"!\" + backup);\r\n\t\t\tnew File(backup).mkdirs();\r\n\t\t}\r\n\t\tlogger.fatal(path);\r\n\t\tif (!new File(path).isFile()) {\r\n\t\t\tlogger.fatal(\"CREATING FILE : \" + path);\r\n\t\t\tif (!new File(path).createNewFile()) {\r\n\t\t\t\tlogger.fatal(\"FAILED TO CREATE BACKUP FILE: \" + path);\r\n\t\t\t}\r\n\t\t}\r\n\t\tFiles.copy(Paths.get(path), Paths.get(backup),\r\n\t\t\t\tStandardCopyOption.REPLACE_EXISTING);\r\n\r\n\t\tFile f = new File(path);\r\n\r\n\t\t// if (f.isFile()) {\r\n\t\t// f.renameTo(new File(backup));\r\n\t\t// }\r\n\t}",
"void backupFile(File targetfile, File backupdir) throws Exception{\n\t\tFile backupfile = new File(backupdir, targetfile.getName());\n\t\tcopyFile(targetfile, backupfile);\n\t\tbackups.put(targetfile, backupfile);\n\t\tbackupFiles++;\n\t}",
"@Override\n protected void exportFirmware() throws IOException {\n // Look for an override in the program's TB_Options directory.\n File sourceFirmwareDir = new File(builderContext.sourceTbOptionsDir, \"firmware.v2\");\n if (!isValidFirmwareSource(sourceFirmwareDir)) {\n // Fall back to the system default, ~/Amplio/ACM/firmware.v2\n sourceFirmwareDir = new File(AmplioHome.getAppSoftwareDir(), \"firmware.v2\");\n }\n File stagedFirmwareDir = new File(builderContext.stagedDeploymentDir, \"firmware.v2\");\n IOUtils.deleteRecursive(stagedFirmwareDir);\n stagedFirmwareDir.mkdirs();\n FileUtils.copyDirectory(sourceFirmwareDir, stagedFirmwareDir);\n }",
"public void save() {\n Path root = Paths.get(storagePath);\n try {\n Files.copy(file.getInputStream(), root.resolve(file.getOriginalFilename()),\n StandardCopyOption.REPLACE_EXISTING);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void writeApkToBackup(PackageInfo pkg, FullBackupDataOutput output) {\n PackageInfo packageInfo = pkg;\n String appSourceDir = packageInfo.applicationInfo.getBaseCodePath();\n FullBackup.backupToTar(packageInfo.packageName, \"a\", null, new File(appSourceDir).getParent(), appSourceDir, output);\n File obbDir = new Environment.UserEnvironment(0).buildExternalStorageAppObbDirs(packageInfo.packageName)[0];\n if (obbDir != null) {\n File[] obbFiles = obbDir.listFiles();\n if (obbFiles != null) {\n String obbDirName = obbDir.getAbsolutePath();\n for (File obb : obbFiles) {\n FullBackup.backupToTar(packageInfo.packageName, \"obb\", null, obbDirName, obb.getAbsolutePath(), output);\n }\n }\n }\n }",
"@Override\n\tpublic void createBootstrapJar() throws IOException {\n\t\t\n\t}",
"@Override\n public void close(JarFile object) {\n JarFileFactory jarFileFactory = instance;\n synchronized (jarFileFactory) {\n object = urlCache.remove(object);\n if (object != null) {\n fileCache.remove(URLUtil.urlNoFragString((URL)object));\n }\n return;\n }\n }",
"DexArchive(BundleArchiveImpl ba, FileTree dir, int rev) {\n super(ba, dir, rev);\n }",
"private void generateBackUpMysql() {\n Calendar c = Calendar.getInstance();//creamos una instancia de la clase calendar de java\n //java.util.Date fecha = new Date();\n String DiaHoy = Integer.toString(c.get(Calendar.DATE));\n String MesHoy = Integer.toString(c.get(Calendar.MONTH)+1);\n String AnioHoy = Integer.toString(c.get(Calendar.YEAR)); \n \n \n JFileChooser RealizarBackupMySQL = new JFileChooser();\n int resp;\n resp=RealizarBackupMySQL.showSaveDialog(this);//JFileChooser de nombre RealizarBackupMySQL\n if (resp==JFileChooser.APPROVE_OPTION) {//Si el usuario presiona aceptar; se genera el Backup\n try{\n Runtime runtime = Runtime.getRuntime();\n File backupFile = new File(String.valueOf(RealizarBackupMySQL.getSelectedFile().toString())+\" \"+DiaHoy +\"-\"+MesHoy+\"-\"+AnioHoy+\".sql\");\n FileWriter fw = new FileWriter(backupFile);\n \n Process child = runtime.exec(\"C:\\\\xampp\\\\mysql\\\\bin\\\\mysqldump --routines --opt --password= --user=root --databases utp2020-dental-system-dev\"); \n\n // Process child = runtime.exec(\"C:\\\\wamp\\\\bin\\\\mariadb\\\\mariadb10.4.10\\\\bin\\\\mysqldump --routines --opt --password= --user=root --databases utp2020-dental-system-dev\"); \n InputStreamReader irs = new InputStreamReader(child.getInputStream());\n BufferedReader br = new BufferedReader(irs);\n String line;\n while( (line=br.readLine()) != null ) {\n fw.write(line + \"\\n\");\n }\n fw.close();\n irs.close();\n br.close();\n JOptionPane.showMessageDialog(null, \"Archivo generado\",\"Verificar\",JOptionPane. INFORMATION_MESSAGE);\n }catch(Exception e){\n JOptionPane.showMessageDialog(null, \"Error no se genero el archivo por el siguiente motivo:\"+e.getMessage(), \"Verificar\",JOptionPane.ERROR_MESSAGE);\n } \n } else if (resp==JFileChooser.CANCEL_OPTION) {\n JOptionPane.showMessageDialog(null,\"Ha sido cancelada la generacion del Backup\");\n }\n }",
"public void testChangeZIPArchive2() throws Exception {\n IPath projectPath = env.addProject(\"Project\");\n env.addExternalJars(projectPath, Util.getJavaClassLibs());\n String internalLib = env.getProject(\"Project\").getLocation().toOSString() + File.separator + \"internalLib.abc\";\n org.eclipse.jdt.core.tests.util.Util.createJar(new String[] { \"p/X.java\", \"package p;\\n\" + \"public class X {\\n\" + \" public void foo() {\\n\" + \" }\\n\" + \"}\" }, internalLib, \"1.4\");\n env.getProject(projectPath).refreshLocal(IResource.DEPTH_INFINITE, null);\n env.addEntry(projectPath, JavaCore.newLibraryEntry(new Path(\"/Project/internalLib.abc\"), null, null));\n //$NON-NLS-1$\n IPath root = env.getPackageFragmentRootPath(projectPath, \"\");\n env.setOutputFolder(projectPath, \"\");\n IPath classY = env.addClass(root, \"q\", \"Y\", \"package q;\\n\" + \"public class Y {\\n\" + \" void bar(p.X x) {\\n\" + \" x.foo();\\n\" + \" }\\n\" + \"}\");\n fullBuild(projectPath);\n expectingNoProblems();\n org.eclipse.jdt.core.tests.util.Util.createJar(new String[] { \"p/X.java\", \"package p;\\n\" + \"public class X {\\n\" + \"}\" }, internalLib, \"1.4\");\n env.getProject(projectPath).refreshLocal(IResource.DEPTH_INFINITE, null);\n incrementalBuild(projectPath);\n expectingProblemsFor(classY, \"Problem : The method foo() is undefined for the type X [ resource : </Project/q/Y.java> range : <54,57> category : <50> severity : <2>]\");\n env.removeProject(projectPath);\n }",
"private File createBackupFile() throws IOException {\n File[] listFiles = dbBackupDir.listFiles();\n int length = listFiles.length;\n\n //Delete old copies\n if (length > 2) {\n for (int i = 0; i < length - 2; i++) {\n listFiles[i].delete();\n }\n }\n\n File dbBackup = new File(databaseFolderPath + \"/backup/db\" + time + \".db\");\n if (!dbBackup.exists()) {\n if (!dbBackup.createNewFile()) {\n throw new IOException(\"Cannot create backup file.\");\n }\n\n }\n return dbBackup;\n }",
"@SuppressWarnings({\"nls\", \"unchecked\"})\n public boolean cleanupJarFileFactory() {\n boolean res = false;\n Class classJarURLConnection = null;\n try {\n classJarURLConnection =\n classForName(\"sun.net.www.protocol.jar.JarURLConnection\");\n } catch (ClassNotFoundException e) {\n //ignore\n }\n if (classJarURLConnection == null) {\n return res;\n }\n Field f = null;\n try {\n f = classJarURLConnection.getDeclaredField(\"factory\");\n } catch (NoSuchFieldException e) {\n //ignore\n }\n if (f == null) {\n return res;\n }\n f.setAccessible(true);\n Object obj = null;\n try {\n obj = f.get(null);\n } catch (IllegalAccessException e) {\n //ignore\n }\n if (obj == null) {\n return res;\n }\n Class classJarFileFactory = obj.getClass();\n //\n HashMap fileCache = null;\n try {\n f = classJarFileFactory.getDeclaredField(\"fileCache\");\n f.setAccessible(true);\n obj = f.get(null);\n if (obj instanceof HashMap) {\n fileCache = (HashMap) obj;\n }\n } catch (NoSuchFieldException e) {\n } catch (IllegalAccessException e) {\n //ignore\n }\n HashMap urlCache = null;\n try {\n f = classJarFileFactory.getDeclaredField(\"urlCache\");\n f.setAccessible(true);\n obj = f.get(null);\n if (obj instanceof HashMap) {\n urlCache = (HashMap) obj;\n }\n } catch (NoSuchFieldException e) {\n } catch (IllegalAccessException e) {\n //ignore\n }\n if (urlCache != null) {\n HashMap urlCacheTmp = (HashMap) urlCache.clone();\n Iterator it = urlCacheTmp.keySet().iterator();\n while (it.hasNext()) {\n obj = it.next();\n if (!(obj instanceof JarFile)) {\n continue;\n }\n JarFile jarFile = (JarFile) obj;\n if (setJarFileNames2Close.contains(jarFile.getName())) {\n try {\n jarFile.close();\n } catch (IOException e) {\n //ignore\n }\n if (fileCache != null) {\n fileCache.remove(urlCache.get(jarFile));\n }\n urlCache.remove(jarFile);\n }\n }\n res = true;\n } else if (fileCache != null) {\n // urlCache := null\n HashMap fileCacheTmp = (HashMap) fileCache.clone();\n Iterator it = fileCacheTmp.keySet().iterator();\n while (it.hasNext()) {\n Object key = it.next();\n obj = fileCache.get(key);\n if (!(obj instanceof JarFile)) {\n continue;\n }\n JarFile jarFile = (JarFile) obj;\n if (setJarFileNames2Close.contains(jarFile.getName())) {\n try {\n jarFile.close();\n } catch (IOException e) {\n //ignore\n }\n fileCache.remove(key);\n }\n }\n res = true;\n }\n setJarFileNames2Close.clear();\n return res;\n }",
"synchronized void revise(String location, InputStream is)\n throws Exception\n {\n m_archive.revise(location, is);\n try\n {\n Module module = createModule();\n addModule(module);\n }\n catch (Exception ex)\n {\n m_archive.rollbackRevise();\n throw ex;\n }\n }",
"public void addJARFolder() {\n btAddJARFolder().push();\n }",
"private void finalizeFileSystemFile() throws IOException {\n Path finalConfigPath = getFinalConfigPath(tempConfigPath);\n fileSystem.rename(tempConfigPath, finalConfigPath);\n LOG.info(\"finalize temp configuration file successfully, finalConfigPath=\"\n + finalConfigPath);\n }",
"public static void main_revertBackup(){\n try {\n table = (HiringTable) tableClone.clone();\n System.out.println(\"Successfully reverted to the backup copy.\");\n } catch (CloneNotSupportedException ex){\n System.out.println(\"Clone not successful.\");\n main_menu();\n }\n }",
"private void backupToFileButtonClicked(java.awt.event.ActionEvent evt) {\n\t\tbyte[][] colFamilys;\n\n\t\tList<List<HBaseRow>> tableRows;\n\n\t\tfinal JFileChooser fc = new JFileChooser();\n\t\tFile backupFile = null;\n\n\t\tfc.showSaveDialog(this);\n\n\t\tbackupFile = fc.getSelectedFile();\n\n\t\ttry {\n\t\t\tgetLabelFileOperationStatus().setText(\"Backup in progress\");\n\t\t\tfor (int i = 0; i < listSelectedTables.getModel().getSize(); i++) {\n\t\t\t\tString tblName = (String) listSelectedTables.getModel().getElementAt(i);// (String)listSelectedTables.\n\t\t\t\tlistSelectedTables.setSelectedValue(tblName, true);\n\t\t\t\tLogger.getLogger(HbaseDataBackupRestoreDialog.class.getName()).log(Level.INFO, \"Table name: \" + tblName);\n\t\t\t\tHBaseTableStructure tableStructure = new HBaseTableStructure();\n\t\t\t\ttableStructure.createWriteTableStructure(tblName);\n\n\t\t\t\tcolFamilys = tableStructure.getAllColoumnFamilies();\n\n\t\t\t\tResultScanner resultScan = HBaseTableManager.getAllDataInRangeOfFamily(\"0\", \"zz\", colFamilys, tblName);\n\n\t\t\t\ttableRows = this.getDataObjectList(resultScan, colFamilys);\n\n\t\t\t\tIterator<List<HBaseRow>> iterator = tableRows.iterator();\n\t\t\t\tList<HBaseRow> rowList;\n\t\t\t\tList<HbaseTableObject> tableObject = new ArrayList<HbaseTableObject>();\n\t\t\t\twhile (iterator.hasNext()) {\n\n\t\t\t\t\trowList = iterator.next();\n\t\t\t\t\tHbaseTableObject hbTable = new HbaseTableObject();\n\t\t\t\t\tHBaseTableData tableData = new HBaseTableData();\n\n\t\t\t\t\ttableData.setHbaseTableData(rowList);\n\t\t\t\t\thbTable.setTableData(tableData);\n\t\t\t\t\thbTable.setTableStructure(tableStructure);\n\t\t\t\t\thbTable.setLastObject(false);\n\t\t\t\t\thbTable.setLinkedFileAvailable(true);\n\n\t\t\t\t\tif (!iterator.hasNext()) {\n\t\t\t\t\t\thbTable.setLastObject(true);\n\t\t\t\t\t}\n\t\t\t\t\ttableObject.add(hbTable);\n\n\t\t\t\t}\n\n\t\t\t\tFile targetFile = new File(backupFile.getAbsolutePath().concat(\"_\").concat(tblName));\n\n\t\t\t\tBackupRestoreFileUtil fileUtil = new BackupRestoreFileUtil(targetFile);\n\t\t\t\tlong rows = (tableObject.size() - 1) * 20001 + tableObject.get(tableObject.size() - 1).getTableData().getHbaseTableData().size();\n\t\t\t\tthis.getLabelFileOperationStatus().setText(\"Backup Done: ~ \" + rows + \" backed-up\");\n\t\t\t\tfileUtil.backupToFiles(tableObject);\n\n\t\t\t\t// writeObjectFile.writeObject(hbTable);\n\t\t\t\tlistBackupSelectedModel.remove(0);\n\n\t\t\t} // write hbTable to file, object stream;\n\n\t\t\tJOptionPane.showMessageDialog(this, \"Backup Complete. \\n Backup File : \" + fc.getSelectedFile().getName());\n\n\t\t}\n\t\tcatch (Exception ex) {\n\t\t\tJOptionPane.showMessageDialog(this, \"Backup Failed.\", \"Error\", JOptionPane.ERROR_MESSAGE);\n\n\t\t}\n\n\t}",
"public static void moveCorrectToArchive(Vocab vocab){\n\n DatabaseReference vocabRef=FirebaseDatabase.getInstance().getReference().child(\"user\").child(FirebaseAuth.getInstance().getUid()).child(\"vocab\").child(vocab.Id);\n vocabRef.removeValue();\n archiveVocabs.add(vocab);\n writeArchivedVocab(vocab);\n\n }",
"public void save(File f) {\n\t\tif (f.exists()) {\r\n\t\t\tString filename = f.getName();\r\n\t\t\tString backName;\r\n\t\t\tif (filename.contains(\".\")) {\r\n\t\t\t\tbackName = filename.substring(0,filename.lastIndexOf('.'));\r\n\t\t\t\tbackName += \"_backup\";\r\n\t\t\t\tbackName += filename.substring(filename.lastIndexOf('.'));\r\n\t\t\t} else {\r\n\t\t\t\tbackName = filename + \"_backup\";\r\n\t\t\t}\r\n\t\t\tFile back = new File(f.getParent(),backName);\r\n\t\t\tSystem.out.println(\"Writing backup to: \"+back.getAbsolutePath());\r\n\t\t\tif (back.exists()) back.delete();\r\n\t\t\tFile newF = f;\r\n\t\t\tf.renameTo(back);\r\n\t\t\tf = newF;\r\n\t\t}\r\n\r\n\t\tFileOutputStream outputStream = null;\r\n\t\ttry {\r\n\t\t\tDocument doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();\r\n//\t\t\tb.append(\"<Map xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\" xsi:noNamespaceSchemaLocation=\\\"map.xsd\\\">\");\r\n//\t\t\tProcessingInstruction pi = doc.createProcessingInstruction(\"xml-stylesheet\", \"type=\\\"text/xsl\\\" href=\\\"/assistantdm/static/CharacterSheetTemplate.xsl\\\"\");\r\n//\t\t\tdoc.appendChild(pi);\r\n\t\t\tXMLMapExporter processor = new XMLMapExporter(doc);\r\n\t\t\tmapPanel.executeProcess(processor);\r\n\t\t\tdoc.setXmlStandalone(true);\r\n\r\n\t\t\tTransformer trans = TransformerFactory.newInstance().newTransformer();\r\n\t\t\ttrans.setOutputProperty(OutputKeys.INDENT, \"yes\");\r\n\t\t\ttrans.setOutputProperty(OutputKeys.ENCODING, \"UTF-8\");\r\n\t\t\ttrans.setOutputProperty(\"{http://xml.apache.org/xslt}indent-amount\", \"4\");\r\n\t\t\toutputStream = new FileOutputStream(f);\r\n\t\t\ttrans.transform(new DOMSource(doc), new StreamResult(outputStream));\r\n\t\t\tmapPanel.modified = false;\r\n\t\t} catch (Exception ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t} finally {\r\n\t\t\tif (outputStream != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\toutputStream.close();\r\n\t\t\t\t} catch (IOException e1) {\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void setUnzippedFile(byte[] aBytes) throws IOException {\r\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\r\n GZIPOutputStream gos = new GZIPOutputStream(baos);\r\n BufferedOutputStream bos = new BufferedOutputStream(gos);\r\n ByteArrayInputStream bais = new ByteArrayInputStream(aBytes);\r\n BufferedInputStream bis = new BufferedInputStream(bais);\r\n int read = -1;\r\n while ((read = bis.read()) != -1) {\r\n bos.write(read);\r\n }\r\n bos.flush();\r\n baos.flush();\r\n gos.finish();\r\n super.setFile(baos.toByteArray());\r\n bis.close();\r\n bos.close();\r\n gos.close();\r\n bais.close();\r\n baos.close();\r\n }",
"public void removePreviouslySavedFilesFromSDCard() {\n\t\tFile file = ctxt.getExternalFilesDir(Tattle_Config_Constants.SD_FOLDER_NAME + File.separator);\n\t\tif (file.exists()) {\n\t\t\tFile[] files = file.listFiles();\n\t\t\tfor (File f : files) {\n\t\t\t\tf.delete();\n\t\t\t}\n\t\t}\n\t\tfile.delete();\n\t}",
"private void restore() {\n AppSettings.setInstance(backupConfig);\n }",
"public void save() {\r\n File distDataFile = new File(path);\r\n\r\n //String basePath = path;\r\n String endOfPath = path.substring(path.lastIndexOf(\"/\"));\r\n\r\n File rootDataFile;\r\n if (!path.contains(\"artists\")) {\r\n rootDataFile = new File(BASEDIR + \"/resources/data\" + endOfPath);\r\n } else {\r\n rootDataFile = new File(BASEDIR + \"/resources/data/artists\" + endOfPath);\r\n }\r\n\r\n File distTempFile = new File(path.substring(0, path.lastIndexOf(\"/\")) + \"/myTempFile.txt\");\r\n\r\n File rootTempFile;\r\n if (!path.contains(\"artists\")) {\r\n rootTempFile = new File(BASEDIR + \"/resources/data/myTempFile.txt\");\r\n } else {\r\n rootTempFile = new File(BASEDIR + \"/resources/data/artists/myTempFile.txt\");\r\n }\r\n \r\n try {\r\n BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(\r\n new FileOutputStream(distTempFile), \"UTF-8\"));\r\n\r\n for (String line : data) {\r\n bw.write(line);\r\n bw.newLine();\r\n }\r\n\r\n bw.close();\r\n distDataFile.delete();\r\n distTempFile.renameTo(distDataFile);\r\n\r\n BufferedWriter bw2 = new BufferedWriter(new OutputStreamWriter(\r\n new FileOutputStream(rootTempFile), \"UTF-8\"));\r\n\r\n for (String line : data) {\r\n bw2.write(line);\r\n bw2.newLine();\r\n }\r\n\r\n bw2.close();\r\n rootDataFile.delete();\r\n rootTempFile.renameTo(rootDataFile);\r\n } catch (IOException ex) {\r\n System.out.println(\"IOExceptoin in save1 : FileData\");\r\n }\r\n }",
"private void updateFile() {\n try {\n this.taskStorage.save(this.taskList);\n this.aliasStorage.save(this.parser);\n } catch (IOException e) {\n System.out.println(\"Master i am unable to save the file!\");\n }\n }",
"private static File untar(final File testdir) throws IOException {\n final String datafile = \"TestMetaMigrationConvertToPB\";\n String srcTarFile =\n System.getProperty(\"project.build.testSourceDirectory\", \"src/test\") +\n File.separator + \"data\" + File.separator + datafile + \".tgz\";\n File homedir = new File(testdir.toString());\n File tgtUntarDir = new File(homedir, datafile);\n if (tgtUntarDir.exists()) {\n if (!FileUtil.fullyDelete(tgtUntarDir)) {\n throw new IOException(\"Failed delete of \" + tgtUntarDir.toString());\n }\n }\n LOG.info(\"Untarring \" + srcTarFile + \" into \" + homedir.toString());\n FileUtil.unTar(new File(srcTarFile), homedir);\n Assert.assertTrue(tgtUntarDir.exists());\n return tgtUntarDir;\n }",
"private static void extractFile(final JarInputStream jarIn, final String filePath) throws IOException {\n BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(filePath));\n byte[] bytesIn = new byte[BUFFER_SIZE];\n int read = 0;\n while ((read = jarIn.read(bytesIn)) != -1) {\n bos.write(bytesIn, 0, read);\n }\n bos.close();\n }",
"public static void removeJar(String jarName, boolean undeploy)\n\tthrows SQLException\n\t{\n\t\tassertJarName(jarName);\n\t\tAclId[] ownerRet = new AclId[1];\n\t\tint jarId = getJarId(jarName, ownerRet);\n\t\tif(jarId < 0)\n\t\t\tthrow new SQLException(\"No Jar named '\" + jarName\n\t\t\t\t+ \"' is known to the system\");\n\n\t\tAclId user = AclId.getSessionUser();\n\t\tif(!(user.isSuperuser() || user.equals(ownerRet[0])))\n\t\t\tthrow new SecurityException(\n\t\t\t\t\"Only super user or owner can remove a jar\");\n\n\t\tif(undeploy)\n\t\t\tdeployRemove(jarId, jarName);\n\n\t\tPreparedStatement stmt = SQLUtils\n\t\t\t.getDefaultConnection()\n\t\t\t.prepareStatement(\"DELETE FROM sqlj.jar_repository WHERE jarId = ?\");\n\t\ttry\n\t\t{\n\t\t\tstmt.setInt(1, jarId);\n\t\t\tif(stmt.executeUpdate() != 1)\n\t\t\t\tthrow new SQLException(\n\t\t\t\t\t\"Jar repository update did not update 1 row\");\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tSQLUtils.close(stmt);\n\t\t}\n\t\tLoader.clearSchemaLoaders();\n\t}",
"String backup(String request) throws RemoteException;",
"public static void decompressJars(final String outputDirectory) {\n File files = new File(outputDirectory);\n for (File f : Objects.requireNonNull(files.listFiles())) {\n if (f.getName().endsWith(\".jar\")) {\n try {\n JarUtils.decompressJarFile(outputDirectory, f.getAbsolutePath());\n // delete the original dependency jar file\n f.delete();\n } catch (IOException e) {\n System.err.println(\"Problem decompressing jar file.\");\n }\n }\n }\n }",
"private static void fixDexElementsForProtectedApp(Application application, Object[] newDexElements) throws Exception {\n Field zipField = null;\n Field dexFileField = null;\n final Field mFileNameField = ShareReflectUtil.findField(DexFile.class, \"mFileName\");\n final Field mCookieField = ShareReflectUtil.findField(DexFile.class, \"mCookie\");\n final Field mInternalCookieField = ShareReflectUtil.findField(DexFile.class, \"mInternalCookie\");\n\n // Always ignore the last element since it should always be the base.apk.\n for (int i = 0; i < newDexElements.length - 1; ++i) {\n final Object newElement = newDexElements[i];\n\n if (zipField == null && dexFileField == null) {\n zipField = ShareReflectUtil.findField(newElement, \"zip\");\n dexFileField = ShareReflectUtil.findField(newElement, \"dexFile\");\n }\n\n final DexFile origDexFile = oldDexFiles.get(i);\n final String origFileName = (String) mFileNameField.get(origDexFile);\n final Object origCookie = mCookieField.get(origDexFile);\n final Object origInternalCookie = mInternalCookieField.get(origDexFile);\n\n final DexFile dupOrigDexFile = DexFile.loadDex(application.getApplicationInfo().sourceDir, null, 0);\n mFileNameField.set(dupOrigDexFile, origFileName);\n mCookieField.set(dupOrigDexFile, origCookie);\n mInternalCookieField.set(dupOrigDexFile, origInternalCookie);\n\n dexFileField.set(newElement, dupOrigDexFile);\n\n // Just for better looking when dump new classloader.\n // Avoid such output like this: DexPathList{zip file: /xx/yy/zz/uu.odex}\n final File newZip = (File) zipField.get(newElement);\n final String newZipPath = (newZip != null ? newZip.getAbsolutePath() : null);\n if (newZipPath != null && !newZipPath.endsWith(\".zip\") && !newZipPath.endsWith(\".jar\") && !newZipPath.endsWith(\".apk\")) {\n zipField.set(newElement, null);\n }\n }\n }",
"private static URL createTempJar(Artifact artifact, Contribution contribution) throws IOException {\n FileOutputStream fileOutputStream = null;\n ZipInputStream zipInputStream = new ZipInputStream(new FileInputStream(new File(URI.create(contribution.getLocation()))));\n try {\n ZipEntry zipEntry = zipInputStream.getNextEntry();\n while (zipEntry != null) {\n if (artifact.getLocation().endsWith(zipEntry.getName())) {\n\n String tempName = (\"tmp.\" + artifact.getURI().substring(0, artifact.getURI().length() - 3)).replace('/', '.');\n File tempFile = File.createTempFile(tempName, \".jar\");\n tempFile.deleteOnExit();\n fileOutputStream = new FileOutputStream(tempFile);\n\n byte[] buf = new byte[2048];\n int n;\n while ((n = zipInputStream.read(buf, 0, buf.length)) > -1) {\n fileOutputStream.write(buf, 0, n);\n }\n\n fileOutputStream.close();\n zipInputStream.closeEntry();\n\n return tempFile.toURI().toURL();\n\n }\n zipEntry = zipInputStream.getNextEntry();\n }\n } finally {\n zipInputStream.close();\n if (fileOutputStream != null) {\n fileOutputStream.close();\n }\n }\n \n throw new IllegalStateException();\n }",
"public void fix(TaskListener listener) throws IOException, InterruptedException {\n File dir = new File(job.getRootDir(), \"outOfOrderBuilds\");\n dir.mkdirs();\n File dst = new File(dir, buildDir.getName());\n listener.getLogger().println(\"Renaming \"+buildDir);\n listener.getLogger().println(\" -> \"+dst);\n if (!buildDir.renameTo(dst)) {\n FilePath bd = new FilePath(buildDir);\n bd.copyRecursiveTo(new FilePath(dst));\n bd.deleteRecursive();\n }\n\n // if there's a symlink delete it\n new File(buildDir.getParentFile(),String.valueOf(n)).delete();\n }",
"@Override\n\tprotected void onPostExecute(String path) {\n\t\t//Remove Notificacions\n \t\tmNotificationManager.cancel(mId);\n \t\tIntent i = new Intent();\n\t i.setAction(Intent.ACTION_VIEW);\n\t File f = new File(path);\n\t f.setReadable(true, false);\n\t i.setDataAndType(Uri.fromFile(f), \"application/vnd.android.package-archive\" );\n\t i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\t Log.d(context.getString(R.string.app_name), \"Installing new version\");\n\t context.startActivity(i);\n\t}",
"private void grabarArchivo() {\n\t\tPrintWriter salida;\n\t\ttry {\n\t\t\tsalida = new PrintWriter(new FileWriter(super.salida));\n\t\t\tsalida.println(this.aDevolver);\n\t\t\tsalida.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@edu.umd.cs.findbugs.annotations.SuppressWarnings(\n value = \"OBL_UNSATISFIED_OBLIGATION\",\n justification = \"Lombok construct of @Cleanup is handing this, but not detected by FindBugs\")\n private static File downloadAzkabanJobJar(String workDir, String jobJarUrl)\n throws IOException {\n String[] jobJarUrlParts = jobJarUrl.trim().split(\"/\");\n String jobJarName = jobJarUrlParts[jobJarUrlParts.length-1];\n String jobJarFilePath = String.format(\"%s/%s\", workDir, jobJarName);\n File jobJarFile = new File(jobJarFilePath);\n if (jobJarFile.exists()) {\n if (jobJarFile.delete()) {\n log.info(\"JobJarFilePath existed and was deleted: \" + jobJarFilePath);\n } else {\n log.warn(\"JobJarFilePath exists but was not deleted: \" + jobJarFilePath);\n }\n }\n\n // Create work directory if not already exists\n FileUtils.forceMkdir(new File(workDir));\n\n // Download jar file from artifactory\n @Cleanup InputStream jobJarInputStream = new URL(jobJarUrl).openStream();\n @Cleanup OutputStream jobJarOutputStream = new FileOutputStream(jobJarFile);\n IOUtils.copy(jobJarInputStream, jobJarOutputStream);\n\n // TODO: compare checksum\n\n return jobJarFile;\n }",
"private void writeArchive(Content content) throws Exception {\n\t\tString path = open();\n\t\tTranslateContent translate = new TranslateContent(content, path);\n\t\ttranslate.writeArchive();\n\n\t\t// compress archive file if +C used\n\t\tif (content.isCompressed()) {\n\t\t\tcompressArchive();\n\t\t}\n\t}",
"public void save() throws ModuleJarException {\n try {\n logger.debug(\"Saving Module JAR \" + filename);\n \n byte[] icon16 = module.getIcon16();\n byte[] icon32 = module.getIcon32();\n \n icon16 = icon16 == null ? Utilities.getBytes(IconLibrary._icoIcon16.getImage(), DcImageIcon._TYPE_PNG) : icon16;\n icon32 = icon32 == null ? Utilities.getBytes(IconLibrary._icoIcon32.getImage(), DcImageIcon._TYPE_PNG) : icon32;\n\n net.datacrow.util.zip.ZipFile zf = new net.datacrow.util.zip.ZipFile(DataCrow.moduleDir, filename);\n \n module.setIcon16Filename(\"icon16.png\");\n module.setIcon32Filename(\"icon32.png\");\n \n XmlModuleWriter writer = new XmlModuleWriter(module);\n byte[] xml = writer.getXML();\n \n writer.close();\n \n zf.addEntry(\"module.xml\", xml);\n zf.addEntry(\"icon16.png\", icon16);\n zf.addEntry(\"icon32.png\", icon32);\n zf.close();\n\n } catch (Exception exp) {\n throw new ModuleJarException(exp);\n }\n }",
"public static void main(String[] args) throws Exception {\n File file = new File(\"D:\\\\var\\\\log\\\\platform.zip\");\n FileUtil.writeFile(new FileInputStream(file), \"D:\\\\var\\\\log1\\\\platform1.zip\");\n }",
"protected void migrateOnDemand () {\n\t\ttry {\n\t\t\tif (fso.fileExists(prefix+\".fat\") && !fso.fileExists(prefix+EXTENSIONS[UBM_FILE])) {\n\t\t\t\tRandomAccessFile ubm, meta, ctr, rbm;\n\t\t\t\tInputStream inputStream;\n\t\t\t\tOutputStream outputStream;\n\n\t\t\t\tfso.renameFile(prefix+\".fat\",prefix+EXTENSIONS[UBM_FILE]);\n\n\t\t\t\tubm = fso.openFile(prefix+EXTENSIONS[UBM_FILE], \"rw\");\n\t\t\t\tmeta = fso.openFile(prefix+EXTENSIONS[MTD_FILE], \"rw\");\n\t\t\t\tctr = fso.openFile(prefix+EXTENSIONS[CTR_FILE], \"rw\");\n\t\t\t\tubm.seek(ubm.length()-16);\n\t\t\t\tmeta.writeInt(blockSize = ubm.readInt());\n\t\t\t\tmeta.writeInt(size = ubm.readInt());\n\t\t\t\tctr.setLength(ubm.readLong()+blockSize);\t// maxOffset\n\t\t\t\tctr.close();\n\t\t\t\tmeta.close();\n\t\t\t\tubm.setLength(ubm.length()-16);\n\n\t\t\t\tubm.seek(0);\n\t\t\t\trbm = fso.openFile(prefix+EXTENSIONS[UBM_FILE], \"rw\");\n\t\t\t\tinputStream = new BufferedInputStream(new RandomAccessFileInputStream(ubm));\n\t\t\t\toutputStream = new BufferedOutputStream(new RandomAccessFileOutputStream(rbm));\n\t\t\t\tfor (int b; (b = inputStream.read())!=-1;)\n\t\t\t\t\toutputStream.write(b);\n\t\t\t\toutputStream.close();\n\t\t\t\tinputStream.close();\n\t\t\t\trbm.close();\n\t\t\t\tubm.close();\n\t\t\t}\n\t\t}\n\t\tcatch (IOException ie) {\n\t\t\tthrow new WrappingRuntimeException(ie);\n\t\t}\n\t}",
"public void zip() {\n\t\tif (zipFile != null) {\n\t\t\tlong start = System.currentTimeMillis();\n\t\t\ttry (ZipOutputStream zos = new ZipOutputStream(new FileOutputStream(zipFile))) {\n\t\t\t\tzos.setLevel(ZipOutputStream.STORED);\n\t\t\t\tbyte[] buffer = new byte[4096];\n\t\t\t\tFiles.list(Paths.get(tool_builddir))\n\t\t\t\t\t\t.forEach(x -> {\n\t\t\t\t\t\t\tFile f = x.toFile();\n\t\t\t\t\t\t\tif (f.isFile() && !f.getName().contains(\".\")) {\n\t\t\t\t\t\t\t\ttry (FileInputStream fis = new FileInputStream(f)) {\n\t\t\t\t\t\t\t\t\tZipEntry zipEntry = new ZipEntry(f.getName());\n\t\t\t\t\t\t\t\t\tzos.putNextEntry(zipEntry);\n\t\t\t\t\t\t\t\t\tint count;\n\t\t\t\t\t\t\t\t\twhile ((count = fis.read(buffer)) >= 0) {\n\t\t\t\t\t\t\t\t\t\tzos.write(buffer, 0, count);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tzos.closeEntry();\n\t\t\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t\t\tthrow new RuntimeException(e);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\tout.println(\"Zipped to '\" + zipFile + \"' - \" + Duration.ofMillis(System.currentTimeMillis() - start));\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public void reDownloadDB(String newVersion)\n {\n }",
"public File downloadJar(DistributedMember locator, String groupName, String jarName)\n throws IOException {\n Path tempDir = FileUploader.createSecuredTempDirectory(\"deploy-\");\n Path tempJar = Paths.get(tempDir.toString(), jarName);\n\n downloadTo(locator, groupName, jarName, tempJar);\n\n return tempJar.toFile();\n }",
"public static Path setupArchiveFile( final Configuration conf, final int count, boolean isJar ) throws IOException {\r\n\t\tFile tmpDir = File.createTempFile(\"tmpDir\", \"\");\r\n\t\tif (!tmpDir.delete()) {\r\n\t\t\tthrow new IOException(\"Can not delete recently created tmpFile\");\r\n\t\t}\r\n\t\tif (!tmpDir.mkdirs()) {\r\n\t\t\tthrow new IOException(\"Can not create tmp directory \" + tmpDir);\r\n\t\t}\r\n\t\t\r\n\t\tfinal Path tmpDirPath = new Path(tmpDir.getName());\r\n\t\tList<Path> files = createSimpleDirectory(conf, tmpDirPath, count, null);\r\n\t\tfinal Path zipFile = tmpDirPath.suffix(isJar?\".jar\":\".zip\");\r\n\t\tcreateArchiveFile(conf, zipFile, files, 1, isJar, null);\r\n\t\t/** Now clean up the tmpDir. */\r\n\t\tFileSystem fs = tmpDirPath.getFileSystem(conf);\r\n\t\tfs.delete( tmpDirPath, true);\r\n\t\treturn zipFile;\r\n\t}",
"protected void doCleanup(File jarFile, String suitePath) {\n if (jarFile != null) {\n jarFile.delete();\n };\n if (suitePath != null) {\n new File(suitePath + \".suite\").delete();\n new File(suitePath + \".suite.api\").delete();\n }\n }",
"public void backupCustom(String... tableName) throws Exception {\n // back up specific files\n QueryDataSet qds = new QueryDataSet(conn);\n for (String str : tableName) {\n\n qds.addTable(str);\n }\n FlatXmlDataSet.write(qds, new FileWriter(backupFile), \"UTF-8\");\n new XlsDataSetWriter().write(qds, new FileOutputStream(backupFile));\n }",
"private void restoreFile(Path parentPath, String sourceFilename, String backupFilename) throws IOException {\n File source = new File(path.toString() + File.separator + sourceFilename);\n File backup = new File(path.toString() + File.separator + backupFilename);\n\n Files.move(backup.toPath(), source.toPath(), StandardCopyOption.REPLACE_EXISTING);\n }",
"private void upgradeBundle(final net.wequick.small.Bundle bundle,\n final String urlStr, final File file,\n final OnUpgradeListener listener) {\n mHandler = new DownloadHandler(listener);\n new Thread() {\n @Override\n public void run() {\n try {\n URL url = new URL(urlStr);\n HttpURLConnection urlConn = (HttpURLConnection) url.openConnection();\n InputStream is = urlConn.getInputStream();\n // Save\n OutputStream os = new FileOutputStream(file);\n byte[] buffer = new byte[1024];\n int length;\n while ((length = is.read(buffer)) != -1) {\n os.write(buffer, 0, length);\n }\n os.flush();\n os.close();\n is.close();\n\n // While you finish downloading patch file, call this\n bundle.upgrade();\n\n Message.obtain(mHandler, 1).sendToTarget();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }.start();\n }",
"public static void main_backup(){\n try {\n tableClone = (HiringTable) table.clone();\n System.out.println(\"Successfully created backup.\");\n } catch (CloneNotSupportedException ex){\n System.out.println(\"Clone not successful.\");\n main_menu();\n }\n }",
"public ZipBuilder save() throws IOException {\n\t\t\tZipUtil.addToZip(zos, bytes, path, comment);\n\t\t\treturn ZipBuilder.this;\n\t\t}",
"com.google.devtools.kythe.proto.Java.JarDetails.Jar getJar(int index);",
"public static void backupToFile(String filePath) throws DatabaseWrapperOperationException {\r\n \t\t// create temporary directory which includes backup files\r\n \t\tString tempDirName = java.util.UUID.randomUUID().toString();\r\n \t\tFile tempDir = new File(System.getProperty(\"user.home\") + File.separator, tempDirName);\r\n \t\tif (!tempDir.exists() && !tempDir.mkdir()) {\r\n \t\t\tLOGGER.error(\"Could not create temp directory\");\r\n \t\t}\r\n \t\r\n \t\t// backup home directory\r\n \t\tFile tempAppDataDir = new File(tempDir.getPath());\r\n \t\tFile sourceAppDataDir = new File(FileSystemLocations.getActiveHomeDir());\r\n \t\ttry {\r\n \t\t\tString excludeRegex = LOCK_FILE_REGEX + REGEX_OR + DATABASE_FILE_REGEX; \r\n \t\t\tFileSystemAccessWrapper.copyDirectory(sourceAppDataDir, tempAppDataDir, excludeRegex);\r\n \t\t} catch (IOException e) {\r\n \t\t\tthrow new DatabaseWrapperOperationException(DBErrorState.ERROR_DIRTY_STATE,e);\r\n \t\t}\r\n \t\r\n \t\t// backup database to file\r\n \t\ttry (Statement statement = ConnectionManager.getConnection().createStatement()){\t\t\t\t\r\n \t\t\tstatement.executeUpdate(BACKUP_TO + \"'\" + tempDir.getPath() + File.separatorChar + FileSystemLocations.DATABASE_TO_RESTORE_NAME + \"'\");\r\n \t\t} catch (SQLException e) {\r\n \t\t\tthrow new DatabaseWrapperOperationException(DBErrorState.ERROR_DIRTY_STATE,e);\r\n \t\t}\r\n \t\r\n \t\t// zip the whole temp folder\r\n \t\tFileSystemAccessWrapper.zipFolderToFile(tempDir.getPath(), filePath);\r\n \t\r\n \t\t// delete temp folder\r\n \t\tFileSystemAccessWrapper.deleteDirectoryRecursively(tempDir);\r\n \t}",
"@Override\n public void save(String bucketUuid, Map<Integer, Checkpoint> vbucketToCheckpoint) throws IOException {\n final File tempDir = new File(filename).getParentFile();\n\n final File temp = File.createTempFile(\"cbes-checkpoint-\", \".tmp.json\", tempDir);\n try {\n try (FileOutputStream out = new FileOutputStream(temp)) {\n mapper.writeValue(out, prepareForSerialization(bucketUuid, vbucketToCheckpoint));\n }\n\n Files.move(temp.toPath(), Paths.get(filename), StandardCopyOption.ATOMIC_MOVE);\n\n } catch (Exception t) {\n if (temp.exists() && !temp.delete()) {\n LOGGER.warn(\"Failed to delete temp file: {}\", temp);\n }\n throw t;\n }\n }",
"private void createTar() {\n File tgzFile = new File(\".\" + File.separator + Arguments.JRE_DEFAULT_NAME);\n File tgzMd5File = new File(tgzFile.getPath() + \".md5\");\n if (tgzFile.exists()) {\n tgzFile.delete();\n m_logger.debug(\"Removed the old tgz file\");\n }\n if (tgzMd5File.exists()) {\n tgzMd5File.delete();\n m_logger.debug(\"Removed the old md5 file\");\n }\n\n try {\n m_logger.debug(\"Starting zip\");\n tgzFile.createNewFile();\n TarArchiveOutputStream tgzStream = new TarArchiveOutputStream(new GZIPOutputStream(\n new BufferedOutputStream(new FileOutputStream(tgzFile))));\n addFileToTarGz(tgzStream, m_jreLocation, \"\");\n tgzStream.finish();\n tgzStream.close();\n m_logger.debug(\"Finished zip, starting md5 hash\");\n\n Platform.runLater(() -> fileLabel.setText(\"Generating md5 hash\"));\n String md5Hash = MainApp.hashFile(tgzFile);\n OutputStream md5Out = new BufferedOutputStream(new FileOutputStream(tgzMd5File));\n md5Out.write(md5Hash.getBytes());\n md5Out.flush();\n md5Out.close();\n m_logger.debug(\"Finished md5 hash, hash is \" + md5Hash);\n final boolean interrupted = Thread.interrupted();\n\n // Show the connect roboRio screen\n Platform.runLater(() -> {\n if (!interrupted) {\n m_args.setArgument(Arguments.Argument.JRE_TAR, tgzFile.getAbsolutePath());\n moveNext(Arguments.Controller.CONNECT_ROBORIO_CONTROLLER);\n }\n });\n } catch (IOException | NoSuchAlgorithmException e) {\n m_logger.error(\"Could not create the tar gz file. Do we have write permissions to the current working directory?\", e);\n showErrorScreen(e);\n }\n }",
"private File getCurrentArtifact() {\n\t\treturn new File(target, jarName.concat(EXTENSION));\n\t}",
"public void unarchive(String baseDir) throws MojoExecutionException {\n try (FileInputStream fis = new FileInputStream(archive);\n ZipArchiveInputStream zipIn = new ZipArchiveInputStream(fis)) {\n ZipArchiveEntry zipEnry = zipIn.getNextZipEntry();\n while (zipEnry != null) {\n // Create a file for this tarEntry\n final File destPath = new File(baseDir + File.separator + zipEnry.getName());\n if (zipEnry.isDirectory()) {\n destPath.mkdirs();\n }\n else {\n destPath.createNewFile();\n try (BufferedOutputStream bout = new BufferedOutputStream(new FileOutputStream(destPath))) {\n IOUtils.copy(zipIn, bout);\n }\n }\n zipEnry = zipIn.getNextZipEntry();\n }\n }\n catch (IOException ex) {\n throw new MojoExecutionException(\"Could not extract archive: \" + archive.getAbsolutePath(), ex);\n }\n\n // delete archive after extraction\n archive.delete();\n }"
] | [
"0.5797263",
"0.5792429",
"0.57843155",
"0.574754",
"0.5691962",
"0.5586305",
"0.5575282",
"0.5486671",
"0.5386078",
"0.5369374",
"0.5312488",
"0.5291178",
"0.52290803",
"0.52274597",
"0.52010727",
"0.51965016",
"0.5195312",
"0.5170865",
"0.5165602",
"0.51503986",
"0.5145334",
"0.5127876",
"0.5112808",
"0.5108464",
"0.50892276",
"0.5055347",
"0.5029929",
"0.5014297",
"0.50114644",
"0.49448925",
"0.4926471",
"0.49144536",
"0.49140573",
"0.49135175",
"0.48920766",
"0.48512757",
"0.48184773",
"0.47966194",
"0.479257",
"0.4789062",
"0.47736183",
"0.47610152",
"0.47541177",
"0.4734983",
"0.4730775",
"0.47280034",
"0.47246882",
"0.472123",
"0.47208136",
"0.4717965",
"0.47127488",
"0.471159",
"0.47016987",
"0.46910536",
"0.46799096",
"0.46588075",
"0.4656026",
"0.46509916",
"0.4649841",
"0.46436408",
"0.46385738",
"0.4634012",
"0.46339858",
"0.46310362",
"0.46299478",
"0.4612471",
"0.46105915",
"0.46073553",
"0.46021667",
"0.4601724",
"0.45948946",
"0.4593988",
"0.45900282",
"0.45830148",
"0.45696428",
"0.45673183",
"0.456216",
"0.4561284",
"0.45607597",
"0.45501873",
"0.4526619",
"0.45254707",
"0.45181185",
"0.45179662",
"0.4514886",
"0.4513135",
"0.45095387",
"0.44999328",
"0.44970262",
"0.44926447",
"0.44886708",
"0.4475308",
"0.4467721",
"0.44671047",
"0.44654074",
"0.44591704",
"0.44563466",
"0.44503647",
"0.44502386",
"0.44483498"
] | 0.7117709 | 0 |
Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.main, menu); | @Override
public boolean onCreateOptionsMenu(Menu menu) {
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\t\t\t\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\t\t\t\tgetMenuInflater().inflate(R.menu.activity_main, menu);\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tthis.getMenuInflater().inflate(R.menu.activity_main, menu);\n\t\treturn true;\n\t}",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\n\t\treturn true;\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.activity_main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.activity_main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.activity_main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.activity_main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.activity_main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.activity_main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.activity_main, menu);\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.activity_main, menu);\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.activity_main, menu);\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.activity_main, menu);\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.activity_main, menu);\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.activity_main, menu);\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.activity_main, menu);\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.activity_main, menu);\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.activity_main, menu);\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.activity_main, menu);\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.activity_main, menu);\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.activity_main, menu);\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.activity_main, menu);\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.activity_main, menu);\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.activity_main, menu);\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.activity_main, menu);\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.activity_main, menu);\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.activity_main, menu);\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.activity_main, menu);\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.activity_main, menu);\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.activity_main, menu);\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.activity_main, menu);\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.activity_main, menu);\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.activity_main, menu);\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.activity_main, menu);\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.activity_main, menu);\n\t\treturn true;\n\t}",
"@Override\t\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.activity_main, menu);\n return true;\n }",
"@Override\t\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\t\t\n\t\t/* Inflate the menu; this adds items to the action bar if it is present */\n\t\tgetMenuInflater().inflate(R.menu.act_main, menu);\t\t\n\t\treturn true;\n\t}",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t}",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\t// Inflate the menu; this adds items to the action bar if it is present.\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.activity_main_menu, menu);\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.activity_main_menu, menu);\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(final Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n this.getMenuInflater().inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu)\n\t{\n\t\tgetMenuInflater().inflate(R.menu.activity_main, menu);\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main_actions, menu);\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn true;\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ui_main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) \n\t{\n\t\tgetMenuInflater().inflate(R.menu.activity_main, menu);\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\n\t\tMenuInflater mInflater = getMenuInflater();\n\t\tmInflater.inflate(R.menu.main, menu);\n\n\t\treturn true;\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn true;\r\n\t}"
] | [
"0.8230528",
"0.8155463",
"0.8147739",
"0.8147739",
"0.8147739",
"0.8147739",
"0.814026",
"0.8118886",
"0.8117706",
"0.8117706",
"0.8117706",
"0.8105381",
"0.8101514",
"0.8101514",
"0.8101514",
"0.8101514",
"0.8101514",
"0.8101514",
"0.8099227",
"0.8099227",
"0.8099227",
"0.8099227",
"0.8099227",
"0.8099227",
"0.8099227",
"0.8099227",
"0.8099227",
"0.8099227",
"0.8099227",
"0.8099227",
"0.8099227",
"0.8099227",
"0.8099227",
"0.8099227",
"0.8099227",
"0.8099227",
"0.8099227",
"0.8099227",
"0.8099227",
"0.8099227",
"0.8099227",
"0.8099227",
"0.8099227",
"0.8099227",
"0.8099004",
"0.8096786",
"0.8092886",
"0.8078318",
"0.8077198",
"0.8077198",
"0.8073453",
"0.8069806",
"0.8065801",
"0.80587906",
"0.80558413",
"0.8053145",
"0.80491763",
"0.80479",
"0.80410236",
"0.80410236",
"0.80410236",
"0.80410236",
"0.80410236",
"0.80410236",
"0.80410236",
"0.80410236",
"0.80410236",
"0.80410236",
"0.80410236",
"0.80410236",
"0.80410236",
"0.80410236",
"0.80410236",
"0.80410236",
"0.80410236",
"0.80410236",
"0.80410236",
"0.80410236",
"0.80410236",
"0.80410236",
"0.80410236",
"0.80410236",
"0.80410236",
"0.80410236",
"0.80410236",
"0.80410236",
"0.80410236",
"0.80410236",
"0.80410236",
"0.80410236",
"0.80410236",
"0.80410236",
"0.80410236",
"0.80410236",
"0.80410236",
"0.80410236",
"0.80410236",
"0.80410236",
"0.80410236",
"0.80410236",
"0.80410236"
] | 0.0 | -1 |
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml. | @Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
//noinspection SimplifiableIfStatement
//if (id == R.id.action_settings) {
// return true;
//}
return super.onOptionsItemSelected(item);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n //\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // Back button clicked\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // app icon in action bar clicked; goto parent activity.\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n switch (id) {\r\n case android.R.id.home:\r\n // app icon in action bar clicked; go home\r\n this.finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // app icon in action bar clicked; go home\n finish();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n Log.e(\"clik\", \"action bar clicked\");\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n\t public boolean onOptionsItemSelected(MenuItem item) {\n\t int id = item.getItemId();\n\t \n\t\t\tif (id == android.R.id.home) {\n\t\t\t\t// Respond to the action bar's Up/Home button\n\t\t\t\t// NavUtils.navigateUpFromSameTask(this);\n\t\t\t\tonBackPressed();\n\t\t\t\treturn true;\n\t\t\t}\n\t \n\t \n\t return super.onOptionsItemSelected(item);\n\t }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n // Respond to the action bar's Up/Home button\r\n case android.R.id.home:\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle presses on the action bar items\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n case R.id.action_clear:\n return true;\n case R.id.action_done:\n\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onActionHomePressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId())\n {\n case android.R.id.home :\n super.onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId ()) {\n case android.R.id.home:\n onBackPressed ();\n return true;\n\n default:\n break;\n }\n return super.onOptionsItemSelected ( item );\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t switch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\t// app icon in action bar clicked; go home \n\t\t\tIntent intent = new Intent(this, Kelutral.class); \n\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); \n\t\t\tstartActivity(intent); \n\t\t\treturn true;\t\t\n\t case R.id.Search:\n\t \treturn onSearchRequested();\n\t\tcase R.id.AppInfo:\n\t\t\t// Place holder menu item\n\t\t\tIntent newIntent = new Intent(Intent.ACTION_VIEW,\n\t\t\t\t\tUri.parse(\"http://forum.learnnavi.org/mobile-apps/\"));\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\n\t\tcase R.id.Preferences:\n\t\t\tnewIntent = new Intent(getBaseContext(), Preferences.class);\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\t\n\t }\n\t return false;\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n onBackPressed();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // Intent homeIntent = new Intent(this, MainActivity.class);\n // homeIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n // startActivity(homeIntent);\n finish();\n return true;\n default:\n return (super.onOptionsItemSelected(item));\n }\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // setResult and close the activity when Action Bar Up Button clicked.\n if (item.getItemId() == android.R.id.home) {\n setResult(RESULT_CANCELED);\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // This ID represents the Home or Up button. In the case of this\n // activity, the Up button is shown. Use NavUtils to allow users\n // to navigate up one level in the application structure. For\n // more details, see the Navigation pattern on Android Design:\n //\n // http://developer.android.com/design/patterns/navigation.html#up-vs-back\n //\n \tgetActionBar().setDisplayHomeAsUpEnabled(false);\n \tgetFragmentManager().popBackStack();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if(id == android.R.id.home){\n onBackPressed();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n\n }\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@RequiresApi(api = Build.VERSION_CODES.M)\n @Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif(item.getItemId()==android.R.id.home)\r\n\t\t{\r\n\t\t\tgetActivity().onBackPressed();\r\n\t\t}\r\n\t\treturn super.onOptionsItemSelected(item);\r\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if(item.getItemId()==android.R.id.home){\n super.onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n return false;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n //Back arrow\n case android.R.id.home:\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // android.R.id.home是Android内置home按钮的id\n finish();\n break;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n this.onBackPressed();\n return false;\n }\n return false;\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n\r\n case android.R.id.home:\r\n /*Intent i= new Intent(getApplication(), MainActivity.class);\r\n i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n startActivity(i);*/\r\n onBackPressed();\r\n finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case android.R.id.home:\n this.finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Pass the event to ActionBarDrawerToggle, if it returns\n // true, then it has handled the app icon touch event\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n\n // Handle your other action bar items...\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n NavUtils.navigateUpFromSameTask(getActivity());\n return true;\n case R.id.action_settings:\n Intent i = new Intent(getActivity(), SettingsActivity.class);\n startActivity(i);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n //Fixes the Up Button\n if(id == android.R.id.home) {\n BuildRoute.this.finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()){\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return true;\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if (id == android.R.id.home) {\n NavUtils.navigateUpFromSameTask(this);\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n break;\r\n }\r\n return true;\r\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif (item.getItemId() == android.R.id.home) {\n\t\t\tfinish();\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n onBackPressed();\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if ( id == android.R.id.home ) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.home) {\r\n NavUtils.navigateUpFromSameTask(this);\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_about) {\r\n AboutDialog();\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_exit) {\r\n finish();\r\n return true;\r\n }\r\n\r\n\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n//noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n// finish the activity\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item)\n {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if( id == android.R.id.home ) // Back button of the actionbar\n {\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n\t\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\t\tswitch (item.getItemId()) {\r\n\t\t\tcase android.R.id.home:\r\n\t\t\t\tfinish();\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\treturn super.onOptionsItemSelected(item);\r\n\t\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n return true;\n }\n return false;\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if(id == android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\r\n\t\tcase android.R.id.home:\r\n\t\t\tsetResult(RESULT_OK, getIntent());\r\n\t\t\tfinish();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n if (item.getItemId() == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n\n case android.R.id.home:\n this.finish();\n return true;\n }\n return true;\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\tif (id == android.R.id.home) {\n\t\t\tfinish();\n\t\t\treturn true;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if (id == android.R.id.home) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n //NavUtils.navigateUpFromSameTask(this);\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // todo: goto back activity from here\n finish();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n // Handle item selection\r\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n return true;\r\n\r\n case me.cchiang.lookforthings.R.id.action_sample:\r\n// Snackbar.make(parent_view, item.getTitle() + \" Clicked \", Snackbar.LENGTH_SHORT).show();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tcase R.id.scan_menu:\n\t\t\tonScan();\n\t\t\tbreak;\n\t\tcase R.id.opt_about:\n\t\t\t//onAbout();\n\t\t\tbreak;\n\t\tcase R.id.opt_exit:\n\t\t\tfinish();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t\treturn true;\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n super.onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n finish();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if(id==android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\r\n\t switch (item.getItemId()) {\r\n\t \t// back to previous page\r\n\t case android.R.id.home:\r\n\t finish();\r\n\t return true;\r\n\t }\r\n\t return super.onOptionsItemSelected(item);\r\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId())\n {\n case android.R.id.home:\n this.finish();\n return (true);\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case R.id.home:{\n NavUtils.navigateUpFromSameTask(this);\n return true;\n }\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n switch(item.getItemId())\n {\n case android.R.id.home:\n super.onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\treturn true;\n\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n\r\n int id = item.getItemId();\r\n if(id==android.R.id.home){\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }"
] | [
"0.79039484",
"0.78061193",
"0.7765948",
"0.772676",
"0.76312095",
"0.76217103",
"0.75842994",
"0.7530533",
"0.748778",
"0.7458179",
"0.7458179",
"0.7438179",
"0.74213266",
"0.7402824",
"0.7391232",
"0.73864055",
"0.7378979",
"0.73700106",
"0.7362941",
"0.73555434",
"0.73453045",
"0.7341418",
"0.7330557",
"0.7327555",
"0.7326009",
"0.7318337",
"0.73160654",
"0.73132724",
"0.73037714",
"0.73037714",
"0.73011225",
"0.7297909",
"0.7293188",
"0.72863173",
"0.7282876",
"0.72807044",
"0.72783154",
"0.72595924",
"0.72595924",
"0.72595924",
"0.7259591",
"0.72591716",
"0.7249715",
"0.72243243",
"0.7219297",
"0.7216771",
"0.72042644",
"0.72012293",
"0.7199543",
"0.7193037",
"0.7184855",
"0.7177254",
"0.7168334",
"0.7167477",
"0.71536905",
"0.7153523",
"0.7135821",
"0.7134834",
"0.7134834",
"0.7128953",
"0.7128911",
"0.71241933",
"0.7123363",
"0.71228945",
"0.71219414",
"0.7117495",
"0.71173275",
"0.71169853",
"0.7116851",
"0.7116851",
"0.7116851",
"0.7116851",
"0.71148705",
"0.7112308",
"0.7109725",
"0.71084905",
"0.71055764",
"0.70995593",
"0.7098301",
"0.7096311",
"0.70935965",
"0.70935965",
"0.7086441",
"0.7082852",
"0.70806813",
"0.70801675",
"0.7073609",
"0.70681775",
"0.7061872",
"0.7060011",
"0.7059868",
"0.70513153",
"0.7037599",
"0.7037599",
"0.7036033",
"0.70353055",
"0.70353055",
"0.70322436",
"0.70304227",
"0.70294935",
"0.70187974"
] | 0.0 | -1 |
Handle navigation view item clicks here. | @SuppressWarnings("StatementWithEmptyBody")
@Override
public boolean onNavigationItemSelected(MenuItem item) {
int id = item.getItemId();
if (id == R.id.nav_profile) {
callProfile();
} else if (id == R.id.nav_logout) {
session.setusename("");
TransitionLeft(LoginActivity.class);
}
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
drawer.closeDrawer(GravityCompat.START);
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void onNavigationItemClicked(Element element);",
"@Override\n public void onClick(View view) { listener.onItemClick(view, getPosition()); }",
"void onDialogNavigationItemClicked(Element element);",
"@Override\n public void onClick(View view) {\n itemInterface.OnItemClickedListener(tracks, getAdapterPosition());\n }",
"@Override\n public void onClickItem(MeowBottomNavigation.Model item) {\n }",
"@Override\n public void onClickItem(MeowBottomNavigation.Model item) {\n }",
"@Override\n public void onClick(View view) {\n listener.menuButtonClicked(view.getId());\n }",
"@Override\r\n\tpublic boolean onNavigationItemSelected(int itemPosition, long itemId) {\n\t\tLog.d(\"SomeTag\", \"Get click event at position: \" + itemPosition);\r\n\t\tswitch (itemPosition) {\r\n\t\tcase 1:\r\n\t\t\tIntent i = new Intent();\r\n\t\t\ti.setClass(getApplicationContext(), MainActivity.class);\r\n\t\t\tstartActivity(i);\r\n\t\t\t//return true;\r\n\t\t\tbreak;\r\n\t\tcase 2 :\r\n\t\t\tIntent intent = new Intent(this,WhiteListActivity.class);\r\n\t\t\tstartActivity(intent);\r\n\t\t\t//return true;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t}",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n String name = navDrawerItems.get(position).getListItemName();\n // call a helper method to perform a corresponding action\n performActionOnNavDrawerItem(name);\n }",
"@Override\n\tpublic void rightNavClick() {\n\t\t\n\t}",
"@Override\n public void OnItemClick(int position) {\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif (itemClicked != null)\n\t\t\t\t\titemClicked.OnItemClicked((BusinessType)item.getTag(), item);\n\t\t\t}",
"@Override\n public void onClick(View view) {\n clickListener.onItemClicked(getBindingAdapterPosition());\n }",
"@Override\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n\t\t\t\t\tint position, long id) {\n\t\t\t\thandleClick(position);\n\t\t\t}",
"@Override\n public void onItemClicked(int itemPosition, Object dataObject) {\n }",
"@Override\n public void onItemClick(int pos) {\n }",
"@Override\n public void onClick(View v) {\n if (listener != null)\n listener.onItemClick(itemView, getPosition());\n }",
"private void handleNavClick(View view) {\n final String label = ((TextView) view).getText().toString();\n if (\"Logout\".equals(label)) {\n logout();\n }\n if (\"Profile\".equals(label)) {\n final Intent intent = new Intent(this, ViewProfileActivity.class);\n startActivity(intent);\n }\n if (\"Search\".equals(label)){\n final Intent intent = new Intent(this, SearchActivity.class);\n startActivity(intent);\n }\n if (\"Home\".equals(label)) {\n final Intent intent = new Intent(this, HomeActivity.class);\n startActivity(intent);\n }\n }",
"void onMenuItemClicked();",
"@Override\n public void onClick(View view) {\n\n switch (view.getId()) {\n case R.id.tvSomeText:\n listener.sendDataToActivity(\"MainActivity: TextView clicked\");\n break;\n\n case -1:\n listener.sendDataToActivity(\"MainActivity: ItemView clicked\");\n break;\n }\n }",
"@Override\n\t\t\t\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\t\t\t\tMainActivity sct = (MainActivity) act;\n\t\t\t\t\t\t\t\t\tsct.onItemClick(posit2, 11);\n\t\t\t\t\t\t\t\t}",
"@Override\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\t}",
"@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\n\t\t\t}",
"@Override\n public void onClick(View v) {\n listener.onItemClick(v, position);\n }",
"@Override\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\t\t\n\t}",
"@Override\n public void onItemClick(View view, String data) {\n }",
"abstract public void onSingleItemClick(View view);",
"@Override\n public void onClick(View v) {\n this.itemClickListener.onItemClick(v, getLayoutPosition());\n }",
"@Override\n public void itemClick(int pos) {\n }",
"@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int position, long id) {\n TextView textView = (TextView)view;\n switch(textView.getText().toString()){\n case \"NavBar\":\n Intent nav = new Intent(this, NavDrawerActivity.class);\n startActivity(nav);\n break;\n }\n\n //Toast.makeText(MainActivity.this,\"Go to \" + textView.getText().toString() + \" page.\",Toast.LENGTH_LONG).show();\n }",
"@Override\r\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\t\t\r\n\t}",
"@Override\n\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\tlong arg3) {\n\t\t\t\n\t\t}",
"@Override\n public void onItemClick(Nson parent, View view, int position) {\n }",
"@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\t\t\t\t\tlong arg3) {\n\t\t\t}",
"@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\t\t\t\t\n\t\t\t}",
"@Override\n public void onClick(View view) {\n int position = getAdapterPosition();\n\n // Check if listener!=null bcz it is not guarantee that we'll call setOnItemClickListener\n // RecyclerView.NO_POSITION - Constant for -1, so that we don't click item at Invalid position (safety measure)\n if (listener != null && position != RecyclerView.NO_POSITION) {\n //listener.onItemClick(notes.get(position)); - used in RecyclerView.Adapter\n listener.onItemClick(getItem(position)); // getting data from superclass\n }\n }",
"@Override\n public void onClick(View v) {\n itemClickListener.itemClicked(movieId, v);\n }",
"@Override\n\t\tpublic void onClick(View view) {\n\t\t\tif (iOnItemClickListener != null) {\n\t\t\t\tiOnItemClickListener.onItemClick(view, null, getAdapterPosition());\n\t\t\t}\n\t\t}",
"@Override\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\n\t}",
"@Override\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\n\t}",
"public void onItemClick(View view, int position);",
"@Override\n public void onClick(View v) {\n if (mListener != null){\n mListener.onItemClick(itemView, getLayoutPosition());\n }\n }",
"@Override\n public void onItemClick(int position) {\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\titemClickListener.Callback(itemInfo);\n\t\n\t\t\t}",
"@Override\n public void onItemClick(View view, int position) {\n }",
"@Override\n public void onItemClick(View view, int position) {\n }",
"@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\t\t\t}",
"@Override\n public void onItemOfListClicked(Object o) {\n UserProfileFragmentDirections.ActionUserProfileFragmentToEventProfileFragment action = UserProfileFragmentDirections.actionUserProfileFragmentToEventProfileFragment((MyEvent) o);\n navController.navigate(action);\n }",
"@Override\n public void onClick(View view) {\n if(mFrom.equals(NetConstants.BOOKMARK_IN_TAB)) {\n IntentUtil.openDetailActivity(holder.itemView.getContext(), NetConstants.G_BOOKMARK_DEFAULT,\n bean.getArticleUrl(), position, bean.getArticleId());\n }\n else {\n IntentUtil.openDetailActivity(holder.itemView.getContext(), mFrom,\n bean.getArticleUrl(), position, bean.getArticleId());\n }\n }",
"@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_ds_note) {\n // Handle the camera action\n } else if (id == R.id.nav_ds_todo) {\n\n } else if (id == R.id.nav_ql_the) {\n\n } else if (id == R.id.nav_tuychinh) {\n Intent intent = new Intent(this, CustomActivity.class);\n startActivity(intent);\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }",
"@Override\n\t\t\t\t\t\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n\t\t\t\t\t\t\t\t\t\tint position, long id) {\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}",
"@Override\n public void onItemClick(View view, ListItem obj, int position) {\n }",
"@Override\n\tpublic void onItemClick(Object o, int position) {\n\n\t}",
"@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\n\t\t\t}",
"void onLinkClicked(@Nullable ContentId itemId);",
"@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case R.id.home:\n Intent homeIntent = new Intent(this, MainActivity.class);\n startActivity(homeIntent);\n break;\n case R.id.send_email:\n Intent mailIntent = new Intent(this, ContactActivity.class);\n startActivity(mailIntent);\n break;\n case R.id.send_failure_ticket:\n Intent ticketIntent = new Intent(this, TicketActivity.class);\n startActivity(ticketIntent);\n break;\n case R.id.position:\n Intent positionIntent = new Intent(this, LocationActivity.class);\n startActivity(positionIntent);\n break;\n case R.id.author:\n UrlRedirect urlRed = new UrlRedirect(this.getApplicationContext(),getString(R.string.linkedinDeveloper));\n urlRed.redirect();\n break;\n default:\n break;\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout_main_activity);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }",
"@SuppressWarnings(\"ConstantConditions\")\n public void onItemClicked(@NonNull Item item) {\n getView().openDetail(item);\n }",
"void onItemClick(View view, int position);",
"@Override\n public void onClick(View v) {\n startNavigation();\n }",
"void onItemClick(int position);",
"@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(@NonNull MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_logs) {\n startActivity(new Intent(this, LogView.class));\n } else if (id == R.id.nav_signOut) {\n signOut();\n }\n\n DrawerLayout drawer = findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }",
"@Override\n public void onClick(View v) {\n if(listener!=null & getLayoutPosition()!=0)\n listener.onItemClick(itemView, getLayoutPosition());\n }",
"@Override\n\tpublic void onItemClick(AdapterView<?> parent, View view, int position,\n\t\t\tlong id) {\n\t\tpresenter.onItemClicked(position);\n\t}",
"@Override\n public void onClick(View view) {\n listener.onMenuButtonSelected(view.getId());\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n }",
"@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\t\t\t\tHashMap<String, Object> item = (HashMap<String, Object>) arg0\n\t\t\t\t\t\t.getAdapter().getItem(arg2);\n\n\t\t\t\tIntent intent = new Intent(ViewActivity.this,\n\t\t\t\t\t\tContentActivity.class);\n\t\t\t\tBundle bundle = new Bundle();\n\t\t\t\tbundle.putString(\"_id\", item.get(\"_id\").toString());\n\t\t\t\tbundle.putString(\"_CityEventID\", item.get(\"_CityEventID\")\n\t\t\t\t\t\t.toString());\n\t\t\t\tbundle.putString(\"_type\", String.valueOf(_type));\n\t\t\t\tintent.putExtras(bundle);\n\t\t\t\tstartActivity(intent);\n\t\t\t}",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }",
"@Override\n public void onClick(View view) {\n Navigation.findNavController(view).navigate(R.id.addEventFragment);\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n Log.w(TAG , \"POSITION : \" + position);\n\n itemClick(position);\n }",
"void clickItem(int uid);",
"@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(@NonNull MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_categories) {\n Intent intent = new Intent(getApplicationContext(), CategoryActivity.class);\n startActivity(intent, compat.toBundle());\n newsHere.setSourceActivity(\"search\");\n newsHere.setTargetActivity(\"category\");\n\n } else if (id == R.id.nav_top_headlines) {\n newsHere.setSourceActivity(\"search\");\n newsHere.setTargetActivity(\"home\");\n Intent intent = new Intent(getApplicationContext(), HomeActivity.class);\n startActivity(intent, compat.toBundle());\n } else if (id == R.id.nav_search) {\n // Do nothing\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }",
"@Override\n public void onItemClick(View view, int position) {\n\n }",
"@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_orders) {\n\n Intent orderStatusIntent = new Intent(Home.this , OrderStatus.class);\n startActivity(orderStatusIntent);\n\n } else if (id == R.id.nav_banner) {\n\n Intent bannerIntent = new Intent(Home.this , BannerActivity.class);\n startActivity(bannerIntent);\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n }",
"public void onItemClick(View view, int position) {\n\n }",
"@Override\n\tpublic void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n\t}",
"@Override\n\tpublic void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n\t}",
"@Override\r\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\r\n\t\t\t\t\tlong arg3) {\n\r\n\t\t\t}",
"void onClick(View item, View widget, int position, int which);",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position,\n long id) {\n\n\n }",
"@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n Intent intent;\n switch(item.getItemId()){\n case R.id.nav_home:\n finish();\n intent = new Intent(this, NavigationActivity.class);\n startActivity(intent);\n return true;\n case R.id.nav_calendar:\n finish();\n intent = new Intent(this, EventHome.class);\n startActivity(intent);\n return true;\n case R.id.nav_discussion:\n return true;\n case R.id.nav_settings:\n intent = new Intent(this, SettingsActivity.class);\n startActivity(intent);\n return true;\n case R.id.nav_app_blocker:\n intent = new Intent(this, AppBlockingActivity.class);\n startActivity(intent);\n return true;\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }",
"@Override\n public boolean onNavigationItemSelected(@NonNull MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n\n case R.id.nav_home:\n break;\n\n case R.id.nav_favourites:\n\n if (User.getInstance().getUser() == null) {\n Intent intent = new Intent(getApplicationContext(), LoginActivity.class);\n startActivity(intent);\n }\n\n Intent intent = new Intent(getApplicationContext(), PlaceItemListActivity.class);\n startActivity(intent);\n\n break;\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tonRgtRgtMenuClick(v);\n\t\t\t}",
"@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_camera) {\n // Handle the camera action\n } else if (id == R.id.nav_gallery) {\n Toast.makeText(this, \"gallery is clicked!\", Toast.LENGTH_LONG).show();\n\n } else if (id == R.id.nav_slideshow) {\n\n } else if (id == R.id.nav_manage) {\n\n } else if (id == R.id.nav_share) {\n\n } else if (id == R.id.nav_send) {\n\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }",
"public void menuClicked(MenuItem menuItemSelected);",
"@Override\n public void onItemClick(int position) {\n }",
"@Override\n public void onItemClick(int position) {\n }",
"@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_my_account) {\n startActivity(new Intent(this, MyAccountActivity.class));\n } else if (id == R.id.nav_message_inbox) {\n startActivity(new Intent(this, MessageInboxActivity.class));\n } else if (id == R.id.nav_view_offers) {\n //Do Nothing\n } else if (id == R.id.nav_create_listing) {\n startActivity(new Intent(this, CreateListingActivity.class));\n } else if (id == R.id.nav_view_listings) {\n startActivity(new Intent(this, ViewListingsActivity.class));\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position,\n long id) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position,\n long id) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }",
"@Override\r\n\t\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\r\n\t\t\t\t\t\tint position, long id) {\n\t\t\t\t}"
] | [
"0.7882029",
"0.7235578",
"0.6987005",
"0.69458413",
"0.6917864",
"0.6917864",
"0.6883472",
"0.6875181",
"0.68681556",
"0.6766498",
"0.67418456",
"0.67207",
"0.6716157",
"0.6713947",
"0.6698189",
"0.66980195",
"0.66793925",
"0.66624063",
"0.66595167",
"0.6646381",
"0.6641224",
"0.66243863",
"0.6624042",
"0.66207093",
"0.6602551",
"0.6602231",
"0.6599443",
"0.65987265",
"0.65935796",
"0.6585869",
"0.658491",
"0.65811735",
"0.65765643",
"0.65751576",
"0.65694076",
"0.6561757",
"0.65582377",
"0.65581614",
"0.6552827",
"0.6552827",
"0.6549224",
"0.65389794",
"0.65345114",
"0.65337104",
"0.652419",
"0.652419",
"0.6522521",
"0.652146",
"0.6521068",
"0.6519354",
"0.65165275",
"0.65159816",
"0.65028816",
"0.6498054",
"0.6498054",
"0.64969087",
"0.64937705",
"0.6488544",
"0.64867324",
"0.64866185",
"0.64865905",
"0.6484047",
"0.6481108",
"0.6474686",
"0.64628965",
"0.64551884",
"0.6446893",
"0.64436555",
"0.64436555",
"0.64436555",
"0.64436555",
"0.64436555",
"0.64386237",
"0.643595",
"0.64356565",
"0.64329195",
"0.6432562",
"0.6429554",
"0.64255124",
"0.64255124",
"0.64121485",
"0.64102405",
"0.64095175",
"0.64095175",
"0.64094734",
"0.640727",
"0.64060104",
"0.640229",
"0.6397359",
"0.6392996",
"0.63921124",
"0.63899696",
"0.63885015",
"0.63885015",
"0.63873845",
"0.6368818",
"0.6368818",
"0.63643163",
"0.63643163",
"0.63643163",
"0.6358884"
] | 0.0 | -1 |
validar que Una llamada recibida se este relacionando | @Test
public void addCallReceived() {
ICallsService iCallsService = new CallsServiceImpl(new ArrayList<>());
iCallsService.addCallReceived(new Call(1l));
Assert.assertTrue(1 == iCallsService.findAll().size());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n protected void validaRegras(ArquivoLoteVO entity) {\n\n }",
"private boolean validarFormulario() {\n boolean cumple=true;\n boolean mosntrarMensajeGeneral=true;\n if(!ValidacionUtil.tieneTexto(txtNombreMedicamento)){\n cumple=false;\n };\n if(!ValidacionUtil.tieneTexto(txtCantidad)){\n cumple=false;\n };\n if(cmbTipoMedicamento.getSelectedItem()==null|| cmbTipoMedicamento.getSelectedItem().equals(\"Seleccione\")){\n setSpinnerError(cmbTipoMedicamento,\"Campo Obligatorio\");\n cumple=false;\n\n }\n if(getSucursalesSeleccionadas().isEmpty()){\n\n cumple=false;\n mosntrarMensajeGeneral=false;\n Utilitario.mostrarMensaje(getApplicationContext(),\"Seleccione una sucursal para continuar.\");\n }\n if(!cumple){\n if(mosntrarMensajeGeneral) {\n Utilitario.mostrarMensaje(getApplicationContext(), \"Error, ingrese todos los campos obligatorios.\");\n }\n }\n return cumple;\n }",
"public void ValidarLetra() {\n\t\t\n\t\tString valorCampo = \"\";\n\t\t\n\t\tif (campo == 1) {\n\t\t\t\n\t\t\tvalorCampo = textCampo1.getText();\n\t\t}\n\t\telse if (campo == 2) {\n\t\t\t\n\t\t\t valorCampo = textCampo2.getText();\n\t\t}\n\t\t\n\t\telse if (campo == 3) {\n\t\t\t\n\t\t\tvalorCampo = textCampo3.getText();\n\t\t}\n\t\t\n\t\telse if (campo == 4) {\n\t\t\t\n\t\t\tvalorCampo = textCampo4.getText();\n\t\t}\n\t\t\n\t\telse if (campo == 5) {\n\t\t\t\n\t\t\tvalorCampo = textCampo5.getText();\n\t\t}\n\n\t\telse if (campo == 6) {\n\t\t\t\n\t\t\tvalorCampo = textCampo6.getText();\n\t\t}\n\t\t\n\t\telse if (campo == 7) {\n\t\t\t\n\t\t\tvalorCampo = textCampo7.getText();\n\t\t}\n\t\t\n\t\telse if (campo == 8) {\n\t\t\t\n\t\t\tvalorCampo = textCampo8.getText();\n\t\t}\n\t\t\n\t\telse if (campo == 9) {\n\t\t\t\n\t\t\tvalorCampo = textCampo9.getText();\n\t\t}\n\t\t\n\t\telse if (campo == 10) {\n\t\t\t\n\t\t\tvalorCampo = textCampo10.getText();\n\t\t}\n\n\t\t \n\t\tboolean existe = palabra.contains(valorCampo);\n\t\t \n\t\t System.out.println(\" \"+existe);\n\n\n\t\t\n\t\t\n\t\tSystem.out.println(\"probando campo \"+campo);\n\t\t\n\t\t/*campo = 0;*/\n\t\t\n\t\t//System.out.println(\" inicializa \"+campo);\n\n\t}",
"public void validarPostagem() {\n\t\t// validando se o nome motorista ou carona foram preenchidos\n\t\tint verif = 0;\n\t\ttry {\n\t\t\tif (txtCarona.getText() == null\n\t\t\t\t\t|| txtCarona.getText().trim().equals(\"\")) {\n\n\t\t\t\tverif++;\n\n\t\t\t}\n\t\t\tif (txtMotorista.getText() == null\n\t\t\t\t\t|| txtMotorista.getText().trim().equals(\"\")) {\n\n\t\t\t\tverif++;\n\n\t\t\t}\n\t\t\tif (verif == 2) {\n\t\t\t\tthrow new IllegalArgumentException();\n\t\t\t}\n\n\t\t\tif (txtDestino.getText() == null\n\t\t\t\t\t|| txtDestino.getText().trim().equals(\"\")) {\n\t\t\t\tthrow new IllegalArgumentException();\n\t\t\t}\n\n\t\t} catch (IllegalArgumentException e) {\n\t\t\tJOptionPane\n\t\t\t\t\t.showMessageDialog(\n\t\t\t\t\t\t\tnull,\n\t\t\t\t\t\t\t\"Para postar no quadro é necessário informar nome (motorista ou passageiro) \"\n\t\t\t\t\t\t\t\t\t+ \"\t\t\t\t\t\t\te local. \\n Por favor certifique se os campos foram preenchidos e tente novamente.\");\n\t\t}\n\n\t}",
"private void validarResp(){\n String respIngresada = txtRespuesta.getText().toString();\n\n if(respIngresada.equals(respuesta)){\n //Habilita el prox paso\n viewFlipper.showNext();\n pasoFlipper = 1;\n } else {\n txtRespuesta.setError(getString(R.string.error_resp_incorrecta));\n txtRespuesta.requestFocus();\n }\n }",
"public boolean validate() {\n\n\t\tNoLista p = lista.validate();\n\t\tif(p==null){\n\t\t\treturn true; \n\t\t}else {\n\t\t\twhile(p!=null) {\n\t\t\t\tfor (int i = 0; i < ignore.length; i++) {\n\t\t\t\t\tif(ignore[i].equals(p.getInfo())) {\n\t\t\t\t\t\tretirar(p.getInfo());\n\t\t\t\t\t\taddList(p.getInfo());\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tp=p.getProximo();\n\t\t\t}\n\t\t\t\n\t\t\tif(this.lista.getPrimeiro()==null) {\n\t\t\t\treturn true;\n\t\t\t}else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t}\n\t}",
"public void validar(){\n\t\tif (verificador == false){\r\n\t\t\tif (contador == 1){\r\n\t\t\t\ttools.searchText(cadenaSinSeparar);\r\n\t\t\t\ttools.waitTime(25000);\r\n\t\t\t}else{\r\n\t\t\t\ttools.scroll(\"abajo\");\r\n\t\t\t\tplayAEventWhichIsPresentInAChannel();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tif (contador == 1){\r\n\t\t\t\ttools.scroll(\"abajo\");\r\n\t\t\t\tplayAEventWhichIsntPresentInAChannel();\r\n\t\t\t}else{\r\n\t\t\t\ttools.searchText(cadenaSinSeparar);\r\n\t\t\t\ttools.waitTime(25000);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t}",
"private String validarEntradas()\n { \n return Utilitarios.validarEntradas(campoNomeAC, campoEnderecoAC, campoBairroAC, campoCidadeAC, campoUfAC, campoCepAC, campoTelefoneAC, campoEmailAC);\n }",
"private boolean validarDatos() {\r\n\t\tboolean _esValido = true;\r\n\r\n\t\tif (txField_lugar.getText() == null || txField_lugar.getText().isEmpty())\r\n\t\t\t_esValido = false;\r\n\t\treturn _esValido;\r\n\t}",
"private boolean validarEntradaDeDados() {\n String errorMessage = \"\";\n\n if (txtFieldHistorico.getText() == null || txtFieldHistorico.getText().length() == 0) {\n errorMessage += \"Nome inválido!\\n\";\n }\n\n if (errorMessage.length() == 0) {\n return true;\n } else {\n // Mostrando a mensagem de erro\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setTitle(\"Erro no cadastro\");\n alert.setHeaderText(\"Campos inválidos, por favor, corrija...\");\n alert.setContentText(errorMessage);\n alert.show();\n return false;\n }\n }",
"private boolean validarDatos() {\n boolean result = true; // variable para saber si los datos son validos para su envio a la DAL de Rol y despues a la base de datos \n // verificar si la caja de texto txtNombre esta vacia \n if (this.txtNombre.getText().trim().isEmpty()) {\n result = false; // en el caso que la caja de texto txtNombre este vacia se colocara la variable resul en false\n }\n\n if (this.txtApellido.getText().trim().isEmpty()) {\n result = false; // en el caso que la caja de texto txtNombre este vacia se colocara la variable resul en false\n }\n\n if (this.txtDui.getText().trim().isEmpty()) {\n result = false; // en el caso que la caja de texto txtNombre este vacia se colocara la variable resul en false\n }\n\n if (this.txtNumero.getText().trim().isEmpty()) {\n result = false; // en el caso que la caja de texto txtNombre este vacia se colocara la variable resul en false\n }\n\n if (result == false) {\n // mostrar un mensaje al usuario de la pantalla que los campos son obligatorios en el caso que la variable result sea false\n JOptionPane.showMessageDialog(this, \"Los campos con * son obligatorios\");\n }\n return result; // retorna la variable result con el valor true o false para saber si los datos son validos o no\n }",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"private void validateData() {\n }",
"@Override\r\n\tprotected boolean validateFields(String action) {\r\n\t\t// Booleano para indicar que hubo error\r\n\t\tisError = false;\r\n\t\t// IRI Concepto\r\n\t\tif (this.isBlanks(object.getDcoiricaf())) {\r\n\t\t\tisError = true;\r\n\t\t\tthis.getErrorMessages().add(\r\n\t\t\t\t\tApplicationMessages.getMessage(\"USR0008\",\r\n\t\t\t\t\t\t\tApplicationMessages.getMessage(\"se010_iriDetail\")));\r\n\t\t}\r\n\t\t// Concepto Semántico\r\n\t\tif (this.isBlanks(object.getCosccosak())) {\r\n\t\t\tisError = true;\r\n\t\t\tthis.getErrorMessages().add(\r\n\t\t\t\t\tApplicationMessages.getMessage(\"USR0008\",\r\n\t\t\t\t\t\t\tApplicationMessages\r\n\t\t\t\t\t\t\t\t\t.getMessage(\"se010_semanticConcept\")));\r\n\t\t}\r\n\t\t// Valida relaciones\r\n\t\tfor (Sedrelco relco : object.getRelcos()) {\r\n\t\t\t// Valor Relacion\r\n\t\t\tif (this.isBlanks(relco.getDrcvalraf())) {\r\n\t\t\t\tisError = true;\r\n\t\t\t\tthis.getErrorMessages().add(\r\n\t\t\t\t\t\tApplicationMessages.getMessage(\"USR0008\",\r\n\t\t\t\t\t\t\t\tApplicationMessages\r\n\t\t\t\t\t\t\t\t\t\t.getMessage(\"se010_valueRelation\")));\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Retorna\r\n\t\treturn !isError;\r\n\t}",
"public boolean validarCampos() {\n\t\tboolean valid = true;\n\t\t\n\t\tif(!Util.isDateNotNull(this.getAgendaMedico().getData())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isDateNotNull(this.getAgendaMedico().getHorarioInicioAtendimento())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isDateNotNull(this.getAgendaMedico().getHorarioFimAtendimento())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\t\n\t\tif(valid) {\n\t\t\tif(this.getAgendaMedicoDAO().verificaAgendamentoHorario(this.getMedicoSessao(), this.getAgendaMedico())) {\n\t\t\t\tthis.tratarMensagemErro(null, \"MSG014\");\n\t\t\t\tvalid = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn valid;\n\t}",
"private boolean checkListino() {\n /* variabili e costanti locali di lavoro */\n boolean ok = false;\n Date dataInizio;\n Date dataFine;\n AddebitoFissoPannello panServizi;\n\n try { // prova ad eseguire il codice\n dataInizio = this.getDataInizio();\n dataFine = this.getDataFine();\n panServizi = this.getPanServizi();\n ok = panServizi.checkListino(dataInizio, dataFine);\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n } // fine del blocco try-catch\n\n /* valore di ritorno */\n return ok;\n }",
"public boolean verify(){\n return from != null && to != null && !to.isEmpty();\n }",
"@Override\n public boolean valida() {\n mediatorCredito m = new mediatorCredito();\n try{\n BigInteger dit = new BigInteger(JOptionPane.showInputDialog(null,\"Digite su número de \"\n + \"tarjeta de crédito\",\"\"));\n String pag = JOptionPane.showInputDialog(null,\"Ingrese su medio de pago: (Visa, master Card\"\n + \", American Express)\",\"\");\n if(m.verificarForm(dit, pag)==false){\n JOptionPane.showMessageDialog(null,\"ups, el medio de pago o la tarjeta de crédito no es válido\"\n ,\"Error\",0);\n }\n return m.verificarForm(dit, pag);\n \n }catch(Exception e){\n JOptionPane.showMessageDialog(null,\"Acción cancelada\",\"Advertencia\",2);\n return false;\n }\n }",
"private boolean validarCliente() {\n for (Cliente itemCliente : clienteList){\n if (cliente.getText().toString().equals(itemCliente.getClie_nombre())){\n clienteSeleccionado = itemCliente;\n return true;\n }\n }\n new Mensaje(getApplicationContext()).mensajeToas(\"El cliente no esta registrado\");\n return false;\n }",
"void validateActivoUpdate(Activo activo);",
"public void validar(View v) {\r\n //Compruebo que se hayan insertado todos los datos\r\n SimpleDateFormat formatoFecha = new SimpleDateFormat(\"dd-MM-yyyy\");\r\n if(!nombre.getText().toString().equals(\"\")\r\n &&!mail.getText().toString().equals(\"\")\r\n &&!fecha.getText().toString().equals(\"\")) {\r\n //Si se han introducido todos los datos compruebo la edad\r\n fNac = null;\r\n fActual = null;\r\n\r\n try {\r\n fNac = formatoFecha.parse(fecha.getText().toString());\r\n fActual = new Date();\r\n edad = (int) ((fActual.getTime() - fNac.getTime()) / 1000 / 60 / 60 / 24 / 360);//Calculo la edad\r\n //Compruebo si es mayor de edad\r\n if (edad < 18)\r\n //Error si es menor de edad\r\n Toast.makeText(getApplicationContext(), R.string.menorDeEdad, Toast.LENGTH_LONG).show();\r\n else {//Si todo es correcto devuelve los datos introcucidos a la pantalla principal.\r\n Toast.makeText(getApplicationContext(), R.string.registroCompletado, Toast.LENGTH_LONG).show();\r\n Intent i = new Intent();\r\n i.putExtra(\"REGISTRADO\", true);\r\n i.putExtra(\"NOMBRE\", nombre.getText().toString());\r\n i.putExtra(\"MAIL\", mail.getText().toString());\r\n i.putExtra(\"FECHA\", fecha.getText().toString());\r\n setResult(RESULT_OK,i);\r\n finish();\r\n }\r\n } catch (Exception e) {\r\n Toast.makeText(getApplicationContext(), \"Error\", Toast.LENGTH_LONG).show();//Si no se ha introducido ninguna fecha\r\n }\r\n }else\r\n Toast.makeText(getApplicationContext(), R.string.toastFaltanDatos, Toast.LENGTH_LONG).show();\r\n }",
"private boolean validarEntradaDeDados() {\n\t\tString errorMessage = \"\";\n\n\t\tif (textFieldProdutoNome.getText() == null || textFieldProdutoNome.getText().length() == 0) {\n\t\t\terrorMessage += \"Nome invalido!\\n\";\n\t\t}\n\t\tif (textFieldProdutoPreco.getText() == null || textFieldProdutoPreco.getText().length() == 0) {\n\t\t\terrorMessage += \"Preço invalido!\\n\";\n\t\t}\n\t\tif (textFieldProdutoQuantidade.getText() == null || textFieldProdutoQuantidade.getText().length() == 0) {\n\t\t\terrorMessage += \"Quantidade invalido!\\n\";\n\t\t}\n\t\tif (comboBoxProdutoCategoria.getSelectionModel().getSelectedItem() == null) {\n\t\t\terrorMessage += \"Categoria invalido!\\n\";\n\t\t}\n\t\tif (errorMessage.length() == 0) {\n\t\t\treturn true;\n\t\t} else {\n\n\t\t\t/** Mostrar a mensagem de erro. */\n\t\t\tAlert alert = new Alert(Alert.AlertType.ERROR);\n\t\t\talert.setTitle(\"Erro no registo\");\n\t\t\talert.setHeaderText(\"Campos invalidos, corrija...\");\n\t\t\talert.setContentText(errorMessage);\n\t\t\talert.show();\n\t\t\treturn false;\n\t\t}\n\t}",
"public void validarLocalidad(ActionEvent e) {\n CommandButton botonSelecionado = (CommandButton) e.getSource();\n\n // if (this.getPersona().getLugarNacimiento() != null) {\n //this.setsDireccion(this.getPersona().getLugarNacimiento().getDepartamento().getDescripcion() + \", \" + this.getPersona().getLugarNacimiento().getDescripcion());\n RequestContext context = RequestContext.getCurrentInstance();\n\n if (botonSelecionado.getId().equals(\"cbDomicilio\")) {\n context.execute(\"PF('dgDomicilio').hide();\");\n context.update(\":frmPri:pnDomicilio\");\n }\n\n// } else {\n// FacesMessage fm = new FacesMessage(FacesMessage.SEVERITY_INFO, \"No seleccionó localidad!!\\n \"\n// + \"si no existe, comuniquese con el administrador\", null);\n// FacesContext fc = FacesContext.getCurrentInstance();\n// fc.addMessage(null, fm);\n//\n//\n// }\n }",
"private void validarhorarioconotroshorariosactivos(HorarioAsignado horarioasignado, List<HorarioAsignado> horarios) throws LogicaException, ParseException, DatoException {\nGregorianCalendar startasignado=new GregorianCalendar();\nDate startdateasignado= new Date(horarioasignado.getValidezinicio().getTime());\nstartasignado.setTime(startdateasignado);\nGregorianCalendar endasignado=new GregorianCalendar();\nDate enddateasignado= new Date(horarioasignado.getValidezfin().getTime());\nendasignado.setTime(enddateasignado);\n\nint tempfrecasignado = horarioasignado.getHorario().getIdfrecuenciaasignacion().intValue();\nList<Integer> diadelasemanaasignado = diadelasemana(tempfrecasignado);\nList<HashMap<String, Object>> dataasignado = Util.diferenciaEnDiasconFrecuencia(startasignado, endasignado,diadelasemanaasignado,tempfrecasignado);\n\n\n\n\nfor(HorarioAsignado ho:horarios){\n\t\t\tif(ho.getIdhorarioasignado().equals(horarioasignado.getIdhorarioasignado())){\n\t\t\t\n\t\t\t}else{\n\t\t\tif(ho.getIdhorario()==horarioasignado.getIdhorario()){\n\t\t\t\n\t\t\t/*//cedulasconhorarios.add(em);\n\t\t\tif (horarioasignado.getValidezinicio().after(ho.getValidezinicio()) && horarioasignado.getValidezinicio().before(ho.getValidezfin())){\n\t\t\tthrow new LogicaException(\"este contrato ya tiene asociado ese horario\"\n\t\t\t+ \" entre las fechas \"+ho.getValidezinicio()+\" y \"+ ho.getValidezfin());\n\t\t\t\n\t\t\t}*/\n\t\t\t\n\t\t\t}else{\n\t\t\t\n\t\t\t}\n\n\t\tContrato contrato = contratoEJB.getContratosporId(ho.getIdcontrato());\n\t\tEmpleadoBean empleado = empleadoEJB.buscarEmpleadosporId(contrato.getIdempleado());\t\n\tGregorianCalendar start=new GregorianCalendar();\n\tDate startdate= new Date(ho.getValidezinicio().getTime());\n\tstart.setTime(startdate);\n\tGregorianCalendar end=new GregorianCalendar();\n\tDate enddate= new Date(ho.getValidezfin().getTime());\n\tend.setTime(enddate);\n\t\n\tint tempfrec = ho.getHorario().getIdfrecuenciaasignacion().intValue();\n\tList<Integer> diadelasemana = diadelasemana(tempfrec);\n\tList<HashMap<String, Object>> data = Util.diferenciaEnDiasconFrecuencia(start, end,diadelasemana,tempfrec);\n\t\n\t\t\t\t\tfor(HashMap<String, Object> diadehorario:data){\n\t\t\t\tHashMap<String, Object> horariofechas=new HashMap<String, Object>();\n\t\t\t\tGregorianCalendar fecha = (GregorianCalendar)diadehorario.get(\"fecha\");\n\t\t\t\tDate fechadat =fecha.getTime();\n\t\t\t\tGregorianCalendar fechafin = (GregorianCalendar)diadehorario.get(\"fechafin\");\n\t\t\t\tDate fechafindat = fechafin.getTime();\n\t\t\t\tfor(HashMap<String, Object> diaasignado:dataasignado){\n\t\t\t\t\t\tHashMap<String, Object> horariofechasasignadas=new HashMap<String, Object>();\n\t\t\t\t\t\tGregorianCalendar fechaasignada = (GregorianCalendar)diaasignado.get(\"fecha\");\n\t\t\t\t\t\tDate fechaasignadadat =fechaasignada.getTime();\n\t\t\t\t\t\tGregorianCalendar fechafinasignada = (GregorianCalendar)diaasignado.get(\"fechafin\");\n\t\t\t\t\t\tDate fechafinasignadadat = fechafinasignada.getTime();\n\t\t\t\t\t\t\t\t\tif(fechaasignada.after(fechafin)){\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tif((fechaasignada.getTime().after(fecha.getTime())||fechaasignada.getTime().equals(fecha.getTime())) && fechaasignada.getTime().before(fechafin.getTime()) ){\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//\tif((fechaasignada.getTime().after(fecha.getTime()) && fechaasignada.getTime().before(fechafin.getTime())) ){\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tthrow new LogicaException(\"Este contrato del empleado con identificación numero:\"+empleado.getEmpleadoidentificacion().getNumeroidentificacion() +\" ya tiene asociado un horario\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \" en las fechas \"+Util.dateToString(fecha.getTime(), \"dd/MM/yyyy HH:mm\") +\" y \"+ Util.dateToString(fechafin.getTime(),\"dd/MM/yyyy HH:mm\")+\" debe seleccionar un rango de dias diferente o un horario diferente\");\n\t\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tif((fechafinasignada.getTime().after(fecha.getTime())||fechafinasignada.getTime().equals(fecha.getTime())) && fechafinasignada.getTime().before(fechafin.getTime()) ){\n\t\t\t\t\t\t\t\t\t\t\t\tthrow new LogicaException(\"Este contrato del empleado con identificación numero:\"+empleado.getEmpleadoidentificacion().getNumeroidentificacion() +\" ya tiene asociado un horario\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \" en las fechas \"+Util.dateToString(fecha.getTime(), \"dd/MM/yyyy HH:mm\")+\" y \"+ Util.dateToString(fechafin.getTime(),\"dd/MM/yyyy HH:mm\")+\" debe seleccionar un rango de dias diferente o un horario diferente\");\n\t\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tif((fecha.getTime().after(fechaasignada.getTime() ) && fecha.getTime().before(fechafinasignada.getTime())) ){\n\t\t\t\t\t\t\t\t\t\t\t\tthrow new LogicaException(\"Este contrato del empleado con identificación numero:\"+empleado.getEmpleadoidentificacion().getNumeroidentificacion() +\" ya tiene asociado un horario\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \" en las fechas \"+Util.dateToString(fecha.getTime(), \"dd/MM/yyyy HH:mm\")+\" y \"+ Util.dateToString(fechafin.getTime(),\"dd/MM/yyyy HH:mm\")+\" debe seleccionar un rango de dias diferente o un horario diferente\");\n\t\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tif((fechafin.getTime().after(fechaasignada.getTime() ) && fechafin.getTime().before(fechafinasignada.getTime())) ){\n\t\t\t\t\t\t\t\t\t\t\t\tthrow new LogicaException(\"Este contrato del empleado con identificación numero:\"+empleado.getEmpleadoidentificacion().getNumeroidentificacion() +\" ya tiene asociado un horario\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \" en las fechas \"+Util.dateToString(fecha.getTime(), \"dd/MM/yyyy HH:mm\")+\" y \"+ Util.dateToString(fechafin.getTime(),\"dd/MM/yyyy HH:mm\")+\" debe seleccionar un rango de dias diferente o un horario diferente\");\n\t\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t}\n\n}\n\n\n}\n\n\n/////////////////////////fin validacion/\n}",
"private boolean camposValidos() {\n boolean valido = false;\n\n if (txtInfectados.getText().equals(\"\")\n || txtFecha.getText().equals(\"\")) {\n JOptionPane.showMessageDialog(null, \"Rellene todos los campos\");\n } else {\n valido = true;\n }\n\n return valido;\n }",
"private void validate() {\n\t\t// just in case;\n\t\tfor (int i=0;i<NR_OF_FIELDS; i++) {\n\t\t\tvalid[i] = \"0\";\n\t\t}\n\t\t//\n\t\t// Validate name and surname:\n\t\t//\n\t\tif ( ! this.isUpperAlpha(nume)) {\n\t\t\tfields[0] = \"1\";\n\t\t}\n\t\t\n\t\tif ( ! this.isUpperAlphaWithSpace(nume)) {\n\t\t\tfields[1] = \"1\";\n\t\t}\n\t\t//\n\t\t// validate seria\n\t\t//\n\t\tvalid[2] = \"1\";\t\t\t\t\t\t\t// presupun ca seria este invalida, si incerc sa o validez\n\t\tfor (int i=0; i<seriiBuletin.length; i++) {\n\t\t\tif (seriiBuletin[i].equals(seria)) {\n\t\t\t\tvalid[2] = \"0\";\n\t\t\t}\n\t\t}\n\t\t//\n\t\t// validate numarul\n\t\t//\n\t\ttry {\n\t\t\tvalid[3] = \"1\";\n\t\t\tint nr = Integer.valueOf(numarul);\n\t\t\tif ( nr >= 100000 && nr <= 999999 ) {\n\t\t\t\tvalid[3] = \"0\";\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tLog.d(TAG, \"Error validating seria.\");\n\t\t}\n\n\t\t//\n\t\t// validate sex\n\t\t//\n\t\tif ( ! (sex == 'M' || sex == 'F')) {\n\t\t\tvalid[6] = \"1\";\n\t\t}\n\t\t//\n\t\t// Validate valabilitate\n\t\t//\n\t\tif ( ! isNumber(this.valabilitate)) {\n\t\t\tvalid[7] = \"1\";\n\t\t}\n\t\t//\n\t\t// validate CNP\n\t\t//\n\t\tif ( ! (isNumber(CNP) && isValidCNP(CNP))) {\n\t\t\tvalid[8] = \"1\";\n\t\t}\n\t\t\n\t}",
"public void validarExcluir(BancoLcto bancoLcto) throws Exception {\r\n\r\n\t\tif (!R42Data.dentroPeriodo(bancoLcto.getDataLcto(), bancoLcto.getBancoPeriodo())) {\r\n\t\t\tthrow new Exception(\"Data fora do periodo de lançamento!\");\r\n\t\t}\r\n\r\n\t\tif (bancoLcto.getBancoPeriodo().isFechado()) {\r\n\t\t\tthrow new Exception(\"Periodo de lançamento do banco \" + bancoLcto.getBancoPeriodo().getBanco().getIdBanco()\r\n\t\t\t\t\t+ \" fechado!\");\r\n\t\t}\r\n\r\n\t\t// verifica se é transferencia\r\n\t\tif (bancoLcto.getOrigemLcto() == OrigemLcto.TRF) {\r\n\t\t\tif (bancoLcto.getTransferencia() != null) {\r\n\t\t\t\tvalidarSalvar(bancoLcto.getTransferencia());\r\n\t\t\t} else {\r\n\t\t\t\tthrow new Exception(\"Transferência deverá ser excluida no banco de origem!\");\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public boolean validar() {\n if (foto==null){\n Toast.makeText(this, getResources().getString(R.string.error_f), Toast.LENGTH_SHORT).show();\n foto.requestFocus();\n return false;\n }\n\n if (txtID.getText().toString().isEmpty()) {\n txtID.setError(getResources().getString(R.string.error_ID));\n txtID.requestFocus();\n return false;\n }\n\n if (txtNombre.getText().toString().isEmpty()) {\n txtNombre.setError(getResources().getString(R.string.error_nombre));\n txtNombre.requestFocus();\n return false;\n }\n\n if (txtTipo.getText().toString().isEmpty()) {\n txtTipo.setError(getResources().getString(R.string.error_tipo));\n txtTipo.requestFocus();\n return false;\n }\n\n /*if (o1 == 0) {\n Toast.makeText(this, getResources().getString(R.string.error_cantidad), Toast.LENGTH_SHORT).show();\n cmbSexo.requestFocus();\n return false;\n }*/\n\n if (txtCantidad.getText().toString().isEmpty()) {\n txtCantidad.setError(getResources().getString(R.string.error_cantidad));\n txtCantidad.requestFocus();\n return false;\n }\n\n return true;\n\n }",
"private boolean validacionesSolicitarReserva(int indice, int CodEmp, int CodLoc, int CodCot, boolean isSol){\n boolean blnRes=true;\n try{\n if(!validaItemsServicio(CodEmp, CodLoc, CodCot)){\n blnRes=false;\n MensajeInf(\"La cotizacion contiene Items de Servicio o Transporte, los cuales no deben ser reservados.\");\n }\n\n if(!validaFechasMAX(indice, tblDat.getValueAt(indice,INT_TBL_DAT_STR_TIP_RES_INV).toString(),isSol)){\n blnRes=false;\n MensajeInf(\"La Fecha solicitada es mayor a la permitida, revise la Fecha y vuelva a intentarlo\");\n }\n \n if(!validaTerminalesLSSegunEmpresaLocal(CodEmp,CodLoc,CodCot)){\n blnRes=false;\n MensajeInf(\"No puede solicitar reserva de codigos L/S en este local, debe reservarlo por el local que puede ser facturado\");\n }\n \n if(!validaFechasPrimerDiaLaboral(indice,isSol,CodEmp,CodLoc)){\n blnRes=false;\n MensajeInf(\"La Fecha solicitada, no corresponde al primer dia laboral registrado\");\n } \n \n if(tblDat.getValueAt(indice,INT_TBL_DAT_STR_TIP_RES_INV).toString().equals(\"R\")){\n if(!validaTerminalesLReservaLocal(CodEmp,CodLoc,CodCot)){\n blnRes=false;\n MensajeInf(\"No puede solicitar Reserva en Empresa de Codigos L \");\n }\n }\n }\n catch(Exception e){\n objUti.mostrarMsgErr_F1(null, e);\n blnRes=false;\n }\n return blnRes;\n }",
"private boolean validateData() {\n if (!mCommon.validateData()) return false;\n\n Core core = new Core(this);\n\n // Due Date is required\n if (TextUtils.isEmpty(getRecurringTransaction().getDueDateString())) {\n core.alert(R.string.due_date_required);\n return false;\n }\n\n if (TextUtils.isEmpty(mCommon.viewHolder.dateTextView.getText().toString())) {\n core.alert(R.string.error_next_occurrence_not_populate);\n\n return false;\n }\n\n // Payments Left must have a value\n if (getRecurringTransaction().getPaymentsLeft() == null) {\n core.alert(R.string.payments_left_required);\n return false;\n }\n return true;\n }",
"public boolean validarForm() throws Exception {\r\n\r\n tbxNro_identificacion\r\n .setStyle(\"text-transform:uppercase;background-color:white\");\r\n lbxNro_ingreso.setStyle(\"background-color:white\");\r\n tbxCodigo_prestador\r\n .setStyle(\"text-transform:uppercase;background-color:white\");\r\n tbxCodigo_diagnostico_principal\r\n .setStyle(\"text-transform:uppercase;background-color:white\");\r\n tbxCausa_muerte\r\n .setStyle(\"text-transform:uppercase;background-color:white\");\r\n lbxEstado_salida.setStyle(\"background-color:white\");\r\n dtbxFecha_ingreso.setStyle(\"background-color:white\");\r\n\r\n Admision admision = ((Admision) lbxNro_ingreso.getSelectedItem()\r\n .getValue());\r\n\r\n boolean valida = true;\r\n\r\n String mensaje = \"Los campos marcados con (*) son obligatorios\";\r\n\r\n if (tbxNro_identificacion.getText().trim().equals(\"\")) {\r\n tbxNro_identificacion\r\n .setStyle(\"text-transform:uppercase;background-color:#F6BBBE\");\r\n valida = false;\r\n }\r\n if (tbxCodigo_prestador.getText().trim().equals(\"\")) {\r\n tbxCodigo_prestador\r\n .setStyle(\"text-transform:uppercase;background-color:#F6BBBE\");\r\n valida = false;\r\n }\r\n if (admision == null) {\r\n lbxNro_ingreso.setStyle(\"background-color:#F6BBBE\");\r\n valida = false;\r\n }\r\n if (tbxCodigo_diagnostico_principal.getText().trim().equals(\"\")) {\r\n tbxCodigo_diagnostico_principal\r\n .setStyle(\"text-transform:uppercase;background-color:#F6BBBE\");\r\n valida = false;\r\n }\r\n\r\n if (lbxCausa_externa.getSelectedIndex() == 0) {\r\n lbxCausa_externa\r\n .setStyle(\"text-transform:uppercase;background-color:#F6BBBE\");\r\n valida = false;\r\n }\r\n\r\n if (valida) {\r\n if (lbxEstado_salida.getSelectedItem().getValue().equals(\"2\")\r\n && tbxCausa_muerte.getText().trim().equals(\"\")) {\r\n tbxCausa_muerte\r\n .setStyle(\"text-transform:uppercase;background-color:#F6BBBE\");\r\n mensaje = \"Usted selecciono el estado de la salida como muerto(a) \\npor lo tanto debe seleccionar la causa de muerte\";\r\n valida = false;\r\n }\r\n }\r\n\r\n if (valida) {\r\n if (!lbxEstado_salida.getSelectedItem().getValue().equals(\"2\")\r\n && !tbxCausa_muerte.getText().trim().equals(\"\")) {\r\n lbxEstado_salida.setStyle(\"background-color:#F6BBBE\");\r\n mensaje = \"Usted selecciono una casua de muerte \\npor lo tanto debe seleccionar el estado a la salida como muerto (a)\";\r\n valida = false;\r\n }\r\n }\r\n\r\n if (valida) {\r\n if (dtbxFecha_ingreso.getValue().compareTo(\r\n dtbxFecha_egreso.getValue()) > 0) {\r\n dtbxFecha_ingreso.setStyle(\"background-color:#F6BBBE\");\r\n mensaje = \"La fecha de ingreso no puede ser mayor a la fecha de egreso\";\r\n valida = false;\r\n }\r\n }\r\n\r\n if (!valida) {\r\n Messagebox.show(mensaje,\r\n usuarios.getNombres() + \" recuerde que...\", Messagebox.OK,\r\n Messagebox.EXCLAMATION);\r\n }\r\n\r\n return valida;\r\n }",
"@Override\n protected void validaRegrasExcluir(ArquivoLoteVO entity) throws AppException {\n\n }",
"private boolean validatorForm() {\n\t\tboolean validazione = true;\n\t\tif (!Validator.validaDataInizio(viewInserimento.getTxtFieldDataI().getText())) {\n\t\t\tviewInserimento.getTxtFieldDataI().setBackground(Color.red);\n\t\t\tvalidazione = false;\n\t\t} else {\n\t\t\tif (viewInserimento.getTxtFieldDataI().getBackground() == Color.red)\n\t\t\t\tviewInserimento.getTxtFieldDataI().setBackground(Color.white);\n\t\t}\n\t\tif (!Validator.validaImporto(viewInserimento.getTxtFieldValore().getText())) {\n\t\t\tviewInserimento.getTxtFieldValore().setBackground(Color.red);\n\t\t\tvalidazione = false;\n\t\t} else {\n\t\t\tif (viewInserimento.getTxtFieldValore().getBackground() == Color.red)\n\t\t\t\tviewInserimento.getTxtFieldValore().setBackground(Color.white);\n\t\t}\n\n\t\tif (!viewInserimento.getTxtFieldDataI().getText().equals(\"\")\n\t\t\t\t&& !viewInserimento.getTxtFieldDataIPre().getText().equals(\"\")) {\n\t\t\tif (!Date.valueOf(viewInserimento.getTxtFieldDataIPre().getText()).before(Date.valueOf(viewInserimento.getTxtFieldDataI().getText() + \"-01\"))\n\t\t\t\t\t) {\n\t\t\t\tviewInserimento.getTxtFieldDataI().setBackground(Color.red);\n\t\t\t\tvalidazione = false;\n\t\t\t} else {\n\t\t\t\tif (viewInserimento.getTxtFieldDataI().getBackground() == Color.red)\n\t\t\t\t\tviewInserimento.getTxtFieldDataI().setBackground(Color.white);\n\t\t\t}\n\t\t}\n\t\treturn validazione;\n\t}",
"private boolean validarComunicacion() {\n String texto = textInputAnadirComunicacion.getEditText().getText().toString().trim();\n if (texto.isEmpty()) {\n textInputAnadirComunicacion.setError(\"El campo no puede estar vacío\");\n return false;\n } else {\n textInputAnadirComunicacion.setError(null);\n return true;\n }\n }",
"private boolean validate(boolean warn) {\n try {\n newOne = getClientFromForm();\n if (warn) {\n ChequeMate.showSuccessMessage(this, \"Todos os valores foram validados com sucesso.\");\n }\n return true;\n } catch (ChequeMateException ex) {\n ex.showExceptionMessage();\n return false;\n }\n }",
"public void ValidandoPerfil()\r\n\t{\n\t\t\r\n\t}",
"void validateActivoCreate(Activo activo);",
"public boolean validarForm() throws Exception {\r\n\r\n\t\ttbxIdentificacion\r\n\t\t\t\t.setStyle(\"text-transform:uppercase;background-color:white\");\r\n\t\tlbxTipo_disnostico\r\n\t\t\t\t.setStyle(\"text-transform:uppercase;background-color:white\");\r\n\t\tlbxCodigo_consulta_pyp\r\n\t\t\t\t.setStyle(\"text-transform:uppercase;background-color:white\");\r\n\r\n\t\tString mensaje = \"Los campos marcados con (*) son obligatorios\";\r\n\r\n\t\tboolean valida = true;\r\n\r\n\t\tif (tbxIdentificacion.getText().trim().equals(\"\")) {\r\n\t\t\ttbxIdentificacion\r\n\t\t\t\t\t.setStyle(\"text-transform:uppercase;background-color:#F6BBBE\");\r\n\t\t\tvalida = false;\r\n\t\t}\r\n\r\n\t\tif (lbxTipo_disnostico.getSelectedIndex() == 0) {\r\n\t\t\tlbxTipo_disnostico\r\n\t\t\t\t\t.setStyle(\"text-transform:uppercase;background-color:#F6BBBE\");\r\n\t\t\tvalida = false;\r\n\t\t}\r\n\r\n\t\tif (!lbxFinalidad_cons.getSelectedItem().getValue().toString()\r\n\t\t\t\t.equalsIgnoreCase(\"10\")\r\n\t\t\t\t&& lbxCodigo_consulta_pyp.getSelectedIndex() == 0) {\r\n\t\t\tlbxCodigo_consulta_pyp\r\n\t\t\t\t\t.setStyle(\"text-transform:uppercase;background-color:#F6BBBE\");\r\n\t\t\tvalida = false;\r\n\t\t}\r\n\r\n\t\tif (tbxTipo_principal.getText().trim().equals(\"\")) {\r\n\t\t\tmensaje = \"Debe digitar la impresion diagnostica\";\r\n\t\t\tvalida = false;\r\n\t\t} else if (vaidarIgualdad(tbxTipo_principal.getText(),\r\n\t\t\t\ttbxTipo_relacionado_1.getText(),\r\n\t\t\t\ttbxTipo_relacionado_2.getText(),\r\n\t\t\t\ttbxTipo_relacionado_3.getText())) {\r\n\t\t\tmensaje = \"no se puede repetir la impresion diagnostica\";\r\n\t\t\tvalida = false;\r\n\t\t}\r\n\r\n\t\tif (!valida) {\r\n\t\t\tMessagebox.show(mensaje,\r\n\t\t\t\t\tusuarios.getNombres() + \" recuerde que...\", Messagebox.OK,\r\n\t\t\t\t\tMessagebox.EXCLAMATION);\r\n\t\t}\r\n\r\n\t\treturn valida;\r\n\t}",
"@Override public boolean isValidated()\n{\n if (location_set.size() == 0 || !have_join) return false;\n\n return true;\n}",
"private boolean hayCamposVacios() {\r\n\t\tif(nomTextField.getText().isEmpty()\r\n\t\t\t|| claveTextField.getText().isEmpty()\r\n\t\t\t\t|| reingresoTextField.getText().isEmpty()\r\n\t\t\t\t\t|| preguntaTextField.getText().isEmpty()\r\n\t\t\t\t\t\t|| respuestaTextField.getText().isEmpty())\r\n\t\t\treturn true;\t\t\r\n\t\treturn false;\r\n\t}",
"@Override\n\tpublic void onValidationSucceeded() {\n\t\tboolean bool = new ConDetect(getActivity()).isOnline();\n\t\tif (bool) {\n\t\t\tif (emailEditText.getText().toString().equals(\"Autogenerated\")\n\t\t\t\t\t|| emailEditText.getText().toString().equals(\"Try Again\")) {\n\n\t\t\t} else {\n\t\t\t\tautoEmail = emailEditText.getText().toString();\n\t\t\t}\n\t\t\tfinal CreateRelationTask cRT2 = new CreateRelationTask();\n\t\t\t// String sessionname = sharedPreferences.getString(\"sessionname\",\n\t\t\t// \"Not Available\");\n\t\t\tLog.d(\"CreateRelation3\", \"Values\" + userId + \", \" + nodeId + \", \" + relationId + \", \"\n\t\t\t\t\t+ firstNameEditText.getText().toString() + \", \" + lastNameEditText.getText().toString() + \", \"\n\t\t\t\t\t+ autoEmail + \", \" + finalgender + \", \" + sessionname);\n\t\t\tcRT2.execute(\"new\",userId, nodeId, relationId, (firstNameEditText.getText().toString().trim()), (lastNameEditText\n\t\t\t\t\t.getText().toString().trim()), autoEmail, finalgender, sessionname, (editLocation.getText().toString()\n\t\t\t\t\t.trim()));\n\n\t\t\tHandler handler = new Handler();\n\t\t\thandler.postDelayed(new Runnable() {\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tif (cRT2.getStatus() == AsyncTask.Status.RUNNING) {\n\t\t\t\t\t\tcRT2.cancel(true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}, 10000);\n\t\t} else {\n\t\t\tCroutonMessage.showCroutonAlert(activity, \"!No Internet Connection,Try again\", 7000);\n\t\t}\n\t}",
"public void validate() {\n for (Map.Entry<Integer, List<Message>> messagesOneId : messagesMap.entrySet()) {\n //get bank client\n int clientId = messagesOneId.getKey();\n BankClient bankClient = bankDatabase.get(clientId);\n\n //loop for each message with this ID\n for (Message messageData : messagesOneId.getValue()) {\n //check if this message is verified\n boolean isVerified = SignatureVerification.checkIsVerified(bankClient, messageData);\n //check if the request amount exceed limitation\n boolean isValid = checkIsValid(bankClient, messageData);\n //set the corresponding fields of message\n messageData.setVerified(isVerified);\n messageData.setValid(isValid);\n }\n }\n }",
"public void validarTareasDepartamento(){\r\n\t\tif ((this.equipo != null) && !(this.equipo.isEmpty()) ){\r\n\t\t\tthis.equipo = gerente.validarTareasEquipo(this.equipo);\r\n\t\t}\r\n\t}",
"@Override\r\n public void validate()\r\n {\r\n List<Connection> connections = model.getConnections();\r\n List<String> connectionsRelation = new ArrayList<>();\r\n\r\n for (Connection c : connections)\r\n {\r\n StringBuilder sb = new StringBuilder();\r\n sb.append(c.getSource().getId());\r\n sb.append(\"-\");\r\n sb.append(c.getTarget().getId());\r\n connectionsRelation.add(sb.toString());\r\n }\r\n\r\n List<String> answerRelations = Arrays.asList(task.getAnswerRelations().split(\";\"));\r\n\r\n if (connectionsRelation.isEmpty())\r\n {\r\n connectionsRelation.add(\"\");\r\n }\r\n\r\n if (ModelUtils.areEqualLists(connectionsRelation, answerRelations))\r\n {\r\n quizBean.setPoints(quizBean.getPoints() + 1);\r\n }\r\n\r\n quizBean.game();\r\n }",
"private void validarForm(AtualizarTramiteEspecificacaoActionForm form){\n\n\t\tString idLocalidade = form.getIdLocalidade();\n\t\tString codigoSetorComercial = form.getCodigoSetorComercial();\n\t\tString idMunicipio = form.getIdMunicipio();\n\t\tString codigoBairro = form.getCodigoBairro();\n\t\tString idSistemaAbastecimento = form.getIdSistemaAbastecimento();\n\t\tString idDistritoOperacional = form.getIdDistritoOperacional();\n\t\tString idZonaAbastecimento = form.getIdZonaAbastecimento();\n\t\tString idSetorAbastecimento = form.getIdSetorAbastecimento();\n\t\tString idSistemaEsgoto = form.getIdSistemaEsgoto();\n\t\tString idSubsistemaEsgoto = form.getIdSubsistemaEsgoto();\n\t\tString idBacia = form.getIdBacia();\n\t\tString idSubBacia = form.getIdSubBacia();\n\t\tString idUnidadeOrganizacionalOrigem = form.getIdUnidadeOrganizacionalOrigem();\n\t\tString idUnidadeOrganizacionalDestino = form.getIdUnidadeOrganizacionalDestino();\n\t\tString indicadorUso = form.getIndicadorUso();\n\n\t\tString numeroNaoInformadoStr = Integer.toString(ConstantesSistema.NUMERO_NAO_INFORMADO);\n\n\t\tFachada fachada = Fachada.getInstancia();\n\n\t\t// Localidade\n\t\tif(!Util.isVazioOuBranco(idLocalidade)){\n\t\t\tFiltroLocalidade filtro = new FiltroLocalidade();\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroLocalidade.INDICADORUSO, ConstantesSistema.INDICADOR_USO_ATIVO));\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroLocalidade.ID, idLocalidade));\n\n\t\t\tCollection<Localidade> colecao = fachada.pesquisar(filtro, Localidade.class.getName());\n\t\t\tif(colecao == null || colecao.isEmpty()){\n\t\t\t\tthrow new ActionServletException(\"atencao.pesquisa_inexistente\", null, \"Localidade\");\n\t\t\t}\n\t\t}\n\n\t\t// Setor Comercial\n\t\tif(Util.isVazioOuBranco(idLocalidade) && !Util.isVazioOuBranco(codigoSetorComercial)){\n\t\t\tthrow new ActionServletException(\"atencao.required\", null, \"Localidade\");\n\t\t}else if(!Util.isVazioOuBranco(idLocalidade) && !Util.isVazioOuBranco(codigoSetorComercial)){\n\t\t\tFiltroSetorComercial filtro = new FiltroSetorComercial();\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroSetorComercial.INDICADORUSO, ConstantesSistema.INDICADOR_USO_ATIVO));\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroSetorComercial.ID_LOCALIDADE, idLocalidade));\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroSetorComercial.CODIGO_SETOR_COMERCIAL, codigoSetorComercial));\n\n\t\t\tCollection<SetorComercial> colecao = fachada.pesquisar(filtro, SetorComercial.class.getName());\n\t\t\tif(colecao == null || colecao.isEmpty()){\n\t\t\t\tthrow new ActionServletException(\"atencao.pesquisa_inexistente\", null, \"Setor Comercial\");\n\t\t\t}\n\t\t}\n\n\t\t// Bairro\n\t\tif(Util.isVazioOuBranco(idMunicipio) && !Util.isVazioOuBranco(codigoBairro)){\n\t\t\tthrow new ActionServletException(\"atencao.required\", null, \"Município\");\n\t\t}else if(!Util.isVazioOuBranco(idMunicipio) && !Util.isVazioOuBranco(codigoBairro)){\n\t\t\tFiltroBairro filtro = new FiltroBairro();\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroBairro.INDICADOR_USO, ConstantesSistema.INDICADOR_USO_ATIVO));\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroBairro.MUNICIPIO_ID, idMunicipio));\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroBairro.CODIGO, codigoBairro));\n\n\t\t\tCollection<Bairro> colecao = fachada.pesquisar(filtro, Bairro.class.getName());\n\t\t\tif(colecao == null || colecao.isEmpty()){\n\t\t\t\tthrow new ActionServletException(\"atencao.pesquisa_inexistente\", null, \"Bairro\");\n\t\t\t}\n\t\t}\n\n\t\t// Sistema de Abastecimento\n\t\tif(!Util.isVazioOuBranco(idSistemaAbastecimento) && !idSistemaAbastecimento.equals(numeroNaoInformadoStr)){\n\t\t\tFiltroSistemaAbastecimento filtro = new FiltroSistemaAbastecimento();\n\t\t\tfiltro\n\t\t\t\t\t\t\t.adicionarParametro(new ParametroSimples(FiltroSistemaAbastecimento.INDICADOR_USO,\n\t\t\t\t\t\t\t\t\t\t\tConstantesSistema.INDICADOR_USO_ATIVO));\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroSistemaAbastecimento.ID, idSistemaAbastecimento));\n\n\t\t\tCollection<SistemaAbastecimento> colecao = fachada.pesquisar(filtro, SistemaAbastecimento.class.getName());\n\t\t\tif(colecao == null || colecao.isEmpty()){\n\t\t\t\tthrow new ActionServletException(\"atencao.pesquisa_inexistente\", null, \"Sistema de Abastecimento\");\n\t\t\t}\n\t\t}\n\n\t\t// Unidade Operacional\n\t\tif(!Util.isVazioOuBranco(idDistritoOperacional) && !idDistritoOperacional.equals(numeroNaoInformadoStr)){\n\t\t\tFiltroDistritoOperacional filtro = new FiltroDistritoOperacional();\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroDistritoOperacional.INDICADORUSO, ConstantesSistema.INDICADOR_USO_ATIVO));\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroDistritoOperacional.ID, idDistritoOperacional));\n\n\t\t\tCollection<DistritoOperacional> colecao = fachada.pesquisar(filtro, DistritoOperacional.class.getName());\n\t\t\tif(colecao == null || colecao.isEmpty()){\n\t\t\t\tthrow new ActionServletException(\"atencao.pesquisa_inexistente\", null, \"Unidade Operacional\");\n\t\t\t}\n\t\t}\n\n\t\t// Zona de Abastecimento\n\t\tif(!Util.isVazioOuBranco(idZonaAbastecimento) && !idZonaAbastecimento.equals(numeroNaoInformadoStr)){\n\t\t\tFiltroZonaAbastecimento filtro = new FiltroZonaAbastecimento();\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroZonaAbastecimento.INDICADOR_USO, ConstantesSistema.INDICADOR_USO_ATIVO));\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroZonaAbastecimento.ID, idZonaAbastecimento));\n\n\t\t\tCollection<ZonaAbastecimento> colecao = fachada.pesquisar(filtro, ZonaAbastecimento.class.getName());\n\t\t\tif(colecao == null || colecao.isEmpty()){\n\t\t\t\tthrow new ActionServletException(\"atencao.pesquisa_inexistente\", null, \"Zona de Abastecimento\");\n\t\t\t}\n\t\t}\n\n\t\t// Setor de Abastecimento\n\t\tif(!Util.isVazioOuBranco(idSetorAbastecimento) && !idSetorAbastecimento.equals(numeroNaoInformadoStr)){\n\t\t\tFiltroSetorAbastecimento filtro = new FiltroSetorAbastecimento();\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroSetorAbastecimento.INDICADOR_USO, ConstantesSistema.INDICADOR_USO_ATIVO));\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroSetorAbastecimento.ID, idSetorAbastecimento));\n\n\t\t\tCollection<SetorAbastecimento> colecao = fachada.pesquisar(filtro, SetorAbastecimento.class.getName());\n\t\t\tif(colecao == null || colecao.isEmpty()){\n\t\t\t\tthrow new ActionServletException(\"atencao.pesquisa_inexistente\", null, \"Setor de Abastecimento\");\n\t\t\t}\n\t\t}\n\n\t\t// Sistema de Esgoto\n\t\tif(!Util.isVazioOuBranco(idSistemaEsgoto) && !idSistemaEsgoto.equals(numeroNaoInformadoStr)){\n\t\t\tFiltroSistemaEsgoto filtro = new FiltroSistemaEsgoto();\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroSistemaEsgoto.INDICADOR_USO, ConstantesSistema.INDICADOR_USO_ATIVO));\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroSistemaEsgoto.ID, idSistemaEsgoto));\n\n\t\t\tCollection<SistemaEsgoto> colecao = fachada.pesquisar(filtro, SistemaEsgoto.class.getName());\n\t\t\tif(colecao == null || colecao.isEmpty()){\n\t\t\t\tthrow new ActionServletException(\"atencao.pesquisa_inexistente\", null, \"Sistema de Esgoto\");\n\t\t\t}\n\t\t}\n\n\t\t// Subsistema de Esgoto\n\t\tif(!Util.isVazioOuBranco(idSubsistemaEsgoto) && !idSubsistemaEsgoto.equals(numeroNaoInformadoStr)){\n\t\t\tFiltroSubsistemaEsgoto filtro = new FiltroSubsistemaEsgoto();\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroSubsistemaEsgoto.INDICADOR_USO, ConstantesSistema.INDICADOR_USO_ATIVO));\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroSubsistemaEsgoto.ID, idSubsistemaEsgoto));\n\n\t\t\tCollection<SubsistemaEsgoto> colecao = fachada.pesquisar(filtro, SubsistemaEsgoto.class.getName());\n\t\t\tif(colecao == null || colecao.isEmpty()){\n\t\t\t\tthrow new ActionServletException(\"atencao.pesquisa_inexistente\", null, \"Subsistema de Esgoto\");\n\t\t\t}\n\t\t}\n\n\t\t// Bacia\n\t\tif(!Util.isVazioOuBranco(idBacia) && !idBacia.equals(numeroNaoInformadoStr)){\n\t\t\tFiltroBacia filtro = new FiltroBacia();\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroBacia.INDICADORUSO, ConstantesSistema.INDICADOR_USO_ATIVO));\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroBacia.ID, idBacia));\n\n\t\t\tCollection<Bacia> colecao = fachada.pesquisar(filtro, Bacia.class.getName());\n\t\t\tif(colecao == null || colecao.isEmpty()){\n\t\t\t\tthrow new ActionServletException(\"atencao.pesquisa_inexistente\", null, \"Bacia\");\n\t\t\t}\n\t\t}\n\n\t\t// Subbacia\n\t\tif(!Util.isVazioOuBranco(idSubBacia) && !idSubBacia.equals(numeroNaoInformadoStr)){\n\t\t\tFiltroSubBacia filtro = new FiltroSubBacia();\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroSubBacia.INDICADOR_USO, ConstantesSistema.INDICADOR_USO_ATIVO));\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroSubBacia.ID, idSubBacia));\n\n\t\t\tCollection<SubBacia> colecao = fachada.pesquisar(filtro, SubBacia.class.getName());\n\t\t\tif(colecao == null || colecao.isEmpty()){\n\t\t\t\tthrow new ActionServletException(\"atencao.pesquisa_inexistente\", null, \"Subbacia\");\n\t\t\t}\n\t\t}\n\n\t\t// Unidade Origem\n\t\tif(!Util.isVazioOuBranco(idUnidadeOrganizacionalOrigem)){\n\t\t\tFiltroUnidadeOrganizacional filtro = new FiltroUnidadeOrganizacional();\n\t\t\tfiltro\n\t\t\t\t\t\t\t.adicionarParametro(new ParametroSimples(FiltroUnidadeOrganizacional.INDICADOR_USO,\n\t\t\t\t\t\t\t\t\t\t\tConstantesSistema.INDICADOR_USO_ATIVO));\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroUnidadeOrganizacional.ID, idUnidadeOrganizacionalOrigem));\n\n\t\t\tCollection<UnidadeOrganizacional> colecao = fachada.pesquisar(filtro, UnidadeOrganizacional.class.getName());\n\t\t\tif(colecao == null || colecao.isEmpty()){\n\t\t\t\tthrow new ActionServletException(\"atencao.pesquisa_inexistente\", null, \"Unidade Origem\");\n\t\t\t}\n\t\t}\n\n\t\t// Unidade Destino\n\t\tif(Util.isVazioOuBranco(idUnidadeOrganizacionalDestino)){\n\t\t\tthrow new ActionServletException(\"atencao.required\", null, \"Unidade Destino\");\n\t\t}else{\n\t\t\tFiltroUnidadeOrganizacional filtro = new FiltroUnidadeOrganizacional();\n\t\t\tfiltro\n\t\t\t\t\t\t\t.adicionarParametro(new ParametroSimples(FiltroUnidadeOrganizacional.INDICADOR_USO,\n\t\t\t\t\t\t\t\t\t\t\tConstantesSistema.INDICADOR_USO_ATIVO));\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroUnidadeOrganizacional.ID, idUnidadeOrganizacionalDestino));\n\n\t\t\tCollection<UnidadeOrganizacional> colecaoUnidadeOrganizacional = fachada.pesquisar(filtro, UnidadeOrganizacional.class\n\t\t\t\t\t\t\t.getName());\n\t\t\tif(colecaoUnidadeOrganizacional == null || colecaoUnidadeOrganizacional.isEmpty()){\n\t\t\t\tthrow new ActionServletException(\"atencao.pesquisa_inexistente\", null, \"Unidade Destino\");\n\t\t\t}\n\t\t}\n\n\t\t// Indicador de Uso\n\t\tif(Util.isVazioOuBranco(indicadorUso)){\n\t\t\tthrow new ActionServletException(\"atencao.required\", null, \"Indicador de Uso\");\n\t\t}\n\t}",
"private void validarPessoa(Lancamento lancamento) {\n\t\tPessoa pessoa = null;\n\t\tif (lancamento.getPessoa().getId() != null)\n\t\t\tpessoa = pessoaRepository.findPessoaById(lancamento.getPessoa().getId());\n\t\tif (pessoa == null || !pessoa.getAtivo())\n\t\t\tthrow new PessoaInexistenteOuInativaException();\n\t}",
"private boolean validarCampos() {\n\t\t// TODO Auto-generated method stub\n\t\tif (txtCedula.getText().trim().equals(\"\")) {\n\t\t\tUtilidades.mostrarMensaje(\"Complete el campo\", \"Por favor ingrese un numero de cedula\");\n\t\t\treturn false;\n\t\t}\n\t\tif (txtNombre.getText().trim().equals(\"\")) {\n\t\t\tUtilidades.mostrarMensaje(\"Complete el campo\", \"Por favor ingrese un nombre\");\n\t\t\treturn false;\n\t\t}\n\t\tif (txtApellidos.getText().trim().equals(\"\")) {\n\t\t\tUtilidades.mostrarMensaje(\"Complete el campo\", \"Por favor ingrese los apellidos\");\n\t\t\treturn false;\n\t\t}\n\t\tif (txtCorreo.getText().trim().equals(\"\")) {\n\t\t\tUtilidades.mostrarMensaje(\"Complete el campo\", \"Por favor ingrese el correo\");\n\t\t\treturn false;\n\t\t}\n\t\tif (!Utilidades.validarEmailFuerte(txtCorreo.getText().trim())) {\n\t\t\tUtilidades.mostrarMensaje(\"Complete el campo\", \"Por favor ingrese un correo valido\");\n\t\t\treturn false;\n\t\t}\n\t\tif (txtDireccion.getText().trim().equals(\"\")) {\n\t\t\tUtilidades.mostrarMensaje(\"Complete el campo\", \"Por favor ingrese la direccion\");\n\t\t\treturn false;\n\t\t}\n\t\tif (txtTelefono.getText().trim().equals(\"\")) {\n\t\t\tUtilidades.mostrarMensaje(\"Complete el campo\", \"Por favor ingrese el numero de telefono\");\n\t\t\treturn false;\n\t\t}\n\t\tif (txtUsuario.getText().trim().equals(\"\")) {\n\t\t\tUtilidades.mostrarMensaje(\"Complete el campo\", \"Por favor ingrese el nombre de usuario\");\n\t\t\treturn false;\n\t\t}\n\t\tif (txtContrasenia.getText().trim().equals(\"\")) {\n\t\t\tUtilidades.mostrarMensaje(\"Complete el campo\", \"Por favor ingrese una contraseña\");\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"public List<ValidationError> validate() {\n\n List<ValidationError> errors = new ArrayList<>();\n\n // isActive\n if (this.isActive != null && !this.isActive.equals(\"\") && this.getIsActiveAsBoolean() == null) {\n errors.add(new ValidationError(\"isActive\", \"isActive is not correctly formated, should be a true or false\"));\n }\n\n // actorTypeRefId\n if (this.actorTypeRefId != null && !this.actorTypeRefId.equals(\"\") && this.getActorType() == null) {\n errors.add(new ValidationError(\"actorTypeRefId\", String.format(\"ActorType %s does not exist\", this.actorTypeRefId)));\n }\n\n // login\n if (this.login != null && !this.login.equals(\"\")) {\n Actor testActor = ActorDao.getActorByUid(this.login);\n if (testActor != null) {\n Actor actor = ActorDao.getActorByRefId(this.refId);\n if (actor != null) { // edit\n if (!testActor.id.equals(actor.id)) {\n errors.add(new ValidationError(\"login\", \"The login \\\"\" + this.login + \"\\\" is already used by another actor\"));\n }\n } else { // create\n errors.add(new ValidationError(\"login\", \"The login \\\"\" + this.login + \"\\\" is already used by another actor\"));\n }\n }\n }\n\n return errors.isEmpty() ? null : errors;\n }",
"@Override\n protected void validaCampos(ArquivoLoteVO entity) {\n\n }",
"private boolean validarMezcla() {\n\t\tint grado = nodos.get(0).getGrado();\n\t\tboolean retorno = true;\n\t\tfor (Nodo n : nodos) {\n\t\t\tif (n.getGrado() != grado) {\n\t\t\t\tif (n.getGrado() < grado) {\n\t\t\t\t\tSystem.err.println(\"Error en la mezcla del grafo\");\n\t\t\t\t\tSystem.exit(4321);\n\t\t\t\t} else\n\t\t\t\t\tgrado = n.getGrado();\n\t\t\t}\n\t\t}\n\t\treturn retorno;\n\t}",
"private Boolean precond() {\r\n\t\tcalculoCantidadSacar(grupoPuestosController.getIdConcursoPuestoAgr());\r\n\t\t/**\r\n\t\t * fin incidencia 0001649\r\n\t\t */\r\n\t\tBoolean respuesta = validacionesIteracion();\r\n\t\treturn respuesta;\r\n\t}",
"public void validate() throws org.apache.thrift.TException {\n if (stampedeId != null) {\n stampedeId.validate();\n }\n if (runId != null) {\n runId.validate();\n }\n }",
"public boolean validarTelefono1() {\n\t\treturn validadores.validarLongitud(telefonos[0], 15);\n\t}",
"public Actividad checkInputActividad() {\n String nombre = etNombre.getText().toString();\n String fechaIniString = etFechaIni.getText().toString();\n String horaIniString = etHoraIni.getText().toString();\n String fechaFinString = etFechaFin.getText().toString();\n String horaFinString = etHoraFin.getText().toString();\n String maxParticipantesString = etMaxParticipantes.getText().toString();\n String descripcion = etDescripcion.getText().toString();\n\n //PROCESAMIENTO PREVIO\n //QUITAR ESPACIOS AL PRINCIPIO Y FINAL DE CADA INPUT\n nombre = nombre.trim();\n fechaIniString = fechaIniString.trim();\n horaIniString = horaIniString.trim();\n fechaFinString = fechaFinString.trim();\n horaFinString = horaFinString.trim();\n descripcion = descripcion.trim();\n\n\n //INICIALIZAR\n boolean unlessOneInteres = false;\n boolean ubicacionOK = false;\n\n Integer maxParticipantes = 0;\n Date fechaIni = null;\n Date fechaFin = null;\n\n View focusView = null;\n Actividad act = null;\n\n // --- CHECKS --- //\n ParserActividad pa = new ParserActividad();\n\n //NOMBRE\n nombre = pa.procesarNombre(nombre, etNombre, focusView);\n\n //FECHA INI\n fechaIniString = pa.procesarFechaIniSinHora(fechaIniString, etFechaIni, focusView);\n\n //HORA INI\n horaIniString = pa.procesarHoraIni(horaIniString, etHoraIni, focusView);\n\n //FECHA INI Y HORA INI\n fechaIni = pa.procesarFechaIniCompleta(fechaIniString, horaIniString, etHoraIni, focusView);\n\n //FECHA FIN\n fechaFinString = pa.procesarFechaFinSinHora(fechaFinString, fechaIniString, etFechaFin, focusView);\n\n //HORA FIN\n horaFinString = pa.procesarHoraFin(horaFinString, etHoraFin, focusView);\n\n //FECHA FIN Y HORA FIN\n fechaFin = pa.procesarFechaFinCompleta(fechaIni, fechaFinString, horaFinString, etHoraFin, focusView);\n\n //MAX PARTICIPANTES\n maxParticipantes = pa.procesarMaxParticipantes(maxParticipantesString, etMaxParticipantes, focusView);\n\n //INTERESES\n Pair<Boolean, ArrayList<Category>> resIntereses = pa.procesarIntereses(listItems, checkedItems, this.getActivity());\n unlessOneInteres = resIntereses.first;\n\n //UBICACION\n ubicacionOK = pa.procesarUbicacion(ubicacionSeleccionada, this.getActivity());\n\n //DESCRIPCION\n if (descripcion == null) {\n descripcion = \"\";\n }\n\n // -------------- //\n\n if(focusView != null)\n focusView.setFocusable(true);\n\n if(nombre != null && fechaIni != null && fechaFin != null && maxParticipantes != null && unlessOneInteres && ubicacionOK) {\n act = new Actividad(nombre, fechaIni, fechaFin, maxParticipantes, descripcion, ubicacionSeleccionada, resIntereses.second, AutorizacionFirebase.getUser().getUid());\n }\n\n return act;\n }",
"public void validar_campos(){\r\n\t\tfor(int i=0;i<fieldNames.length-1;++i) {\r\n\t\t\tif (jtxt[i].getText().length() > 0){\r\n\t\t\t}else{\r\n\t\t\t\tpermetir_alta = 1;\r\n\t\t\t}\t\r\n\t\t}\r\n\t\tif((CmbPar.getSelectedItem() != null) && (Cmbwp.getSelectedItem() != null) && (CmbComp.getSelectedItem() != null) && (jdc1.getDate() != null) && (textdescripcion.getText().length() > 1) && (textjustificacion.getText().length() > 1)){\t\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tpermetir_alta = 1;\r\n\t\t}\r\n\t\t\r\n\t}",
"public void validate() {\r\n super.validate();\r\n\r\n if (!isReferenced()) {\r\n getReporter().reportProblem(BPEL_PARTNER_LINK_NOT_USED_CODE,\r\n WARNING_PARTNER_LINK_NOT_USED,\r\n new String[]{getDef().getName()}, getDef());\r\n }\r\n\r\n // check that the partner link type exists\r\n if (getPartnerLinkType() == null) {\r\n addTypeNotFoundError(ERROR_PARTNER_LINK_TYPE_NOT_FOUND, getDef().getPartnerLinkTypeName());\r\n return;\r\n }\r\n\r\n // validate the roles, if defined.\r\n if (hasMyRole()) {\r\n IAeRole role = getPartnerLinkType().findRole(getDef().getMyRole());\r\n if (role == null) {\r\n // role not found\r\n getReporter().reportProblem(BPEL_ROLE_NOT_FOUND_CODE,\r\n ERROR_ROLE_NOT_FOUND,\r\n new String[]{getDef().getMyRole(), getPartnerLinkType().getName()},\r\n getDef());\r\n } else {\r\n setMyRolePortTypeDef(findPortType(role));\r\n }\r\n }\r\n\r\n if (hasPartnerRole()) {\r\n IAeRole role = getPartnerLinkType().findRole(getDef().getPartnerRole());\r\n if (role == null) {\r\n // role not found\r\n getReporter().reportProblem(BPEL_ROLE_NOT_FOUND_CODE,\r\n ERROR_ROLE_NOT_FOUND,\r\n new String[]{getDef().getPartnerRole(), getPartnerLinkType().getName()},\r\n getDef());\r\n } else {\r\n setPartnerRolePortTypeDef(findPortType(role));\r\n }\r\n } else {\r\n // if it doesn't have a partner role then it shouldn't have the\r\n // intializePartnerRole attribute\r\n if (getDef().getInitializePartnerRole() != null) {\r\n // role not found\r\n getReporter().reportProblem(BPEL_INIT_PARTNER_ROLE_NOT_ALLOWED_CODE,\r\n ERROR_INIT_PARTNER_ROLE_NOT_ALLOWED,\r\n new String[]{getDef().getName()},\r\n getDef());\r\n }\r\n }\r\n\r\n validatePartnerLinkUsers();\r\n }",
"public void validation() {\n ValidationData();\n if (Validation == null) {\n Toast.makeText(this, \"No Data Found\", Toast.LENGTH_SHORT).show();\n } else {\n getHistory();\n }\n }",
"boolean validarCamposVacios(int menu) {\r\n if (menu == 1) {\r\n if (!v_registro_Usuario.getTxtCedulaEmp_Registro().getText().isEmpty()\r\n && !v_registro_Usuario.getTxt_NombreUsuario().getText().isEmpty()\r\n && !v_registro_Usuario.getTxt_Contrasenia().getText().isEmpty()) {\r\n\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n } else {\r\n if (!v_registro_Usuario.getTxtCedula_RegisEdit().getText().isEmpty()\r\n && !v_registro_Usuario.getTxtUsuario_RegisEdit().getText().isEmpty()\r\n && !v_registro_Usuario.getTxtContra_RegisEdit().getText().isEmpty()) {\r\n\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n }",
"@Override\r\n\tpublic void validate() {\n\t\t\r\n\t}",
"public void validateReading() {\r\n\t\tint i = 0;\r\n\t\tfor (Integer reading : readingList) {\r\n\t\t\tif (reading != null) {\r\n\t\t\t\tif (reading < 0 || reading > Constantes.PLUVIOMETER_MAX_RANGE) {\r\n\t\t\t\t\tControladorContexto\r\n\t\t\t\t\t\t\t.mensajeErrorArg1(\r\n\t\t\t\t\t\t\t\t\t\"formDetalles:repeat:\" + i + \":message\",\r\n\t\t\t\t\t\t\t\t\t\"javax.faces.validator.DoubleRangeValidator.NOT_IN_RANGE\",\r\n\t\t\t\t\t\t\t\t\t\"mensaje\", 0,\r\n\t\t\t\t\t\t\t\t\tConstantes.PLUVIOMETER_MAX_RANGE);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tControladorContexto.mensajeErrorEspecifico(\r\n\t\t\t\t\t\t\"formDetalles:repeat:\" + i + \":message\",\r\n\t\t\t\t\t\t\"message_campo_requerido\", \"mensaje\");\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}",
"public boolean validarFichaEpidemiologia() {\n\t\t\n\t\tboolean valida = true;\n\t\t\n\t\tif(!valida){\n\t\t\tMensajesUtil.mensajeAlerta(usuarios.getNombres()+\" recuerde que...\",\"Los campos marcados con (*) son obligatorios\");\n\t\t}\n\t\t\n\t\treturn valida;\n\t}",
"private void validarDadosUsuarios(View v) {\n String nome = edtName1.getText().toString();\n edtName1.setError(\"Digite o nome do produto\");\n String descricao = descricaoProduto.getText().toString();\n descricaoProduto.setError(\"Descriçao produto\");\n String preco = precoProduto.getText().toString();\n precoProduto.setError(\"Digite Preço\");\n String data = DataOferta.getText().toString();\n DataOferta.setError(\"Digite a data da Oferta\");\n ImageView imagePerfil = null;\n\n\n if (!nome.isEmpty()) {\n if (!descricao.isEmpty()) {\n if (!preco.isEmpty()) {\n if (!data.isEmpty()) {\n\n\n Anuncio anuncio = new Anuncio();\n\n anuncio.setNome(nome);\n\n anuncio.setDescricao(descricao);\n anuncio.setPreco(preco);\n anuncio.setDate(data);\n anuncio.setUrlImage(urlImagemSelecionada);\n anuncio.salvar();\n finish();\n\n\n } else {\n\n exibirMensagem(\"Digite o nome do produto \");\n }\n } else {\n exibirMensagem(\"Descriçao produto \");\n }\n } else {\n exibirMensagem(\"Digite Preço\");\n }\n } else {\n exibirMensagem(\"Digite a data da Oferta \");\n }\n\n finish();\n }",
"private boolean validarProcesoFianciacionIncumplido(String numeroObligacion) {\n\n boolean proceso = false;\n\n StringBuilder jpql = new StringBuilder();\n jpql.append(\"SELECT o FROM ObligacionFinanciacion o\");\n jpql.append(\" JOIN o.financiacion f\");\n jpql.append(\" JOIN f.proceso p\");\n jpql.append(\" WHERE o.numeroObligacion = :numeroObligacion\");\n jpql.append(\" AND p.estadoProceso.id = :estadoProceso\");\n\n Query query = em.createQuery(jpql.toString());\n query.setParameter(\"numeroObligacion\", numeroObligacion);\n query.setParameter(\"estadoProceso\", EnumEstadoProceso.ECUADOR_FINANCIACION_INCUMPLIDO.getId());\n\n @SuppressWarnings(\"unchecked\")\n List<ObligacionFinanciacion> procesos = query.getResultList();\n if (procesos != null && !procesos.isEmpty()) {\n proceso = true;\n }\n return proceso;\n }",
"private boolean verificarCamposVacios() {\n \n boolean bandera = false; // false = campos no vacios\n \n if(this.jTextFieldDigiteCodigo.getText().equals(\"\") || this.jTextFieldDigiteCodigo.getText().equals(\"Digite Código\"))\n {\n mostrarError(jLabelErrorDigiteCodigo, \"Rellenar este campo\",jTextFieldDigiteCodigo);\n bandera=true;\n }\n return bandera;\n }",
"ValidationResponse validate();",
"@Override\n\tpublic void validate() {\n\t\t if(pname==null||pname.toString().equals(\"\")){\n\t\t\t addActionError(\"父项节点名称必填!\");\n\t\t }\n\t\t if(cname==null||cname.toString().equals(\"\")){\n\t\t\t addActionError(\"子项节点名称必填!\");\n\t\t }\n\t\t if(caction==null||caction.toString().equals(\"\")){\n\t\t\t addActionError(\"子项节点动作必填!\");\n\t\t }\n\t\t \n\t\t List l=new ArrayList();\n\t\t\tl=userService.QueryByTabId(\"Resfun\", \"resfunid\", resfunid);\n\t\t\t//判断是否修改\n\t\t\tif(l.size()!=0){\n\t\t\t\t\n\t\t\t\tfor(int i=0;i<l.size();i++){\n\t\t\t\t\tResfun rf=new Resfun();\n\t\t\t\t\trf=(Resfun)l.get(i);\n\t\t\t\t\tif(rf.getCaction().equals(caction.trim())&&rf.getCname().equals(cname)&&rf.getPname().equals(pname)){\n\t\t\t\t\t\tSystem.out.println(\"mei gai\");\n\t\t\t\t\t}else{\n\t\t\t\t\t\tList n=new ArrayList();\n\t\t\t\t\t\tn=userService.QueryByPcac(\"Resfun\", \"pname\", pname, \"cname\", cname, \"caction\", caction);\n\t\t\t\t\t\tif(n.size()!=0){\n\t\t\t\t\t\t\taddActionError(\"该记录已经存在!\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t \n\t\t \n\t\t \n\t\t \n\t}"
] | [
"0.628673",
"0.6271148",
"0.6170817",
"0.61030114",
"0.597751",
"0.5960161",
"0.5912293",
"0.5858398",
"0.58207774",
"0.5817801",
"0.58156633",
"0.58062446",
"0.58062446",
"0.58062446",
"0.58062446",
"0.58062446",
"0.58062446",
"0.58062446",
"0.58062446",
"0.58062446",
"0.58062446",
"0.58062446",
"0.58062446",
"0.58062446",
"0.58062446",
"0.58062446",
"0.58062446",
"0.58062446",
"0.58062446",
"0.58062446",
"0.58062446",
"0.58062446",
"0.58062446",
"0.58062446",
"0.58062446",
"0.58062446",
"0.58062446",
"0.58062446",
"0.58062446",
"0.58062446",
"0.58062446",
"0.58062446",
"0.58062446",
"0.58062446",
"0.58062446",
"0.58062446",
"0.58062446",
"0.5792634",
"0.5766175",
"0.57555",
"0.5703037",
"0.56933033",
"0.5679959",
"0.56384575",
"0.5629363",
"0.56185937",
"0.56185806",
"0.5616379",
"0.5611098",
"0.5606605",
"0.5606201",
"0.5584064",
"0.5553155",
"0.55363005",
"0.5533805",
"0.5517235",
"0.5516896",
"0.5508286",
"0.55020684",
"0.54973346",
"0.5491898",
"0.5485682",
"0.54713506",
"0.54667467",
"0.54619473",
"0.54448354",
"0.5426348",
"0.5424284",
"0.5422634",
"0.54207903",
"0.54152775",
"0.54105",
"0.54104614",
"0.5408717",
"0.5397468",
"0.53964835",
"0.5393653",
"0.5389645",
"0.5389403",
"0.5385646",
"0.53842145",
"0.5374387",
"0.53736913",
"0.53642404",
"0.53616273",
"0.53566414",
"0.5354936",
"0.53493017",
"0.53442836",
"0.53415066",
"0.5338597"
] | 0.0 | -1 |
validar que el codigo de la llamada recibida se este relacionando en la lista | @Test
public void findById() {
ICallsService iCallsService = new CallsServiceImpl(new ArrayList<>());
iCallsService.addCallReceived(new Call(1l));
Assert.assertTrue(1l == iCallsService.findById(1l).getId().longValue());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private boolean checkListino() {\n /* variabili e costanti locali di lavoro */\n boolean ok = false;\n Date dataInizio;\n Date dataFine;\n AddebitoFissoPannello panServizi;\n\n try { // prova ad eseguire il codice\n dataInizio = this.getDataInizio();\n dataFine = this.getDataFine();\n panServizi = this.getPanServizi();\n ok = panServizi.checkListino(dataInizio, dataFine);\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n } // fine del blocco try-catch\n\n /* valore di ritorno */\n return ok;\n }",
"public List<MovimentoPorCanalDeVendaVO> validaSelecionaEmissaoPorCanal(String movimento) {\n\n\t\tList<MovimentoPorCanalDeVendaVO> list = new ArrayList<MovimentoPorCanalDeVendaVO>(listaEmissaoPorCanal);\n\n\t\tList<MovimentoPorCanalDeVendaVO> listTotal = new ArrayList<MovimentoPorCanalDeVendaVO>();\n\n\t\tString[] mesesTotaisValor = { \"0.0\", \"0.0\", \"0.0\", \"0.0\", \"0.0\", \"0.0\", \"0.0\", \"0.0\", \"0.0\", \"0.0\", \"0.0\",\n\t\t\t\t\"0.0\" };\n\n\t\tString[] mesesTotaisQuantidade = { \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\" };\n\n\t\tString anoTotal = null;\n\t\tString produtoTotal = null;\n\n\t\tint qtdQuantidade = 0;\n\t\tint qtdValor = 0;\n\n\t\tfor (int i = 0; i < list.size(); i++) {\n\t\t\tif (!(list.get(i).getMovimento().trim().equalsIgnoreCase(movimento.trim()))) {\n\t\t\t\tlist.remove(i);\n\t\t\t\ti--;\n\t\t\t}\n\t\t}\n\n\t\tfor (MovimentoPorCanalDeVendaVO objLista : list) {\n\t\t\tif (objLista.getTipo().equalsIgnoreCase(\"Valor\")) {\n\t\t\t\tqtdValor++;\n\t\t\t} else if (objLista.getTipo().equalsIgnoreCase(\"Quantidade\")) {\n\t\t\t\tqtdQuantidade++;\n\t\t\t}\n\t\t}\n\t\tint indiceElementoNaoEncontrado = 0;\n\t\tif (qtdValor != qtdQuantidade) {\n\n\t\t\tif (qtdValor > qtdQuantidade) {// Valor eh maior\n\t\t\t\touter: for (int i = 0; i < list.size(); i++) {\n\t\t\t\t\tif (list.get(i).getTipo().equalsIgnoreCase(\"Valor\")) {\n\n\t\t\t\t\t\t// System.out.println();\n\t\t\t\t\t\t//\n\t\t\t\t\t\t// System.out.print(\" 1 | \"\n\t\t\t\t\t\t// + list.get(i).getCanalDeVenda());\n\t\t\t\t\t\t// System.out.println();\n\n\t\t\t\t\t\tfor (int j = 0; j < list.size(); j++) {\n\t\t\t\t\t\t\tint achou = -1;\n\t\t\t\t\t\t\tif (list.get(j).getTipo().equalsIgnoreCase(\"Quantidade\")) {\n\n\t\t\t\t\t\t\t\t// System.out.print(\" 2 | \"\n\t\t\t\t\t\t\t\t// + list.get(j).getCanalDeVenda());\n\t\t\t\t\t\t\t\t// System.out.println();\n\n\t\t\t\t\t\t\t\tif (list.get(i).getCanalDeVenda().equals(list.get(j).getCanalDeVenda())) {\n\t\t\t\t\t\t\t\t\tachou = j;\n\t\t\t\t\t\t\t\t\tcontinue outer;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (j == list.size() - 1 && achou == -1) {\n\t\t\t\t\t\t\t\t\tindiceElementoNaoEncontrado = i;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tString[] meses = { \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\" };\n\n\t\t\t\tMovimentoPorCanalDeVendaVO canalVendaVazio = new MovimentoPorCanalDeVendaVO();\n\t\t\t\tcanalVendaVazio.setCanalDeVenda(list.get(indiceElementoNaoEncontrado).getCanalDeVenda());\n\t\t\t\tcanalVendaVazio.setProduto(list.get(indiceElementoNaoEncontrado).getProduto());\n\t\t\t\tcanalVendaVazio.setTipo(\"Quantidade\");\n\t\t\t\tcanalVendaVazio.setMeses(meses);\n\n\t\t\t\tlist.add(((list.size() + 1) / 2 + indiceElementoNaoEncontrado), canalVendaVazio);// aqui\n\t\t\t\t/* estou ordenando tudo que é tipo 'Valor' antes de 'Quantidade' */\n\t\t\t} else {// Qtd eh maior\n\t\t\t\touter: for (int i = 0; i < list.size(); i++) {\n\t\t\t\t\tif (list.get(i).getTipo().equalsIgnoreCase(\"Quantidade\")) {\n\n\t\t\t\t\t\t// System.out.println();\n\t\t\t\t\t\t//\n\t\t\t\t\t\t// System.out.print(\" 1 | \"\n\t\t\t\t\t\t// + list.get(i).getCanalDeVenda());\n\t\t\t\t\t\t// System.out.println();\n\n\t\t\t\t\t\tfor (int j = 0; j < list.size(); j++) {\n\t\t\t\t\t\t\tint achou = -1;\n\t\t\t\t\t\t\tif (list.get(j).getTipo().equalsIgnoreCase(\"Valor\")) {\n\n\t\t\t\t\t\t\t\t// System.out.print(\" 2 | \"+\n\t\t\t\t\t\t\t\t// list.get(j).getCanalDeVenda());\n\t\t\t\t\t\t\t\t// System.out.println();\n\n\t\t\t\t\t\t\t\tif (list.get(i).getCanalDeVenda().equals(list.get(j).getCanalDeVenda())) {\n\t\t\t\t\t\t\t\t\tachou = j;\n\t\t\t\t\t\t\t\t\tcontinue outer;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (j == list.size() - 1 && achou == -1) {\n\t\t\t\t\t\t\t\t\tindiceElementoNaoEncontrado = i;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tString[] meses = { \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\" };\n\n\t\t\t\tMovimentoPorCanalDeVendaVO canalVendaVazio = new MovimentoPorCanalDeVendaVO();\n\t\t\t\tcanalVendaVazio.setCanalDeVenda(list.get(indiceElementoNaoEncontrado).getCanalDeVenda());\n\t\t\t\tcanalVendaVazio.setProduto(list.get(indiceElementoNaoEncontrado).getProduto());\n\t\t\t\tcanalVendaVazio.setTipo(\"Valor\");\n\t\t\t\tcanalVendaVazio.setMeses(meses);\n\n\t\t\t\tlist.add(((list.size() + 1) / 2 + indiceElementoNaoEncontrado), canalVendaVazio);// aqui\n\t\t\t\t/* estou ordenando tudo que é tipo 'Valor' antes de 'Quantidade' */\n\n\t\t\t}\n\n\t\t}\n\n\t\t/*\n\t\t * ===Primeiro crio os objetos com os totais=========\n\t\t */\n\t\tfor (MovimentoPorCanalDeVendaVO emi : list) {\n\n\t\t\tif (emi.getTipo().equals(\"Valor\")) {\n\n\t\t\t\tfor (int i = 0; i < emi.getMeses().length; i++) {\n\t\t\t\t\tmesesTotaisValor[i] = new BigDecimal(mesesTotaisValor[i]).add(new BigDecimal(emi.getMeses()[i]))\n\t\t\t\t\t\t\t.toString();\n\t\t\t\t}\n\n\t\t\t} else if (emi.getTipo().equals(\"Quantidade\")) {\n\n\t\t\t\tfor (int i = 0; i < emi.getMeses().length; i++) {\n\t\t\t\t\tmesesTotaisQuantidade[i] = Integer.toString(\n\t\t\t\t\t\t\t(Integer.parseInt(mesesTotaisQuantidade[i]) + Integer.parseInt(emi.getMeses()[i])));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tanoTotal = emi.getAno();\n\t\t\tprodutoTotal = emi.getProduto();\n\n\t\t}\n\n\t\tMovimentoPorCanalDeVendaVO totalValor = new MovimentoPorCanalDeVendaVO();\n\t\tMovimentoPorCanalDeVendaVO totalQuantidade = new MovimentoPorCanalDeVendaVO();\n\n\t\ttotalValor.setCanalDeVenda(\"Total\");\n\t\ttotalValor.setProduto(produtoTotal);\n\t\ttotalValor.setTipo(\"Valor\");\n\t\ttotalValor.setAno(anoTotal);\n\t\ttotalValor.setMeses(mesesTotaisValor);\n\t\tlistTotal.add(totalValor);\n\n\t\ttotalQuantidade.setCanalDeVenda(\"Total\");\n\t\ttotalQuantidade.setProduto(produtoTotal);\n\t\ttotalQuantidade.setTipo(\"Quantidade\");\n\t\ttotalQuantidade.setAno(anoTotal);\n\t\ttotalQuantidade.setMeses(mesesTotaisQuantidade);\n\t\tlistTotal.add(totalQuantidade);\n\n\t\t/*\n\t\t * ===Agora calculo os percentuais=========\n\t\t */\n\n\t\tfinal int VALOR = 0;\n\t\tfinal int QUANTIDADE = 1;\n\n\t\tDecimalFormat percentForm = new DecimalFormat(\"0.00%\");\n\t\tDecimalFormat roundForm = new DecimalFormat(\"0.00\");\n\t\tUteis uteis = new Uteis();\n\t\tList<MovimentoPorCanalDeVendaVO> listFinal = new ArrayList<MovimentoPorCanalDeVendaVO>();\n\n\t\tfor (int i = 0; i < list.size() / 2; i++) {\n\t\t\tMovimentoPorCanalDeVendaVO emissaoValor = new MovimentoPorCanalDeVendaVO();\n\t\t\t/* ===VALOR==== */\n\t\t\temissaoValor.setCanalDeVenda(list.get(i).getCanalDeVenda());\n\t\t\temissaoValor.setTipo(list.get(i).getTipo());\n\t\t\temissaoValor.setMeses(list.get(i).getMeses());\n\n\t\t\tMovimentoPorCanalDeVendaVO emissaoValorPercent = new MovimentoPorCanalDeVendaVO();\n\t\t\t/* ===%=VALOR==== */\n\t\t\temissaoValorPercent.setCanalDeVenda(list.get(i).getCanalDeVenda());\n\t\t\temissaoValorPercent.setTipo(\"% \" + list.get(i).getTipo());\n\n\t\t\tString[] mesesPercentValor = new String[12];\n\t\t\tfor (int k = 0; k < list.get(i).getMeses().length; k++) {\n\n\t\t\t\ttry {\n\t\t\t\t\tdouble total = Double.parseDouble(new BigDecimal(list.get(i).getMeses()[k])\n\t\t\t\t\t\t\t.divide(new BigDecimal(listTotal.get(VALOR).getMeses()[k]), 5, RoundingMode.HALF_DOWN)\n\t\t\t\t\t\t\t.toString());\n\t\t\t\t\tmesesPercentValor[k] = percentForm.format(total);\n\n\t\t\t\t} catch (ArithmeticException e) {\n\t\t\t\t\tmesesPercentValor[k] = \"0%\";\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\temissaoValorPercent.setMeses(mesesPercentValor);\n\n\t\t\tMovimentoPorCanalDeVendaVO emissaoQuantidade = new MovimentoPorCanalDeVendaVO();\n\t\t\t/* ===QUANTIDADE==== */\n\t\t\tint j = list.size() / 2;\n\t\t\temissaoQuantidade.setCanalDeVenda(list.get(j + i).getCanalDeVenda());\n\t\t\temissaoQuantidade.setTipo(list.get(j + i).getTipo());\n\t\t\temissaoQuantidade.setMeses(list.get(j + i).getMeses());\n\n\t\t\tMovimentoPorCanalDeVendaVO emissaoQuantidadePercent = new MovimentoPorCanalDeVendaVO();\n\t\t\t/* ===%=QUANTIDADE==== */\n\t\t\temissaoQuantidadePercent.setCanalDeVenda(list.get(j + i).getCanalDeVenda());\n\t\t\temissaoQuantidadePercent.setTipo(\"% \" + list.get(j + i).getTipo());\n\n\t\t\tString[] mesesPercentQuantidade = new String[12];\n\t\t\tfor (int k = 0; k < list.get(j + i).getMeses().length; k++) {\n\n\t\t\t\ttry {\n\n\t\t\t\t\tdouble total = Double.parseDouble(list.get(j + i).getMeses()[k])\n\t\t\t\t\t\t\t/ Double.parseDouble(listTotal.get(QUANTIDADE).getMeses()[k]);\n\t\t\t\t\tmesesPercentQuantidade[k] = percentForm\n\t\t\t\t\t\t\t.format(Double.toString(total).equalsIgnoreCase(\"NaN\") ? 0.0 : total);\n\n\t\t\t\t} catch (ArithmeticException e) {\n\t\t\t\t\tmesesPercentQuantidade[k] = \"0%\";\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\temissaoQuantidadePercent.setMeses(mesesPercentQuantidade);\n\n\t\t\tString[] valorFormatado = new String[12];\n\t\t\tfor (int k = 0; k < emissaoValor.getMeses().length; k++) {\n\t\t\t\tvalorFormatado[k] = uteis\n\t\t\t\t\t\t.insereSeparadoresMoeda(roundForm.format(Double.parseDouble(emissaoValor.getMeses()[k])));\n\n\t\t\t}\n\t\t\temissaoValor.setMeses(valorFormatado);\n\n\t\t\tString[] valorFormatado2 = new String[12];\n\t\t\tfor (int k = 0; k < emissaoQuantidade.getMeses().length; k++) {\n\t\t\t\tvalorFormatado2[k] = uteis.insereSeparadores(emissaoQuantidade.getMeses()[k]);\n\t\t\t}\n\t\t\temissaoQuantidade.setMeses(valorFormatado2);\n\n\t\t\tlistFinal.add(emissaoValor);\n\t\t\tlistFinal.add(emissaoValorPercent);\n\t\t\tlistFinal.add(emissaoQuantidade);\n\t\t\tlistFinal.add(emissaoQuantidadePercent);\n\n\t\t}\n\n\t\treturn listFinal;\n\n\t}",
"private void validarhorarioconotroshorariosactivos(HorarioAsignado horarioasignado, List<HorarioAsignado> horarios) throws LogicaException, ParseException, DatoException {\nGregorianCalendar startasignado=new GregorianCalendar();\nDate startdateasignado= new Date(horarioasignado.getValidezinicio().getTime());\nstartasignado.setTime(startdateasignado);\nGregorianCalendar endasignado=new GregorianCalendar();\nDate enddateasignado= new Date(horarioasignado.getValidezfin().getTime());\nendasignado.setTime(enddateasignado);\n\nint tempfrecasignado = horarioasignado.getHorario().getIdfrecuenciaasignacion().intValue();\nList<Integer> diadelasemanaasignado = diadelasemana(tempfrecasignado);\nList<HashMap<String, Object>> dataasignado = Util.diferenciaEnDiasconFrecuencia(startasignado, endasignado,diadelasemanaasignado,tempfrecasignado);\n\n\n\n\nfor(HorarioAsignado ho:horarios){\n\t\t\tif(ho.getIdhorarioasignado().equals(horarioasignado.getIdhorarioasignado())){\n\t\t\t\n\t\t\t}else{\n\t\t\tif(ho.getIdhorario()==horarioasignado.getIdhorario()){\n\t\t\t\n\t\t\t/*//cedulasconhorarios.add(em);\n\t\t\tif (horarioasignado.getValidezinicio().after(ho.getValidezinicio()) && horarioasignado.getValidezinicio().before(ho.getValidezfin())){\n\t\t\tthrow new LogicaException(\"este contrato ya tiene asociado ese horario\"\n\t\t\t+ \" entre las fechas \"+ho.getValidezinicio()+\" y \"+ ho.getValidezfin());\n\t\t\t\n\t\t\t}*/\n\t\t\t\n\t\t\t}else{\n\t\t\t\n\t\t\t}\n\n\t\tContrato contrato = contratoEJB.getContratosporId(ho.getIdcontrato());\n\t\tEmpleadoBean empleado = empleadoEJB.buscarEmpleadosporId(contrato.getIdempleado());\t\n\tGregorianCalendar start=new GregorianCalendar();\n\tDate startdate= new Date(ho.getValidezinicio().getTime());\n\tstart.setTime(startdate);\n\tGregorianCalendar end=new GregorianCalendar();\n\tDate enddate= new Date(ho.getValidezfin().getTime());\n\tend.setTime(enddate);\n\t\n\tint tempfrec = ho.getHorario().getIdfrecuenciaasignacion().intValue();\n\tList<Integer> diadelasemana = diadelasemana(tempfrec);\n\tList<HashMap<String, Object>> data = Util.diferenciaEnDiasconFrecuencia(start, end,diadelasemana,tempfrec);\n\t\n\t\t\t\t\tfor(HashMap<String, Object> diadehorario:data){\n\t\t\t\tHashMap<String, Object> horariofechas=new HashMap<String, Object>();\n\t\t\t\tGregorianCalendar fecha = (GregorianCalendar)diadehorario.get(\"fecha\");\n\t\t\t\tDate fechadat =fecha.getTime();\n\t\t\t\tGregorianCalendar fechafin = (GregorianCalendar)diadehorario.get(\"fechafin\");\n\t\t\t\tDate fechafindat = fechafin.getTime();\n\t\t\t\tfor(HashMap<String, Object> diaasignado:dataasignado){\n\t\t\t\t\t\tHashMap<String, Object> horariofechasasignadas=new HashMap<String, Object>();\n\t\t\t\t\t\tGregorianCalendar fechaasignada = (GregorianCalendar)diaasignado.get(\"fecha\");\n\t\t\t\t\t\tDate fechaasignadadat =fechaasignada.getTime();\n\t\t\t\t\t\tGregorianCalendar fechafinasignada = (GregorianCalendar)diaasignado.get(\"fechafin\");\n\t\t\t\t\t\tDate fechafinasignadadat = fechafinasignada.getTime();\n\t\t\t\t\t\t\t\t\tif(fechaasignada.after(fechafin)){\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tif((fechaasignada.getTime().after(fecha.getTime())||fechaasignada.getTime().equals(fecha.getTime())) && fechaasignada.getTime().before(fechafin.getTime()) ){\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//\tif((fechaasignada.getTime().after(fecha.getTime()) && fechaasignada.getTime().before(fechafin.getTime())) ){\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tthrow new LogicaException(\"Este contrato del empleado con identificación numero:\"+empleado.getEmpleadoidentificacion().getNumeroidentificacion() +\" ya tiene asociado un horario\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \" en las fechas \"+Util.dateToString(fecha.getTime(), \"dd/MM/yyyy HH:mm\") +\" y \"+ Util.dateToString(fechafin.getTime(),\"dd/MM/yyyy HH:mm\")+\" debe seleccionar un rango de dias diferente o un horario diferente\");\n\t\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tif((fechafinasignada.getTime().after(fecha.getTime())||fechafinasignada.getTime().equals(fecha.getTime())) && fechafinasignada.getTime().before(fechafin.getTime()) ){\n\t\t\t\t\t\t\t\t\t\t\t\tthrow new LogicaException(\"Este contrato del empleado con identificación numero:\"+empleado.getEmpleadoidentificacion().getNumeroidentificacion() +\" ya tiene asociado un horario\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \" en las fechas \"+Util.dateToString(fecha.getTime(), \"dd/MM/yyyy HH:mm\")+\" y \"+ Util.dateToString(fechafin.getTime(),\"dd/MM/yyyy HH:mm\")+\" debe seleccionar un rango de dias diferente o un horario diferente\");\n\t\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tif((fecha.getTime().after(fechaasignada.getTime() ) && fecha.getTime().before(fechafinasignada.getTime())) ){\n\t\t\t\t\t\t\t\t\t\t\t\tthrow new LogicaException(\"Este contrato del empleado con identificación numero:\"+empleado.getEmpleadoidentificacion().getNumeroidentificacion() +\" ya tiene asociado un horario\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \" en las fechas \"+Util.dateToString(fecha.getTime(), \"dd/MM/yyyy HH:mm\")+\" y \"+ Util.dateToString(fechafin.getTime(),\"dd/MM/yyyy HH:mm\")+\" debe seleccionar un rango de dias diferente o un horario diferente\");\n\t\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tif((fechafin.getTime().after(fechaasignada.getTime() ) && fechafin.getTime().before(fechafinasignada.getTime())) ){\n\t\t\t\t\t\t\t\t\t\t\t\tthrow new LogicaException(\"Este contrato del empleado con identificación numero:\"+empleado.getEmpleadoidentificacion().getNumeroidentificacion() +\" ya tiene asociado un horario\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \" en las fechas \"+Util.dateToString(fecha.getTime(), \"dd/MM/yyyy HH:mm\")+\" y \"+ Util.dateToString(fechafin.getTime(),\"dd/MM/yyyy HH:mm\")+\" debe seleccionar un rango de dias diferente o un horario diferente\");\n\t\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t}\n\n}\n\n\n}\n\n\n/////////////////////////fin validacion/\n}",
"public static void criaListaCandidatos() {\n\t\tScanner sc = new Scanner(System.in);\t\n\t\tString id, numCandidatos, nomePessoa, nomeLista, tipoLista;\n\t\tArrayList<Pessoa> listaCandidatos = new ArrayList<>();\n\t\tint check = 0, num, i;\n\t\t\n\t\tSystem.out.println(\"\\nInsira o id da eleicao a qual pretende adicionar uma lista de candidatos:\");\n\t\tid = sc.nextLine();\n\n\t\tdo {\n\t\t\tSystem.out.println(\"\\nInsira numero de elementos (Min. 2):\");\n\t\t\tnumCandidatos = sc.nextLine();\n\t\t\tif(verificarNumeros(numCandidatos)) {\n\t\t\t\tif (Integer.parseInt(numCandidatos) >= 2) {\n\t\t\t\t\tcheck = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"\\nO numero so pode conter digitos\");\n\t\t\t}\n\t\t}while(check==0);\n\t\tnum = Integer.parseInt(numCandidatos);\n\t\tcheck = 0;\n\t\t\n\t\tdo {\n\t\t\tSystem.out.println(\"\\nInsira o nome da lista:\");\n\t\t\tnomeLista = sc.nextLine();\n\t\t\tif(verificarLetras(nomeLista) && nomeLista.length()>0) {\n\t\t\t\tcheck = 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"\\nO nome apenas pode conter letras\");\n\t\t\t}\n\t\t}while(check==0);\n\t\t\n\t\tcheck = 0;\n\t\t\n\t\tdo {\n\t\t\tSystem.out.println(\"\\nEm que tipo se insere a lista?\\n(1) Estudantes (2) Funcionarios (3) Docentes\");\n\t\t\ttipoLista = sc.nextLine();\n\t\t\tif(verificarNumeros(tipoLista)) {\n\t\t\t\tif ( (tipoLista.equals(\"1\")) || (tipoLista.equals(\"2\")) || (tipoLista.equals(\"3\")) ) {\n\t\t\t\t\tcheck = 1;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println(\"\\nA opcao so pode conter digitos de 1 a 3\");\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"\\nA opcao so pode conter digitos\");\n\t\t\t}\n\t\t}while(check==0);\n\t\t\n\t\tcheck = 0;\n\t\t\n\t\tdo {\n\t\t\tSystem.out.println(\"\\nInsira o nome do presidente:\");\n\t\t\tnomePessoa = sc.nextLine();\n\t\t\tif(verificarLetras(nomePessoa) && nomePessoa.length()>0) {\n\t\t\t\tcheck = 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"\\nO nome apenas pode conter letras\");\n\t\t\t}\n\t\t}while(check==0);\n\t\tPessoa p = new Pessoa(nomePessoa);\n\t\tlistaCandidatos.add(p);\t\n\t\tnum--;\n\t\t\n\t\tcheck = 0;\n\t\t\n\t\tdo {\n\t\t\tSystem.out.println(\"\\nInsira o nome do vice-presidente:\");\n\t\t\tnomePessoa = sc.nextLine();\n\t\t\tif(verificarLetras(nomePessoa) && nomePessoa.length()>0) {\n\t\t\t\tcheck = 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"\\nO nome apenas pode conter letras\");\n\t\t\t}\n\t\t}while(check==0);\n\t\tPessoa novap = new Pessoa(nomePessoa);\n\t\tlistaCandidatos.add(novap);\t\n\t\tnum--;\n\t\t\n\t\tcheck = 0;\n\t\t\n\t\tfor (i=0; i<num;i++) {\n\t\t\tdo {\n\t\t\t\tSystem.out.println(\"\\nInsira o nome do elemento seguinte:\");\n\t\t\t\tnomePessoa = sc.nextLine();\n\t\t\t\tif(verificarLetras(nomePessoa) && nomePessoa.length()>0) {\n\t\t\t\t\tcheck = 1;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println(\"\\nO nome apenas pode conter letras\");\n\t\t\t\t}\n\t\t\t}while(check==0);\n\t\t\tPessoa novaPessoa = new Pessoa(nomePessoa);\n\t\t\tlistaCandidatos.add(novaPessoa);\n\t\t\tcheck = 0;\n\t\t}\n\t\t\n\t\tString msgServer = \"\";\n\t\t\n\t\tcheck = 0;\n\t\tint tries = 0;\n\t\tdo {\n\t\t\ttry {\n\t\t\t\tmsgServer = rmiserver.criaLista(id, tipoLista, nomeLista, listaCandidatos);\n\t\t\t\tSystem.out.println(msgServer);\n\t\t\t\tSystem.out.println(\"\\n\");\n\t\t\t\tcheck = 1;\n\t\t\t} catch (RemoteException e1) {\n\t\t\t\t// Tratamento da Excepcao da chamada RMI alteraFac\n\t\t\t\tif(tries == 0) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(6000);\n\t\t\t\t\t\t//faz novo lookup\n\t\t\t\t\t\trmiserver = (RMI_S_I) Naming.lookup(\"rmi://\"+registryIP+\":\"+registryPort+\"/rmi\");\n\t\t\t\t\t\trmiserver.subscribeConsola((ADMIN_C_I)consola);\n\t\t\t\t\t\ttries = 0;\n\t\t\t\t\t} catch (RemoteException | InterruptedException | MalformedURLException | NotBoundException e) {\n\t\t\t\t\t\t// FailOver falhou\n\t\t\t\t\t\ttries++;\n\t\t\t\t\t}\n\t\t\t\t}else if(tries > 0 && tries < 24) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t//faz novo lookup\n\t\t\t\t\t\trmiserver = (RMI_S_I) Naming.lookup(\"rmi://\"+registryIP+\":\"+registryPort+\"/rmi\");\n\t\t\t\t\t\trmiserver.subscribeConsola((ADMIN_C_I)consola);\n\t\t\t\t\t\ttries = 0;\n\t\t\t\t\t} catch (RemoteException | InterruptedException | MalformedURLException | NotBoundException e) {\n\t\t\t\t\t\t// FailOver falhou\n\t\t\t\t\t\ttries++;\n\t\t\t\t\t}\n\t\t\t\t}else if(tries >= 24) {\n\t\t\t\t\tSystem.out.println(\"Impossivel realizar a operacao devido a falha tecnica (Servidores RMI desligados).\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}while(check==0);\n\t\tcheck = 0;\n\t}",
"boolean comprovarCodi(String codi) {\r\n if(codi == id) {\r\n return true;\r\n }\r\n else {\r\n return false;\r\n }\r\n }",
"public Boolean validarCodigoRecursoPrestamo(String codigoRecurso) {\r\n Boolean resultado = false;\r\n try {\r\n\r\n Prestamo p = new Prestamo();\r\n p.setCodigoRecurso(codigoRecurso);\r\n p.setEstado(\"Activo\");\r\n ArrayList<Prestamo> prestamo = (ArrayList<Prestamo>) prestamoDao.searchMatching(conexion.obtenerConexion(), p);\r\n Prestamo validarPrestamo = (prestamo != null && prestamo.size() > 0) ? prestamo.get(0) : null;\r\n //si no existe un recurso con ese Codigo se puede agregar\r\n resultado = validarPrestamo == null;\r\n\r\n } catch (SQLException ex) {\r\n Logger.getLogger(PrestamoBL.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return resultado;\r\n }",
"private void caricaLista() {\n /** variabili e costanti locali di lavoro */\n ArrayList unaLista = null;\n CampoDati unCampoDati = null;\n CDBLinkato unCampoDBLinkato = null;\n //@todo da cancellare\n try { // prova ad eseguire il codice\n /* recupera il campo DB specializzato */\n unCampoDBLinkato = (CDBLinkato)unCampoParente.getCampoDB();\n\n /* recupera la lista dal campo DB */\n unaLista = unCampoDBLinkato.caricaLista();\n\n /* recupera il campo dati */\n unCampoDati = unCampoParente.getCampoDati();\n\n /* registra i valori nel modello dei dati del campo */\n if (unaLista != null) {\n unCampoDati.setValoriInterni(unaLista);\n// unCampoDatiElenco.regolaElementiAggiuntivi();\n } /* fine del blocco if */\n\n } catch (Exception unErrore) { // intercetta l'errore\n /* mostra il messaggio di errore */\n Errore.crea(unErrore);\n } /* fine del blocco try-catch */\n\n }",
"private boolean validarCliente() {\n for (Cliente itemCliente : clienteList){\n if (cliente.getText().toString().equals(itemCliente.getClie_nombre())){\n clienteSeleccionado = itemCliente;\n return true;\n }\n }\n new Mensaje(getApplicationContext()).mensajeToas(\"El cliente no esta registrado\");\n return false;\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == INTENTO_NUEVO_CLIENTE) {\n if (resultCode == RESULT_OK) {\n\n // obtengo los datos del cliente lo meto en un objeto cliente y lo meto en el arrylist\n\n String nombre=data.getStringExtra(\"nombre\");\n int cantidad=Integer.parseInt(data.getStringExtra(\"cantidad\"));\n String fecha=data.getStringExtra(\"fecha\");\n // creo un objeto cliente\n listaCuentas.add(new Cliente(nombre,cantidad,fecha));\n rellenarListview(listaCuentas);\n\n // mientras escribo el archivo\n }\n if (resultCode == RESULT_CANCELED) {\n // no hago nada\n\n\n }\n\n\n }\n }",
"public List<Comentario> listaComentarioPorCodigo(Long codigo);",
"public void recuperarDatosMedidor(String codigo){\n\t\ttry{\n\t\t\tList<Medidor> listaMedidor = new ArrayList<Medidor>();\n\t\t\tlistaMedidor = medidorDao.getRecuperaMedidor(codigo);\n\t\t\tfor(int i = 0 ; i < listaMedidor.size() ; i ++) {\n\t\t\t\ttxtIdMedidor.setText(String.valueOf(listaMedidor.get(i).getIdMedidor()));\n\t\t\t\ttxtCodigo.setText(listaMedidor.get(i).getCodigo());\n\t\t\t\tcboEstadoMed.setValue(listaMedidor.get(i).getEstadoMedidor());\n\t\t\t\ttxtMarca.setText(listaMedidor.get(i).getMarca());\n\t\t\t\ttxtModelo.setText(listaMedidor.get(i).getModelo());\n\t\t\t\ttxtPrecio.setText(String.valueOf(listaMedidor.get(i).getPrecio()));\n\t\t\t\t\n\t\t\t\tmedidorSeleccionado = listaMedidor.get(i);\n\t\t\t}\n\t\t\tif (listaMedidor.size() == 0)\n\t\t\t\tmedidorSeleccionado = new Medidor();\n\t\t}catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"List<Celda> obtenerCeldasValidas(Celda origen);",
"public boolean validarClienImpLinComEstFilial(Long codigoClienteImportacion,Integer codigoCompania)throws SICException{\n\t\ttry {\n\t\t\tLogeable.LOG_SICV2.info(\"Metodo validarClienImpLinComEstFilial \");\n\t\t\tLogeable.LOG_SICV2.info(\"Parametros : \");\n\t\t\tLogeable.LOG_SICV2.info(\"codigoClienteImportacion : \"+codigoClienteImportacion);\n\t\t\tLogeable.LOG_SICV2.info(\"codigoCompania : \"+codigoCompania);\n\t\t\t\n\t\t\tCriteria criteria = hibernateH.getHibernateSession().createCriteria(LineaComercialClienteImportacionDTO.class);\n\t\t\tcriteria.setProjection(Projections.count(\"id.codigoClienteImportacion\"));\n\t\t\tcriteria.createAlias(\"lineaComercialDTO\", \"lineaComercialDTO\");\n\t\t\tcriteria.createAlias(\"lineaComercialDTO.establecimiento\", \"establecimiento\");\n\t\t\tcriteria.add(Restrictions.eq(\"establecimiento.tipoEstablecimiento\",CorporativoConstantes.TIPO_ESTABLECIMIENTO_FILIAL));\n\t\t\tcriteria.add(Restrictions.eq(\"id.codigoClienteImportacion\", codigoClienteImportacion));\n\t\t\tcriteria.add(Restrictions.eq(\"id.codigoCompania\", codigoCompania));\n\t\t\tcriteria.add(Restrictions.eq(\"estado\", SICConstantes.ESTADO_ACTIVO_NUMERICO));\n\t\t\tcriteria.add(Restrictions.eq(\"lineaComercialDTO.estado\", SICConstantes.ESTADO_ACTIVO_NUMERICO));\n\t\t\tcriteria.add(Restrictions.eq(\"establecimiento.estado\", SICConstantes.ESTADO_ACTIVO_LITERAL));\n\t\t\t\n\t\t\tLong resulCount = (Long)criteria.uniqueResult();\n\t\t\t\n\t\t\tif(resulCount > 0){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t\n\t\t\treturn false;\n\t\t\t\n\t\t} catch (SICException e) {\n\t\t\tthrow new SICException(\"Error validarClienImpLinComEstFilial\",e);\n\t\t}\n\t}",
"public static boolean validaContinuaLista(Conjunto nome) {\r\n\t\tVisao.continuaLista();\r\n\t\tchar resposta = Leitura.lerChar();\r\n\t\tif (resposta != 'S')\r\n\t\t\tVisao.nomesCadastrados(nome.getQtdNomes());\r\n\t\telse\r\n\t\t\t// ZERAR NOMES PARA OUTRA LISTA\r\n\t\t\tnome.zerarLista();\r\n\t\treturn ((resposta == 'S') ? true : false);\r\n\t}",
"public List<DadosDiariosVO> validaSelecionaAcumuladoDadosDiarios(String ano) {\n\n\t\tList<DadosDiariosVO> listaDadosDiarios = validaSelecionaDetalhesDadosDiarios(ano);\n\n\t\tList<DadosDiariosVO> listaFiltradaDadosDiarios = new ArrayList<DadosDiariosVO>();\n\t\tList<DadosDiariosVO> listaFaturamentoDiario = new ArrayList<DadosDiariosVO>();\n\t\tList<DadosDiariosVO> listaFaturamentoAcumulado = new ArrayList<DadosDiariosVO>();\n\n\t\t/* Ordena a lista em EMITIDOS;EMITIDOS CANCELADOS;EMITIDOS RESTITUIDOS */\n\n\t\tfor (int i = 0; i < listaDadosDiarios.size(); i++) {\n\t\t\tString dataParaComparacao = listaDadosDiarios.get(i).getAnoMesDia();\n\n\t\t\tfor (int j = 0; j < listaDadosDiarios.size(); j++) {\n\n\t\t\t\tif (dataParaComparacao.equals(listaDadosDiarios.get(j).getAnoMesDia())) {\n\t\t\t\t\tDadosDiariosVO dados = new DadosDiariosVO();\n\t\t\t\t\tdados.setAnoMesDia(listaDadosDiarios.get(j).getAnoMesDia());\n\t\t\t\t\tdados.setProduto(listaDadosDiarios.get(j).getProduto());\n\t\t\t\t\tdados.setTipo(listaDadosDiarios.get(j).getTipo());\n\t\t\t\t\tdados.setValorDoDia(listaDadosDiarios.get(j).getValorDoDia());\n\n\t\t\t\t\tlistaFiltradaDadosDiarios.add(dados);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\touter: for (int i = listaFiltradaDadosDiarios.size() - 1; i >= 0; i--) {\n\t\t\tfor (int j = 0; j < listaFiltradaDadosDiarios.size(); j++) {\n\t\t\t\tif (listaFiltradaDadosDiarios.get(i).getAnoMesDia()\n\t\t\t\t\t\t.equalsIgnoreCase(listaFiltradaDadosDiarios.get(j).getAnoMesDia())\n\t\t\t\t\t\t&& listaFiltradaDadosDiarios.get(i).getProduto()\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(listaFiltradaDadosDiarios.get(j).getProduto())\n\t\t\t\t\t\t&& listaFiltradaDadosDiarios.get(i).getTipo()\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(listaFiltradaDadosDiarios.get(j).getTipo())\n\t\t\t\t\t\t&& listaFiltradaDadosDiarios.get(i).getValorDoDia()\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(listaFiltradaDadosDiarios.get(j).getValorDoDia())) {\n\t\t\t\t\tif (i != j) {\n\n\t\t\t\t\t\tlistaFiltradaDadosDiarios.remove(i);\n\t\t\t\t\t\tcontinue outer;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/* Ordena por data */\n\t\tCollections.sort(listaFiltradaDadosDiarios, DadosDiariosVO.anoMesDiaCoparator);\n\n\t\tString dataTemp = \"\";\n\t\tBigDecimal somaAcumulada = new BigDecimal(\"0.0\");\n\n\t\t/* abaixo a visao da faturamento de cada dia */\n\t\tDadosDiariosVO faturamentoDiario = new DadosDiariosVO();\n\n\t\ttry {\n\n\t\t\tfor (int i = 0; i <= listaFiltradaDadosDiarios.size(); i++) {\n\n\t\t\t\tif (i == 0) {\n\t\t\t\t\tdataTemp = listaFiltradaDadosDiarios.get(i).getAnoMesDia();\n\n\t\t\t\t\tfaturamentoDiario.setAnoMesDia(listaFiltradaDadosDiarios.get(i).getAnoMesDia());\n\t\t\t\t\tfaturamentoDiario.setProduto(listaFiltradaDadosDiarios.get(i).getProduto());\n\t\t\t\t\tfaturamentoDiario.setTipo(\"FATURAMENTO\");\n\t\t\t\t}\n\n\t\t\t\tif ((i != listaFiltradaDadosDiarios.size())\n\t\t\t\t\t\t&& dataTemp.equals(listaFiltradaDadosDiarios.get(i).getAnoMesDia())) {\n\n\t\t\t\t\tsomaAcumulada = new BigDecimal(listaFiltradaDadosDiarios.get(i).getValorDoDia()).add(somaAcumulada);\n\n\t\t\t\t} else {\n\t\t\t\t\tif (listaFiltradaDadosDiarios.size() == i) {\n\t\t\t\t\t\tfaturamentoDiario.setValorDoDia(somaAcumulada.toString());\n\t\t\t\t\t\tlistaFaturamentoDiario.add(faturamentoDiario);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfaturamentoDiario.setValorDoDia(somaAcumulada.toString());\n\t\t\t\t\t\tlistaFaturamentoDiario.add(faturamentoDiario);\n\t\t\t\t\t}\n\n\t\t\t\t\tdataTemp = listaFiltradaDadosDiarios.get(i).getAnoMesDia();\n\t\t\t\t\tsomaAcumulada = new BigDecimal(listaFiltradaDadosDiarios.get(i).getValorDoDia());\n\n\t\t\t\t\tfaturamentoDiario = new DadosDiariosVO();\n\t\t\t\t\tfaturamentoDiario.setAnoMesDia(listaFiltradaDadosDiarios.get(i).getAnoMesDia());\n\t\t\t\t\tfaturamentoDiario.setProduto(listaFiltradaDadosDiarios.get(i).getProduto());\n\t\t\t\t\tfaturamentoDiario.setTipo(\"FATURAMENTO\");\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (IndexOutOfBoundsException ioobe) {\n\t\t\tSystem.err.println(\n\t\t\t\t\t\"VisãoExecutiva_Diaria_BO - método validaSelecionaAcumuladoDadosDiarios - adicionando dados fictícios...\");\n\t\t\tDadosDiariosVO dados = new DadosDiariosVO();\n\t\t\tdados.setAnoMesDia(\"2015-10-02\");\n\t\t\tdados.setProduto(\"TESTE\");\n\t\t\tdados.setTipo(\"FATURAMENTO\");\n\t\t\tdados.setValorDoDia(\"0.0\");\n\t\t\tlistaFaturamentoDiario.add(dados);\n\t\t\tSystem.err.println(\"... dados inseridos\");\n\t\t}\n\n\t\t/* abaixo construimos a visao acumulada */\n\t\tBigDecimal somaAnterior = new BigDecimal(\"0.0\");\n\t\tint quantidadeDias = 0;\n\t\tfor (int i = 0; i < listaFaturamentoDiario.size(); i++) {\n\n\t\t\tDadosDiariosVO faturamentoDiarioAcumulado = new DadosDiariosVO();\n\t\t\tif (i == 0) {\n\t\t\t\tfaturamentoDiarioAcumulado.setAnoMesDia(listaFaturamentoDiario.get(i).getAnoMesDia());\n\t\t\t\tfaturamentoDiarioAcumulado.setProduto(listaFaturamentoDiario.get(i).getProduto());\n\t\t\t\tfaturamentoDiarioAcumulado.setTipo(listaFaturamentoDiario.get(i).getTipo());\n\t\t\t\tfaturamentoDiarioAcumulado.setValorDoDia(listaFaturamentoDiario.get(i).getValorDoDia());\n\n\t\t\t\tsomaAnterior = somaAnterior.add(new BigDecimal(listaFaturamentoDiario.get(i).getValorDoDia()));\n\t\t\t\tquantidadeDias++;\n\t\t\t\tlistaFaturamentoAcumulado.add(faturamentoDiarioAcumulado);\n\n\t\t\t} else {\n\t\t\t\tfaturamentoDiarioAcumulado.setAnoMesDia(listaFaturamentoDiario.get(i).getAnoMesDia());\n\t\t\t\tfaturamentoDiarioAcumulado.setProduto(listaFaturamentoDiario.get(i).getProduto());\n\t\t\t\tfaturamentoDiarioAcumulado.setTipo(listaFaturamentoDiario.get(i).getTipo());\n\t\t\t\tfaturamentoDiarioAcumulado.setValorDoDia(\n\t\t\t\t\t\tsomaAnterior.add(new BigDecimal(listaFaturamentoDiario.get(i).getValorDoDia())).toString());\n\n\t\t\t\tsomaAnterior = somaAnterior.add(new BigDecimal(listaFaturamentoDiario.get(i).getValorDoDia()));\n\t\t\t\tquantidadeDias++;\n\t\t\t\tlistaFaturamentoAcumulado.add(faturamentoDiarioAcumulado);\n\t\t\t}\n\t\t}\n\n\t\tUteis uteis = new Uteis();\n\t\tString dataAtualSistema = new SimpleDateFormat(\"dd/MM/yyyy\").format(new Date(System.currentTimeMillis()));\n\t\tString dataCut[] = dataAtualSistema.split(\"/\");\n\t\tString mes_SO;\n\t\tmes_SO = dataCut[1];\n\n\t\t/* BP */\n\t\tList<FaturamentoVO> listaBP = dadosFaturamentoDetalhado;\n\t\tint mes_SO_int = Integer.parseInt(mes_SO);\n\t\tString bpMes = listaBP.get(0).getMeses()[mes_SO_int - 1];\n\t\tint diasUteis = uteis.retornaDiasUteisMes(mes_SO_int - 1);\n\t\tBigDecimal bpPorDia = new BigDecimal(bpMes).divide(new BigDecimal(diasUteis), 6, RoundingMode.HALF_DOWN);\n\n\t\tBigDecimal somaAnteriorBp = new BigDecimal(\"0.0\");\n\t\tfor (int i = 0; i < quantidadeDias; i++) {\n\t\t\tDadosDiariosVO faturamentoDiarioAcumulado = new DadosDiariosVO();\n\t\t\tif (i == 0) {\n\t\t\t\tfaturamentoDiarioAcumulado.setAnoMesDia(listaFaturamentoAcumulado.get(i).getAnoMesDia());\n\t\t\t\tfaturamentoDiarioAcumulado.setProduto(listaFaturamentoAcumulado.get(i).getProduto());\n\t\t\t\tfaturamentoDiarioAcumulado.setTipo(\"BP\");\n\t\t\t\tfaturamentoDiarioAcumulado.setValorDoDia(bpPorDia.toString());\n\n\t\t\t\tsomaAnteriorBp = somaAnteriorBp.add(bpPorDia);\n\t\t\t\tlistaFaturamentoAcumulado.add(faturamentoDiarioAcumulado);\n\n\t\t\t} else {\n\t\t\t\tfaturamentoDiarioAcumulado.setAnoMesDia(listaFaturamentoAcumulado.get(i).getAnoMesDia());\n\t\t\t\tfaturamentoDiarioAcumulado.setProduto(listaFaturamentoAcumulado.get(i).getProduto());\n\t\t\t\tfaturamentoDiarioAcumulado.setTipo(\"BP\");\n\n\t\t\t\tsomaAnteriorBp = somaAnteriorBp.add(bpPorDia);\n\n\t\t\t\tfaturamentoDiarioAcumulado.setValorDoDia(somaAnteriorBp.toString());\n\n\t\t\t\tlistaFaturamentoAcumulado.add(faturamentoDiarioAcumulado);\n\t\t\t}\n\t\t}\n\n\t\treturn listaFaturamentoAcumulado;\n\t}",
"public boolean validate() {\n\n\t\tNoLista p = lista.validate();\n\t\tif(p==null){\n\t\t\treturn true; \n\t\t}else {\n\t\t\twhile(p!=null) {\n\t\t\t\tfor (int i = 0; i < ignore.length; i++) {\n\t\t\t\t\tif(ignore[i].equals(p.getInfo())) {\n\t\t\t\t\t\tretirar(p.getInfo());\n\t\t\t\t\t\taddList(p.getInfo());\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tp=p.getProximo();\n\t\t\t}\n\t\t\t\n\t\t\tif(this.lista.getPrimeiro()==null) {\n\t\t\t\treturn true;\n\t\t\t}else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t}\n\t}",
"public String guardarsalidatransferencia( List<ListviewGenerico> existencias, List<ListviewGenerico> salidatransferencia, String clavemobil, String observacion){\n\t\tint size = existencias.size();\n\t\tfor (int i = 0; i < size; i++){\n\t\t Double existencia =existencias.get(i).getexistencia();\n\t\t int idmaterial =existencias.get(i).getidmaterial();\n\t\t int idalmacen =existencias.get(i).getidalmacen();\n\t\t updateexistencia(existencia,idmaterial,idalmacen);\t\t \n\t\t}\n\t\t\n\t\tString cadenaimprimir=\"\";\n\t\tsize =salidatransferencia.size();\n\t\tVector vector=new Vector();\n\t\tfor (int i = 0; i < size; i++){\t\t\n\t\t\tint cont=0;\n\t\t\tfor (int j=0; j<vector.size(); j++){\n\t\t\t\tif(vector.elementAt(j).equals(salidatransferencia.get(i).getnombrealmacne()))\n\t\t\t\t\tcont++;\t\n\t\t\t}\n\t\t\tif(cont==0)\n\t\t\t\tvector.add(salidatransferencia.get(i).getnombrealmacne());\t\t\t\n\t\t}\n\t\tcadenaimprimir+=\"SALIDA TRANSFERECIA\\n\";\n\t\tfor (int j=0; j<vector.size(); j++) {\n\t\t\tLog.e(\"obra-concepto\",vector.elementAt(j)+\"\");\t\t\t\n\t\t\tcadenaimprimir+=\"--------------------------------------------\\n\";\n\t\t\tcadenaimprimir+=vector.elementAt(j).toString()+\"\\n\";\n\t\t\tcadenaimprimir+=\"--------------------------------------------\\n\";\n\t\t\tfor (int i = 0; i < size; i++){\n\t\t\t\t\tif(vector.elementAt(j).equals(salidatransferencia.get(i).getnombrealmacne())){\n\t\t\t\t\t\tLog.e(\"concepto\",\" \"+salidatransferencia.get(i).getexistencia()+\" - \"+salidatransferencia.get(i).getunidad()+\"\\n \"+salidatransferencia.get(i).getdescripcion());\n\t\t\t\t\t\tcadenaimprimir+=\" \"+salidatransferencia.get(i).getexistencia()+\" - \"+salidatransferencia.get(i).getunidad()+\"\\n \"+salidatransferencia.get(i).getdescripcion()+\"\\n\";\n\t\t\t\t\t\tif(salidatransferencia.get(i).getidcontratista()>0){\n\t\t\t\t\t\t\tcadenaimprimir+=\" Entregado a: \"+salidatransferencia.get(i).getnombrecontratista()+\"\";\t\n\t\t\t\t\t\t\tLog.e(\"material\",\" \"+salidatransferencia.get(i).getnombrecontratista());\n\t\t\t\t\t\t\tif(salidatransferencia.get(i).getconcargo()>0){\n\t\t\t\t\t\t\t\tcadenaimprimir+=\"(Con cargo)\\n\";\n\t\t\t\t\t\t\t\tLog.e(\"material\",\" -> Con cargo\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\t\n\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tcadenaimprimir+=\"\\n\\nObservaciones: \"+observacion;\n\t\t\n\t\tfor (int i = 0; i < size; i++){\n\t\t\t Double existencia =salidatransferencia.get(i).getexistencia();\n\t\t\t int idmaterial =salidatransferencia.get(i).getidmaterial();\n\t\t\t int idalmacen =salidatransferencia.get(i).getidalmacen();\n\t\t\t String unidad=salidatransferencia.get(i).getunidad();\t\n\t\t\t int idcontratista=salidatransferencia.get(i).getidcontratista();\t\n\t\t\t int concargo=salidatransferencia.get(i).getconcargo();\n\t\t\t \n\t\t\t salidatrasferenciapartidas(existencia, idmaterial, unidad, idalmacen, clavemobil, idcontratista, concargo);\n\t\t}\n\t\treturn cadenaimprimir;\n\t\t\n\t}",
"@Override\n protected void validaRegras(ArquivoLoteVO entity) {\n\n }",
"public boolean buscarLibro(String codigoLibro){\n libro = manejadorArchivoLibro.leerArchivo(LIBRO, codigoLibro, \".lib\");\n return libro != null;\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if(requestCode==77){\n if(resultCode==RESULT_OK){\n if (data!=null){\n String nombre = data.getStringExtra(\"nombre\");\n String cantidad = data.getStringExtra(\"cantidad\");\n\n // int cantnum = Integer.parseInt(cantidad);\n\n Listado list = new Listado(nombre, Integer.parseInt(cantidad));\n\n listado.add(list);\n adapter.notifyItemInserted(listado.size());\n } else if (resultCode==MainActivity.RESULT_CANCELED){\n Toast.makeText(this, \"INTRODUCE DATOS\", Toast.LENGTH_SHORT).show();\n }\n }\n }\n\n }",
"int contarListarCobranza(CobranzaDTO cobranza);",
"public static boolean guardarCancionLista(int id_cancion, int id_lista){ \n\t boolean resultado = false;\n\t \n try {\n \t \n \t manager = Connection.connectToMysql();\n \t manager.getTransaction().begin();\n \t \n \t Lista l = manager.find(Lista.class, id_lista);\n \t Cancion c = manager.find(Cancion.class, id_cancion);\n\n \t List<Lista> lista_canciones = c.getListas();\n \t \n \t if(enLista(lista_canciones, l)) {\n \t\t lista_canciones.add(l);\n \t c.setListas(lista_canciones);\n \t resultado = true;\n \t }\n \t \n \n manager.getTransaction().commit();\n \n }catch (Exception ex) {\n System.out.println(ex);\n }\n \n return resultado;\n }",
"public void testLoadContentsId_1() throws Throwable {\n \tList<String> list = null;\n\t\ttry {\n\t\t\tlist = _contentSearcherDao.loadPublicContentsId(\"ART\", null, null, null);\n\t\t} catch (Throwable t) {\n\t\t\tthrow t;\n\t\t}\n\t\tassertEquals(4, list.size());\n\t\tassertFalse(list.contains(\"ART179\"));//contenuto non on-line\n\t\tassertTrue(list.contains(\"ART180\"));\n\t\tassertTrue(list.contains(\"ART187\"));\n\t\tassertTrue(list.contains(\"ART121\"));//contenuto administrator abilitato ai free\n\t\tassertFalse(list.contains(\"ART102\"));//contenuto di gruppo customers\n\t}",
"public void inicializarComboMoneda(String cod){\n\t\tBeanItemContainer<MonedaVO> monedasObj = new BeanItemContainer<MonedaVO>(MonedaVO.class);\r\n\t\tMonedaVO moneda = new MonedaVO();\r\n\t\tArrayList<MonedaVO> lstMonedas = new ArrayList<MonedaVO>();\r\n\t\tUsuarioPermisosVO permisosAux;\r\n\t\t\r\n\t\ttry {\r\n\t\t\tpermisosAux = \r\n\t\t\t\t\tnew UsuarioPermisosVO(this.permisos.getCodEmp(),\r\n\t\t\t\t\t\t\tthis.permisos.getUsuario(),\r\n\t\t\t\t\t\t\tVariablesPermisos.FORMULARIO_CONCILIACION,\r\n\t\t\t\t\t\t\tVariablesPermisos.OPERACION_LEER);\r\n\t\t\t\r\n\t\t\tlstMonedas = this.controlador.getMonedas(permisosAux);\r\n\t\t\t\r\n\t\t} catch (ObteniendoMonedaException | InicializandoException | ConexionException | ObteniendoPermisosException | NoTienePermisosException e) {\r\n\r\n\t\t\tMensajes.mostrarMensajeError(e.getMessage());\r\n\t\t}\r\n\t\t\r\n\t\tfor (MonedaVO monedaVO : lstMonedas) {\r\n\t\t\t\r\n\t\t\tmonedasObj.addBean(monedaVO);\r\n\t\t\t\r\n\t\t\tif(cod != null){\r\n\t\t\t\tif(cod.equals(monedaVO.getCodMoneda())){\r\n\t\t\t\t\tmoneda = monedaVO;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tthis.comboMoneda.setContainerDataSource(monedasObj);\r\n\t\tthis.comboMoneda.setItemCaptionPropertyId(\"descripcion\");\r\n\t\t\r\n\t\t\r\n\t\tif(cod!=null)\r\n\t\t{\r\n\t\t\ttry{\r\n\t\t\t\tthis.comboMoneda.setReadOnly(false);\r\n\t\t\t\tthis.comboMoneda.setValue(moneda);\r\n\t\t\t\tthis.comboMoneda.setReadOnly(true);\r\n\t\t\t}catch(Exception e)\r\n\t\t\t{}\r\n\t\t}\r\n\t\t\r\n\t}",
"private boolean validacionesSolicitarReserva(int indice, int CodEmp, int CodLoc, int CodCot, boolean isSol){\n boolean blnRes=true;\n try{\n if(!validaItemsServicio(CodEmp, CodLoc, CodCot)){\n blnRes=false;\n MensajeInf(\"La cotizacion contiene Items de Servicio o Transporte, los cuales no deben ser reservados.\");\n }\n\n if(!validaFechasMAX(indice, tblDat.getValueAt(indice,INT_TBL_DAT_STR_TIP_RES_INV).toString(),isSol)){\n blnRes=false;\n MensajeInf(\"La Fecha solicitada es mayor a la permitida, revise la Fecha y vuelva a intentarlo\");\n }\n \n if(!validaTerminalesLSSegunEmpresaLocal(CodEmp,CodLoc,CodCot)){\n blnRes=false;\n MensajeInf(\"No puede solicitar reserva de codigos L/S en este local, debe reservarlo por el local que puede ser facturado\");\n }\n \n if(!validaFechasPrimerDiaLaboral(indice,isSol,CodEmp,CodLoc)){\n blnRes=false;\n MensajeInf(\"La Fecha solicitada, no corresponde al primer dia laboral registrado\");\n } \n \n if(tblDat.getValueAt(indice,INT_TBL_DAT_STR_TIP_RES_INV).toString().equals(\"R\")){\n if(!validaTerminalesLReservaLocal(CodEmp,CodLoc,CodCot)){\n blnRes=false;\n MensajeInf(\"No puede solicitar Reserva en Empresa de Codigos L \");\n }\n }\n }\n catch(Exception e){\n objUti.mostrarMsgErr_F1(null, e);\n blnRes=false;\n }\n return blnRes;\n }",
"public Integer getExisteCliente(String codigoCliente);",
"public String ottieniListaCodiceBilancio(){\n\t\tInteger uid = sessionHandler.getParametro(BilSessionParameter.UID_CLASSE);\n\t\tcaricaListaCodiceBilancio(uid);\n\t\treturn SUCCESS;\n\t}",
"private void verificaIdade() {\r\n\t\thasErroIdade(idade.getText());\r\n\t\tisCanSave();\r\n\t}",
"public static void gereCandidatos() {\n\t\tString idE, titulo, op, numCandidatos, nomeP;\n\t\tScanner sc = new Scanner(System.in);\n\t\tint check = 0, num, i;\n\t\tArrayList<Pessoa> listaCandidatos = new ArrayList<>();\n\t\tString msgServer = \"\";\n\t\t\n\t\tSystem.out.println(\"\\nInsira o id da eleicao a qual pretende adicionar uma lista de candidatos:\");\n\t\tidE = sc.nextLine();\n\t\t\n\t\tdo {\n\t\t\tSystem.out.println(\"\\nInsira o titulo da lista:\");\n\t\t\ttitulo = sc.nextLine();\n\t\t\tif(verificarLetras(titulo) && titulo.length()>0) {\n\t\t\t\tcheck = 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"\\nO titulo apenas pode conter letras\");\n\t\t\t}\n\t\t}while(check==0);\n\t\t\n\t\tcheck = 0;\n\t\t\n\t\tdo {\n\t\t\tSystem.out.println(\"\\nO que pretende fazer?\\n(1) Adicoes (2) Remocoes\");\n\t\t\top = sc.nextLine();\n\t\t\tif(op.equals(\"1\") || op.equals(\"2\")) {\n\t\t\t\tcheck = 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"\\nA opcao so pode conter digitos de 1 a 2\");\n\t\t\t}\n\t\t}while(check==0);\n\t\tcheck = 0;\n\t\t\n\t\tswitch(op) {\n\t\t\tcase \"1\":\n\t\t\t\tdo {\n\t\t\t\t\tSystem.out.println(\"\\nInsira numero de elementos:\");\n\t\t\t\t\tnumCandidatos = sc.nextLine();\n\t\t\t\t\tif(verificarNumeros(numCandidatos)) {\n\t\t\t\t\t\tif (Integer.parseInt(numCandidatos) > 0) {\n\t\t\t\t\t\t\tcheck = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tSystem.out.println(\"\\nO numero so pode conter digitos\");\n\t\t\t\t\t}\n\t\t\t\t}while(check==0);\n\t\t\t\tnum = Integer.parseInt(numCandidatos);\n\t\t\t\tcheck = 0;\n\t\t\t\t\n\t\t\t\tfor (i=0; i<num;i++) {\n\t\t\t\t\tdo {\n\t\t\t\t\t\tSystem.out.println(\"\\nInsira o nome do elemento a adicionar:\");\n\t\t\t\t\t\tnomeP = sc.nextLine();\n\t\t\t\t\t\tif(verificarLetras(nomeP) && nomeP.length()>0) {\n\t\t\t\t\t\t\tcheck = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tSystem.out.println(\"\\nO nome apenas pode conter letras\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}while(check==0);\n\t\t\t\t\tPessoa novaP = new Pessoa(nomeP);\n\t\t\t\t\tlistaCandidatos.add(novaP);\n\t\t\t\t\tcheck = 0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcheck = 0;\n\t\t\t\tint tries = 0;\n\t\t\t\tdo {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tmsgServer = rmiserver.adicionaCandidatos(idE, titulo, listaCandidatos);\n\t\t\t\t\t\tSystem.out.println(msgServer);\n\t\t\t\t\t\tSystem.out.println(\"\\n\");\n\t\t\t\t\t\tcheck = 1;\n\t\t\t\t\t} catch (RemoteException e1) {\n\t\t\t\t\t\t// Tratamento da Excepcao da chamada RMI addCandidatos\n\t\t\t\t\t\tif(tries == 0) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tThread.sleep(6000);\n\t\t\t\t\t\t\t\t//faz novo lookup\n\t\t\t\t\t\t\t\trmiserver = (RMI_S_I) Naming.lookup(\"rmi://\"+registryIP+\":\"+registryPort+\"/rmi\");\n\t\t\t\t\t\t\t\trmiserver.subscribeConsola((ADMIN_C_I)consola);\n\t\t\t\t\t\t\t\ttries = 0;\n\t\t\t\t\t\t\t} catch (RemoteException | InterruptedException | MalformedURLException | NotBoundException e) {\n\t\t\t\t\t\t\t\t// FailOver falhou\n\t\t\t\t\t\t\t\ttries++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else if(tries > 0 && tries < 24) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t\t\t//faz novo lookup\n\t\t\t\t\t\t\t\trmiserver = (RMI_S_I) Naming.lookup(\"rmi://\"+registryIP+\":\"+registryPort+\"/rmi\");\n\t\t\t\t\t\t\t\trmiserver.subscribeConsola((ADMIN_C_I)consola);\n\t\t\t\t\t\t\t\ttries = 0;\n\t\t\t\t\t\t\t} catch (RemoteException | InterruptedException | MalformedURLException | NotBoundException e) {\n\t\t\t\t\t\t\t\t// FailOver falhou\n\t\t\t\t\t\t\t\ttries++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else if(tries >= 24) {\n\t\t\t\t\t\t\tSystem.out.println(\"Impossivel realizar a operacao devido a falha tecnica (Servidores RMI desligados).\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}while(check==0);\n\t\t\t\tcheck = 0;\n\t\t\t\tbreak;\n\t\t\tcase \"2\":\n\t\t\t\tdo {\n\t\t\t\t\tSystem.out.println(\"\\nInsira numero de elementos:\");\n\t\t\t\t\tnumCandidatos = sc.nextLine();\n\t\t\t\t\tif(verificarNumeros(numCandidatos)) {\n\t\t\t\t\t\tif (Integer.parseInt(numCandidatos) > 0) {\n\t\t\t\t\t\t\tcheck = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tSystem.out.println(\"\\nO numero so pode conter digitos\");\n\t\t\t\t\t}\n\t\t\t\t}while(check==0);\n\t\t\t\tnum = Integer.parseInt(numCandidatos);\n\t\t\t\tcheck = 0;\n\t\t\t\t\n\t\t\t\tfor (i=0; i<num;i++) {\n\t\t\t\t\tdo {\n\t\t\t\t\t\tSystem.out.println(\"\\nInsira o nome do elemento a remover:\");\n\t\t\t\t\t\tnomeP = sc.nextLine();\n\t\t\t\t\t\tif(verificarLetras(nomeP) && nomeP.length()>0) {\n\t\t\t\t\t\t\tcheck = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tSystem.out.println(\"\\nO nome apenas pode conter letras\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}while(check==0);\n\t\t\t\t\tPessoa novaP = new Pessoa(nomeP);\n\t\t\t\t\tlistaCandidatos.add(novaP);\n\t\t\t\t\tcheck = 0;\n\t\t\t\t}\n\t\t\t\n\t\t\t\tcheck = 0;\n\t\t\t\ttries = 0;\n\t\t\t\tdo {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tmsgServer = rmiserver.removeCandidatos(idE, titulo, listaCandidatos);\n\t\t\t\t\t\tSystem.out.println(msgServer);\n\t\t\t\t\t\tSystem.out.println(\"\\n\");\n\t\t\t\t\t\tcheck = 1;\n\t\t\t\t\t} catch (RemoteException e1) {\n\t\t\t\t\t\t// Tratamento da Excepcao da chamada RMI addCandidatos\n\t\t\t\t\t\tif(tries == 0) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tThread.sleep(6000);\n\t\t\t\t\t\t\t\t//faz novo lookup\n\t\t\t\t\t\t\t\trmiserver = (RMI_S_I) Naming.lookup(\"rmi://\"+registryIP+\":\"+registryPort+\"/rmi\");\n\t\t\t\t\t\t\t\trmiserver.subscribeConsola((ADMIN_C_I)consola);\n\t\t\t\t\t\t\t\ttries = 0;\n\t\t\t\t\t\t\t} catch (RemoteException | InterruptedException | MalformedURLException | NotBoundException e) {\n\t\t\t\t\t\t\t\t// FailOver falhou\n\t\t\t\t\t\t\t\ttries++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else if(tries > 0 && tries < 24) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t\t\t//faz novo lookup\n\t\t\t\t\t\t\t\trmiserver = (RMI_S_I) Naming.lookup(\"rmi://\"+registryIP+\":\"+registryPort+\"/rmi\");\n\t\t\t\t\t\t\t\trmiserver.subscribeConsola((ADMIN_C_I)consola);\n\t\t\t\t\t\t\t\ttries = 0;\n\t\t\t\t\t\t\t} catch (RemoteException | InterruptedException | MalformedURLException | NotBoundException e) {\n\t\t\t\t\t\t\t\t// FailOver falhou\n\t\t\t\t\t\t\t\ttries++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else if(tries >= 24) {\n\t\t\t\t\t\t\tSystem.out.println(\"Impossivel realizar a operacao devido a falha tecnica (Servidores RMI desligados).\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}while(check==0);\n\t\t\t\tcheck = 0;\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t}\n\t}",
"public void verificarDatosConsola(Cliente cliente, List<Cuenta> listaCuentas) {\n\n int codigoCliente = cliente.getCodigo();\n\n System.out.println(\"Codigo: \"+cliente.getCodigo());\n System.out.println(\"Nombre: \"+cliente.getNombre());\n System.out.println(\"DPI: \"+cliente.getDPI());\n System.out.println(\"Direccion: \"+cliente.getDireccion());\n System.out.println(\"Sexo: \"+cliente.getSexo());\n System.out.println(\"Password: \"+cliente.getPassword());\n System.out.println(\"Tipo de Usuario: \"+ 3);\n\n System.out.println(\"Nacimiento: \"+cliente.getNacimiento());\n System.out.println(\"ArchivoDPI: \"+cliente.getDPIEscaneado());\n System.out.println(\"Estado: \"+cliente.isEstado());\n \n \n for (Cuenta cuenta : listaCuentas) {\n System.out.println(\"CUENTAS DEL CLIENTE\");\n System.out.println(\"Numero de Cuenta: \"+cuenta.getNoCuenta());\n System.out.println(\"Fecha de Creacion: \"+cuenta.getFechaCreacion());\n System.out.println(\"Saldo: \"+cuenta.getSaldo());\n System.out.println(\"Codigo del Dueño: \"+codigoCliente);\n \n }\n \n\n\n }",
"@Override\n protected void onActivityResult(int requestCode,\n int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (resultCode==RESULT_OK) {\n Bundle datos = data.getExtras();\n Institucion inst = (Institucion) datos.getSerializable(\"institucion\");\n if (requestCode == SOLICITUD_NUEVA) {\n mDatos.add(inst);\n adapterInst.notifyItemInserted(mDatos.size()-1);\n }\n else {\n int operacion = datos.getInt(\"operacion\");\n int pos = mDatos.indexOf(inst);\n if (operacion == OPERACION_ELIMINACION) {\n mDatos.remove(pos);\n adapterInst.notifyItemRemoved(pos);\n }\n else {\n mDatos.set(pos,inst);\n adapterInst.notifyItemChanged(pos);\n }\n }\n muestraMensaje(R.string.mensaje_exito_operacion);\n }\n }",
"void registrarArticulosMigracion(Integer codigoCompania, String namefile, Date fechaEjecucion, List<? extends MigrarDatosProcesoVentaDTO> listaDatosArchivoFTP) throws SICException, ParseException;",
"@Override\n\tpublic ArrayList<CodeBean> findCodeList() {\n\t\tif(logger.isDebugEnabled()){ logger.debug(\" CodeListApplicationServiceImpl : findCodeList 시작 \"); }\n\t\tArrayList<CodeBean> codeList = null;\n\t\ttry{\n\t\t\tcodeList = codeDAO.selectCodeList(); \n\t\t\t\n\t\t\tfor(CodeBean codeBean : codeList){\t\t\t\t\t\t\n\t\t\t\tcodeBean.setCodeDetailList(codeDetailDAO.selectDetailCodeList(codeBean.getDivisionCode()));\n\t\t\t}\t\t\n\t\t\n\t\t}catch(DataAccessException e){\n\t\t\tSystem.out.println(\"\t\t@ 코드어플서비스 조회 오류\");\n\t\t\tlogger.fatal(e.getMessage());\n\t\t\tthrow e;\n\t\t}\n\t\tif(logger.isDebugEnabled()){ logger.debug(\" CodeListApplicationServiceImpl : findCodeList 종료 \"); }\n\t\treturn codeList;\n\t}",
"private void checkDatosCliente(Cliente cliente) throws ValidacionException{\n\t\tList<Cliente> clientes = clienteDAOLocal.getClienteByCUIT(cliente.getCuit(), cliente.getId() == null ? 0 : cliente.getId());\n\t\tif(!clientes.isEmpty()) {\n\t\t\tthrow new ValidacionException(EValidacionException.CLIENTE_YA_EXISTE_CUIT.getInfoValidacion());\n\t\t}\n\t\t// Chequeo lo del dígito verificador\n\t\tif(!cuitValido(cliente.getCuit())) {\n\t\t\tthrow new ValidacionException(EValidacionException.CLIENTE_CUIT_INVALIDO.getInfoValidacion());\n\t\t}\n\t}",
"private boolean validaItemsServicio(int CodEmp, int CodLoc, int CodCot){\n java.sql.Statement stmLoc;\n java.sql.ResultSet rstLoc;\n java.sql.Connection conLoc;\n boolean blnRes=true;\n try{\n conLoc=DriverManager.getConnection(objParSis.getStringConexion(), objParSis.getUsuarioBaseDatos(), objParSis.getClaveBaseDatos());\n if (conLoc != null) {\n stmLoc=conLoc.createStatement();\n strSql=\"\";\n strSql+=\" SELECT a1.co_emp, a1.co_loc, a1.co_cot \\n\";\n strSql+=\" FROM tbm_cabCotVen as a1 \\n\";\n strSql+=\" INNER JOIN tbm_detCotVen as a2 ON (a1.co_emp=a2.co_emp AND a1.co_loc=a2.co_loc AND a1.co_cot=a2.co_cot) \\n\";\n strSql+=\" INNER JOIN tbm_inv as a3 ON (a2.co_emp=a3.co_emp AND a2.co_itm=a3.co_itm) \\n\";\n strSql+=\" WHERE a1.co_emp=\"+CodEmp+\" AND a1.co_loc=\"+CodLoc+\" AND a1.co_cot=\"+CodCot+\" AND (a3.st_ser='S' OR a3.st_ser='T' OR a3.st_ser='O') \\n\";\n rstLoc=stmLoc.executeQuery(strSql);\n if(rstLoc.next()){\n blnRes=false;\n }\n rstLoc.close();\n rstLoc=null;\n stmLoc.close();\n stmLoc=null;\n }\n conLoc.close();\n conLoc=null;\n }\n catch (java.sql.SQLException e){\n objUti.mostrarMsgErr_F1(this, e);\n blnRes=false; \n }\n catch(Exception e){\n objUti.mostrarMsgErr_F1(this, e);\n blnRes=false;\n }\n return blnRes;\n }",
"private String entraCodPed(boolean isIncluir) {\n String cod = \"\";\n boolean isCadastro = false;\n\n ArrayList<Pedido> codPed = (obterTodosPedidos());\n\n // loop enquanto teclar vazio ou not fim\n while (cod.isEmpty() || true) {\n // janela de input do CPF\n cod = JOptionPane.showInputDialog(this, \"Cod do Pedido\");\n if (cod == null) {\n return null;\n } else if (cod.isEmpty()) {\n // SE DER <ENTER> JOGA MENSAGEM DE ERRO e VOLTA AO LOOP.\n JOptionPane.showMessageDialog(null, \"Por Favor, Digite Algo!\",\n \"Msg do Servidor\", JOptionPane.INFORMATION_MESSAGE);\n } else {\n\n for (Pedido codPed1 : codPed) {\n if (cod.equals(codPed1.getCodPed())) {\n if (isIncluir) {\n // ENQUANTO NAO ENCONTRA JOGA MENSAGEM DE ERRO e\n // VOLTA AO LOOP.\n JOptionPane.showMessageDialog(null,\n \"Pedido Ja Cadastrado!!!\",\n \"Msg do Servidor\",\n JOptionPane.INFORMATION_MESSAGE);\n isCadastro = true;\n break;\n } else {\n return cod;\n }\n }\n isCadastro = false;\n }\n\n if (!isIncluir) {\n // ENQUANTO NAO ENCONTRA JOGA MENSAGEM DE ERRO e VOLTA AO\n // LOOP.\n JOptionPane.showMessageDialog(null,\n \"Pedido nao encontrado!!!\", \"Msg do Servidor\",\n JOptionPane.INFORMATION_MESSAGE);\n } else {\n if (!isCadastro) {\n return cod;\n }\n }\n }\n\n }\n return cod;\n }",
"public void cargarConceptoRetencion()\r\n/* 393: */ {\r\n/* 394: */ try\r\n/* 395: */ {\r\n/* 396:387 */ this.listaConceptoRetencionSRI = this.servicioConceptoRetencionSRI.getConceptoListaRetencionPorFecha(this.facturaProveedorSRI.getFechaRegistro());\r\n/* 397: */ }\r\n/* 398: */ catch (Exception e)\r\n/* 399: */ {\r\n/* 400:390 */ addErrorMessage(getLanguageController().getMensaje(\"msg_error_cargar_datos\"));\r\n/* 401: */ }\r\n/* 402: */ }",
"public static ArrayList IngresarInfoLista(int posarray){\n\n // Definir objeto de la clase constanste para mensajes\n Constantes constantes = new Constantes();\n\n // Definir Array del objeto de la clase BeneficiosCovid\n ArrayList <BeneficiosCovid19> arrayBeneficios = new ArrayList <BeneficiosCovid19>();\n\n System.out.println(\"Por favor ingresar Subsidios para la lista Nro: \" + posarray);\n\n // Variables de trabajo\n String tipoDato = \"\";\n String info = \"\";\n String idrandom;\n String continuar = constantes.TXT_SI;\n //iniciar Ciclo para cargar informacion\n //while (continuar.equals(\"SI\")){\n\n //Definir Objeto de la clase BeneficiosCovid\n BeneficiosCovid19 beneficios_Covid = new BeneficiosCovid19();\n\n //Ingresar Nombre Tipo Alfa\n tipoDato = \"A\";\n info = validarinfo(constantes.TXT_Inp_Nombre,tipoDato);\n beneficios_Covid.setNombre(info);\n\n //Ingresar Valor Subsidio Tipo Numerico\n tipoDato = \"N\";\n info = validarinfo(constantes.TXT_Inp_Subsidio,tipoDato);\n beneficios_Covid.setValorSubsidio(Float.parseFloat(info));\n\n //Obtener el ID de manera aleatoria\n idrandom = getIdBeneficio();\n beneficios_Covid.setId(idrandom);\n\n arrayBeneficios.add(beneficios_Covid);\n\n /**\n * Validacion para continuar o finalizar el ciclo\n * principaly finalizar Main de manera controlada\n * por consola\n **/\n\n /* tipoDato = \"A\";\n continuar = validarinfo(constantes.TXT_Msg_Continuar,tipoDato);\n // Validar valor ingrsado para continuar o finalizar aplicación\n while ( !continuar.equals(\"SI\") && !continuar.equals(\"NO\")) {\n continuar = validarinfo(constantes.TXT_Msg_Continuar, tipoDato);\n }\n\n }\n */\n return arrayBeneficios;\n }",
"public boolean buscarCodApelacion() throws ExceptionConnection {\n boolean indicador = true;\n EquivalenciasDao oEquivalencia = new EquivalenciasDao();\n EquivalenciasBean oEqv = new EquivalenciasBean();\n oEqv.setEqv_sol_numero(this.apelacionesBean.getApel_codApelar());\n oEqv = oEquivalencia.buscarEquivalenciasNum(oEqv);\n if (oEqv.getEqv_sol_numero() == null) {\n EquiparacionesDao oEquiparacion = new EquiparacionesDao();\n EquiparacionesBean oEqp = new EquiparacionesBean();\n oEqp.setEqp_sol_numero(this.apelacionesBean.getApel_codApelar());\n if (oEquiparacion.buscaDr_regt_equiparaciones(oEqp) == false) {\n indicador = false;\n }\n }\n return indicador;\n }",
"public void domicilioAgregar() {\r\n\t\tlog.info(\"Domicilio agregar \" + nuevoDomici.getDomicilio());\r\n\t\tboolean verifica = false;\r\n\t\tmensaje = null;\r\n\t\tnuevoDomici.setTbTipoCasa(objTipoCasaService.findTipoCasa(Tipocasanuevo));\r\n\t\tnuevoDomici.setDomicilio(domicilio);\r\n\t\tnuevoDomici.setReferencia(referencia);\r\n\t\tnuevoDomici.setTbUbigeo(objUbigeoService.findUbigeo(idUbigeo));\r\n\t\tlog.info(\"TIPO-CASA-NUEVO--->\"+nuevoDomici.getTbTipoCasa().getIdtipocasa());\r\n\t\tnuevoDomici.setNuevoD(1);\r\n\t\t//aqui ponfo el ID-Domicilio a la lista Domicilio temporalmente.\r\n\t\tnuevoDomici.setIddomiciliopersona(0);\r\n\t\tnuevoDomici.setTbEstadoGeneral(objEstadoGeneralService.findEstadogeneral(15));\r\n\t\t\r\n\t\tfor (int i = 0; i < DomicilioPersonaList.size(); i++) {\r\n\t\t\tlog.info(\" \"+ DomicilioPersonaList.get(i).getDomicilio() + \" \" + nuevoDomici.getDomicilio());\r\n\t\t\tif (DomicilioPersonaList.get(i).getDomicilio().equals(nuevoDomici.getDomicilio())) {\r\n\t\t\t\tverifica = false;\r\n\t\t\t\tmensaje = \"el Domicilio ya se encuentra registrado en la lista de domiclio cliente\";\r\n\t\t\t\tbreak;\r\n\t\t\t}else {\r\n\t\t\t\tverifica = true;\r\n\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\tif (DomicilioPersonaList.size() == 0) {\r\n\t\t\t\tverifica = true;\r\n\t\t\t\t}\r\n\t\t\tif (verifica) {\r\n\t\t\t\tnuevoDomici.setItem(\"Por Agregar\");\r\n\t\t\t\tDomicilioPersonaList.add(nuevoDomici);\r\n\t\t\t\tlog.info(\"se agrego \"+ nuevoDomici.getDomicilio());\r\n\t\t\t\t}\r\n\t\t\tif (mensaje != null) {\r\n\t\t\t\tmsg = new FacesMessage(FacesMessage.SEVERITY_FATAL,\r\n\t\t\t\tConstants.MESSAGE_ERROR_FATAL_TITULO, mensaje);\r\n\t\t\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\r\n\t\t\t\t}\r\n\t\t\tnuevoDomici = new DomicilioPersonaSie();\r\n\t\t}",
"private String entraCodProd(boolean isIncluir) {\n String cod = \"\";\n boolean isCadastro = false;\n\n ArrayList<Produto> codProd = (obterTodosProdutos());\n\n // loop enquanto teclar vazio ou not fim\n while (cod.isEmpty() || true) {\n // janela de input do CPF\n cod = JOptionPane.showInputDialog(this, \"Cod do Produto\");\n if (cod == null) {\n return null;\n } else if (cod.isEmpty()) {\n // SE DER <ENTER> JOGA MENSAGEM DE ERRO e VOLTA AO LOOP.\n JOptionPane.showMessageDialog(null, \"Por Favor, Digite Algo!\",\n \"Msg do Servidor\", JOptionPane.INFORMATION_MESSAGE);\n } else {\n\n for (Produto codProd1 : codProd) {\n if (cod.equals(codProd1.getCod())) {\n if (isIncluir) {\n // ENQUANTO NAO ENCONTRA JOGA MENSAGEM DE ERRO e\n // VOLTA AO LOOP.\n JOptionPane.showMessageDialog(null,\n \"Produto Ja Cadastrado!!!\",\n \"Msg do Servidor\",\n JOptionPane.INFORMATION_MESSAGE);\n isCadastro = true;\n break;\n } else {\n return cod;\n }\n }\n isCadastro = false;\n }\n\n if (!isIncluir) {\n // ENQUANTO NAO ENCONTRA JOGA MENSAGEM DE ERRO e VOLTA AO\n // LOOP.\n JOptionPane.showMessageDialog(null,\n \"Produto nao encontrado!!!\", \"Msg do Servidor\",\n JOptionPane.INFORMATION_MESSAGE);\n } else {\n if (!isCadastro) {\n return cod;\n }\n }\n }\n\n }\n return cod;\n }",
"private boolean contieneCarrera(List<ProyectoCarreraOferta> carrerasProyecto, ProyectoCarreraOferta carreraProyecto) {\r\n boolean var = false;\r\n for (ProyectoCarreraOferta pco : carrerasProyecto) {\r\n if (pco.getCarreraId().equals(carreraProyecto.getCarreraId())) {\r\n var = true;\r\n }\r\n }\r\n return var;\r\n }",
"public List<Instruccion> emite(List<Instruccion> codh,\r\n\t\t\tList<Instruccion> cod) {\r\n\t\tcodh.addAll(cod);\r\n\t\treturn codh;\r\n\t}",
"public void agregarDatosCliente(Integer codCliente){\n try{\n ClienteDao clienteDao = new ClienteDaoImp();\n //obtenemos la instancia de Cliente en Base a su codigo\n this.cliente = clienteDao.obtenerClientePorCodigo(codCliente);\n //Mensaje de confirmacion de exito de la operacion\n FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_INFO,\"Correcto\", \"Cliente agregado correctamente!\");\n FacesContext.getCurrentInstance().addMessage(null, message);\n }catch(Exception e){\n e.printStackTrace();\n }\n \n }",
"private void caricaRegistrazione() {\n\t\tfor(MovimentoEP movimentoEP : primaNota.getListaMovimentiEP()){\n\t\t\t\n\t\t\tif(movimentoEP.getRegistrazioneMovFin() == null) { //caso di prime note libere.\n\t\t\t\tthrow new BusinessException(ErroreCore.OPERAZIONE_NON_CONSENTITA.getErrore(\"La prima nota non e' associata ad una registrazione.\"));\n\t\t\t}\n\t\t\t\n\t\t\tthis.registrazioneMovFinDiPartenza = registrazioneMovFinDad.findRegistrazioneMovFinById(movimentoEP.getRegistrazioneMovFin().getUid());\n\t\t\t\n\t\t}\n\t\t\n\t\tif(this.registrazioneMovFinDiPartenza.getMovimento() == null){\n\t\t\tthrow new BusinessException(\"Movimento non caricato.\");\n\t\t}\n\t\t\n\t}",
"public GrupoProducto colsultarPorCodigo(String codigo){\r\n for (int i = 0; i < listaGrupoProductos.size() ; i++) {\r\n if (!listaGrupoProductos.get(i).isEliminado()) {\r\n if (codigo.equals( listaGrupoProductos.get(i).getCodigo() ) ) {\r\n return listaGrupoProductos.get(i);\r\n }\r\n }\r\n }\r\n return null;\r\n }",
"@Override\n\tprotected LinkedHashSet<String> getOrderedValidatedItemCodes() {\n\t\treturn null;\n\t}",
"@Override\n\tprotected LinkedHashSet<String> getOrderedValidatedItemCodes() {\n\t\treturn null;\n\t}",
"private boolean validateLocationStatusCode(OleLocationStatus oleLocationStatus) {\n\n if (oleLocationStatus.getLocationStatusCode() != null) {\n\n Map<String, String> criteria = new HashMap<String, String>();\n\n // criteria.put(OLEConstants.OleLocationStatus.LOCATION_STATUS_CD, oleLocationStatus.getLocationStatusCode());\n\n List<OleLocationStatus> locationStatusCodeInDatabase = (List<OleLocationStatus>) getBoService().findMatching(OleLocationStatus.class, criteria);\n\n if ((locationStatusCodeInDatabase.size() > 0)) {\n\n for (OleLocationStatus locationStatusObj : locationStatusCodeInDatabase) {\n String locationStatusId = locationStatusObj.getLocationStatusId();\n if (null == oleLocationStatus.getLocationStatusId() ||\n !(oleLocationStatus.getLocationStatusId().equalsIgnoreCase(locationStatusId))) {\n // this.putFieldError(OLEConstants.OleLocationStatus.LOCATION_STATUS_CODE, \"error.duplicate.code\");\n return false;\n }\n }\n }\n return true;\n }\n return false;\n }",
"@Override\n\tpublic ArrayList<DetailCodeBean> findDetailCodeList(String code) {\n\t\tif(logger.isDebugEnabled()){ logger.debug(\" CodeListApplicationServiceImpl : findDetailCodeList 시작 \"); }\n\t\t\n\t\tArrayList<DetailCodeBean> detailCodeList = null;\n\t\ttry{\n\t\tdetailCodeList = detailCodeDAO.selectDetailCodeList(code);\n\t\t}catch(Exception e){\n\t\t\tlogger.fatal(e.getMessage());\n\t\t\tthrow e; \n\t\t}\n\t\tif(logger.isDebugEnabled()){ logger.debug(\" CodeListApplicationServiceImpl : findDetailCodeList 종료 \"); }\n\t\treturn detailCodeList;\n\t}",
"private boolean isAirlineCodenameValid(String airlineCodename) {\n\n\t\t// return airline database content through given list\n\t\tArrayList<Airline> listOfAirlines = (ArrayList<Airline>) airlinedb.fetchDatabaseContent();\n\n\t\tfor (int i = 0; i < listOfAirlines.size(); i++) {\n\t\t\tString airlineCodenameFromList = listOfAirlines.get(i).getAirlineCodename();\n\t\t\tif (airlineCodenameFromList.equals(airlineCodename)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"Airline codename is not in database.\");\n\t\treturn false;\n\t}",
"public String insertarOficial() {\r\n\t\tlog.info(\"LISTA DE DESHABILITADO--> \"+ TelefonoDeshabilitado.size()); \r\n\t\tlog.info(\"insertarOficial() \" + \"Id-Cliente-->\"+\" \"+ objClienteSie.getIdcliente() + \" \"+\"Nombre de Cliente\"+\" \"+ objClienteSie.getNombrecliente());\r\n\t\tString paginaretorno=\"\";\r\n\t\ttry {\r\n\t\t\tif (log.isInfoEnabled()) {\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tlog.info(\"busca el Id-DNI\");\r\n\t\t\tobjClienteSie.setTbTipoDocumentoIdentidad(objTipoDocService.buscarTipoDocumento(TipoDocumento));\r\n\t\t\t\r\n\t\t\tlog.info(\"busca el Id-Ubigeo\");\r\n\t\t\tobjDomicilio.setTbUbigeo(objUbigeoService.findUbigeo(Integer.parseInt(idUbigeo1)));\r\n\t\t\t\r\n\t\t\tlog.info(\"*******AQUI ESTA SI HAY UN VALOR DENTRO DE LA LISTA TELEFONOS PARA ELIMINAR*******\");\r\n\t\t\tlog.info(\"Tel-FISICO--------->\"+ \" \"+ TelefonoDeshabilitado.size());\r\n\t\t\tlog.info(\"Tel-TEMPORAL------->\"+ \"\t\"+ TelefonoPersonaList.size());\r\n\t\t\t\r\n\t\t\tlog.info(\"*******AQUI ESTA SI HAY UN VALOR DENTRO DE LA LISTA DOMICILIO PARA ELIMINAR*******\");\r\n\t\t\tlog.info(\"Domicilio-FISICO--------->\"+ \" \"+ DomicilioPersonaDeshabilitado.size());\r\n\t\t\tlog.info(\"Domicilio-TEMPORAL------->\"+ \"\t\"+ DomicilioPersonaList.size());\r\n\t\t\tobjClienteService.updateCliente(objClienteSie,objDomicilio,idUbigeo1, idUbigeo, tipo, Tipocasanuevo,TelefonoPersona,TelefonoPersonaList, TelefonoDeshabilitado, DomicilioPersonaList, DomicilioPersonaDeshabilitado);\r\n\t\t\t\r\n\t\t\tmensaje = Constants.MESSAGE_ACTUALIZO_TITULO;\r\n\t\t\tmsg = new FacesMessage(FacesMessage.SEVERITY_INFO,\r\n\t\t\tConstants.MESSAGE_INFO_TITULO, mensaje);\r\n\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tmensaje = e.getMessage();\r\n\t\t\tmsg = new FacesMessage(FacesMessage.SEVERITY_FATAL,\r\n\t\t\tConstants.MESSAGE_ERROR_FATAL_TITULO, mensaje);\r\n\t\t\tlog.error(e.getMessage());\r\n\t}\r\n\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\r\n\t\treturn getViewList();\r\n\t}",
"public List<EntradaDeMaterial> buscarEntradasDisponibles();",
"public static SendResult checkRoomList(LinkedHashMap param) {\n\t\tSendResult sr=new SendResult(\"0\", \"\", \"\");\r\n\t\tif(param.containsKey(\"rlist\")) {\r\n\t\t\ttry {\r\n\t\t\t\tList<Room> powlist=(List<Room>) param.get(\"rlist\");\r\n\t\t\t\tif(powlist!=null && powlist.size()>0) {\r\n\t\t\t\t\tfor(Room pow : powlist) {\r\n\t\t\t\t\t\tif(pow==null) {\r\n\t\t\t\t\t\t\treturn new SendResult(\"100001\",\"参数错误\", \"\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(pow.getGatewaycode()==null||pow.getGatewaycode().equals(\"\")||pow.getGatewaycode().equals(\"null\")) {\r\n\t\t\t\t\t\t\tsr.setResultCode(\"-10001\");\r\n\t\t\t\t\t\t\tsr.setResultMsg(\"网关通讯ID不能为空\");\r\n\t\t\t\t\t\t\treturn sr;\r\n\t\t\t\t\t\t}else if(pow.getGatewaycode().length()!=10||pow.getGatewaycode().toUpperCase().matches(\".*[G-Z].*\")) {\r\n\t\t\t\t\t\t\tsr.setResultCode(\"-10002\");\r\n\t\t\t\t\t\t\tsr.setResultMsg(\"网关通讯ID必须为10位十六进制字符串\");\r\n\t\t\t\t\t\t\treturn sr;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(pow==null||\"\".equals(pow.getGatewaycode2())||pow.getGatewaycode2().equals(\"null\")) {\r\n\t\t\t\t\t\t\tsr.setResultCode(\"-10003\");\r\n\t\t\t\t\t\t\tsr.setResultMsg(\"网关唯一ID不能为空\");\r\n\t\t\t\t\t\t\treturn sr;\r\n\t\t\t\t\t\t}else if(pow.getGatewaycode2().length()!=10||pow.getGatewaycode2().toUpperCase().matches(\".*[G-Z].*\")) {\r\n\t\t\t\t\t\t\tsr.setResultCode(\"-10004\");\r\n\t\t\t\t\t\t\tsr.setResultMsg(\"网关唯一ID必须为10位十六进制字符串\");\r\n\t\t\t\t\t\t\treturn sr;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(pow.getRoomcode()==null||pow.getRoomcode().equals(\"\")||pow.getRoomcode().equals(\"null\")) {\r\n\t\t\t\t\t\t\tsr.setResultCode(\"-10005\");\r\n\t\t\t\t\t\t\tsr.setResultMsg(\"门锁编号不能为空\");\r\n\t\t\t\t\t\t\treturn sr;\r\n\t\t\t\t\t\t}else if(pow.getRoomcode().length()!=4||pow.getRoomcode().toUpperCase().matches(\".*[G-Z].*\")) {\r\n\t\t\t\t\t\t\tsr.setResultCode(\"-10006\");\r\n\t\t\t\t\t\t\tsr.setResultMsg(\"门锁编号必须为4位十六进制字符串\");\r\n\t\t\t\t\t\t\treturn sr;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}else {\r\n\t\t\t\t\treturn new SendResult(\"100001\",\"参数错误\", \"\");\r\n\t\t\t\t}\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\t// TODO: handle exception\r\n\t\t\t\treturn new SendResult(\"10008\",\"类型转换错误\",\"\");\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\t\treturn new SendResult(\"100001\",\"参数错误\", \"\");\r\n\t\t}\r\n\t\treturn sr;\r\n\t}",
"public boolean isValidCode(String code)\n {\n for (int i = 0; i < parcels.size(); i++)\n {\n Parcel p = parcels.get(i);\n if (p.getTrackingCode().equalsIgnoreCase(code))\n return true;\n }\n return false;\n }",
"List<ListObject> getSupplimentalCodeList();",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof ServiciosListaPK)) {\n return false;\n }\n ServiciosListaPK other = (ServiciosListaPK) object;\n if (this.codInstitucion != other.codInstitucion) {\n return false;\n }\n// if (this.codEstablecimiento != other.codEstablecimiento) {\n// return false;\n// }\n if (this.codLista != other.codLista) {\n return false;\n }\n if (this.codServicio != other.codServicio) {\n return false;\n }\n return true;\n }",
"public String getCodigoLivro() throws IOException {\r\n ArrayList<String> listLivros = livro.getListLivros();\r\n String codigo = null;\r\n for (int i = 0; i < listLivros.size(); i++) {\r\n if (listLivros.get(i).contains(jComboBoxLivros.getSelectedItem().toString())) {\r\n String[] temp = listLivros.get(i).split(\";\");\r\n codigo = temp[0];\r\n }\r\n }\r\n return codigo;\r\n }",
"private ArrayList limpiar() {//quita espacios en blanco y saltos de linea\n String codigoFuente = ta_source.getText();\n ArrayList retorno = new ArrayList();\n try {\n codigoFuente = codigoFuente.replaceAll(\" \", \"\");\n String aux = \"\";\n byte guardaLinea = 1, guardaBloque = 1;\n for (int i = 0; i < codigoFuente.length(); i++) {\n if (codigoFuente.length() > (i + 1) && codigoFuente.charAt(i) == '/' && codigoFuente.charAt(i + 1) == '/' && guardaBloque == 1) {\n guardaLinea = 0;//0: no guarda\n }\n if (codigoFuente.length() > (i + 1) && codigoFuente.charAt(i) == '/' && codigoFuente.charAt(i + 1) == '*' && guardaLinea == 1) {\n guardaBloque = 0;//0: no guarda\n }\n if (i > 0 && codigoFuente.charAt(i) == '/' && codigoFuente.charAt(i - 1) == '*') {\n guardaBloque = 2;//1: si guarda\n }\n if (codigoFuente.charAt(i) == '\\n' && guardaBloque == 1) {\n guardaLinea = 1;//1: si guarda\n if (aux.length() > 0) {\n retorno.add(aux);\n aux = \"\";\n }\n } else {\n if (i == codigoFuente.length() - 1) {\n aux += codigoFuente.charAt(i);\n retorno.add(aux);\n }\n }\n if (guardaBloque == 1 && guardaLinea == 1 && codigoFuente.charAt(i) != '\\n') {\n aux += codigoFuente.charAt(i);\n }\n if (guardaBloque == 2) {\n guardaBloque--;\n }\n }\n } catch (Exception e) {\n System.out.println(\"errror \" + e.getClass());\n } finally {\n return retorno;\n }\n }",
"public void verifyBugerList()\n\t{\n\t\t\n\t}",
"@Override\n protected void validaRegrasExcluir(ArquivoLoteVO entity) throws AppException {\n\n }",
"public String validarAsociacion(String nombre, String dpi, String codigo_cuenta, String codigo_cliente) {\n String mensaje = \"\";\n DM_Cliente dmcli = new DM_Cliente();\n DM_Solicitud dmsol = new DM_Solicitud();\n try {\n Cliente cliente = dmcli.validarCliente(nombre, dpi);\n PreparedStatement PrSt;\n ResultSet rs = null;\n String Query = \"SELECT * FROM Cuenta WHERE Codigo = ?\";\n PrSt = conexion.prepareStatement(Query);\n PrSt.setString(1, codigo_cuenta);\n if (cliente != null) {\n rs = PrSt.executeQuery();\n if (rs.next()) {\n java.util.Date d = new java.util.Date();\n java.sql.Date fecha = new java.sql.Date(d.getTime());\n Solicitud solicitud = new Solicitud();\n solicitud.setEmisor(codigo_cliente);\n solicitud.setReceptor(cliente.getCodigo());\n solicitud.setCodigo_cuenta(codigo_cuenta);\n solicitud.setEstado(\"Pendiente\");\n solicitud.setFecha(fecha);\n mensaje = dmsol.agregarSolicitud(solicitud);\n } else {\n mensaje = \"La cuenta no existe\";\n }\n } else {\n mensaje = \"El dueño de la cuenta no existe\";\n }\n PrSt.close();\n rs.close();\n } catch (SQLException e) {\n System.out.println(e.toString());\n }\n return mensaje;\n }",
"private void miInregistrareActionPerformed(java.awt.event.ActionEvent evt) { \n try {\n int n = Integer.parseInt(JOptionPane.showInputDialog(rootPane, \"Introduceti codul de validare:\", \"Confirmare\", JOptionPane.QUESTION_MESSAGE));\n if (n == cod) {\n // In cazul introducerii codului de inregistrare corect, toate functionalitatile aplicatiei devin accesibile, altfel se genereaza exceptie\n lblReclama.setVisible(false);\n miDeschidere.setEnabled(true);\n miSalvare.setEnabled(true);\n miInregistrare.setEnabled(false);\n btnAdauga.setEnabled(true);\n btnModifica.setEnabled(true);\n btnSterge.setEnabled(true);\n lblCod.setVisible(false);\n cbFiltre.setEnabled(true);\n cbOrdonari.setEnabled(true);\n tfPersonalizat.setEditable(true);\n } else {\n throw new NumberFormatException();\n }\n } catch (NumberFormatException numberFormatException) {\n JOptionPane.showMessageDialog(null, \"Cod de validare eronat!\");\n }\n\n }",
"public ArrayList<Cuenta> verCuentasDeCliente(String codigo_cliente) {\n ArrayList<Cuenta> lista = new ArrayList<>();\n try {\n PreparedStatement PrSt;\n ResultSet rs = null;\n String Query = \"SELECT * FROM Cuenta where Codigo_Cliente = ?\";\n PrSt = conexion.prepareStatement(Query);\n PrSt.setString(1, codigo_cliente);\n rs = PrSt.executeQuery();\n while (rs.next()) {\n Cuenta cuenta = new Cuenta();\n cuenta.setCodigo(rs.getString(\"Codigo\"));\n cuenta.setCreacion(rs.getDate(\"Creacion\"));\n cuenta.setCredito(rs.getDouble(\"Credito\"));\n lista.add(cuenta);\n }\n PrSt.close();\n rs.close();\n } catch (Exception e) {\n System.out.println(e.toString());\n }\n return lista;\n }",
"public boolean validar_ingresoUsuario_inasistencia(ArrayList<JTextField> ar){\n\t\t\tfor(JTextField tf : ar){\n\t\t\t\t\n\t\t\t\tif(!validarInt(tf.getText())) return false;\n\t\t\t\tif(tf.getText().length() >30) return false;\n\t\t\t\t//if(numero < 0) return false;\n\t\t\t\tif(numero < 0) return false;\n\t\t\t}\n\t\t\n\t\treturn true;\n\t}",
"public CodeBook getCodificacion(){\n CodeBook res=new CodeBook();\n \n //Se obtiene los valores ni\n ArrayList<Integer> n=obtenerNi(obtenerYi());\n \n //Se asigna a cada carácter un código\n ArrayList<String> candidatos;\n int i=0;\n int cont_alfa=0;\n int nd=0;\n \n // Se comprueba para cada ni si es mayor que 0, en cuyo caso, se generan\n // los posibles códigos de longitud i que quedan libres y se asignan.\n while (i<n.size()){\n nd=nd*base;\n int cont=n.get(i);\n if (cont>0){\n candidatos=generaCod(i+1,nd);\n int cod=0;\n while (cont>0){\n res.add(alfabeto.getN(cont_alfa), candidatos.get(cod));\n nd++;\n cont_alfa++;\n cod++;\n cont--;\n }\n }\n i++;\n } \n return res;\n }",
"public Boolean edit(Paciente codigo) {\r\n\t\t\tlogger.debug(\"Editing codigo with id: \" + codigo.getId());\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\t/*for (Paciente p:codigos) {\r\n\t\t\t\t\tif (p.getId().longValue() == codigo.getId().longValue()) {\r\n\t\t\t\t\t\tlogger.debug(\"Found record\");\r\n\t\t\t\t\t\tcodigos.remove(p);\r\n\t\t\t\t\t\tcodigos.add(codigo);\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}*/\r\n\t\t\t\t\r\n\t\t\t\tlogger.debug(\"No records found\");\r\n\t\t\t\treturn false;\r\n\t\t\t\t\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tlogger.error(e);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}",
"public void telefonoAgregar() {\r\n\t\t\tlog.info(\"telefono agregar \" + nuevoTelef.getTelefono());\r\n\t\tif( nuevoTelef.getTelefono()==null||nuevoTelef.getTelefono().equals(\"\")){\r\n\t\t\tmensaje= \"Debe ingresar un número telefónico\";\r\n\t\t\tmsg = new FacesMessage(FacesMessage.SEVERITY_FATAL,\r\n\t\t\tConstants.MESSAGE_ERROR_FATAL_TITULO, mensaje);\r\n\t\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\r\n\t\t\t}\r\n\t\telse{\r\n\t\t\tlog.info(\"telefono agregar \" + nuevoTelef.getTelefono());\r\n\t\t\tboolean verifica = false;\r\n\t\t\tmensaje = null;\r\n\t\tif (TipoTelef == 1)\r\n\t\t\tnuevoTelef.setTipotelefono(\"F\");\r\n\t\telse\r\n\t\t\tnuevoTelef.setTipotelefono(\"C\");\r\n\t\t// claro\r\n\t\tif (operadorTelefonico == 1)\r\n\t\t\tnuevoTelef.setOperadorTelefonico(\"Claro\");\r\n\t\telse if (operadorTelefonico == 2)\r\n\t\t\tnuevoTelef.setOperadorTelefonico(\"Movistar\");\r\n\t\telse if (operadorTelefonico == 3)\r\n\t\t\tnuevoTelef.setOperadorTelefonico(\"Nextel\");\r\n\t\t\tnuevoTelef.setNuevoT(1);\r\n\t\t\tnuevoTelef.setIdtelefonopersona(0);\r\n\t\t\tnuevoTelef.setTbEstadoGeneral(objEstadoGeneralService.findEstadogeneral(17));\r\n\t\tfor (int i = 0; i < TelefonoPersonaList.size(); i++) {\r\n\t\t\tlog.info(\" \" + TelefonoPersonaList.get(i).getTelefono() + \" \"\t+ nuevoTelef.getTelefono());\r\n\t\t\tif (TelefonoPersonaList.get(i).getTelefono().equals(nuevoTelef.getTelefono())) {\r\n\t\t\t\tverifica = false;\r\n\t\t\t\tmensaje = \"el telefono ya se encuentra registrado en la lista de referencias\";\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tverifica = true;\r\n\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (TelefonoPersonaList.size() == 0) {\r\n\t\t\tverifica = true;\r\n\t\t\t}\r\n\t\t\tif (verifica) {\r\n\t\t\t\t//int cantidad=TelefonoPersonaList.size();\r\n\t\t\t\tnuevoTelef.setItem(\"Por Agregar\");\t\r\n\t\t\t\tTelefonoPersonaList.add(nuevoTelef);\r\n\t\t\t\tlog.info(\"se agrego \" + nuevoTelef.getTelefono());\r\n\t\t\t }\r\n\t\t\tif (mensaje != null) {\r\n\t\t\tmsg = new FacesMessage(FacesMessage.SEVERITY_FATAL,\r\n\t\t\tConstants.MESSAGE_ERROR_FATAL_TITULO, mensaje);\r\n\t\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\r\n\t\t\t}\r\n\t\t\tnuevoTelef = new TelefonoPersonaSie();\r\n\t\t\t}\r\n\t}",
"public List<Instruccion> emite(List<Instruccion> cod1, Instruccion cod2) {\r\n\t\t\tcod1.add(cod2);\r\n\t\t\treturn cod1;\r\n\t}",
"private void gerarLaudosProcedimentosCirurgicos(\r\n\t\t\tMpmPrescricaoMedica prescricao, List<MpmLaudo> laudoList) throws ApplicationBusinessException {\r\n\r\n\t\tMap<MpmPrescricaoProcedimento, FatProcedHospInternos> procedimentosMap = this\r\n\t\t\t\t.getConfirmarPrescricaoMedicaRN()\r\n\t\t\t\t.listarProcedimentosCirurgicosGeracaoLaudos(prescricao);\r\n\r\n\t\tMpmLaudo laudo = null;\r\n\r\n\t\tfor (MpmPrescricaoProcedimento procedimento : procedimentosMap.keySet()) {\r\n\r\n\t\t\tlaudo = new MpmLaudo();\r\n\t\t\tlaudo.setDthrInicioValidade(prescricao.getDthrInicio());\r\n\r\n\t\t\tDate dataFimValidade = prescricao.getDthrInicio();\r\n\t\t\tif (procedimento.getDuracaoTratamentoSolicitado() != null) {\r\n\t\t\t\tdataFimValidade = DateUtil.adicionaDias(dataFimValidade,\r\n\t\t\t\t\t\tprocedimento.getDuracaoTratamentoSolicitado()\r\n\t\t\t\t\t\t\t\t.intValue() - 1);\r\n\t\t\t}\r\n\t\t\tlaudo.setDthrFimValidade(dataFimValidade);\r\n\t\t\tlaudo.setDthrFimPrevisao(dataFimValidade);\r\n\r\n\t\t\tlaudo.setJustificativa(procedimento.getJustificativa());\r\n\t\t\tlaudo.setContaDesdobrada(false);\r\n\t\t\tlaudo.setImpresso(false);\r\n\t\t\tlaudo.setDuracaoTratSolicitado(procedimento\r\n\t\t\t\t\t.getDuracaoTratamentoSolicitado());\r\n\t\t\tlaudo.setLaudoManual(false);\r\n\t\t\tlaudo.setAtendimento(prescricao.getAtendimento());\r\n\t\t\tlaudo.setPrescricaoProcedimento(procedimento);\r\n\t\t\tlaudo.setProcedimentoHospitalarInterno(procedimentosMap\r\n\t\t\t\t\t.get(procedimento));\r\n\r\n\t\t\tthis.adicionarLaudoLista(laudoList, laudo);\r\n\r\n\t\t}\r\n\r\n\t}",
"private void verificarCodigoErro() {\n\t\ttry {\n\t\t\tif (resultado.getStatus().isCodigoErro() && emailReplicacaoServico != null) {\n\t\t\t\tExecucaoReplicacaoUtil.log(\"Enviando e-mail de erro.\");\n\t\t\t\tenviarEmailErro();\n\t\t\t}\n\t\t} catch (BancoobException e) {\n\t\t\tExecucaoReplicacaoUtil.log(e.getMessage());\n\t\t}\n\t}",
"private void verificaUnicitaAccertamento() {\n\t\t\n\t\t//chiamo il servizio ricerca accertamento per chiave\n\t\tRicercaAccertamentoPerChiave request = model.creaRequestRicercaAccertamento();\n\t\tRicercaAccertamentoPerChiaveResponse response = movimentoGestioneService.ricercaAccertamentoPerChiave(request);\n\t\tlogServiceResponse(response);\n\t\t// Controllo gli errori\n\t\tif(response.hasErrori()) {\n\t\t\t//si sono verificati degli errori: esco.\n\t\t\taddErrori(response);\n\t\t} else {\n\t\t\t//non si sono verificatui errori, ma devo comunque controllare di aver trovato un accertamento su db\n\t\t\tcheckCondition(response.getAccertamento() != null, ErroreCore.ENTITA_NON_TROVATA.getErrore(\"Movimento Anno e numero\", \"L'impegno indicato\"));\n\t\t\tmodel.setAccertamento(response.getAccertamento());\n\t\t}\n\t}",
"public List<Catalogo> buscarPorNemonico(final String codigo) throws DaoException {\n try {\n return buscarPorConsultaNombrada(Catalogo.BUSCAR_POR_NEMONICO, codigo);\n } catch (DaoException ex) {\n Logger.getLogger(CatalogoDao.class.getName()).log(Level.SEVERE, null, ex);\n throw new DaoException(ex);\n }\n }",
"void codificarArticuloLeyMercado(ArticuloLeyMercadoDTO articuloLeyMercadoDTO) throws SICException;",
"void incluir(List<TabelaIRRFLegadoDTO> lstTabelaIRRF) throws BancoobException;",
"public List<EntradaDeMaterial> buscarEntradasDisponibles(Almacen a);",
"public void cargarListaTipoComprobanteSRI()\r\n/* 675: */ {\r\n/* 676:746 */ this.listaTipoComprobanteSRI = this.servicioSRI.buscarPorTipoIdentificacion(this.facturaProveedorSRI.getTipoIdentificacion());\r\n/* 677: */ }",
"boolean isCodeAlreadyExists(String codeListId, Code code);",
"private boolean validarProcesoFianciacionIncumplido(String numeroObligacion) {\n\n boolean proceso = false;\n\n StringBuilder jpql = new StringBuilder();\n jpql.append(\"SELECT o FROM ObligacionFinanciacion o\");\n jpql.append(\" JOIN o.financiacion f\");\n jpql.append(\" JOIN f.proceso p\");\n jpql.append(\" WHERE o.numeroObligacion = :numeroObligacion\");\n jpql.append(\" AND p.estadoProceso.id = :estadoProceso\");\n\n Query query = em.createQuery(jpql.toString());\n query.setParameter(\"numeroObligacion\", numeroObligacion);\n query.setParameter(\"estadoProceso\", EnumEstadoProceso.ECUADOR_FINANCIACION_INCUMPLIDO.getId());\n\n @SuppressWarnings(\"unchecked\")\n List<ObligacionFinanciacion> procesos = query.getResultList();\n if (procesos != null && !procesos.isEmpty()) {\n proceso = true;\n }\n return proceso;\n }",
"private void checkIntentInformation() {\n Bundle extras = getIntent().getExtras();\n Gson gson = new Gson();\n if (extras != null) {\n Curso aux;\n aux = (Curso) getIntent().getSerializableExtra(\"addCurso\");\n if (aux == null) {\n aux = (Curso) getIntent().getSerializableExtra(\"editCurso\");\n if (aux != null) {//Accion de actualizar\n //found an item that can be updated\n String cursoU = \"\";\n cursoU = gson.toJson(aux);\n\n apiUrlTemp = apiUrlAcciones+\"acc=updateC\" +\"&cursoU=\"+cursoU +\"&profesor_id=\"+aux.getProfesor().getCedula();\n MyAsyncTasksCursoOperaciones myAsyncTasksOp = new MyAsyncTasksCursoOperaciones();\n myAsyncTasksOp.execute();\n }\n } else {//Accion de agregar\n //found a new Curso Object\n String cursoA = \"\";\n cursoA = gson.toJson(aux);\n\n apiUrlTemp = apiUrlAcciones+\"acc=addC\" +\"&cursoA=\"+cursoA +\"&profesor_id=\"+aux.getProfesor().getCedula();\n MyAsyncTasksCursoOperaciones myAsyncTasksOp = new MyAsyncTasksCursoOperaciones();\n myAsyncTasksOp.execute();\n }\n }\n }",
"private void gerarLaudoPermanenciaMaior(MpmPrescricaoMedica prescricao,\r\n\t\t\tList<MpmLaudo> laudoList, FatConvenioSaudePlano convenioSaudePlano,\r\n\t\t\tAghParametros seqLaudoMaiorPermanencia) {\r\n\t\tMpmTipoLaudoConvenio tipoLaudoConvenio = this\r\n\t\t\t\t.getMpmTipoLaudoConvenioDAO()\r\n\t\t\t\t.obterTempoValidadeTipoLaudoPermanenciaMaior(\r\n\t\t\t\t\t\tseqLaudoMaiorPermanencia.getVlrNumerico().shortValue(),\r\n\t\t\t\t\t\tconvenioSaudePlano);\r\n\r\n\t\tif (tipoLaudoConvenio != null) {\r\n\r\n\t\t\tShort quantidadeDiasFaturamento = 0;\r\n\t\t\tShort diasPermanenciaMaior = 0;\r\n\r\n\t\t\tMpmTipoLaudo tipoLaudoMaiorPermanencia = this.getMpmTipoLaudoDAO()\r\n\t\t\t\t\t.obterPorChavePrimaria(\r\n\t\t\t\t\t\t\tseqLaudoMaiorPermanencia.getVlrNumerico()\r\n\t\t\t\t\t\t\t\t\t.shortValue());\r\n\r\n\t\t\tif (prescricao.getAtendimento().getInternacao() != null) {\r\n\t\t\t\tif (prescricao.getAtendimento()\r\n\t\t\t\t\t\t.getInternacao().getItemProcedimentoHospitalar() != null){\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (prescricao.getAtendimento()\r\n\t\t\t\t\t.getInternacao().getItemProcedimentoHospitalar()\r\n\t\t\t\t\t.getQuantDiasFaturamento() != null){\r\n\t\t\t\t\t\tquantidadeDiasFaturamento = prescricao.getAtendimento()\r\n\t\t\t\t\t\t.getInternacao().getItemProcedimentoHospitalar()\r\n\t\t\t\t\t\t.getQuantDiasFaturamento();\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tdiasPermanenciaMaior = prescricao.getAtendimento()\r\n\t\t\t\t\t.getInternacao().getItemProcedimentoHospitalar()\r\n\t\t\t\t\t.getDiasPermanenciaMaior();\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (diasPermanenciaMaior == null || diasPermanenciaMaior > 0){\r\n\t\t\t\t\r\n\t\t\t\tInteger adicionalDias = 0;\r\n\t\t\t\tif (quantidadeDiasFaturamento != null) {\r\n\t\t\t\t\tadicionalDias = (quantidadeDiasFaturamento * 2) + 1;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif (DateUtil.validaDataTruncadaMaiorIgual(new Date(), DateUtil\r\n\t\t\t\t\t\t.adicionaDias(prescricao.getAtendimento().getInternacao()\r\n\t\t\t\t\t\t\t\t.getDthrInternacao(), adicionalDias))) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (this.getMpmLaudoDAO()\r\n\t\t\t\t\t\t\t.obterCountLaudosPorTipoEAtendimento(\r\n\t\t\t\t\t\t\t\t\tprescricao.getAtendimento(),\r\n\t\t\t\t\t\t\t\t\ttipoLaudoMaiorPermanencia) <= 0) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tMpmLaudo laudo = new MpmLaudo();\r\n\t\t\t\t\t\tlaudo.setDthrInicioValidade(prescricao.getAtendimento()\r\n\t\t\t\t\t\t\t\t.getInternacao().getDthrInternacao());\r\n\t\t\t\t\t\tlaudo.setContaDesdobrada(false);\r\n\t\t\t\t\t\tlaudo.setImpresso(false);\r\n\t\t\t\t\t\tlaudo.setLaudoManual(false);\r\n\t\t\t\t\t\tlaudo.setAtendimento(prescricao.getAtendimento());\r\n\t\t\t\t\t\tlaudo.setTipoLaudo(tipoLaudoMaiorPermanencia);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tlaudoList.add(laudo);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private Long devuelveProyectoCarreraId(List<ProyectoCarreraOferta> proyectoCarreras, ProyectoCarreraOferta pc) {\r\n Long var = 0L;\r\n for (ProyectoCarreraOferta pco : proyectoCarreras) {\r\n if (pco.getCarreraId().equals(pc.getCarreraId())) {\r\n var = pco.getId();\r\n break;\r\n }\r\n }\r\n return var;\r\n }",
"public Paciente add(Paciente codigo) {\r\n\t\t\tlogger.debug(\"Adding new codigo\");\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\t// Find suitable id\r\n\t\t\t\tLong newId = 0L;\r\n\t\t\t\tBoolean hasFoundSuitableId = false;\r\n\t\t\t\t/*while(hasFoundSuitableId == false) {\r\n\t\t\t\t\tfor (int i=0; i <codigos.size(); i++) {\r\n\t\t\t\t\t\tif (codigos.get(i).getId().longValue() == newId.longValue()) {\r\n\t\t\t\t\t\t\tnewId++;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Exit while loop\r\n\t\t\t\t\t\tif(i==codigos.size()-1) {\r\n\t\t\t\t\t\t\tlogger.debug(\"Assigning id: \" + newId);\r\n\t\t\t\t\t\t\thasFoundSuitableId = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// Assign new id\r\n\t\t\t\tcodigo.setId(newId);\r\n\t\t\t\t// Add to list\r\n\t\t\t\tcodigos.add(codigo);*/\r\n\t\t\t\t\r\n\t\t\t\tlogger.debug(\"Added new codigo\");\r\n\t\t\t\treturn codigo;\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tlogger.error(e);\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t}",
"public void ValidarLetra() {\n\t\t\n\t\tString valorCampo = \"\";\n\t\t\n\t\tif (campo == 1) {\n\t\t\t\n\t\t\tvalorCampo = textCampo1.getText();\n\t\t}\n\t\telse if (campo == 2) {\n\t\t\t\n\t\t\t valorCampo = textCampo2.getText();\n\t\t}\n\t\t\n\t\telse if (campo == 3) {\n\t\t\t\n\t\t\tvalorCampo = textCampo3.getText();\n\t\t}\n\t\t\n\t\telse if (campo == 4) {\n\t\t\t\n\t\t\tvalorCampo = textCampo4.getText();\n\t\t}\n\t\t\n\t\telse if (campo == 5) {\n\t\t\t\n\t\t\tvalorCampo = textCampo5.getText();\n\t\t}\n\n\t\telse if (campo == 6) {\n\t\t\t\n\t\t\tvalorCampo = textCampo6.getText();\n\t\t}\n\t\t\n\t\telse if (campo == 7) {\n\t\t\t\n\t\t\tvalorCampo = textCampo7.getText();\n\t\t}\n\t\t\n\t\telse if (campo == 8) {\n\t\t\t\n\t\t\tvalorCampo = textCampo8.getText();\n\t\t}\n\t\t\n\t\telse if (campo == 9) {\n\t\t\t\n\t\t\tvalorCampo = textCampo9.getText();\n\t\t}\n\t\t\n\t\telse if (campo == 10) {\n\t\t\t\n\t\t\tvalorCampo = textCampo10.getText();\n\t\t}\n\n\t\t \n\t\tboolean existe = palabra.contains(valorCampo);\n\t\t \n\t\t System.out.println(\" \"+existe);\n\n\n\t\t\n\t\t\n\t\tSystem.out.println(\"probando campo \"+campo);\n\t\t\n\t\t/*campo = 0;*/\n\t\t\n\t\t//System.out.println(\" inicializa \"+campo);\n\n\t}",
"public ArrayList<String> Info_Disc_Pel_Compras_usu(String genero, String usuario) {\r\n ArrayList<String> Lista_nombre = Info_Disco_Pel_Rep1(genero);\r\n ArrayList<String> Lista_datos_compras = new ArrayList();\r\n String line;\r\n try (BufferedReader br = new BufferedReader(new FileReader(\"src/Archivos/Compra_Peliculas.txt\"))) {\r\n while ((line = br.readLine()) != null) {\r\n String[] info_disco_compra = line.split(\";\");\r\n for (int s = 0; s < Lista_nombre.size(); s++) {\r\n if (Lista_nombre.get(s).equals(info_disco_compra[3]) & info_disco_compra[0].equals(usuario)) {\r\n Lista_datos_compras.add(info_disco_compra[3]);\r\n Lista_datos_compras.add(info_disco_compra[5]);\r\n }\r\n }\r\n }\r\n } catch (IOException ex) {\r\n System.out.println(ex);\r\n }\r\n return Lista_datos_compras;\r\n }",
"public void livrosLidos(Livro livro){\n\n Boolean enviar = true;\n\n LivroLido livrol = new LivroLido();\n\n //setando o valor do id livro lid\n livrol.setIdLivro(livro.getId());\n\n //saber se o livro já foi enviado\n if(myBooksDb.daoLivrosLidos().idLivros(livro.getId()) == livro.getId()){\n enviar = false;\n Toast.makeText(getContext(),\"O livro já se encontra em livros lidos\", Toast.LENGTH_SHORT).show();\n }\n //verificar se o livro esta em outra tela\n else if(myBooksDb.daoLivroLer().idLivros(livro.getId()) == livro.getId()){\n enviar = false;\n tranferirLidos(livro.getId(),livrol);\n }\n\n if(enviar == true){\n myBooksDb.daoLivrosLidos().inserir(livrol);\n }\n\n }",
"private ArrayList<Integer> getListOnCode(String code) {\n\t\tArrayList<Integer> list = new ArrayList<Integer>();\n\t\tfor (int i = 0; i < copyOfChunks.size(); i++) {\n\t\t\tif (copyOfChunks.get(i).getCode().equals(code)) {\n\t\t\t\tlist.add(i);\n\t\t\t}\n\t\t}\n\t\treturn list;\n\t}",
"private static ArrayList<Compra> listComprasDoCliente(int idCliente) throws Exception {//Inicio mostraCompras\r\n ArrayList<Compra> lista = arqCompra.toList();\r\n lista.removeIf(c -> c.idCliente != idCliente);\r\n return lista;\r\n }",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof Recibos)) {\n return false;\n }\n Recibos other = (Recibos) object;\n if ((this.codRecibo == null && other.codRecibo != null) || (this.codRecibo != null && !this.codRecibo.equals(other.codRecibo))) {\n return false;\n }\n return true;\n }",
"public ArrayList<ComentarioComp> listaComentarioNoRespondido() {\n ArrayList<ComentarioComp> lista = new ArrayList<>();\n try {\n Connection conn = DriverManager.getConnection(CONN, USER, PASS);\n\n Statement st = conn.createStatement();\n ResultSet rs = st.executeQuery(\"select co.nombre, c.nombreUsuario, c.descripcion, c.fecha, c.valoracion\\n\" +\n\"from Comentarios c join Comercios co on c.id_comercio = co.id_comercio\\n\" +\n\"where id_comentario not in (select id_comentario from Respuestas r )\");\n\n while (rs.next()) {\n String nombreC = rs.getString(1);\n String nombre = rs.getString(2);\n String descripcion = rs.getString(3);\n String fecha = rs.getString(4);\n int valoracion = rs.getInt(5);\n\n ComentarioComp c = new ComentarioComp(nombreC, nombre, descripcion, fecha, valoracion);\n\n lista.add(c);\n }\n\n st.close();\n conn.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n\n return lista;\n }",
"public RegistroHuellasDigitalesDto registrarHuellasDigitalesSistemas(ListaRegistroHuellasDigitalesDto pSolicitud) {\n\t\tLOG.info(\"Ingresando registrarHuellasDigitalesSistemaContribuyente >>\"+pSolicitud.getListaRegistroHuellasDigitales().size());\n\t\tRegistroHuellasDigitalesDto vRespuesta = new RegistroHuellasDigitalesDto();\n\t\n\t\tif(pSolicitud.getListaRegistroHuellasDigitales().size() > 0) { \n\t\t\tValRegistroHuellaServiceImpl vValRegistroArchivo = new ValRegistroHuellaServiceImpl(mensajesDomain);\n\t\t\tvValRegistroArchivo.validarSolicitudRegistroHuellaDigital(pSolicitud.getListaRegistroHuellasDigitales().get(0));\n\t\t\tif(vValRegistroArchivo.isValido() ) {\n\t\t\t\tList<SreComponentesCertificadosTmp> vSreCompCertTmp = new ArrayList<>();\n\t\t\t\tvSreCompCertTmp = iComponentesCertificadosTmpDomain.obtenerComponenteCertificadoTmpPorSistemaId(pSolicitud.getListaRegistroHuellasDigitales().get(0).getSistemaId());\n\t\t\t\tif(vSreCompCertTmp != null && vSreCompCertTmp.size() > 0) {\t\t\t\n\t\t\t\t\tSystem.out.println(\"Existen Registros \"+vSreCompCertTmp.size() +\" Sistema_id\"+pSolicitud.getListaRegistroHuellasDigitales().get(0).getSistemaId());\n\t\t\t\t\tactualizarEstadoComponenteCertificado(vSreCompCertTmp);\t\n\t\t\t\t}else {\n\t\t\t\t\tSystem.out.println(\"No existen registros en SreComponentesCertificadosTmp\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tRegistroHuellasDigitalesDto registroHuellasDigitales = null;\n\t\t\t\tfor (RegistroHuellasDigitalesDto registroHuellasDigitalesDto : pSolicitud.getListaRegistroHuellasDigitales()) {\n\t\t\t\t\tregistroHuellasDigitales = registrarHuellaDigitalSistemaContribuyente(registroHuellasDigitalesDto);\n\t\t\t\t\tif(registroHuellasDigitales.isOk()) {\n\t\t\t\t\t\tvRespuesta.setOk(true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\tvRespuesta.setOk(false);\n\t\t\t\tvRespuesta.addMensaje(mensajesDomain.getMensaje(EnumSubsistema.RECAUDACIONES,EnumFacturacionTipoMensaje.VALIDACION_DATOS_ENTRADA_RECHAZADO));\n\t\t\t}\n\t\t}else {\n\t\t\tvRespuesta.setOk(false);\n\t\t\tvRespuesta.addMensaje(mensajesDomain.getMensaje(EnumSubsistema.RECAUDACIONES,EnumFacturacionTipoMensaje.VALIDACION_DATOS_ENTRADA_RECHAZADO));\n\t\t}\t\n\t\treturn vRespuesta;\n\t}",
"public static boolean busca_id(List<Funcionario_lista> list, int id) {\n Funcionario_lista funcionario = list.stream().filter(x -> x.getId() == id).findFirst().orElse(null);\n return funcionario != null;\n }",
"@Override\n\tpublic boolean verificaAgencia(String codigo)\n\t{\n\t\tchar[] digitos = capturaDigitos(codigo, 4, 0);\n\t\treturn (digitos != null);\n\t}",
"@Test\n\tpublic void test_validate_string_list() throws Exception {\n\t\tArrayList<Data> rawList = new ArrayList<Data>();\n\t\trawList.add(new Data(\"subData\", \"integer\", 12, false, false, false));\n\t\tData list = new Data(\"list\", \"description\", rawList, false, false, false);\n\t\t\n\t\tHashMap<String, Data> rawParent = new HashMap<String, Data>();\n\t\trawParent.put(\"list\", list);\n\t\t\n\t\tData parent = new Data(\"parent\", \"parent\", rawParent, false,false,false);\n\t\t\n\t\tChemistryProjectGlobalValidation c = new ChemistryProjectGlobalValidation();\n\t\t\n\t\t//fail becuase list contains an integer element\n\t\tassertNotEquals(null, c.containsStringList(parent, \"list\"));\n\t\t\n\t\t//fail because key doesnt exist\n\t\tassertNotEquals(null, c.containsStringList(parent, \"non existant \"));\n\t\t\n\t\t//fail because key exists but is not list type\n\t\tassertNotEquals(null, c.containsStringList(list, \"subData\"));\n\t}",
"List<Reservation> trouverlisteDeReservationAyantUneDateDenvoieDeMail();",
"public static void validCode(String code) {\n Participation participation = Participation.find(\"byCode\", code).first();\n if (participation != null) {\n participation.status = participation.status.next();\n participation.code = UUID.randomUUID().toString();\n participation.save();\n Event event = participation.event;\n render(\"Inscription/show.html\", event);\n } else {\n // TODO\n // flash(\"alerte\", \"Cannot valid participation\");\n }\n }",
"public Object[] getCbo_ReqCd_Add() throws SQLException, Exception {\r\n\t\tConnection conn = null;\r\n\t\tPreparedStatement pstmt = null;\r\n\t\tResultSet rs = null;\r\n\t\tStringBuffer strQuery = new StringBuffer();\r\n\t\tArrayList<HashMap<String, String>> rtList = new ArrayList<HashMap<String, String>>();\r\n\t\tHashMap<String, String>\t\t\t rst\t\t = null;\r\n\t\tObject[]\t\t rtObj\t\t = null;\r\n\r\n\t\tConnectionContext connectionContext = new ConnectionResource();\r\n\t\ttry {\r\n\t\t\tconn = connectionContext.getConnection();\r\n\r\n\t\t\tstrQuery.setLength(0);\r\n\t\t\tstrQuery.append(\"select cm_micode,cm_codename from cmm0020 \\n\");\r\n\t\t\tstrQuery.append(\" where cm_macode='REQUEST' and cm_micode<'10' \\n\");\r\n\t\t\tstrQuery.append(\" and cm_micode<>'****' and cm_closedt is null \\n\");\r\n\t\t\tstrQuery.append(\" order by cm_micode \\n\");\r\n\t\t pstmt = conn.prepareStatement(strQuery.toString());\r\n\t\t\trs = pstmt.executeQuery();\r\n\t\t\trst = new HashMap<String,String>();\r\n\t\t\trst.put(\"cm_micode\",\"ALL\");\r\n\t\t\trst.put(\"cm_codename\",\"전체\");\r\n\t\t\trtList.add(rst);\r\n\t\t\trst = null;\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\trst = new HashMap<String,String>();\r\n\t\t\t\trst.put(\"cm_micode\",rs.getString(\"cm_micode\"));\r\n\t\t\t\trst.put(\"cm_codename\",rs.getString(\"cm_codename\"));\r\n\t\t\t\trtList.add(rst);\r\n\t\t\t\trst = null;\r\n\t\t\t}\r\n\r\n\t\t\trs.close();\r\n\t\t\tpstmt.close();\r\n\t\t\tconn.close();\r\n\t\t rs = null;\r\n\t\t pstmt = null;\r\n\t\t conn = null;\r\n\r\n\t\t\trtObj = rtList.toArray();\r\n\t\t\trtList.clear();\r\n\t\t\trtList = null;\r\n\r\n\t\t\treturn rtObj;\r\n\r\n\t\t} catch (SQLException sqlexception) {\r\n\t\t\tif (conn != null){\r\n\t\t\t\tconn.close();conn = null;\r\n\t\t\t}\r\n\t\t\tsqlexception.printStackTrace();\r\n\t\t\tthrow sqlexception;\r\n\t\t} catch (Exception exception) {\r\n\t\t\tif (conn != null){\r\n\t\t\t\tconn.close();conn = null;\r\n\t\t\t}\r\n\t\t\texception.printStackTrace();\r\n\t\t\tthrow exception;\r\n\t\t}finally{\r\n\t\t\tif (strQuery != null)\tstrQuery = null;\r\n\t\t\tif (rtObj != null)\trtObj = null;\r\n\t\t\tif (rs != null) try{rs.close();}catch (Exception ex){ex.printStackTrace();}\r\n\t\t\tif (pstmt != null) try{pstmt.close();}catch (Exception ex2){ex2.printStackTrace();}\r\n\t\t\tif (conn != null){\r\n\t\t\t\ttry{\r\n\t\t\t\t\tConnectionResource.release(conn);\r\n\t\t\t\t}catch(Exception ex3){\r\n\t\t\t\t\tex3.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n }",
"public List<NotaDeCredito> procesar();",
"public void validaCadastro(List<ProdutoModel> produto) {\n\n if (produto.size() == 0) {\n cadastraProduto();\n } else {\n JOptionPane.showMessageDialog(null, \"Produto existente\");\n jtf_nome.requestFocus();\n }\n }",
"public List<DAPMessage> findUnreadByType(String code) throws org.fermat.fermat_dap_plugin.layer.network.service.asset.transmission.developer.version_2.exceptions.CantReadRecordDataBaseException {\n\n if (code == null) {\n throw new IllegalArgumentException(\"The code type is required, can not be null\");\n }\n\n List<DAPMessage> listDAPMessage = new ArrayList<DAPMessage>();\n DAPMessage dapMessage = null;\n\n try {\n\n /*\n * 1 - load the data base to memory with filter\n */\n DatabaseTable dapMessagesTable = getDAPMessagesTable();\n dapMessagesTable.addStringFilter(CommunicationNetworkServiceDatabaseConstants.DAP_MESSAGE_STATUS_COLUMN_NAME, MessageStatus.NEW_RECEIVED.getCode(), DatabaseFilterType.EQUAL);\n dapMessagesTable.addStringFilter(CommunicationNetworkServiceDatabaseConstants.DAP_MESSAGE_TYPE_COLUMN_NAME, code, DatabaseFilterType.EQUAL);\n dapMessagesTable.loadToMemory();\n\n /*\n * 2 - read all records\n */\n List<DatabaseTableRecord> records = dapMessagesTable.getRecords();\n\n\n /*\n * 3 - Convert into DAPMessage objects\n */\n for (DatabaseTableRecord record : records) {\n\n /*\n * 3.1 - Create and configure a DAPMessage\n */\n dapMessage = constructFrom(record);\n listDAPMessage.add(dapMessage);\n }\n\n } catch (CantLoadTableToMemoryException cantLoadTableToMemory) {\n // Register the failure.\n StringBuffer contextBuffer = new StringBuffer();\n contextBuffer.append(\"Database Name: \" + CommunicationNetworkServiceDatabaseConstants.DATA_BASE_NAME);\n\n String context = contextBuffer.toString();\n String possibleCause = \"The data no exist\";\n org.fermat.fermat_dap_plugin.layer.network.service.asset.transmission.developer.version_2.exceptions.CantReadRecordDataBaseException cantReadRecordDataBaseException = new org.fermat.fermat_dap_plugin.layer.network.service.asset.transmission.developer.version_2.exceptions.CantReadRecordDataBaseException(org.fermat.fermat_dap_plugin.layer.network.service.asset.transmission.developer.version_2.exceptions.CantReadRecordDataBaseException.DEFAULT_MESSAGE, cantLoadTableToMemory, context, possibleCause);\n throw cantReadRecordDataBaseException;\n }\n\n return listDAPMessage;\n }",
"private void creaAddebitiGiornoConto(Date data, int codConto) {\n /* variabili e costanti locali di lavoro */\n boolean continua;\n Filtro filtro;\n int[] interi;\n ArrayList<Integer> codici = null;\n Modulo modAddFisso;\n Modulo modConto;\n boolean chiuso;\n\n try { // prova ad eseguire il codice\n\n /* controllo se il conto e' aperto */\n modConto = Albergo.Moduli.Conto();\n chiuso = modConto.query().valoreBool(Conto.Cam.chiuso.get(), codConto);\n continua = (!chiuso);\n\n if (continua) {\n\n /* filtro che isola gli addebiti fissi da eseguire\n * per il giorno e il conto dati */\n filtro = this.getFiltroFissiGiornoConto(data, codConto);\n continua = filtro != null;\n\n /* crea elenco dei codici addebito fisso da elaborare */\n if (continua) {\n modAddFisso = Albergo.Moduli.AddebitoFisso();\n interi = modAddFisso.query().valoriChiave(filtro);\n codici = Lib.Array.creaLista(interi);\n }// fine del blocco if\n\n /* crea un addebito effettivo per ogni addebito fisso */\n if (codici != null) {\n for (int cod : codici) {\n this.creaSingoloAddebito(cod, data);\n } // fine del ciclo for-each\n }// fine del blocco if\n\n }// fine del blocco if\n\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n }"
] | [
"0.67713946",
"0.59381455",
"0.5798191",
"0.5749734",
"0.569143",
"0.5638126",
"0.56159085",
"0.5612334",
"0.5587435",
"0.5546843",
"0.5537934",
"0.55023867",
"0.54976445",
"0.5493362",
"0.5489104",
"0.5487214",
"0.5463046",
"0.5448709",
"0.54425645",
"0.5435781",
"0.5426548",
"0.5421133",
"0.5401883",
"0.5394249",
"0.5387004",
"0.53715295",
"0.53565985",
"0.53465897",
"0.5343652",
"0.5338705",
"0.53281343",
"0.532093",
"0.53125966",
"0.5311913",
"0.52970564",
"0.5288977",
"0.5273523",
"0.5269765",
"0.5264514",
"0.5246254",
"0.5240194",
"0.5231355",
"0.52287567",
"0.5228157",
"0.5226995",
"0.5205506",
"0.5203223",
"0.5203223",
"0.52019286",
"0.5200331",
"0.51711625",
"0.51684844",
"0.5150971",
"0.51499206",
"0.51133543",
"0.51100296",
"0.5105543",
"0.5100823",
"0.50956786",
"0.5094607",
"0.5091029",
"0.5088076",
"0.50860727",
"0.5083573",
"0.5081856",
"0.5077636",
"0.5071866",
"0.5070957",
"0.5069778",
"0.50533396",
"0.505102",
"0.50498766",
"0.504664",
"0.50362587",
"0.5033635",
"0.5031401",
"0.50263494",
"0.5024855",
"0.50180113",
"0.5015647",
"0.5013721",
"0.5012342",
"0.50115114",
"0.5010596",
"0.50064147",
"0.5003457",
"0.4997783",
"0.49939078",
"0.49935526",
"0.4993395",
"0.49910346",
"0.4989949",
"0.49877274",
"0.49873576",
"0.498345",
"0.49812207",
"0.4977251",
"0.4973381",
"0.49733347",
"0.49714494",
"0.4964923"
] | 0.0 | -1 |
y direction Determines how the moving object moves | public void move(){
x+=xDirection;
y+=yDirection;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setMovementY(int directionY) {\r\n movementY = directionY;\r\n }",
"public void moveY(int dir) { velocity.add(PVector.mult(up, speed * dir)); }",
"public void reverseDirectionY()\n\t{\n\t\t\n\t\tvy = -vy;\n\t}",
"public void moveY() {\n\t\tsetY( getY() + getVy() );\n\t}",
"public void moveVertical(int dir)\n\t{\n\t\tyCoord += 90*dir;\n\t\tplayerPoint.setLocation(xCoord+45,yCoord+45);\n\t}",
"public void moveY(double y) {\n this.y += y;\n }",
"public double getYDirection() {\r\n return Math.sin(Math.toRadians(angle));\r\n }",
"public void moveVertical(int y)\n {\n wall.moveVertical(y);\n roof.moveVertical(y);\n window.moveVertical(y);\n }",
"public void moveY(boolean isDown){\n if(isDown){\n this.y += velocity[1];\n } else{\n this.y -= velocity[1];\n }\n }",
"public int getMovementY() {\r\n return movementY;\r\n }",
"public void setDirectionMove(double direction);",
"void moveY(float y) {\n _y += y;\n }",
"public void reverseY()\r\n {\r\n\t if(moveY < 0)\r\n\t\t moveY = moveY * (-1);\r\n\t else if(moveY > 0)\r\n\t\t moveY = moveY * (-1);\r\n }",
"public void moveDown() {\n if (ycoor <= Game.heightOfGameBoard - movingSpeed) {\n ycoor = ycoor + movingSpeed;\n }\n\n }",
"public double direction(){\n return Math.atan2(this.y, this.x);\n }",
"public void setYDir(int yDir) {\r\n\t\tthis.yDir = yDir;\r\n\t}",
"public int yIncriment(){\n\t\tswitch (direction){\n\t\t\tcase NORTH: \n\t\t\t\treturn -1;\n\t\t\tcase NORTHEAST:\n\t\t\t\treturn -1;\n\t\t\tcase EAST:\n\t\t\t\treturn 0;\n\t\t\tcase SOUTHEAST:\n\t\t\t\treturn 1;\n\t\t\tcase SOUTH:\n\t\t\t\treturn 1;\n\t\t\tcase SOUTHWEST:\n\t\t\t\treturn 1;\n\t\t\tcase WEST:\n\t\t\t\treturn 0;\n\t\t\tdefault: //NORTHWEST\n\t\t\t\treturn -1;\n\t\t}\n\t}",
"public void moveDown()\n {\n if (yPos == yBound)\n {\n movementY = 0;\n movementX = 0;\n }\n\n // Set the movement factor - positive Y because we are moving DOWN!\n movementY = 0.5;\n movementX = 0;\n }",
"public void direction()\n {\n if(!goLeft){\n horzVelocity = 1;\n }else{\n horzVelocity = -1;\n }\n }",
"public void setYPosition(double y)\n\t{\n\t\tthis.yPosition = y;\n\t}",
"public int getYDir() {\r\n\t\treturn yDir;\r\n\t}",
"public void reverseDirection() {\n\t\tdirection *= -1;\n\t\ty += 10;\n\t}",
"double getPositionY();",
"double getPositionY();",
"double getPositionY();",
"public void setYPos(int y) {\n // from MoveEventHandler\n // convert to real y coord\n // y = yP * (ymaxR - yminr) / (ymaxP - yminP)\n double tmp = config.getMaximumRealY() + (y - config.getMaximumPixelY())*(config.getMaximumRealY() - config.getMinimumRealY())/(config.getMaximumPixelY() - config.getMinimumPixelY());\n ypos.setText(formatter.format(tmp));\n }",
"public void reverseYVelocity() {\n yVelocity = -yVelocity + 50;\n this.normalizeVelocity(this.xVelocity, this.yVelocity);\n }",
"public double getDirectionMove();",
"public void moveUporDown(int direction)\n\t{\n\t\tif (this.direction == direction || this.direction == -direction)\n\t\t\treturn ;\n\t\tthis.direction = direction;\n\t\tdirx = 0;\n\t\tdiry = 0;\n\t\tif (direction == 1 || direction == -1)\n\t\t\tdirx = direction;\n\t\telse\n\t\t\tdiry = direction / 2;\n\t}",
"public void setVelocityY(double y) {\n\t\tvelocity.setY(y);\n\t}",
"@Override\n public void move() {\n switch (direction){\n case SOUTH:\n position.setY(position.getY() + currentSpeed);\n break;\n case NORTH:\n position.setY(position.getY() - currentSpeed);\n break;\n case WEST:\n position.setX(position.getX() - currentSpeed);\n break;\n case EAST:\n position.setX(position.getX() + currentSpeed);\n }\n }",
"public void setY(int y){\n\t\tthis.y_location = y;\n\t}",
"public void inertia_y() {\n if (!isMovingUp && !isMovingDown) {\n if (Math.abs(speedY) < acceleration) speedY = 0;\n else if (speedY < 0) speedY += acceleration;\n else speedY -= acceleration;\n }\n }",
"void move( int dir ) {\n\t\t//Guard against literal edge cases\n\t\tif (p.y - PADDLE_WIDTH / 2 == 0 && dir == UP) {\n\t\t\treturn;\n\t\t} \n\t\telse if (p.y + PADDLE_WIDTH / 2 == Game.GAME_HEIGHT &&\n\t\t\t\t dir == DOWN){\n\t\t\treturn;\n\t\t}\n\t\t//Handle all three cases of dir\n\t\tif (dir == UP) {\n\t\t\tp.y -= 5; } \n\t\telse if (dir == DOWN) {\n\t\t\tp.y += 5; }\n\t\telse {\n\t\t\treturn;\n\t\t}\n\t}",
"public void moveDown() {\n speedY -= (speedY > 0) ? acceleration * 2 : acceleration;\n if (speedY < -maxSpeed) {\n speedY = -maxSpeed;\n }\n direction = Direction.DOWN;\n }",
"@Override\n public double getDestinationY() {\n return myMovable.getDestinationY();\n }",
"public Velocity changeDirection(double x, double y) {\n if (Double.isNaN(x) || x == 0) {\n x = 1;\n }\n if (Double.isNaN(y) || y == 0) {\n y = 1;\n }\n return new Velocity(this.dx * Math.signum(x), this.dy * Math.signum(y));\n }",
"double getYPosition();",
"public void setY(double y) {\n\t\tthis.y = y;\n\t}",
"public void setY(int y) {\r\n\t\tthis.y = y;\r\n\t}",
"public void setY(int y) {\r\n\t\tthis.y = y;\r\n\t}",
"public void setY(int y) {\r\n\t\tthis.y = y;\r\n\t}",
"public void setY(int y) {\r\n\t\tthis.y = y;\r\n\t}",
"public final MotionUpdateEvent setY(double y) {\n pos.setY(y);\n return this;\n }",
"@Override\n\tpublic void setY(int y) {\n\t\tyPos = y;\n\t}",
"public void setY(int y) {\n\t\tthis.y = y;\n\t}",
"public void setY(int y) {\n\t\tthis.y = y;\n\t}",
"public void setY(int y) {\n\t\tthis.y = y;\n\t}",
"public void setY(int y) {\n\t\tthis.y = y;\n\t}",
"private void calculateMovement() {\r\n \tmovementY = (int)(movementSpeed * Math.sin(Math.toRadians(movementDirection - 90)));\r\n \tmovementX = (int)(movementSpeed * Math.cos(Math.toRadians(movementDirection - 90)));\r\n }",
"public void setY(double y) {\n this.y = y;\n }",
"public void setY(double y) {\n this.y = y;\n }",
"public void setY(double y) {\n this.y = y;\n }",
"public void setY(float y) {\r\n\t\tthis.y = y;\r\n\t}",
"public void setY(double y) {\n this.y = y;\r\n }",
"public void setY(int y){\r\n\t\tthis.y = y;\r\n\t}",
"public void setY(double y)\n\t{\n\t\tthis.y = y;\n\t}",
"public void translateY(float y) {\n if (collides((int) x, (int) (this.y + y))) return;\n this.y += y;\n this.model.setY(this.y);\n }",
"void moveDown() {\n\t\tsetY(y+1);\r\n\t\tdx=0;\r\n\t\tdy=1;\r\n\t}",
"public void setY(int y) {\n\t\tthis.Y = y;\n\t}",
"public static void setDirection(float x, float y) {\n PlayerDirectionSystem.directionX = x;\r\n PlayerDirectionSystem.directionY = y;\r\n }",
"@Test\n public void testGetDeltaYRIGHT()\n {\n assertEquals(Direction.RIGHT.getDeltaY(), 0);\n }",
"public void setY(int y) {\n this.y = y;\n }",
"public void setY(int y) {\n this.y = y;\n }",
"public void setY(int y) {\n this.y = y;\n }",
"public void setY(double y)\n {\n this.y = y;\n }",
"abstract double getDirY();",
"public void move() {\r\n if (y > HEIGHT)\r\n y = initialY;\r\n y = y + speed;\r\n }",
"public void getDirection (float xDir, float yDir){\n this.xDir = xDir;\n this.yDir = yDir;\n }",
"public void moveUp() {\n if (ycoor >= movingSpeed) {\n ycoor = ycoor - movingSpeed;\n }\n }",
"public void setY(float y) {\n this.y = y;\n }",
"public void setY(int y) {\n this.y = y;\r\n }",
"public void setY(double y){\n this.y = y;\n }",
"public void setY(double y){\n this.y = y;\n }",
"public void setY(int y) {\n collider.setLocation((int) collider.getX(), y);\n }",
"public void setY(int y ){\n if(y>0){\n this.y=y;\n }\n \n }",
"public void setY(Double y) {\n\t\tthis.y = y;\n\t}",
"public void setY( int y ) {\n\t\t//not checking if y is valid because that depends on the coordinate system\n\t\tthis.y = y;\n\t}",
"@Test\n public void testGetDeltaYUP()\n {\n assertEquals(Direction.UP.getDeltaY(), -1);\n }",
"public void direction(int dirX, int dirY) {\r\n if (dirX == 1 && dirY == 0) {\r\n this.direction = \"HORI\";\r\n }\r\n else if (dirX == 1 && dirY == -1) {\r\n this.direction = \"RISE\";\r\n }\r\n else if (dirX == 0 && dirY == 1) {\r\n this.direction = \"VERTI\";\r\n }\r\n else {\r\n this.direction = \"FALL\";\r\n }\r\n }",
"public void MovePlayer(int dir, double dt){\n //move the player on the y axis only \n float moveAmount = 1f;\n switch(dir){\n case 0: \n if( py < ( 0.98f - sy ) )\n py += (moveAmount * dt);\n break;\n case 1: //move down\n if( py > ( -0.98f + sy) )\n py -= (moveAmount * dt);\n break;\n default:\n break;\n }\n }",
"public void setY(Float y) {\n\t\tthis.y = y;\n\t}",
"public void muevaseVertical(int aMover) {\n\t\tyPos+=aMover;\n\t}",
"public void updateYPosition(){\r\n if (centerY + speedY >= 630) {\r\n centerY = 630;\r\n\r\n rect1= new FloatRect (centerX,centerY,80,110);\r\n }else if(!collide){\r\n\r\n centerY += speedY;\r\n\r\n rect1= new FloatRect (centerX,centerY,80,110);\r\n }\r\n else if((jumped && collide && Keyboard.isKeyPressed (Keyboard.Key.W )&& collidedTop)){\r\n speedY=-20;\r\n centerY +=speedY;\r\n }\r\n }",
"public void setY(boolean y) {\n\tthis.y = y;\n }",
"void setY(int y) {\n position = position.setY(y);\n }",
"public void setY(int y)\n {\n this.y = y;\n }",
"public void up() {dy = -SPEED;}",
"@Test\n void testTrackBallYMax(){\n goalie.TrackBallSetDirection(new Vector(45,450),new Vector(-0.5f,0.5f));\n // test if goalie direction is positive\n assertEquals(1,goalie.getNext_direction().getY());\n }",
"public void follow() {\n\n\t\t// moves y position\n\t\tif (centerY < StartingClass.MIDDLE_Y - 100) {\n\t\t\tcenterY += MOVEMENT_SPEED;\n\t\t} else {\n\t\t\tisMovingY = false;\n\t\t}\n\t}",
"public double getY() {\r\n return this.dy;\r\n }",
"void move(String direction) {\n \tif (direction.equals(\"A\")) { \n \t\tsetXCoord(getXCoord()-getHSpeed());\n \t} else if (direction.equals(\"D\")) {\n \t\tsetXCoord(getXCoord()+getHSpeed());\n \t}\n }",
"public void moveDown() {\n locY = locY - 1;\n }",
"void setPlayerYRelative(int y) {\n }",
"public MoveDirection getDirection() {\n\t\treturn direction;\n\t}",
"void setY(int newY) {\n this.yPos = newY;\n }",
"public void setFlingDirection(int velocityY) {\n if (velocityY > 0) {\n this.mFlingDirection = this.FLING_BACKWARD;\n } else {\n this.mFlingDirection = this.FLING_FOWARD;\n }\n }",
"public int getYPos();",
"public void setPositionY(float y) {\n\t\tthis.position.set(this.position.x, y, 0);\n\t}",
"@Override\n\tpublic void setY(float y) \n\t{\n\t\t_y = y;\n\t}"
] | [
"0.8192648",
"0.74943376",
"0.723012",
"0.7194967",
"0.71618354",
"0.71513855",
"0.70927864",
"0.7033318",
"0.70222586",
"0.69523036",
"0.6889491",
"0.6870418",
"0.6823151",
"0.6708505",
"0.6688642",
"0.6654492",
"0.66395044",
"0.66250014",
"0.65961456",
"0.65703475",
"0.6568196",
"0.6527564",
"0.6468289",
"0.6468289",
"0.6468289",
"0.64671886",
"0.64635825",
"0.64559615",
"0.6453519",
"0.6451861",
"0.6448803",
"0.6427705",
"0.64221007",
"0.6397788",
"0.6395679",
"0.6390362",
"0.6388455",
"0.63876843",
"0.63789773",
"0.63780993",
"0.63780993",
"0.63780993",
"0.63780993",
"0.637475",
"0.6363064",
"0.6358905",
"0.6358905",
"0.6358905",
"0.6358905",
"0.6356944",
"0.63503623",
"0.63503623",
"0.63503623",
"0.6342514",
"0.6341795",
"0.6338019",
"0.63343453",
"0.632005",
"0.6310272",
"0.63091373",
"0.6302692",
"0.6291435",
"0.62889683",
"0.62889683",
"0.62889683",
"0.62887996",
"0.6287783",
"0.62819266",
"0.6280939",
"0.62795347",
"0.62746716",
"0.6262733",
"0.62583995",
"0.62583995",
"0.6248611",
"0.6246371",
"0.6241733",
"0.6227968",
"0.6226896",
"0.62183595",
"0.6217993",
"0.6217046",
"0.6213495",
"0.62093776",
"0.62092936",
"0.62000895",
"0.61977303",
"0.61902976",
"0.6189857",
"0.6189257",
"0.6176713",
"0.61746657",
"0.6159069",
"0.6158618",
"0.6156277",
"0.61524713",
"0.61514324",
"0.61513686",
"0.61507654",
"0.61475873"
] | 0.64540905 | 28 |
Sets button coordinates on screen | public void setCoords(int x, int y) {
setLayoutX(x);
setLayoutY(y);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setButtonDisplayLocation(int loc) {\r\n\t\t_buttonDisplayLocation = loc;\r\n\t}",
"private void setLocations(){\n\t\tbuttonArea.setSize(FRAME_WIDTH, 50);\n\t\tbuttonArea.setLocation(0, 0);\n\t\tboardOne.setSize(600,600);\n\t\tboardOne.setLocation(0,buttonArea.getHeight());\n\t\tboardTwo.setSize(600,600);\n\t\tboardTwo.setLocation(boardOne.getWidth() + 10,buttonArea.getHeight());\n\t\tboardOne.setIcon(background);\n\t\tboardTwo.setIcon(background);\n\t\tnewGame.setSize(100,20);\n\t\tnewGame.setLocation(5,5);\n\t\tcp1shipLabel.setSize(200,15);\n\t\tcp1shipLabel.setLocation((boardOne.getWidth() / 2) - (cp1shipLabel.getWidth() / 2),buttonArea.getHeight() - cp1shipLabel.getHeight() - 5);\n\t\tcp1shipLabel.setVisible(false);\n\t\tcp2shipLabel.setSize(200,15);\n\t\tcp2shipLabel.setLocation(boardTwo.getX() + (boardTwo.getWidth() / 2) - (cp2shipLabel.getWidth() / 2),buttonArea.getHeight() - cp2shipLabel.getHeight() - 5);\n\t\tcp2shipLabel.setVisible(false);\n\t}",
"@Override\n public void onClick(View v) {\n buttonSetLocation();\n }",
"protected void doScreenClick() {\r\n\t\tbtnColonyInfo.visible = btnButtons.down;\r\n\t\tbtnPlanet.visible = btnButtons.down;\r\n\t\tbtnStarmap.visible = btnButtons.down;\r\n\t\tbtnBridge.visible = btnButtons.down;\r\n\t\trepaint();\r\n\t}",
"public Point getAddToListButtonLoc(){\r\n\t\treturn button.getLocationOnScreen();\r\n\t}",
"public void setPosicao() {\n Dimension d = this.getDesktopPane().getSize();\n this.setLocation((d.width - this.getSize().width) / 2, (d.height - this.getSize().height) / 2);\n }",
"public TranslateButton() {\n this.posX = 0;\n this.posY = 0;\n this.width = 0;\n this.height = 0;\n translateButton = new JButton();\n }",
"public void setLoc(int x, int y)\n {\n powerUp.setBounds(x,y,65,29);\n text.setBounds(x,y,65,29);\n }",
"public void setButton() {\n pan.add(playButton);\n }",
"public void setPosicao() {\n Dimension d = this.getDesktopPane().getSize();\n this.setLocation((d.width - this.getSize().width) / 2, (d.height - this.getSize().height) / 2); \n}",
"protected final void windowLocationControl(){\n\t\tthis.setLocation(0, 0);\n\t}",
"void updatePosition() {\n if (gameScreen.cursorIsOnLeft()) \n {\n // set the panel's rightmost edge to be 1/12th from the edge\n // set the panel's bottommost edge to be 1/6th from the edge\n setLocation(\n gameScreen.getScreenWidth() * 11/12 - getWidth(), \n gameScreen.getScreenHeight() * 5/6 - getHeight());\n }\n else // Otherwise the cursor must be on the right half of the screen\n {\n // set the panel's leftmost edge to be 1/12th from the edge\n // set the panel's bottommost edge to be 1/6th from the edge\n setLocation(\n gameScreen.getScreenWidth() * 1/12, \n gameScreen.getScreenHeight() * 5/6 - getHeight());\n }\n }",
"@Override\n public void mousePressed(MouseEvent e) {\n x_pressed = e.getX();\n y_pressed = e.getY();\n \n }",
"@Override\n public void mousePressed(MouseEvent e) {\n x_pressed = e.getX();\n y_pressed = e.getY();\n \n }",
"@Override\n public void mousePressed(MouseEvent e) {\n x_pressed = e.getX();\n y_pressed = e.getY();\n \n }",
"private void setButtons(int width, int height) {\n\tint centerX = width / 2;\n\tint centerY = height / 2;\n\tplayButton.setPos(centerX - playButton.getWidth() / 2, centerY + 2\n\t\t* lineHeight);\n\tplaneButton_p1.setPos(centerX - planeButton_p1.getWidth() / 2, centerY\n\t\t+ 1 * lineHeight);\n\tplaneButton_p2.setPos(centerX - planeButton_p2.getWidth() / 2, centerY\n\t\t+ 0 * lineHeight);\n\toptionsButton.setPos(centerX - optionsButton.getWidth() / 2, centerY\n\t\t- 1 * lineHeight);\n\texitButton.setPos(centerX - exitButton.getWidth() / 2, centerY - 5\n\t\t* lineHeight);\n }",
"@Override\n public void mousePressed(MouseEvent e) {\n x_pressed = e.getX();\n y_pressed = e.getY();\n \n }",
"public void drawButton(Minecraft mc, int mouseX, int mouseY) {\n/* 20 */ if (this.visible) {\n/* */ \n/* 22 */ mc.getTextureManager().bindTexture(GuiButton.buttonTextures);\n/* 23 */ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);\n/* 24 */ boolean var4 = (mouseX >= this.xPosition && mouseY >= this.yPosition && mouseX < this.xPosition + this.width && mouseY < this.yPosition + this.height);\n/* 25 */ int var5 = 106;\n/* */ \n/* 27 */ if (var4)\n/* */ {\n/* 29 */ var5 += this.height;\n/* */ }\n/* */ \n/* 32 */ drawTexturedModalRect(this.xPosition, this.yPosition, 0, var5, this.width, this.height);\n/* */ } \n/* */ }",
"public void resetRobotPositionOnUI() {\r\n\t\tthis.x = checkValidX(1);\r\n\t\tthis.y = checkValidY(1);\r\n\t\ttoggleValid();\r\n\t\trobotImage.setLocation(Constant.MARGINLEFT + (Constant.GRIDWIDTH * 3 - Constant.ROBOTWIDTH)/2 + (x-1) * Constant.GRIDWIDTH, Constant.MARGINTOP + (Constant.GRIDHEIGHT * 3 - Constant.ROBOTHEIGHT)/2 + (y-1) * Constant.GRIDHEIGHT);\r\n\t\t\r\n\t}",
"void setLocation(int x, int y);",
"public void place(){\n\t\tplace((float) Math.floor(Main.mouseSelector.x)+0.5f,(float) Math.floor(Main.mouseSelector.y)+0.5f);\r\n\t}",
"private void updateButtonBounds(){\n\t\tactionButton.setVisible(true);\n\t\tactionButton.setToolTipText(toolTips[boundIndex]);\n\t\tactionButton.setBounds(buttonBounds[boundIndex]);\n\t\texitButton.setBounds(exitBounds);\n\t}",
"void home() {\n\t\tx = y = 10;\n\t\twin.repaint();\n\t}",
"public void moveEastButton (View View){\n if (model.canMoveEast()) {\n model.moveEast();\n updateLabel();\n updateButtonStatus();\n }\n }",
"public static void setCoordinates(JButton currentButton, int numPlayers, JButton tile[][] ) {\n\t\t if(currentButton.getIcon()==Player1.PieceImages[0]) {\n\t\t\t //System.out.println(\"This is player 1's \" + Player1.playersTeam.teamPieces[0].name);\n\t\t\t for (int i=0; i<tile.length; i++) {\n \t\t\t for(int j=0; j<tile[i].length; j++) {\n \t\t\t\t if (currentButton == tile[i][j]) {\n \t\t\t\t\t pieceYCoord = i; \n \t\t\t\t\t pieceXCoord = j;\n \t\t\t\t\t //System.out.println(pieceYCoord + \"\" + pieceXCoord);\n \t\t\t\t }\n \t\t\t }\n \t\t }\n\t\t }\n\t\t if(currentButton.getIcon()==Player1.PieceImages[1]) {\n\t\t\t //System.out.println(\"This is player 1's \" + Player1.playersTeam.teamPieces[1].name);\n\t\t\t for (int i=0; i<tile.length; i++) {\n \t\t\t for(int j=0; j<tile[i].length; j++) {\n \t\t\t\t if (currentButton == tile[i][j]) {\n \t\t\t\t\t pieceYCoord = i; \n \t\t\t\t\t pieceXCoord = j;\n \t\t\t\t\t//System.out.println(pieceYCoord + \"\" + pieceXCoord);\n \t\t\t\t }\n \t\t\t }\n \t\t }\n\t\t }\n\t\t if(currentButton.getIcon()==Player1.PieceImages[2]) {\n\t\t\t //System.out.println(\"This is player 1's \" + Player1.playersTeam.teamPieces[2].name);\n\t\t\t for (int i=0; i<tile.length; i++) {\n \t\t\t for(int j=0; j<tile[i].length; j++) {\n \t\t\t\t if (currentButton == tile[i][j]) {\n \t\t\t\t\t pieceYCoord = i;\n \t\t\t\t\t pieceXCoord = j;\n \t\t\t\t\t//System.out.println(pieceYCoord + \"\" + pieceXCoord);\n \t\t\t\t }\n \t\t\t }\n \t\t }\n\t\t }\n\t\t if(currentButton.getIcon()==Player1.PieceImages[3]) {\n\t\t\t //System.out.println(\"This is player 1's \" + Player1.playersTeam.teamPieces[3].name);\n\t\t\t for (int i=0; i<tile.length; i++) {\n \t\t\t for(int j=0; j<tile[i].length; j++) {\n \t\t\t\t if (currentButton == tile[i][j]) {\n \t\t\t\t\t pieceYCoord = i;\n \t\t\t\t\t pieceXCoord = j;\n \t\t\t\t\t//System.out.println(pieceYCoord + \"\" + pieceXCoord);\n \t\t\t\t }\n \t\t\t }\n \t\t }\n\t\t }\n\t\t if(currentButton.getIcon()==Player1.PieceImages[4]) {\n\t\t\t //System.out.println(\"This is player 1's \" + Player1.playersTeam.teamPieces[4].name);\n\t\t\t for (int i=0; i<tile.length; i++) {\n \t\t\t for(int j=0; j<tile[i].length; j++) {\n \t\t\t\t if (currentButton == tile[i][j]) {\n \t\t\t\t\t pieceYCoord = i;\n \t\t\t\t\t pieceXCoord = j;\n \t\t\t\t\t//System.out.println(pieceYCoord + \"\" + pieceXCoord);\n \t\t\t\t }\n \t\t\t }\n \t\t }\n\t\t }\n\t\t if(currentButton.getIcon()==Player2.PieceImages[0]) {\n\t\t\t //System.out.println(\"This is player 2's \" + Player2.playersTeam.teamPieces[0].name);\n\t\t\t for (int i=0; i<tile.length; i++) {\n \t\t\t for(int j=0; j<tile[i].length; j++) {\n \t\t\t\t if (currentButton == tile[i][j]) {\n \t\t\t\t\t pieceYCoord = i;\n \t\t\t\t\t pieceXCoord = j;\n \t\t\t\t\t//System.out.println(pieceYCoord + \"\" + pieceXCoord);\n \t\t\t\t }\n \t\t\t }\n \t\t }\n\t\t }\n\t\t if(currentButton.getIcon()==Player2.PieceImages[1]) {\n\t\t\t //System.out.println(\"This is player 2's \" + Player2.playersTeam.teamPieces[1].name);\n\t\t\t for (int i=0; i<tile.length; i++) {\n \t\t\t for(int j=0; j<tile[i].length; j++) {\n \t\t\t\t if (currentButton == tile[i][j]) {\n \t\t\t\t\t pieceYCoord = i;\n \t\t\t\t\t pieceXCoord = j;\n \t\t\t\t\t//System.out.println(pieceYCoord + \"\" + pieceXCoord);\n \t\t\t\t }\n \t\t\t }\n \t\t }\n\t\t }\n\t\t if(currentButton.getIcon()==Player2.PieceImages[2]) {\n\t\t\t //System.out.println(\"This is player 2's \" + Player2.playersTeam.teamPieces[2].name);\n\t\t\t for (int i=0; i<tile.length; i++) {\n \t\t\t for(int j=0; j<tile[i].length; j++) {\n \t\t\t\t if (currentButton == tile[i][j]) {\n \t\t\t\t\t pieceYCoord = i;\n \t\t\t\t\t pieceXCoord = j;\n \t\t\t\t\t//System.out.println(pieceYCoord + \"\" + pieceXCoord);\n \t\t\t\t }\n \t\t\t }\n \t\t }\n\t\t }\n\t\t if(currentButton.getIcon()==Player2.PieceImages[3]) {\n\t\t\t //System.out.println(\"This is player 2's \" + Player2.playersTeam.teamPieces[3].name);\n\t\t\t for (int i=0; i<tile.length; i++) {\n \t\t\t for(int j=0; j<tile[i].length; j++) {\n \t\t\t\t if (currentButton == tile[i][j]) {\n \t\t\t\t\t pieceYCoord = i;\n \t\t\t\t\t pieceXCoord = j;\n \t\t\t\t\t//System.out.println(pieceYCoord + \"\" + pieceXCoord);\n \t\t\t\t }\n \t\t\t }\n \t\t }\n\t\t }\n\t\t if(currentButton.getIcon()==Player2.PieceImages[4]) {\n\t\t\t //System.out.println(\"This is player 2's \" + Player2.playersTeam.teamPieces[4].name);\n\t\t\t for (int i=0; i<tile.length; i++) {\n \t\t\t for(int j=0; j<tile[i].length; j++) {\n \t\t\t\t if (currentButton == tile[i][j]) {\n \t\t\t\t\t pieceYCoord = i;\n \t\t\t\t\t pieceXCoord = j;\n \t\t\t\t\t//System.out.println(pieceYCoord + \"\" + pieceXCoord);\n \t\t\t\t }\n \t\t\t }\n \t\t }\n\t\t }\n\t\t if(numPlayers==4) {\n\t\t\t if(currentButton.getIcon()==Player3.PieceImages[0]) {\n\t\t\t //System.out.println(\"This is player 3's \" + Player3.playersTeam.teamPieces[0].name);\n\t\t\t \tfor (int i=0; i<tile.length; i++) {\n\t\t\t \t\tfor(int j=0; j<tile[i].length; j++) {\n\t\t\t \t\t\tif (currentButton == tile[i][j]) {\n\t\t\t \t\t\t\tpieceYCoord = i;\n\t\t\t \t\t\t\tpieceXCoord = j;\n\t\t\t \t\t\t\t//System.out.println(pieceYCoord + \"\" + pieceXCoord);\n\t\t\t \t\t\t}\n\t\t\t \t\t}\n\t\t\t \t}\n\t\t\t }\n\t\t\t if(currentButton.getIcon()==Player3.PieceImages[1]) {\n\t\t\t //System.out.println(\"This is player 3's \" + Player3.playersTeam.teamPieces[1].name);\n\t\t\t \tfor (int i=0; i<tile.length; i++) {\n\t\t\t \t\tfor(int j=0; j<tile[i].length; j++) {\n\t\t\t \t\t\tif (currentButton == tile[i][j]) {\n\t\t\t \t\t\t\tpieceYCoord = i;\n\t\t\t \t\t\t\tpieceXCoord = j;\n\t\t\t \t\t\t\t//System.out.println(pieceYCoord + \"\" + pieceXCoord);\n\t\t\t \t\t\t}\n\t\t\t \t\t}\n\t\t\t \t}\n\t\t\t }\n\t\t\t if(currentButton.getIcon()==Player3.PieceImages[2]) {\n\t\t\t //System.out.println(\"This is player 3's \" + Player3.playersTeam.teamPieces[2].name);\n\t\t\t\tfor (int i=0; i<tile.length; i++) {\n\t\t\t \t\tfor(int j=0; j<tile[i].length; j++) {\n\t\t\t \t\t\tif (currentButton == tile[i][j]) {\n\t\t\t \t\t\t\tpieceYCoord = i;\n\t\t\t \t\t\t\tpieceXCoord = j;\n\t\t\t \t\t\t\t//System.out.println(pieceYCoord + \"\" + pieceXCoord);\n\t\t\t \t\t\t}\n\t\t\t \t\t}\n\t\t\t \t}\n\t\t\t }\n\t\t\t if(currentButton.getIcon()==Player3.PieceImages[3]) {\n\t\t\t //System.out.println(\"This is player 3's \" + Player3.playersTeam.teamPieces[3].name);\n\t\t\t\tfor (int i=0; i<tile.length; i++) {\n\t\t\t \t\tfor(int j=0; j<tile[i].length; j++) {\n\t\t\t \t\t\tif (currentButton == tile[i][j]) {\n\t\t\t \t\t\t\tpieceYCoord = i;\n\t\t\t \t\t\t\tpieceXCoord = j;\n\t\t\t \t\t\t\t//System.out.println(pieceYCoord + \"\" + pieceXCoord);\n\t\t\t \t\t\t}\n\t\t\t \t\t}\n\t\t\t \t}\n\t\t\t }\n\t\t\t if(currentButton.getIcon()==Player3.PieceImages[4]) {\n\t\t\t //System.out.println(\"This is player 3's \" + Player3.playersTeam.teamPieces[4].name);\n\t\t\t\tfor (int i=0; i<tile.length; i++) {\n\t\t\t \t\tfor(int j=0; j<tile[i].length; j++) {\n\t\t\t \t\t\tif (currentButton == tile[i][j]) {\n\t\t\t \t\t\t\tpieceYCoord = i;\n\t\t\t \t\t\t\tpieceXCoord = j;\n\t\t\t \t\t\t\t//System.out.println(pieceYCoord + \"\" + pieceXCoord);\n\t\t\t \t\t\t}\n\t\t\t \t\t}\n\t\t\t \t}\n\t\t\t }\n\t\t\t if(currentButton.getIcon()==Player4.PieceImages[0]) {\n\t\t\t //System.out.println(\"This is player 4's \" + Player4.playersTeam.teamPieces[0].name);\n\t\t\t\tfor (int i=0; i<tile.length; i++) {\n\t\t\t \t\tfor(int j=0; j<tile[i].length; j++) {\n\t\t\t \t\t\tif (currentButton == tile[i][j]) {\n\t\t\t \t\t\t\tpieceYCoord = i;\n\t\t\t \t\t\t\tpieceXCoord = j;\n\t\t\t \t\t\t\t//System.out.println(pieceYCoord + \"\" + pieceXCoord);\n\t\t\t \t\t\t}\n\t\t\t \t\t}\n\t\t\t \t}\n\t\t\t }\n\t\t\t if(currentButton.getIcon()==Player4.PieceImages[1]) {\n\t\t\t //System.out.println(\"This is player 4's \" + Player4.playersTeam.teamPieces[1].name);\n\t\t\t\tfor (int i=0; i<tile.length; i++) {\n\t\t\t \t\tfor(int j=0; j<tile[i].length; j++) {\n\t\t\t \t\t\tif (currentButton == tile[i][j]) {\n\t\t\t \t\t\t\tpieceYCoord = i;\n\t\t\t \t\t\t\tpieceXCoord = j;\n\t\t\t \t\t\t\t//System.out.println(pieceYCoord + \"\" + pieceXCoord);\n\t\t\t \t\t\t}\n\t\t\t \t\t}\n\t\t\t \t}\n\t\t\t }\n\t\t\t if(currentButton.getIcon()==Player4.PieceImages[2]) {\n\t\t\t //System.out.println(\"This is player 4's \" + Player4.playersTeam.teamPieces[2].name);\n\t\t\t\tfor (int i=0; i<tile.length; i++) {\n\t\t\t \t\tfor(int j=0; j<tile[i].length; j++) {\n\t\t\t \t\t\tif (currentButton == tile[i][j]) {\n\t\t\t \t\t\t\tpieceYCoord = i;\n\t\t\t \t\t\t\tpieceXCoord = j;\n\t\t\t \t\t\t\t//System.out.println(pieceYCoord + \"\" + pieceXCoord);\n\t\t\t \t\t\t}\n\t\t\t \t\t}\n\t\t\t \t}\n\t\t\t }\n\t\t\t if(currentButton.getIcon()==Player4.PieceImages[3]) {\n\t\t\t //System.out.println(\"This is player 4's \" + Player4.playersTeam.teamPieces[3].name);\n\t\t\t\tfor (int i=0; i<tile.length; i++) {\n\t\t\t \t\tfor(int j=0; j<tile[i].length; j++) {\n\t\t\t \t\t\tif (currentButton == tile[i][j]) {\n\t\t\t \t\t\t\tpieceYCoord = i;\n\t\t\t \t\t\t\tpieceXCoord = j;\n\t\t\t \t\t\t\t//System.out.println(pieceYCoord + \"\" + pieceXCoord);\n\t\t\t \t\t\t}\n\t\t\t \t\t}\n\t\t\t \t}\n\t\t\t }\n\t\t\t if(currentButton.getIcon()==Player4.PieceImages[4]) {\n\t\t\t //System.out.println(\"This is player 4's \" + Player4.playersTeam.teamPieces[4].name);\n\t\t\t\tfor (int i=0; i<tile.length; i++) {\n\t\t\t \t\tfor(int j=0; j<tile[i].length; j++) {\n\t\t\t \t\t\tif (currentButton == tile[i][j]) {\n\t\t\t \t\t\t\tpieceYCoord = i;\n\t\t\t \t\t\t\tpieceXCoord = j;\n\t\t\t \t\t\t\t//System.out.println(pieceYCoord + \"\" + pieceXCoord);\n\t\t\t \t\t\t}\n\t\t\t \t\t}\n\t\t\t \t}\n\t\t\t }\n\t\t }\n\n\t}",
"private void setSelectionLocations()\n\t{\n\t\tPoint center = new Point(640, 539);\n\t\tint spaceBetweenRows = 20;\n\t\tint width = selectedUnits.size()\n\t\t\t\t* (thumbnailSize.width + spaceBetweenRows) - spaceBetweenRows;\n\t\tPoint buttonLoc = new Point(center.x - width / 2, center.y\n\t\t\t\t- thumbnailSize.height / 2);\n\t\tfor (int unit = 0; unit < selectedUnits.size(); unit++)\n\t\t{\n\t\t\tcancelButtons.get(unit).setLocation(buttonLoc);\n\t\t\tbuttonLoc.translate(thumbnailSize.width + spaceBetweenRows, 0);\n\t\t}\n\t}",
"public void setPosition(ScreenPoint p) {\n setX(p.x);\n setY(p.y);\n }",
"Button(int ID, Texture image) {\n\n this.ID = ID;\n objectTexture = image;\n\n //Player 1 buttons\n int buttonx = Gdx.graphics.getWidth() - (Gdx.graphics.getHeight() / 4);\n int button1y = 0;\n int button2y = Gdx.graphics.getHeight() / 4;\n int button3y = Gdx.graphics.getHeight() / 2;\n int button4y = (3 * Gdx.graphics.getHeight()) / 4;\n //Player 2 buttons\n int buttonx2 = 0;\n int button5y = (3 * Gdx.graphics.getHeight()) / 4;\n int button6y = Gdx.graphics.getHeight() / 2;\n int button7y = Gdx.graphics.getHeight() / 4;\n int button8y = 0;\n //StartGame Button\n int startGameX = (Gdx.graphics.getWidth()/2)-((Gdx.graphics.getWidth()/3)/2);\n int startGameY = (Gdx.graphics.getHeight()/3)-(Gdx.graphics.getWidth()/3/2/2);\n\n //check which button we are\n switch (ID) {\n case 1:\n currentPosition = new GridPoint2(buttonx, button1y);\n break;\n case 2:\n currentPosition = new GridPoint2(buttonx, button2y);\n break;\n case 3:\n currentPosition = new GridPoint2(buttonx, button3y);\n break;\n case 4:\n currentPosition = new GridPoint2(buttonx, button4y);\n break;\n case 5:\n currentPosition = new GridPoint2(buttonx2, button5y);\n break;\n case 6:\n currentPosition = new GridPoint2(buttonx2, button6y);\n break;\n case 7:\n currentPosition = new GridPoint2(buttonx2, button7y);\n break;\n case 8:\n currentPosition = new GridPoint2(buttonx2, button8y);\n break;\n case 9:\n currentPosition = new GridPoint2(startGameX, startGameY);\n break;\n }\n\n //Now set the area to be clicked. first two parameters are position, then size\n if (ID == 9)\n {\n clickArea = new Rectangle(startGameX, Gdx.graphics.getHeight()-startGameY-(Gdx.graphics.getWidth()/3/2),\n Gdx.graphics.getWidth()/3, (Gdx.graphics.getWidth()/3)/2);\n }\n else {\n clickArea = new Rectangle(currentPosition.x, currentPosition.y,\n Gdx.graphics.getHeight() / 4, Gdx.graphics.getHeight() / 4);\n }\n }",
"public void setLocation(float x, float y);",
"public void setLocation(Point p) {\n // Not supported for MenuComponents\n }",
"@Override\r\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\torigin.x=e.getX();\r\n\t\t\t\torigin.y=e.getY();\r\n\t\t\t}",
"@Override\n\tpublic void handleButton (Context context, int button) {\n\t\tif (bodyDrag) super.handleButton(context, button);\n\t\telse context.setHeight(renderer.getHeight(open.getValue()!=0));\n\t\tif (context.isClicked() && button==Interface.LBUTTON) {\n\t\t\tdragging=true;\n\t\t\tattachPoint=context.getInterface().getMouse();\n\t\t} else if (!context.getInterface().getButton(Interface.LBUTTON) && dragging) {\n\t\t\tPoint mouse=context.getInterface().getMouse();\n\t\t\tdragging=false;\n\t\t\tPoint p=getPosition(context.getInterface());\n\t\t\tp.translate(mouse.x-attachPoint.x,mouse.y-attachPoint.y);\n\t\t\tsetPosition(context.getInterface(),p);\n\t\t}\n\t\tif (!bodyDrag) super.handleButton(context, button);\n\t}",
"Point onScreen();",
"private void updatePosition(){\n updateXPosition(true);\n updateYPosition(true);\n }",
"private void setLocation() {\n switch (getKey()) {\n case UP:\n this.y_location = -136.8 - 6;\n this.y_tile = -1;\n this.positive = false;\n break;\n case DOWN:\n this.y_location = 136.8 + 6;\n this.y_tile = 1;\n break;\n case LEFT:\n this.x_location = -140.6 - 6;\n this.x_tile = -1;\n this.positive = false;\n break;\n case RIGHT:\n this.x_location = 140.6 + 6;\n this.x_tile = 1;\n break;\n default:\n break;\n }\n }",
"void setPosition(double xPos, double yPos);",
"void setPos(float x, float y);",
"public AutoClickGUI() {\n initComponents();\n this.getContentPane().setBackground(Color.WHITE);\n this.setLocationRelativeTo(null);\n this.Campo_X.setFocusable(false);\n this.Campo_Y.setFocusable(false);\n this.Btn_instrucciones.setFocusable(false);\n this.btn_chrome.setFocusable(false);\n this.btn_link_base.setFocusable(false);\n this.Campo_X.setEditable(false);\n this.Campo_Y.setEditable(false);\n this.setVisible(true);\n this.setResizable(false);\n this.setTitle(\"AutoClick\");\n }",
"public void setLocation(int y)\r\n {\r\n pencil.setBounds(110, y, 26, 26);\r\n minus.setBounds(136, y, 26, 26);\r\n draggable.setBounds(20, y, 90, 16);\r\n visible.setLocation(164, y+5);\r\n checkbox.setLocation(136, y);\r\n text.setLocation(20,y);\r\n }",
"public void onClick(View v) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tint id=v.getId();\n\t\t\t\t\t\tfloat setX,setY;\n\t\t\t\t\t\t String str2=\"\"+(sm[id].getXValue()*screenwidth);\n\t\t\t\t\t\t setX = Float.parseFloat(str2);\n\t\t\t\t\t\t \n\t\t\t\t\t\t \n\t\t\t\t\t\t str2=\"\"+(sm[id].getYValue()*screenheight);\n\t\t\t\t\t\t setY = Float.parseFloat(str2);\n\t\t\t\t\t\t//Toast.makeText(getContext(), \"By image click\",Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\t//Log.d(\"x y\",\"\"+setX+\" \"+setY);\n\t\t\t\t\t\t//Button img=new Button(context);\n\t\t\t\t\t\t//img.setBackgroundResource(R.drawable.back_blue_button);\n\t\t\t\t\t\t//img.setText(\"from\"+\"\"+sm[id].getID());\n//\t\t\t\t\t\t RelativeLayout.LayoutParams par2=new RelativeLayout.LayoutParams(android.widget.RelativeLayout.LayoutParams.WRAP_CONTENT,android.widget.RelativeLayout.LayoutParams.WRAP_CONTENT);\n//\t\t\t\t\t\t par2.leftMargin=(int)(setX);\n//\t\t\t\t\t\t par2.topMargin=(int)(setY);\n//\t\t\t\t\t\t popMsg.setLayoutParams(par2);\n//\t\t\t\t\t\t popMsg.setText(\"from\"+\"\"+sm[id].getID());\n//\t\t\t\t\t\t //popMsg.setText(\"from sfsf dfdfsfd dfdsf df dfdfdf d fdfedfd dfdfdf dfdf df dfdfd \");\n//\t\t\t\t\t\t popMsg.setVisibility(View.VISIBLE);\n\t\t\t\t\t\t//RelativeLayout.LayoutParams par2=v.(RelativeLayout.LayoutParams)getTag();\n\t\t\t\t\t\t // img.setLayoutParams(par2);\n\t\t\t\t\t\t // mapLayout.addView(img);\n\t\t\t\t\t\t String text=\"Project - \"+sm[id].getProjectName()+\"\\n\"+\"Building - \"+sm[id].getBuildingName()+\"\\n\"+\"Floor - \"+sm[id].getFloor()+\"\\n\"+\"Apartment - \"+sm[id].getApartment()+\"\\n\"+\"Area - \"+sm[id].getAptAreaName()+\"\\n\"+\"SnagType - \"+sm[id].getSnagType()+\"\\n\"+\"FaultType - \"+sm[id].getFaultType()+\"\\n\"+\"Status - \"+sm[id].getSnagStatus()+\"\\n\"+\"ReportDate - \"+sm[id].getReportDate()+\"\\n\"+\"SnagDetails - \"+sm[id].getSnagDetails()+\"\\n\"+\"PriorityLevel - \"+sm[id].getSnagPriority()+\"\\n\"+\"Cost - \"+sm[id].getCost()+\"\\n\"+\"CostTO - \"+sm[id].getCostTo()+\"\\n\"+\"AllocatedToName - \"+sm[id].getAllocatedToName()+\"\\n\"+\"InspectorName - \"+sm[id].getInspectorName()+\"\\n\"+\"ContractorName - \"+sm[id].getContractorName()+\"\\n\"+\"SubContractorName - \"+sm[id].getSubContractorName()+\"\\n\"+\"ContractorStatus - \"+sm[id].getContractorStatus();\n\t\t\t\t\t\t \n\t\t\t\t\t\t \n//\t\t\t\t\t\t \n\t\t\t\t\t\t final int loc=id;\n\t\t\t\t\t\t new AlertDialog.Builder(context)\n\t\t\t\t \t .setTitle(\"Snag Detail\")\n\t\t\t\t \t .setMessage(\"\"+text)\n\t\t\t\t \t .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n\t\t\t\t \t public void onClick(DialogInterface dialog, int which) { \n\t\t\t\t \t \t//Toast.makeText(context,\"\"+0.052083332*screenwidth+\" \"+0.078125*screenheight,Toast.LENGTH_LONG).show();\n\t\t\t\t \t // continue with delete\n\t\t\t\t \t }\n\t\t\t\t \t })\n\t\t\t\t \t .show();\n\t\t\t\t\t}",
"public Confirm() {\n initComponents();\n Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();\n this.setLocation(dim.width/2-this.getSize().width/2, dim.height/2-this.getSize().height/2);\n }",
"public planillaInsert() {\n initComponents();\n int lebar = this.getWidth()/2;\n int tinggi = this.getHeight()/2;\n int x = (Toolkit.getDefaultToolkit().getScreenSize().width/2)-lebar;\n int y = (Toolkit.getDefaultToolkit().getScreenSize().height/2)-tinggi;\n this.setLocation(x, y);\n }",
"public void setPositionPauseMenu(){\r\n\t\tpauseMenu.setPosition(camera.position.x- canvas.getWidth()/PAUSE_MENU_POSITION_SCALE , camera.position.y-canvas.getHeight()/PAUSE_MENU_POSITION_SCALE );\r\n\t}",
"public void buttonPressed(){\r\n\t\tsetBorder(new BevelBorder(10));\r\n\t}",
"public void drawPauseButton(){\r\n\t\tBatch b = canvas.getBatch();\r\n\t\tpauseButton.setPosition(camera.position.x+PAUSE_BUTTON_OFFSETX, camera.position.y+PAUSE_BUTTON_OFFSETY);\r\n\t\tpauseButton.draw(b, 1);\r\n\t}",
"public void setToCoordinates(int toX, int toY);",
"private void generateButtons(){\n\t\tint coordX = ThreadLocalRandom.current().nextInt(0, 16);\n\t\tint coordY = ThreadLocalRandom.current().nextInt(0, 16);\n\t\t//Button button = new Button(coordX, coordY);\n\t\t//buttons.put(0, button);\n\t}",
"public void setTargets(){\n Targot_Button1 = new JButton();\n Targot_Button1.setSize(50,120);\n Targot_Button1.setVisible(true);\n Targot_Button1.setLocation(235,270);\n Targot_Button1.setContentAreaFilled(false);\n Targot_Button1.setBorder(null);\n Targot_Button1.addActionListener(this);\n this.add(Targot_Button1);\n \n // sets up targot 2\n Targot_Button2 = new JButton();\n Targot_Button2.setSize(50,125);\n Targot_Button2.setVisible(true);\n Targot_Button2.setLocation(128,280);\n Targot_Button2.setContentAreaFilled(false);\n Targot_Button2.setBorder(null);\n Targot_Button2.addActionListener(this);\n this.add(Targot_Button2);\n \n // sets up targot 3\n Targot_Button3 = new JButton();\n Targot_Button3.setSize(40,80);\n Targot_Button3.setVisible(true);\n Targot_Button3.setLocation(185,280);\n Targot_Button3.setContentAreaFilled(false);\n Targot_Button3.setBorder(null);\n Targot_Button3.addActionListener(this);\n this.add(Targot_Button3);\n \n // sets up targot 4\n Targot_Button4 = new JButton();\n Targot_Button4.setSize(65,180);\n Targot_Button4.setVisible(true);\n Targot_Button4.setLocation(15,265);\n Targot_Button4.setContentAreaFilled(false);\n Targot_Button4.setBorder(null);\n Targot_Button4.addActionListener(this);\n this.add(Targot_Button4);\n \n // sets up targot 5\n Targot_Button5 = new JButton();\n Targot_Button5.setSize(20,60);\n Targot_Button5.setVisible(true);\n Targot_Button5.setLocation(380,270);\n Targot_Button5.setContentAreaFilled(false);\n Targot_Button5.setBorder(null);\n Targot_Button5.addActionListener(this);\n this.add(Targot_Button5);\n \n // sets up targot 1\n Targot_Button6 = new JButton();\n Targot_Button6.setSize(40,100);\n Targot_Button6.setVisible(true);\n Targot_Button6.setLocation(465,280);\n Targot_Button6.setContentAreaFilled(false);\n Targot_Button6.setBorder(null);\n Targot_Button6.addActionListener(this);\n this.add(Targot_Button6);\n \n }",
"@Override\n\tpublic void drawButton(Minecraft par1Minecraft, int par2, int par3)\n {\n if (this.drawButton)\n {\n boolean var4 = par2 >= this.xPosition && par3 >= this.yPosition && par2 < this.xPosition + this.width && par3 < this.yPosition + this.height;\n GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);\n par1Minecraft.renderEngine.bindTexture(par1Minecraft.renderEngine.getTexture(\"/gui/book.png\"));\n int var5 = 0;\n int var6 = 192;\n\n if (var4)\n {\n var5 += 23;\n }\n\n if (!this.nextPage)\n {\n var6 += 13;\n }\n\n this.drawTexturedModalRect(this.xPosition, this.yPosition, var5, var6, 23, 13);\n }\n }",
"@Override\n\tpublic void drawButton(Minecraft par1Minecraft, int par2, int par3)\n {\n if (this.drawButton)\n {\n boolean var4 = par2 >= this.xPosition && par3 >= this.yPosition && par2 < this.xPosition + this.width && par3 < this.yPosition + this.height;\n GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);\n par1Minecraft.renderEngine.bindTexture(par1Minecraft.renderEngine.getTexture(SteamCraft.guiLocation + \"researchpaper.png\"));\n int var5 = 209;\n int var6 = 13;\n\n if (this.nextPage)\n {\n var6 += 91;\n var5 += 13;\n }\n\n this.drawTexturedModalRect(this.xPosition, this.yPosition, var5, 0, 10, var6);\n }\n }",
"@Override\r\n\t\t\tpublic void onClick(ButtonSprite button, float arg1, float arg2) {\n\r\n\t\t\t\tif (button == settingBtn) {\r\n\t\t\t\t\tif (isSetting) {\r\n\t\t\t\t\t\tisSetting = false;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tisSetting = true;\r\n\t\t\t\t\t\tMainActivity.playScene.pauseGame();\r\n\t\t\t\t\t\tbgSettingSpr.setVisible(true);\r\n\t\t\t\t\t\tbutton.setCurrentTileIndex(1);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (button == musicBtn) {\r\n\t\t\t\t\tif (ConfigManager.IS_MUSIC) {\r\n\t\t\t\t\t\tConfigManager.IS_MUSIC = false;\r\n\t\t\t\t\t\tif (MainActivity.playScene.bgMusic.isPlaying()) {\r\n\t\t\t\t\t\t\tMainActivity.playScene.bgMusic.stop();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbutton.setCurrentTileIndex(1);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tConfigManager.IS_MUSIC = true;\r\n\t\t\t\t\t\tMainActivity.playScene.bgMusic.play();\r\n\t\t\t\t\t\tbutton.setCurrentTileIndex(0);\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (button == soundBtn) {\r\n\t\t\t\t\tif (ConfigManager.IS_SOUND) {\r\n\t\t\t\t\t\tConfigManager.IS_SOUND = false;\r\n\t\t\t\t\t\tbutton.setCurrentTileIndex(1);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tConfigManager.IS_SOUND = true;\r\n\t\t\t\t\t\tbutton.setCurrentTileIndex(0);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}",
"public Button(){\n id=1+nbrButton++;\n setBounds(((id-1)*getDimX())/(Data.getNbrLevelAviable()+1),((id-1)*getDimY())/(Data.getNbrLevelAviable()+1),getDimX()/(2*Data.getNbrLevelAviable()),getDimY()/(2*Data.getNbrLevelAviable()));\n setText(id+\"\");\n setFont(Data.getFont());\n addMouseListener(this);\n setVisible(true);\n }",
"public void mousePressed(MouseEvent e)\n {\n points.setX(e.getX());\n points.setY(e.getY());\n }",
"public RectYellowWorldButton(World world) \n {\n super(world,\n \"buttonUnpressed.png\",\n \"buttonHovered.png\",\n \"buttonPressed.png\");\n }",
"private void checkButtonTranslate(Button button)\r\n {\r\n int[] loc = new int[2];\r\n button.getLocationOnScreen(loc);\r\n int y = loc[1];\r\n\r\n if (y > 1200) {\r\n //Toast.makeText(getApplicationContext(),\"EXCEDDED! \" + y, Toast.LENGTH_SHORT).show();\r\n updateQuestion();\r\n }\r\n }",
"private void updateGenerateButton() {\r\n\r\n\t\ttry {\r\n\t\t\txDim = Integer.valueOf(xDimField.getText());\r\n\t\t\tyDim = Integer.valueOf(yDimField.getText());\r\n\t\t\tscale = Integer.valueOf(scaleField.getText());\r\n\t\t} catch (NumberFormatException exc) {\r\n\t\t\tactionButton.setEnabled(false);\r\n\t\t\tvalidCoords = false;\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (xDim < XDIM_MIN || yDim < YDIM_MIN || \r\n\t\t\t\txDim > XDIM_MAX || yDim > YDIM_MAX ||\r\n\t\t\t\tscale < SCALE_MIN || scale > SCALE_MAX) {\r\n\t\t\tactionButton.setEnabled(false);\r\n\t\t\tvalidCoords = false;\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tactionButton.setEnabled(true);\r\n\t\tvalidCoords = true;\r\n\t}",
"public void setLocationAndSize()\n {\n\t welcome.setBounds(150,50,200,30);\n\t amountLabel.setBounds(50,100,150,30);\n\t amountText.setBounds(200,100,150,30);\n\t depositButton.setBounds(150,150,100,30);\n \n \n }",
"public void drawButtons(){\r\n\t\tGuiBooleanButton showDirection = new GuiBooleanButton(1, 10, 20, 150, 20, \"Show Direction\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isShowdir(), \"showdir\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.showdir\").split(\";\"));\r\n\t\tGuiChooseStringButton dirpos = new GuiChooseStringButton(2, width/2+50, 20, 150, 20, \"Dir-Position\", GuiPositions.getPosList(), \"posdir\", ModData.InfoMod, speicher,GuiPositions.getPos(((InfoMod)speicher.getMod(ModData.InfoMod.name())).getPosDir()),LiteModMain.lconfig.getData(\"Main.choosepos\").split(\";\"));\r\n\t\t\r\n\t\tGuiBooleanButton showFPS= new GuiBooleanButton(3, 10, 45, 150, 20, \"Show FPS\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isShowfps(), \"showfps\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.showfps\").split(\";\"));\r\n\t\tGuiChooseStringButton fpspos = new GuiChooseStringButton(4, width/2+50, 45, 150, 20, \"FPS-Position\", GuiPositions.getPosList(), \"posfps\", ModData.InfoMod, speicher,GuiPositions.getPos(((InfoMod)speicher.getMod(ModData.InfoMod.name())).getPosFPS()),LiteModMain.lconfig.getData(\"Main.choosepos\").split(\";\"));\r\n\t\t\r\n\t\tGuiBooleanButton showCoor = new GuiBooleanButton(5, 10, 70, 150, 20, \"Show Coor\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isShowcoor(), \"showcoor\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.showcoor\").split(\";\"));\r\n\t\tGuiChooseStringButton coorpos = new GuiChooseStringButton(6, width/2+50, 70, 150, 20, \"Coor-Position\", GuiPositions.getPosList(), \"poscoor\", ModData.InfoMod, speicher,GuiPositions.getPos(((InfoMod)speicher.getMod(ModData.InfoMod.name())).getPosCoor()),LiteModMain.lconfig.getData(\"Main.choosepos\").split(\";\"));\r\n\t\t\r\n\t\tGuiBooleanButton showworldage = new GuiBooleanButton(7, 10, 95, 150, 20, \"Show WorldAge\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isShowWorldAge(), \"showworldage\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.showworldage\").split(\";\"));\r\n\t\tGuiChooseStringButton worldagepos = new GuiChooseStringButton(8, width/2+50, 95, 150, 20, \"WorldAge-Position\", GuiPositions.getPosList(), \"posworldage\", ModData.InfoMod, speicher,GuiPositions.getPos(((InfoMod)speicher.getMod(ModData.InfoMod.name())).getPosWorldAge()),LiteModMain.lconfig.getData(\"Main.choosepos\").split(\";\"));\r\n\t\t\r\n\t\t\r\n\t\tGuiBooleanButton showFriendly = new GuiBooleanButton(7, 10, 120, 150, 20, \"Mark friendly spawns\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isShowingFriendlySpawns(), \"showfmobspawn\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.showfriendlymobspawn\").split(\";\"));\r\n\t\tGuiBooleanButton showAggressiv = new GuiBooleanButton(7, 10, 145, 150, 20, \"Mark aggressiv spawns\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isShowingAggressivSpawns(), \"showamobspawn\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.showaggressivmobspawn\").split(\";\"));\r\n\t\t\r\n\t\tGuiBooleanButton dynamic = new GuiBooleanButton(7, width/2+50, 120, 150, 20, \"dynamic selection\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isDynamic(), \"dynamichsel\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.dynamicselection\").split(\";\"));\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tGuiButton back = new GuiButton(9, width/2-100,height-50 , \"back to game\");\r\n\t\t\r\n\t\tbuttonList.add(showworldage);\r\n\t\tbuttonList.add(worldagepos);\r\n\t\tbuttonList.add(dirpos);\r\n\t\tbuttonList.add(fpspos);\r\n\t\tbuttonList.add(coorpos);\r\n\t\tbuttonList.add(showCoor);\r\n\t\tbuttonList.add(showFPS);\r\n\t\tbuttonList.add(showDirection);\r\n\t\t\r\n\t\tbuttonList.add(showFriendly);\r\n\t\tbuttonList.add(showAggressiv);\r\n\t\tbuttonList.add(dynamic);\r\n\t\t\r\n\t\tbuttonList.add(back);\r\n\t}",
"public void touchUp (InputEvent event, float x, float y, int pointer, int button) {\n if(x > 0 && x < 100 && y > 0 && y < 100){\n game.setScreen(game.mapState);\n }\n }",
"public void setPosition(float x, float y);",
"@Override\n\t\t\t\tpublic void onClick(ButtonSprite pButtonSprite, float pTouchAreaLocalX, float pTouchAreaLocalY) {\n\t\t\t\t}",
"private void locationClicked(int row, int col, int tool)\n {\n //2. Assign the values associated with the parameters to the grid\n\t grid[row][col] = tool;\n }",
"public void init()\n {\n Container screen = getContentPane();\n buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.Y_AXIS));\n buttonPanel.add(attackButton);\n attackButton.setBackground(Color.WHITE);\n buttonPanel.add(defendButton);\n buttonPanel.add(fireButton);\n buttonPanel.add(iceButton);\n buttonPanel.add(hPotionButton);\n buttonPanel.add(mPotionButton);\n attackButton.addActionListener(this);\n defendButton.addActionListener(this);\n hPotionButton.addActionListener(this);\n mPotionButton.addActionListener(this);\n fireButton.addActionListener(this);\n iceButton.addActionListener(this);\n offScreen = new BufferedImage(500,500, BufferedImage.TYPE_INT_RGB);\n add(buttonPanel, BorderLayout.EAST);\n }",
"public Affectation() {\r\n initComponents();\r\n Toolkit toolkit=getToolkit();\r\n Dimension size=toolkit.getScreenSize();\r\n setLocation(size.width/2-getWidth()/2,size.height/2-getHeight()/2);\r\n }",
"public void sendToMap(View view) {\n // Do something in response to button\n// Display dp = ((WindowManager)getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay();\n// int screen_width = dp.getWidth();\n// int screen_height = dp.getHeight();\n//\n// ImageButton butt1 = (ImageButton) view;\n//\n// ViewGroup.LayoutParams butt1_layout = view.getLayoutParams();\n// butt1_layout.height = screen_width/10;\n// butt1_layout.width = screen_height/10;\n//\n// butt1.setLayoutParams(butt1_layout);\n//\n// open when created SendMapActivity class\n// Intent intent = new Intent(this, SendMapActivity.class);\n// startActivity(intent);\n }",
"private void setButtonDimensions() {\n\n int lButtonVisibility = mInfoLButton.getVisibility();\n int rButtonVisibility = mInfoRButton.getVisibility();\n\n if (lButtonVisibility == View.VISIBLE &&\n rButtonVisibility == View.VISIBLE) {\n\n mInfoLButton.setBackgroundResource(R.drawable.drawable_button_dialog_small);\n mInfoRButton.setBackgroundResource(R.drawable.drawable_button_dialog_small);\n\n mInfoLButton.setLayoutParams(mButtonLpSmall);\n mInfoRButton.setLayoutParams(mButtonLpSmall);\n } else {\n\n mInfoLButton.setBackgroundResource(R.drawable.drawable_button_dialog);\n mInfoRButton.setBackgroundResource(R.drawable.drawable_button_dialog);\n\n mInfoLButton.setLayoutParams(mButtonLp);\n mInfoRButton.setLayoutParams(mButtonLp);\n }\n }",
"public void setChessLocation(ChessPiece aPiece, int xx, int yy) {//Just for test, set the selected chess piece(a JButton)'s location\n aPiece.setLocation(xx, yy);\n\n }",
"private void configureButtons() {\n\n backToMenu = new JButton(\"Menu\");\n if(isWatching){\n backToMenu.setBounds(575, 270, 100, 50);\n }\n else{\n backToMenu.setBounds(30, 800, 100, 50);\n }\n backToMenu.setFont(new Font(\"Broadway\", Font.PLAIN, 20));\n backToMenu.setBackground(Color.RED);\n backToMenu.setFocusable(false);\n backToMenu.addActionListener(this);\n add(backToMenu);\n }",
"@Override public void onMouseClick( Location point ) {\n new FilledRect( verticalCorner, 5, 210, canvas );\n new FilledRect( horizontalCorner, 210, 5, canvas );\n\n verticalCorner.translate( -10, 0 );\n horizontalCorner.translate( 0, -10 );\n }",
"public balik_turleri() {\n initComponents();\n Toolkit toolkit = getToolkit();\n Dimension dim = toolkit.getScreenSize();\n setLocation(dim.width/2-this.getSize().width/2, dim.height/2-this.getSize().height/2);\n setTitle(\"Balık Türleri Ekranı\");\n }",
"public void mousePressed(MouseEvent e) {\n xinitial = e.getX() / 5; //get the x value\r\n yinitial = e.getY() / 5; //get the y value\r\n }",
"public void drawButton(Minecraft par1Minecraft, int par2, int par3) {\r\n\t\tif(this.visible) {\r\n\t\t\tRenderUtils.bindTexture(texture);\r\n\t\t\tGL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);\r\n\t\t\tint posX = 176;\r\n\t\t\tint posY = 10;\r\n\t\t\t\r\n\t\t\tif(this.enabled) {\r\n\t\t\t\tposY = 0;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(!this.field_73749_j) {\r\n\t\t\t\tposX += 15;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.drawTexturedModalRect(this.xPosition, this.yPosition, posX, posY, this.width, this.height);\r\n\t\t}\r\n\t}",
"public void setLoc(int lx, int ly){\r\n \tbox.setLocation(lx,ly);\r\n }",
"@Override\n public void clicked(InputEvent event, float x, float y ){\n mGame.setScreen( new MainScreen( mGame ));\n }",
"private void locationClicked(int row, int col, int tool)\n {\n\t grid[row][col] = tool;\n }",
"@Override\n public void mousePressed(MouseEvent me) {\n mouse_x = me.getX();\n mouse_y = me.getY();\n super.mousePressed(me);\n }",
"private static void setButtonsPlaced(){\r\n for(MyButton b : mylist.getAllButtons()){\r\n b.setPlaced(false);\r\n }\r\n }",
"Label setLocation();",
"public void activateButton() {\n\t\tif (isBrowser) this.bringToBack();\r\n\t\tMainActivity.resetXY();\r\n\t}",
"public void relocateToPoint(boolean isUserClick){\n// System.out.println(\"Scene x: \"+point.getX()+\", y: \"+point.getY());\n// System.out.println(\"Local x: \"+getParent().sceneToLocal(point).getX()+\", y: \"+getParent().sceneToLocal(point).getY());\n// System.out.println(\"Relocate x: \"+(getParent().sceneToLocal(point).getX() - (getWidth() / 2))+\", y: \"+(getParent().sceneToLocal(point).getY() - (getHeight() / 2)));\n// System.out.println(getBoundsInLocal().getWidth());\n// System.out.println(widthProperty());\n\n if (isUserClick) {\n double new_x=getParent().sceneToLocal(x,y).getX();\n double new_y=getParent().sceneToLocal(x,y).getY();\n setX(new_x);\n setY(new_y);\n relocate(\n// (getParent().sceneToLocal(x,y).getX() - (widthCountry / 2)),\n// (getParent().sceneToLocal(x,y).getY() - (heightCountry / 2))\n new_x,new_y\n );\n } else {\n relocate(x,y);\n }\n\n\n }",
"private void formMousePressed(java.awt.event.MouseEvent evt) {\n xx=evt.getX();\n xy=evt.getY();\n \n }",
"private void formMousePressed(java.awt.event.MouseEvent evt) {\n xx=evt.getX();\n xy=evt.getY();\n \n }",
"@Override\n\tprotected void init() {\n\t\tsuper.init();\n\t\tisAnchorPointForPosition = true;\n\t\tsetContentSize(Screen.GAME_W, Screen.GAME_H);\n\t\tsetAnchor(Graphics.HCENTER | Graphics.VCENTER);\n\t}",
"@Override\r\n\tpublic void press(EditorInterface i, MouseEvent e) {\r\n\t\tthis.x = e.getX();\r\n\t\tthis.y = e.getY();\r\n\t\t\r\n\t\r\n\t}",
"public void mouseClicked(MouseEvent e) {\n p.x = e.getX();\n p.y = e.getY();\n repaint();\n }",
"@Override\n public final void initButtons(int x, int y, int addy){\n \n String data = s_datapath;\n addButton(data + \"SM_NeuesSpiel\" + s_typ, x, y, 1);\n addButton(data + \"OM_SpielSpeichern\" + s_typ, x, y + addy, 2);\n addButton(data + \"SM_SpielLaden\" + s_typ, x, y + addy * 2, 3);\n //addButton(data,x, y + addy*3, 4);\n addButton(data + \"Menu_Element_Blank\" + s_typ, x,/*715*/ y + addy * 4, 5);\n addButton(data + \"SM_SpielBeenden\" + s_typ, x,/*845*/ y + addy * 5, 6);\n }",
"@Override\n\tpublic void mousePressed(MouseEvent arg0) {\n\t\tgraphics.panel.requestFocus();\n\t\tx=arg0.getX();\n\t\ty=arg0.getY();\n\t}",
"Button(int x, int y, int w, int h, String label, int c){\n this.x = x;\n this.y = y;\n this.w = w;\n this.h = h;\n this.label = label;\n this.col = c;\n }",
"public void centerOnScreen()\n {\n \t// Get the size of the screen\n Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();\n \n // Determine the new location of the window\n int w = frame.getSize().width;\n int h = frame.getSize().height;\n int xloc = (dim.width-w)/2;\n int yloc = (dim.height-h)/2;\n\n // Move the window\n frame.setLocation(xloc, yloc);\n }",
"private void centerScreen(){\n\t\tint xCenter = Toolkit.getDefaultToolkit().getScreenSize().width/2;\n\t\tint yCenter = Toolkit.getDefaultToolkit().getScreenSize().height/2;\n\t\tint xSize = this.getSize().width;\n\t\tint ySize = this.getSize().height;\n\t\tPoint p = new Point();\n\t\tp.setLocation(xCenter - xSize/2, yCenter - ySize/2);\n\t\tthis.setLocation(p);\n\t}",
"public void setRobotLocation(Point p);",
"protected void update(){\n\t\t_offx = _x.valueToPosition(0);\n\t\t_offy = _y.valueToPosition(0);\n\t}",
"@Override\r\n\t\t\tpublic void clicked(InputEvent event, float x, float y) { \r\n\t\t\t\tFROGGERTESTER_IKKE_PUSH.WIDTH = 1280;\r\n\t\t\t\tFROGGERTESTER_IKKE_PUSH.HEIGHT = 720;\r\n\t\t\t\tGdx.graphics.setWindowedMode(FROGGERTESTER_IKKE_PUSH.WIDTH, FROGGERTESTER_IKKE_PUSH.HEIGHT);\r\n\t\t\t\t((Game) Gdx.app.getApplicationListener()).setScreen(new MainMenu());\r\n\t\t\t\t\r\n\t\t\t}",
"public void setLocation(int x, int y) {\r\n manager.setLocation(this, x, y);\r\n }",
"private void center() {\r\n\t\tDimension dim = Toolkit.getDefaultToolkit().getScreenSize();\r\n\r\n\t\tint x = (dim.width - getSize().width) / 2;\r\n\t\tint y = (dim.height - getSize().height) / 2;\r\n\r\n\t\tsetLocation(x, y);\r\n\t}",
"public void mousePressed(MouseEvent e) {\n pX = e.getX();\n pY = e.getY();\n }",
"public void drawButton(Minecraft p_146112_1_, int p_146112_2_, int p_146112_3_)\n {\n if (this.visible)\n {\n FontRenderer fontrenderer = p_146112_1_.fontRendererObj;\n p_146112_1_.getTextureManager().bindTexture(ThemeRegistry.curTheme().guiTexture());\n GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);\n this.hovered = p_146112_2_ >= this.xPosition && p_146112_3_ >= this.yPosition && p_146112_2_ < this.xPosition + this.width && p_146112_3_ < this.yPosition + this.height;\n int k = this.getHoverState(this.hovered);\n GlStateManager.enableBlend();\n GlStateManager.tryBlendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);\n GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA);\n \n GlStateManager.pushMatrix();\n float sh = height/20F;\n float sw = width >= 196? width/200F : 1F;\n float py = yPosition/sh;\n float px = xPosition/sw;\n GlStateManager.scale(sw, sh, 1F);\n \n if(width > 200) // Could use 396 but limiting it to 200 this makes things look nicer\n {\n \tGlStateManager.translate(px, py, 0F); // Fixes floating point errors related to position\n \tthis.drawTexturedModalRect(0, 0, 48, k * 20, 200, 20);\n } else\n {\n \tthis.drawTexturedModalRect((int)px, (int)py, 48, k * 20, this.width / 2, 20);\n \tthis.drawTexturedModalRect((int)px + width / 2, (int)py, 248 - this.width / 2, k * 20, this.width / 2, 20);\n }\n \n GlStateManager.popMatrix();\n \n this.mouseDragged(p_146112_1_, p_146112_2_, p_146112_3_);\n int l = 14737632;\n\n if (packedFGColour != 0)\n {\n l = packedFGColour;\n }\n else if (!this.enabled)\n {\n l = 10526880;\n }\n else if (this.hovered)\n {\n l = 16777120;\n }\n \n String txt = this.displayString;\n \n if(fontrenderer.getStringWidth(txt) > width) // Auto crop text to keep things tidy\n {\n \tint dotWidth = fontrenderer.getStringWidth(\"...\");\n \ttxt = fontrenderer.trimStringToWidth(txt, width - dotWidth) + \"...\";\n }\n \n this.drawCenteredString(fontrenderer, txt, this.xPosition + this.width / 2, this.yPosition + (this.height - 8) / 2, l);\n }\n }",
"@Override\r\n\tpublic void updateScreen() {\r\n\t\tsuper.updateScreen();\r\n\t\t_resolutionResolver = new ScaledResolution(Minecraft.getMinecraft(), Minecraft.getMinecraft().displayWidth, Minecraft.getMinecraft().displayHeight);\r\n\t\tthis.width = _resolutionResolver.getScaledWidth();\r\n\t\tthis.height = _resolutionResolver.getScaledHeight();\r\n\r\n\t\t// Handle when the player clicked on a cell\r\n\t\tif (_selectedCell != -1) {\r\n\t\t \r\n\t\t\t// make sure we have our player or otherwise we will\r\n\t\t // not be able to set the correct position for the player\r\n\t\t\tif (HubbyUtils.getServerPlayer() != null) {\r\n\t\t\t\tint cellIndex = _startCell + _selectedCell;\r\n\t\t\t\tif (cellIndex < UltraTeleportWaypoint.getWaypointCount()) {\r\n\t\t\t\t UltraTeleportWaypoint p = UltraTeleportWaypoint.getWaypoints().get(cellIndex);\r\n\t\t\t\t double posX = p.getPos().getX();\r\n\t\t\t\t double posY = p.getPos().getY();\r\n\t\t\t\t double posZ = p.getPos().getZ();\r\n\t\t\t\t float yaw = p.getRotationY();\r\n\t\t\t\t float pitch = p.getRotationX();\r\n\r\n\t\t\t\t // Get the client world to be able to find the proper block for teleporting\r\n\t\t\t\t World world = HubbyUtils.getClientWorld();\r\n\t\t\t\t if (world != null) {\r\n\t\t\t\t while (true) {\r\n\t\t\t\t \tBlockPos pos = new BlockPos(posX, posY, posZ);\r\n\t\t\t\t if (world.isAirBlock(pos)) {\r\n\t\t\t\t break;\r\n\t\t\t\t }\r\n\t\t\t\t posY += 1.0d;\r\n\t\t\t\t }\r\n\t\t\t\t }\r\n\r\n\t\t\t\t // Update the player's location on the server and then\r\n\t\t\t\t // that will pass down to the client player and update his\r\n\t\t\t\t // position as well\r\n\t\t\t\t HubbyUtils.getServerPlayer().playerNetServerHandler.setPlayerLocation(posX, posY, posZ, yaw, pitch);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t_selectedCell = -1;\r\n\t\t}\r\n\r\n\t\t// update selected list\r\n for (int i = 0; i < UltraTeleportWaypoint.getWaypointCount(); ++i) {\r\n if (i >= _selectedList.size()) {\r\n _selectedList.add(false);\r\n }\r\n }\r\n\r\n // Only show delete button when we have something selected\r\n if (getSelectedCount() > 0) {\r\n this.buttonList.add(_deleteButton);\r\n }\r\n else {\r\n this.buttonList.clear();\r\n }\r\n\t}",
"public boolean mouseClicked(gb gui, int mousex, int mousey, int button) {\n/* 233 */ if (button == 0)\n/* 234 */ return transferRect(gui, false); \n/* 235 */ if (button == 1) {\n/* 236 */ return transferRect(gui, true);\n/* */ }\n/* 238 */ return false;\n/* */ }",
"public void move(){\n\t\t\tbx += (int)movex;\n\t\t\tby += (int)movey;\n\t\t\tthis.setBounds((int)bx,(int)by,10,10);\n\n\t\t\t\n\t\t}"
] | [
"0.6996962",
"0.67642534",
"0.6722918",
"0.6366649",
"0.63325375",
"0.6312506",
"0.62993515",
"0.6261172",
"0.6239373",
"0.622173",
"0.61941195",
"0.6085298",
"0.6080609",
"0.6080609",
"0.6080609",
"0.6073616",
"0.6049785",
"0.6047866",
"0.6042527",
"0.6040803",
"0.6038069",
"0.6015497",
"0.5996972",
"0.5996739",
"0.5996173",
"0.5969911",
"0.5968958",
"0.59598255",
"0.5941623",
"0.59234583",
"0.592227",
"0.5920764",
"0.5916398",
"0.5914963",
"0.59139216",
"0.5912066",
"0.5909317",
"0.59087807",
"0.5893601",
"0.58889836",
"0.5870778",
"0.58690464",
"0.58614004",
"0.58553416",
"0.5853226",
"0.58333164",
"0.58262736",
"0.58252007",
"0.5825052",
"0.5816436",
"0.58081394",
"0.5807449",
"0.58065265",
"0.57955104",
"0.5793487",
"0.5783197",
"0.5775783",
"0.57709837",
"0.57664204",
"0.57555896",
"0.5747284",
"0.57304555",
"0.57255965",
"0.57230854",
"0.5721021",
"0.57195777",
"0.57059056",
"0.5705294",
"0.5703328",
"0.5702357",
"0.5697553",
"0.5693568",
"0.56935084",
"0.56900144",
"0.5688209",
"0.56823814",
"0.5681236",
"0.56802696",
"0.5658926",
"0.56563723",
"0.5650298",
"0.5650298",
"0.5645812",
"0.5640755",
"0.5629582",
"0.5617809",
"0.561635",
"0.5613715",
"0.56077707",
"0.5602592",
"0.56008756",
"0.56001943",
"0.5598815",
"0.55957353",
"0.55868477",
"0.55862194",
"0.55847377",
"0.5584718",
"0.5582202",
"0.55776566"
] | 0.5824717 | 49 |
Checks if piece has an owner | public boolean isEmpty() {
if (player == ePlayer.none) return true;
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isOwnerKnown() {\n\t\tif (owner == null && possibleOwners.size() == 1)\n\t\t\towner = possibleOwners.get(0);\n\t\t\t\n\t\treturn (owner == null);\n\t}",
"@Override\n public boolean isOwner(String groupingPath, String username) {\n return isMember(groupingPath + OWNERS, username);\n }",
"public boolean isOwner(EntityPlayer player) {\n\t\treturn player.getDisplayName().equals(owner) /*|| Platform.worldType() != Platform.WorldMode.MP*/;\r\n\t}",
"public final boolean isOwner() {\n return currentOwner == this;\n }",
"public boolean owns(String establishment) {\n for (int i = 0; i < Establishments.size(); i++) {\n if (Establishments.get(i).getName().equals(establishment)) {\n return true;\n }\n }\n return false;\n }",
"public boolean isOwned(){\n\t\treturn isOwned;\n\t}",
"private boolean isOwnOccupied(int x, int y) {\n for (int i = 0; i < player.own.length; i++) {\n if (player.own[i].x == x && player.own[i].y == y) {\n //System.out.println(\"own occupied:\" + i);\n return true;\n }\n }\n return false;\n }",
"public boolean isSignOwner(Sign sign, Player p)\n\t{\t\n\t\treturn getBoutiqueSign(sign.getBlock()).getOwnerString().compareToIgnoreCase(p.getName()) == 0;\n\t}",
"public boolean isPossibleOwner(Player player) {\n\t\treturn possibleOwners.contains(player);\n\t}",
"@Override\n public boolean addOwner(Resident owner) {\n if (!owner.getTowns().contains(town))\n return false;\n\n return owners.add(owner);\n }",
"public boolean checkifHasOwner(String uuid){\r\n\tArrayList<String> allAnimals = new ArrayList<String>();\r\n\t\tif(!plugin.getAnimalData().contains(\"Farmer\")){\r\n\t\t\treturn false;\r\n\t\t}else{\r\n\t\tSet<String> farmers = plugin.getAnimalData().getConfigurationSection(\"Farmer\").getKeys(false);\r\n\t//getting the farmers animals\r\n\t\tfor(String farmer : farmers){\r\n\t\t\tif(plugin.getAnimalData().get(\"Farmer.\" + farmer + \".Animals\") == null){\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tSet<String> t = plugin.getAnimalData().getConfigurationSection(\"Farmer.\" + farmer + \".Animals\").getKeys(false);\r\n\t\t\tfor(String FarmAnimals : t){\r\n\t\t\t\tallAnimals.add(FarmAnimals);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(allAnimals.contains(uuid)){\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n}",
"public boolean isOccupied() {\n return piece != null;\n }",
"public void isBought(Player p){\n\t\towner = p;\n\t\tisOwned=true;\n\t}",
"public boolean isOccupied() {\n\t\treturn piece != null;\n\t}",
"private boolean doesWarpExist(IPlayer owner, String name)\r\n\t{\r\n\t\t// Check if the warp is already stored in the cache.\r\n\t\tif (cache.Cache(cacheKey(owner, name)) != null)\r\n\t\t\treturn true;\r\n\r\n\t\tfinal boolean publicWarp = (owner == null);\r\n\t\tString privateWarp = \"\";\r\n\t\tif (!publicWarp)\r\n\t\t\tprivateWarp = \" AND `creator`='\" + owner.getUniqueId().toString() + \"'\";\r\n\r\n\t\treturn database.queryString(\r\n\t\t\t\"SELECT y FROM `warpdrive_locations` WHERE `name`=? AND `public`=?\" + privateWarp,\r\n\t\t\tname, publicWarp ? 1 : 0\r\n\t\t) != null;\r\n\t}",
"public abstract boolean isOwner (String url);",
"public boolean isChestOwner(Chest chest, Player p)\n\t{\n\t\treturn WorldGuardHandler.canBuild(p, chest.getBlock());\n\t}",
"public boolean equals(Owner owner) {\n\n return (this.name == owner.getFirstName() && this.manager == owner.getManager());\n }",
"public boolean isOwner(GiftCard giftCard) {\n ArrayList<GiftCard> giftCards = getInv().getInvList();\n return giftCards.contains(giftCard);\n }",
"@SuppressWarnings(\"deprecation\")\n\tprivate static boolean hasPermission(String player, Block block, boolean ownership) {\n\t\tInventoryHolder chest;\n\t\tif (block.getType() == Material.CHEST || block.getType() == \n\t\t\t\tMaterial.TRAPPED_CHEST) {\n\t\t\tchest = getHolder(block);\n\t\t} else if (block.getType() == Material.WALL_SIGN) {\n\t\t\tBlock chestBlock = null;\n\t\t\tswitch (block.getData()) {\n\t\t\tcase 2: \n\t\t\t\tchestBlock = block.getRelative(BlockFace.NORTH\n\t\t\t\t\t\t.getOppositeFace());\n\t\t\t\tbreak;\n\t\t\tcase 5: \n\t\t\t\tchestBlock = block.getRelative(BlockFace.EAST\n\t\t\t\t\t\t.getOppositeFace());\n\t\t\t\tbreak;\n\t\t\tcase 3: \n\t\t\t\tchestBlock = block.getRelative(BlockFace.SOUTH\n\t\t\t\t\t\t.getOppositeFace());\n\t\t\t\tbreak;\n\t\t\tcase 4: \n\t\t\t\tchestBlock = block.getRelative(BlockFace.WEST\n\t\t\t\t\t\t.getOppositeFace());\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (chestBlock.getType() != Material.CHEST && chestBlock\n\t\t\t\t\t.getType() != Material.TRAPPED_CHEST) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tchest = getHolder(chestBlock);\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tString[] owners = getUsers(getSigns(getChests(chest)));\n\t\t\n\t\treturn (owners.length == 0 && !ownership)|| Arrays.asList(owners).contains(player);\n\t}",
"public boolean hasPiece()\r\n\t{\r\n\t\treturn piece != null;\r\n\t}",
"@Override\n public boolean isOwningCollection(Item item, Collection c)\n {\n Collection collection = item.getOwningCollection();\n\n if (collection != null && c.getID() == collection.getID())\n {\n return true;\n }\n\n // not the owner\n return false;\n }",
"@Given(\"^an owner exists within the database$\")\n\tpublic void an_owner_exists_within_the_database() throws Throwable {\n\t throw new PendingException();\n\t}",
"public void testGetOwner_1_accuracy() {\n instance.setOwner(owner);\n assertTrue(\"Owner is not set properly.\", owner == instance.getOwner());\n }",
"public boolean isPlayerOwned(int row, int column) {\n return getCell(row, column).isPlayerOwned();\n }",
"@Override\n\tpublic boolean hasStrongOwners() {\n\t\treturn false;\n\t}",
"java.lang.String getOwner();",
"java.lang.String getOwner();",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof Owner)) {\n return false;\n }\n Owner other = (Owner) object;\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }",
"public void testGetOwner() {\n System.out.println(\"getOwner\");\n Wizard instance = new Wizard();\n Component result = instance.getOwner();\n assertNotNull(result);\n }",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof Owner)) {\n return false;\n }\n Owner other = (Owner) object;\n if ((this.ownerId == null && other.ownerId != null) || (this.ownerId != null && !this.ownerId.equals(other.ownerId))) {\n return false;\n }\n return true;\n }",
"public Boolean checkHouseWithId(){\n\t\t\tif(removeHouse == null){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}",
"@Test\r\n public void lookProfileByOwner() {\n assertNull(Activity.find(\"select a from Activity a where a.member = ?\", member).first());\r\n\r\n // Our member looked at his own profile\r\n member.lookedBy(member);\r\n \r\n // Still no activity for member\r\n assertNull(Activity.find(\"select a from Activity a where a.member = ?\", member).first());\r\n }",
"@Override\n public boolean hasDeviceOwner() {\n final CallerIdentity caller = getCallerIdentity();\n Preconditions.checkCallAuthorization(isDefaultDeviceOwner(caller)\n || canManageUsers(caller) || isFinancedDeviceOwner(caller)\n || hasCallingOrSelfPermission(permission.MANAGE_PROFILE_AND_DEVICE_OWNERS));\n return mOwners.hasDeviceOwner();\n }",
"public static boolean isInParty(Player player) {\n\t\treturn getParty(player) != null;\n\t}",
"public boolean hasAttachmentOwner( EAIMMCtxtIfc theCtxt, com.dosmil_e.kit.core.model.trace.ifc.KitCommentIfc theAttachmentOwner) throws EAIException;",
"public Boolean isDraftOwner(final Artifact artifact);",
"Participant getOwner();",
"@Test\n public void ownerArgumentNotAddedIfOwnerIsInGroupWithUserPools() throws AmplifyException {\n final AuthorizationType mode = AuthorizationType.AMAZON_COGNITO_USER_POOLS;\n\n // OwnerInGroup class uses combined owner and group-based auth,\n // and user is in the read-restricted group.\n for (SubscriptionType subscriptionType : SubscriptionType.values()) {\n GraphQLRequest<OwnerInGroup> originalRequest =\n createRequest(OwnerInGroup.class, subscriptionType);\n GraphQLRequest<OwnerInGroup> modifiedRequest =\n decorator.decorate(originalRequest, mode);\n assertNull(getOwnerField(modifiedRequest));\n }\n }",
"public boolean isOwner(String role) throws IOException {\n\t\treturn (rolePoster.sendPost(\"isOwner=\" + role).startsWith(\"true\"));\n\t}",
"public final boolean tryOwn() {\n return own(this) == this;\n }",
"public boolean isHouse() {\n return (this.getId() == Player.PLAYER_1.getHouseIndex())\n || (this.getId() == Player.PLAYER_2.getHouseIndex());\n }",
"public boolean canPlaceRoad(Player p, Edge e){\r\n for(Corner c: e.getConnectingCorners()){\r\n if(c.getOwner()==p) return true;\r\n }\r\n return false;\r\n }",
"public SettlementPlayer getOwner();",
"public boolean CheckForUNO(Player aPlayer) {\n\t\tif (aPlayer.getPlayersHand().size() == 1) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\taPlayer.getPlayersHand().add(GameUNODeck.DealACard()); // IF player called for UNO and really did not have UNO, the player is dealt two cards\n\t\t\taPlayer.getPlayersHand().add(GameUNODeck.DealACard());\n\t\t\treturn false;\n\t\t}\n\t}",
"private static boolean checkExistenceAndOwner(String username, String clientData, String playlist){\n //Check if user exists\n if (!CheckExistence.userExists(username)){\n System.out.println(clientData + \" | \" + username\n + \" | User not found.\");\n return false;\n }\n\n //Check if playlist exists\n if (!CheckExistence.playlistExists(playlist)){\n System.out.println(clientData + \" | \" + username\n + \" | Playlist not found.\");\n return false;\n }\n\n //Check if user owns the playlist\n if (!Permission.ownsPlaylist(username, playlist)){\n System.out.println(clientData + \" | \" + username\n + \" | You don't own this playlist.\");\n return false;\n }\n return true;\n }",
"public boolean hasOpponent() {\n return opponentBuilder_ != null || opponent_ != null;\n }",
"public Player getOwner() {\n return owner;\n }",
"String getOwner();",
"String getOwner();",
"public void setOwner (String owner) {\n\t\tthis.owner=owner;\n\t}",
"public boolean isCardToAccuse() {\n\t\treturn (getOwner() == CASE_FILE_PLAYER);\n\t}",
"public void setOwner(String owner) {\n this.owner = owner;\n }",
"public void setOwner(String owner) {\n this.owner = owner;\n }",
"public void setOwner(String owner) {\n this.owner = owner;\n }",
"public void setOwner(String owner) {\n this.owner = owner;\n }",
"public boolean isOwner(User user, Chatroom chatroom) {\n\t\tList<Chatroom> chatrooms = user.getOwnedChatrooms();\n\n\t\treturn chatrooms.contains(chatroom) && chatroom.getOwner() == user;\n\t}",
"public int getOwner() {\n validify();\n return Client.INSTANCE.pieceGetOwner(ptr);\n }",
"public boolean canBuild(String username) {\n\t\tif (getOwner() != null)\n\t\t\treturn false;\n\n\t\t/*\n\t\t * If there is a village owned by the player on one of the\n\t\t * intersections, the player can build a road\n\t\t */\n\t\tfor (int i = 0; i < myIntersections.length; i++) {\n\t\t\tIntersectionUnit unit = myIntersections[i].getUnit();\n\t\t\tif (unit != null) {\n\t\t\t\t// There is a unit here\n\t\t\t\tif (unit instanceof Village) {\n\t\t\t\t\t// The unit is a village\n\t\t\t\t\tVillage village = (Village) unit;\n\t\t\t\t\tif (village.getOwner().getUsername().equals(username))\n\t\t\t\t\t\t// The player owns the village\n\t\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/*\n\t\t * If there is an adjacent road owned by the player, the player can\n\t\t * build\n\t\t */\n\t\tfor (int i = 0; i < myIntersections.length; i++) {\n\t\t\tIntersection intersection = myIntersections[i];\n\n\t\t\tfor (Edge edge : intersection.getEdges()) {\n\t\t\t\tif (edge.getOwner() != null)\n\t\t\t\t\tif (edge.getOwner().getUsername().equals(username))\n\t\t\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}",
"public boolean checkForUser(Player p) {\n\t\tif(p.getName(p).equals(\"user\")) {\n\t\t\treturn true;\t\t\t\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public String getOwner() { return owner; }",
"public boolean isAt(Point punto) {\r\n Point inner = toInnerPoint(punto);\r\n for (Point block : innerPiece.getPoints())\r\n \tif (block.X() == inner.X() && block.Y() == inner.Y())\r\n \t\treturn true;\r\n return false;\r\n }",
"public boolean isComputerOwned(int row, int column) {\n return getCell(row, column).isComputerOwned();\n }",
"public String getOwner();",
"private static boolean checkColonyForTools(AIUnit aiUnit, Colony colony) {\n return colony != null\n && !colony.isDisposed()\n && colony.getOwner() == aiUnit.getUnit().getOwner()\n && colony.canProvideEquipment(Unit.Role.PIONEER\n .getRoleEquipment(colony.getSpecification()));\n }",
"public boolean checkCheck(Player p){\n\t\tPosition position = null;\n\t\tfor (int i = Position.MAX_ROW; i >= Position.MIN_ROW; i--) {\n\t\t\tfor (char c = Position.MIN_COLUMN; c <= Position.MAX_COLUMN; c++) {\n\t Piece piece = gameState.getPieceAt(String.valueOf(c) + i);\n\t if(piece!=null &&piece.getClass().equals(King.class) && piece.getOwner()==p){\n\t \tposition = new Position(c,i);\n\t \tbreak;\n\t }\n\t\t\t}\n\t\t}\n\t\t//Find out if a move of other player contains position of king\n\t\tList<Move> moves = gameState.listAllMoves(p==Player.Black?Player.White:Player.Black,false);\n\t\tfor(Move move : moves){\n\t\t\tif(move.getDestination().equals(position)){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t\t\n\t}",
"public Owner getOwner()\n {\n return owner;\n }",
"private boolean partAvailable(Piece piece) {\n boolean temp = false;\r\n try {\r\n temp = repairAreaInt.partAvailable(piece, id);\r\n } catch (RemoteException e) {\r\n System.err.println(\"Excepção na invocação remota de método\" + getName() + \": \" + e.getMessage() + \"!\");\r\n System.exit(1);\r\n }\r\n return temp;\r\n }",
"@Test\n public void testGetOwner()\n {\n System.out.println(\"getOwner\");\n Party instance = null;\n Account expResult = null;\n Account result = instance.getOwner();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }",
"public boolean isPlayerOwned(int inputPlayerId, int territoryId) {\n\t\treturn getCountryArray()[territoryId].getCountryOwner()==inputPlayerId;\n\t}",
"private boolean checkCost(int owner, ItemType item) {\n\t\t\t\t\treturn false;\n\t\t\t\t}",
"public static boolean own() {\n return InventoryManager.getAccessibleCount(ItemPool.COMBAT_LOVERS_LOCKET) > 0;\n }",
"protected boolean isPieceOfFurnitureDeletable(HomePieceOfFurniture piece) {\n return true;\n }",
"@java.lang.Override\n public boolean hasOpponent() {\n return opponent_ != null;\n }",
"private boolean checkAppInstanceOwnership(){\n\n\t\ttry {\n\t\t\t\n\t\t\t\n\t \tif(getUser() != null){\n\t \t\t\n\t \t\tif(getUser().getRole().equalsIgnoreCase(UserRoles.admin.toString()))\n\t \t\t\treturn true;\n\t \t\telse{\n\t \t\t\t\n\t\t\t\t\tAppInstance app = AHEEngine.getAppInstanceEntity(Long.valueOf(appinst));\n\t \t\t\t\t\t\t\t\t\n\t \t\t\tif(app != null){\n\t \t\t\t\t\n\t \t\t\t\tif(app.getOwner().getId() == getUser().getId())\n\t \t\t\t\t\treturn true;\n\t \t\t\t\telse{\n\t \t\t\t\t\tsetStatus(Status.CLIENT_ERROR_FORBIDDEN);\n\t \t\t\t\t\treturn false;\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t\t\t\n\t \t\t\t\n\t \t\t}\n\t \t\t\n\t \t}\n\t\t\t\n\t\t} catch (NumberFormatException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (AHEException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tsetStatus(Status.CLIENT_ERROR_FORBIDDEN);\n \treturn false;\n }",
"private boolean isOpponentAround(Actor actor, GameMap map) {\n Location currentPosition = map.locationOf(this);\n int closeOpponent = 0;\n for (Exit exit : currentPosition.getExits()) {\n Location destination = exit.getDestination();\n if (destination.containsAnActor()) {\n if (!(destination.getActor()\n instanceof Player)) { // If not player there is dinasours arround\n closeOpponent++;\n }\n }\n }\n return closeOpponent > 0;\n }",
"public boolean removePossibleOwner(Player player) {\n\t\treturn possibleOwners.remove(player);\n\t}",
"private boolean isUidProfileOwnerLocked(int appUid) {\n ensureLocked();\n\n final int userId = UserHandle.getUserId(appUid);\n final ComponentName profileOwnerComponent = mOwners.getProfileOwnerComponent(userId);\n if (profileOwnerComponent == null) {\n return false;\n }\n for (ActiveAdmin admin : getUserData(userId).mAdminList) {\n final ComponentName currentAdminComponent = admin.info.getComponent();\n if (admin.getUid() == appUid && profileOwnerComponent.equals(currentAdminComponent)) {\n return true;\n }\n }\n return false;\n }",
"public AbstractGameObject getOwner() {\r\n\t\treturn owner;\r\n\t}",
"public Owner getOwner() {\n return owner;\n }",
"public boolean isAllowed(Player owner, Item item) {\r\n if (item.getValue() > 50000) {\r\n owner.getActionSender().sendMessage(\"This item is too valuable to trust to this familiar.\");\r\n return false;\r\n }\r\n if (!item.getDefinition().isTradeable()) {\r\n owner.getActionSender().sendMessage(\"You can't trade this item, not even to your familiar.\");\r\n return false;\r\n }\r\n if (!owner.getFamiliarManager().getFamiliar().getDefinition().getName().toLowerCase().contains(\"abyssal\")) {\r\n if (item.getId() == 1436 || item.getId() == 7936 || !item.getDefinition().getConfiguration(ItemConfiguration.BANKABLE, true)) {\r\n owner.getActionSender().sendMessage(\"You can't store \" + item.getName().toLowerCase() + \" in this familiar.\");\r\n return false;\r\n }\r\n }\r\n return true;\r\n }",
"User getOwner();",
"@objid (\"8b942215-f0a1-454e-9f8a-596315ee40d5\")\n Instance getOwner();",
"public String getOwner(){\n return owner;\r\n }",
"protected Object getOwner(){\n return owner;\n }",
"default boolean isOpponent(Player player, UUID playerToCheckId) {\n return !player.getId().equals(playerToCheckId);\n }",
"public boolean isAccountOwner() {\n\t\treturn acctOwnerFlg;\n\t}",
"@Test\n public void testGetMyTasks_ByPotentialOwner() throws HTException {\n\n log.info(\"testGetMyTasks_ByPotentialOwner\");\n \n Task t = createTask_OnePotentialOwner();\n\n List<Task> results = this.services.getMyTasks(\"user1\", TaskTypes.ALL,\n GenericHumanRole.POTENTIAL_OWNERS, null,\n new ArrayList<Status>(), null, null, null, null, 0);\n\n Assert.assertEquals(1, results.size());\n\n Task taskToCheck = results.get(0);\n Person p = this.assigneeDao.getPerson(\"user1\");\n Assert.assertNotNull(p);\n \n log.info(taskToCheck.getPotentialOwners());\n Assert.assertEquals(taskToCheck.getActualOwner(), p);\n Assert.assertEquals(taskToCheck.getPotentialOwners().size(), 1);\n \n log.info(\"Potential owner: \" + taskToCheck.getPotentialOwners().iterator().next());\n log.info(\"Potential owner: \" + p);\n \n Assert.assertEquals(p, taskToCheck.getPotentialOwners().iterator().next());\n \n //TODO why it fails??? jnb???\n //Assert.assertTrue(taskToCheck.getPotentialOwners().contains(p));\n \n log.info(\"~testGetMyTasks_ByPotentialOwner\");\n }",
"public void setOwnerId(String ownerId) {\n this.ownerId = ownerId;\n }",
"public boolean isEnemy(Piece piece) {\n\t\treturn piece == null ? false : piece.team != this.team;\n\t}",
"public boolean isHere(){ return this.piece.isAffected();}",
"public void setOwner(String owner) {\n mOwner = owner;\n }",
"@JsonIgnore\n @Override\n public Person getOwner()\n {\n if (getFetchOptions() != null && getFetchOptions().hasOwner())\n {\n return owner;\n }\n else\n {\n throw new NotFetchedException(\"Owner has not been fetched.\");\n }\n }",
"@SuppressWarnings(\"rawtypes\")\n\tpublic boolean isNameInUse(String name,String idOwner)\n\t{\n\t\topen();\n\t\ttry\n\t\t{\n\t\t\tSystem.out.println(name);\n\t\t\tQuery query=DB.query();\n\t\t\tquery.constrain(Census.class);\n\t\t\tquery.descend(\"idOwner\").constrain(idOwner);\n\t\t\tquery.descend(\"censusName\").constrain(name).endsWith(false);\n\t\t\t\n\t\n\t\t\t\n\t\t\tObjectSet result=query.execute();\n\t\t\t\n\t\t\tif(result.hasNext())\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tclose();\n\t\t}\n\t\t\n\t\treturn false;\n\t\t\n\t}",
"public boolean isHasProvisioningOnThisObjectOrParent() {\r\n \r\n for (GuiGrouperProvisioningAttributeValue attributeValue: guiGrouperProvisioningAttributeValues) {\r\n if (attributeValue.getGrouperProvisioningAttributeValue().isDirectAssignment() || StringUtils.isNotBlank(attributeValue.getGrouperProvisioningAttributeValue().getOwnerStemId())) {\r\n return true;\r\n }\r\n }\r\n \r\n return false;\r\n }",
"Optional<String> getOwner();",
"boolean isSetWhoOwnsWhom();",
"public boolean isCellOwned(int row, int column) {\n return !isCellOpen(row, column);\n }",
"public void setOwner(Player player) {\n owner = player;\n }",
"public String getOwner() {\r\n return owner;\r\n }",
"public boolean hasValidHolder(){\r\n\t\tHolder directHolder = getDirectHolder();\r\n\t\tif(isTerminated() && directHolder == null) \r\n\t\t\treturn true;\r\n\t\telse if(isTerminated() && directHolder != null){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif(directHolder == null || directHolder == this)\r\n\t\t\treturn false;\t\t\r\n\t\telse{\r\n\t\t\tHolder parser = getDirectHolder();\r\n\t\t\twhile(!parser.isSupremeHolder()){\r\n\t\t\t\tif(parser == this)\r\n\t\t\t\t\treturn false;\r\n\t\t\t\tparser = ((Item)parser).getDirectHolder();\r\n\t\t\t}\t\r\n\t\t}\r\n\t\treturn true;\r\n\t}"
] | [
"0.68471205",
"0.6693386",
"0.6683465",
"0.6538784",
"0.6503863",
"0.64325756",
"0.63863575",
"0.6333142",
"0.62984896",
"0.62744087",
"0.6229721",
"0.62261",
"0.6111164",
"0.610102",
"0.6077352",
"0.6069889",
"0.60597026",
"0.60588205",
"0.6042373",
"0.6032091",
"0.59826976",
"0.5974205",
"0.59693253",
"0.5935753",
"0.5818341",
"0.58169985",
"0.5809756",
"0.5809756",
"0.5793002",
"0.5790695",
"0.5787163",
"0.5781192",
"0.5770486",
"0.57613003",
"0.57504827",
"0.56955844",
"0.56914556",
"0.5682852",
"0.56764877",
"0.5666754",
"0.56619704",
"0.56549937",
"0.56406415",
"0.56294227",
"0.56134874",
"0.5600315",
"0.5583923",
"0.5580233",
"0.5576234",
"0.5576234",
"0.5567354",
"0.5557607",
"0.555256",
"0.555256",
"0.555256",
"0.555256",
"0.55500853",
"0.5540996",
"0.55259705",
"0.5521329",
"0.55190885",
"0.55048496",
"0.55027527",
"0.55002",
"0.5500102",
"0.54932016",
"0.5488466",
"0.54844356",
"0.5483846",
"0.5480433",
"0.5473775",
"0.54702383",
"0.54609114",
"0.544892",
"0.5447773",
"0.5445167",
"0.5444758",
"0.54446495",
"0.54382116",
"0.5434787",
"0.54266214",
"0.54226404",
"0.5421998",
"0.54218304",
"0.5414409",
"0.5413366",
"0.54077643",
"0.5400938",
"0.5396302",
"0.5391164",
"0.53805375",
"0.5378152",
"0.5368259",
"0.535849",
"0.53512496",
"0.5342863",
"0.5337451",
"0.532536",
"0.5318076",
"0.5314063",
"0.5313577"
] | 0.0 | -1 |
Checks if piece is active | public boolean isActiveImageOn() {
if (isActiveImageOn == true) return true;
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasActive();",
"public boolean hasPiece()\r\n\t{\r\n\t\treturn piece != null;\r\n\t}",
"public boolean isOccupied() {\n return piece != null;\n }",
"public boolean isOccupied() {\n\t\treturn piece != null;\n\t}",
"public boolean isActivePlayerPiece(IPiece ipiece) {\n\n for (IPiece piece : getActivePlayerPieces()) {\n if (piece.getClass().getSuperclass().equals(ipiece.getClass().getSuperclass())) {\n return true;\n }\n }\n return false;\n }",
"public boolean hasCaptured() {\n //YOUR CODE HERE\n\t return pieceCaptured;\n }",
"public static boolean isPieceAvailable(int[] piece) {\n /* Before this was checking if a frame was available,\n but now it's checking for the whole piece since the method\n implemented before could give bugs */\n\n for (int b = 1; b <= ColorFrames.BOARD_PLACES; ++b) {\n if (hasSpaceForPiece(piece, b))\n return true;\n }\n\n return false;\n }",
"@Override\n public boolean activate() {\n //When will this activate?\n return Areas.FALADOR.contains(ctx.players.local().tile())\n && ctx.widgets.component(1371,0).visible()\n && !ctx.objects.select().name(\"Waterpump\").within(6.0).isEmpty();\n }",
"public boolean checkActive() {\n\t\treturn active;\n\t}",
"public boolean hasActive() {\n return active_ != null;\n }",
"@Override\n public boolean active() {\n General.sleep(100); // Sleep to reduce CPU usage.\n return fishing_spots[0].isOnScreen();\n }",
"public boolean hasMoves() {\n if(color != 0){\n activePieces = getPiece();\n\n for(int i = 0; i < activePieces.size(); i++){\n Piece curr = activePieces.get(i);\n\n if(curr.possibleMoves(state).size() > 0){\n //curr.printSpecial();\n return true;\n }\n }\n return false;\n }\n System.out.println(\"Empty stop error\");\n return false;\n }",
"boolean hasActivePokemon();",
"@Override\n public boolean active() {\n return !isFishing();\n }",
"boolean isActive();",
"boolean isActive();",
"boolean isActive();",
"private boolean partAvailable(Piece piece) {\n boolean temp = false;\r\n try {\r\n temp = repairAreaInt.partAvailable(piece, id);\r\n } catch (RemoteException e) {\r\n System.err.println(\"Excepção na invocação remota de método\" + getName() + \": \" + e.getMessage() + \"!\");\r\n System.exit(1);\r\n }\r\n return temp;\r\n }",
"public boolean gameStillActive() {\n boolean active = true;\n \n // Check max days is not reached.\n active = active && getCurrentDay() < maxDays;\n \n // Check there is still living crew members\n active = active && crewState.getLivingCrewCount() > 0;\n \n // Check ship is not destroyed\n active = active && crewState.getShip().getShieldLevel() > 0;\n \n // Check ship parts have not been found.\n active = active && crewState.getShipPartsFoundCount() < getShipPartsNeededCount();\n \n return active;\n }",
"public boolean activeFor(String player);",
"public boolean playerActive(int pno){\n\t\tif (playerPosition.get(pno) == null || collectedGold.get(pno) == null){\n\t\t\treturn false;\n\t\t}\n\t\telse{return true;}\n\t}",
"public boolean hasPieces() {\n return !(pieces.isEmpty());\n }",
"public boolean isHere(){ return this.piece.isAffected();}",
"@Override\n public boolean active() {\n return isFishing();\n }",
"@java.lang.Override\n public boolean hasActivePokemon() {\n return activePokemon_ != null;\n }",
"@Override public boolean active() {\n General.sleep(200, 300); // Reduces CPU usage.\n return isAtFish();\n }",
"public boolean checkWin (int totalPieces){\n\t\treturn isFull();\n\t}",
"@Override\n public boolean active() {\n return !Inventory.isFull();\n }",
"public boolean getActive();",
"public boolean getActive();",
"int isActive();",
"public boolean isActive();",
"public boolean isActive();",
"public boolean isActive();",
"public boolean isActive();",
"public boolean isActive();",
"public boolean isActive();",
"public boolean isActive();",
"public boolean isActive();",
"public boolean isActive();",
"public boolean isActive();",
"public boolean isActive();",
"public boolean isActive();",
"public boolean isActive();",
"public boolean isActive();",
"public boolean isActive();",
"private boolean canCaptureEnPassant(Board board, Point pt) {\n Piece temp = board.getPieceAt(pt);\n if(temp != null)\n if (temp instanceof Pawn && temp.getColor() != this.color)\n if (((Pawn)temp).enPassantOk)\n return true;\n return false;\n }",
"public boolean activate() { //if true continue to execute\n\n if (Inventory.getCount(PowerFletch.LOG) >= 1) {\n System.out.println(\"cutting activated\");\n\n return true;\n }\n\n return false;\n }",
"@Override\n\tpublic Boolean isActve() {\n\t\treturn active;\n\t}",
"public boolean isPeace() {\r\n\t\tfor (int i=0; i<piece.size(); i++) {\r\n\t\t\tChessPiece p = piece.get(order[i]);\r\n\t\t\tif (p.chessPlayer.equals(\"black\") || p.chessPlayer.equals(\"white\")) {\r\n\t\t\t\tVector<ChessBoardBlock> blocks = this.getMovablePosition(p);\r\n\t\t\t\tif (blocks.size()>1) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"protected abstract boolean isPlayerActivatable(PlayerSimple player);",
"public boolean hasActivePokemon() {\n return activePokemonBuilder_ != null || activePokemon_ != null;\n }",
"boolean hasCurHP();",
"boolean hasCurHP();",
"boolean hasCurHP();",
"boolean hasCurHP();",
"boolean hasCurHP();",
"boolean hasCurHP();",
"private boolean isWinning(Piece[] arr) {\n if (arr[0] == X) {\n for (Piece piece : arr) {\n if (piece != X) {\n return false;\n }\n }\n }\n else {\n for (Piece piece : arr) {\n if (piece != O) {\n return false;\n }\n }\n }\n return true;\n }",
"public boolean active(){\r\n\t\treturn active;\r\n\t}",
"public boolean meWin(){\n return whitePieces.size() > blackPieces.size() && isWhitePlayer;\n }",
"boolean finishBlackMoves(int piece) {\n\t\treturn (piece == 0 && curPlayer == 2);\n\t}",
"public boolean isActive(){\r\n\t\treturn active_;\r\n\t}",
"public boolean isActive() { return true; }",
"private boolean selectCondition2(int x, int y) {\n \n if (pieceAt(x, y) != null) {\n if (rightTurn(x, y)) {\n if (selectedPiece == null) {\n return true;\n } else if (!hasMoved) {\n return true; \n } else {\n return false;\n }\n \n } \n else {\n return false;\n }\n } else {\n return false;\n }\n \n \n }",
"public abstract boolean isActive();",
"public boolean isAlive(){\r\n if (currHP > 0){\r\n return true;\r\n }\r\n return false;\r\n }",
"@Override\n public boolean activate() {\n // We only want to go to the bank if our inventory is full and we aren't already there.\n return Mining.isInvFull() && !Constants.BANK_AREA.contains(Players.getLocal());\n }",
"protected abstract boolean isCardActivatable(Card card);",
"public boolean isThisThingOn(){\r\n return isActive;\r\n }",
"boolean hasCurMP();",
"boolean hasCurMP();",
"boolean hasCurMP();",
"boolean hasCurMP();",
"boolean hasCurMP();",
"boolean hasCurMP();",
"boolean hasCurrentAction();",
"public boolean isCheck()\n {\n Game g = Game.getInstance();\n\n for(Piece[] p1 : g.m_board.m_pieces)\n {\n for(Piece p2 : p1)\n {\n if(p2 == null){ continue; }\n if(g.containsMove(new Move(m_x, m_y), p2.getMoves()))\n return true;\n }\n }\n\n return false;\n }",
"public boolean isAllPiecesEaten(Piece piece) {\n\t\tArrayList<Piece> ediblePieces= piece.getMustEdiblePieces();\n\t\tif(ediblePieces.isEmpty()) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\r\n public boolean isActive() {\r\n return m_active;\r\n }",
"public boolean isActive(){\n\t\treturn active;\n\t}",
"public boolean canSelect(int x, int y){\n\t\tif(!(pieceAt(x,y)==null)){\n\t\tSystem.out.println(fireplaying);\n\t\tif(fireplaying){\n\t\t\tif(!moved){\n\t\t\t\tif(pieceAt(x,y).isFire()){\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t// else if (moved)\n\t\t\t// {\n\t\t\t// \tif (pieceAt(x, y) == selected)\n\t\t\t// \t{\n\t\t\t// \t\treturn true;\n\t\t\t// \t}\n\t\t\t// }\n\t\t\treturn false;\n\t\t}\n\t\telse if(!fireplaying){\n\t\t\tif(!moved){\n\t\t\t\tif(!pieceAt(x,y).isFire()){\n\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t// else if (moved)\n\t\t\t// {\n\t\t\t// \tif (pieceAt(x, y) == selected)\n\t\t\t// \t{\n\t\t\t// \t\treturn true;\n\t\t\t// \t}\n\t\t\t// }\n\t\t\treturn false;\n\t\t}\n\t}\n\telse if((pieceAt(x,y))==null){\n\t\tif(selected==null){\n\t\t\treturn false;\n\t\t}\n\t\telse{\n\t\t\tif(validMove(xpos,ypos,x,y)){\n\t\t\t\t\tif(moved&&selected.hasCaptured()){\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\telse if(moved){\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn false;\n\t}",
"private boolean moveContinues(Point piece){\r\n boolean result = canEats(piece);\r\n // if move continues, next move has to start with the same piece\r\n model.setCheckPiece((result)?piece:null);\r\n return result;\r\n }",
"public static boolean isActive(){\n return active;\n }",
"public boolean inCheck(PieceColor color)\n {\n Piece king = findKing(color);\n if (king==null)\n return false;\n Location loc = getLocation(king);\n return enemyCanAttack(color,loc);\n }",
"public boolean isActive()\r\n\t{\r\n\t\treturn active;\r\n\t}",
"public boolean hasMoves(int clr) {\n if(clr != 0){\n activePieces = getPiece();\n\n for(int i = 0; i < activePieces.size(); i++){\n Piece curr = activePieces.get(i);\n\n if(curr.possibleMoves(state).size() > 0){\n //curr.printSpecial();\n return true;\n }\n }\n return false;\n }\n System.out.println(\"Empty stop error\");\n return false;\n }",
"public boolean isActive() {\n return !isSuspended() && !isExpired();\n }",
"public void checkActivation() {\n\t\tplayer.getPackets().sendConfigByFile(10907, 1);\n\t\tplayer.getPackets().sendConfigByFile(10902, 1);\n\t\tfor (int x = 0; x <= 12; x++) {\n\t\t\tif (player.getActivatedLodestones()[x] == true) {\n\t\t\t\tplayer.getPackets().sendConfigByFile(CONFIG_IDS[x], 1);\n\t\t\t}\n\t\t}\n\t\tif (player.getActivatedLodestones()[13] == true) {\n\t\t\tplayer.getPackets().sendConfigByFile(CONFIG_IDS[13], 190);\n\t\t}\n\t\tif (player.getActivatedLodestones()[14] == true) {\n\t\t\tplayer.getPackets().sendConfigByFile(CONFIG_IDS[14], 15);\n\t\t}\n\t}",
"public boolean isActive( ) {\n\t\treturn active;\n\t}",
"public boolean checkmate()\n {\n return checkmate(PieceColor.BLACK)||checkmate(PieceColor.WHITE);\n }",
"boolean finishRedMoves(int piece) {\n\t\treturn (piece == 0 && curPlayer == 1);\n\t}",
"public boolean isActive(){\n return active;\n }",
"public boolean isActive(){\n return active;\n }",
"public Boolean isActive();",
"public boolean canCapture(Piece piece, Point start)\n \t{\n \t\t//Piece.Team team = piece.getTeam();\n \t\tPiece.Team opposite = piece.getOppositeTeam();\n \t\t\n \t\tboolean ahead = false;\n \t\tboolean behind = false;\n \t\tint captureAhead = 0;\n \t\tint captureBehind = 0;\n \t\t\n \t\tfor(Direction d : Direction.values())\n \t\t{\n \t\t\tPoint land = getPoint(start,d); //get point in all directions\n \t\t\t\n \t\t\tif( land == start) //when direction is none\n \t\t\t\tcontinue;\n \t\t\t\n \t\t\tif(board[land.y][land.x] == null) //you will land in an empty spot\n \t\t\t{\n \t\t\t\tPoint target = getPoint(land,d); //look for targets in the same direction you traveled\n \t\t\t\tPoint targetBehind = getPoint(start,getOppositeDirection(d)); //from your starting position get the target behind \n \t\t\t\tif(board[target.y][target.x].getTeam() == opposite) //check position ahead in the same direction you advanced for opposite team\n \t\t\t\t{\n \t\t\t\t\tahead = true;\n \t\t\t\t\t++captureAhead;\n \t\t\t\t}\n \t\t\t\tif(board[targetBehind.y][targetBehind.x].getTeam() == opposite)\n \t\t\t\t{\n \t\t\t\t\tbehind = true;\n \t\t\t\t\t++captureBehind;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\tif (captureAhead+captureBehind > 0)\n \t\t\treturn true;\n \t\telse \n \t\t\treturn false;\n \t}",
"public void playerMissedBall(){ active = false;}",
"public boolean isCheckmate()\n {\n Game g = Game.getInstance();\n\n int sum = 0;\n\n for(Piece[] p1 : g.m_board.m_pieces)\n {\n for(Piece p2 : p1)\n {\n if(p2 != null)\n {\n if(p2.m_color == this.m_color)\n {\n sum += p2.getLegalMoves().size();\n }\n }\n }\n }\n\n if(sum == 0){ return true; } else { return false; }\n }",
"public boolean checkForVictory() {\n // keep track of whether we have seen any pieces of either color.\n boolean anyWhitePieces = false;\n boolean anyRedPieces = false;\n // iterate through each row\n for (Row row : this.redBoard) {\n // whether we iterate through the red or white board does not matter; they contain the same pieces, just\n // in a different layout\n // iterate through each space in a row\n for (Space space : row) {\n // if there is a piece on this space\n if (space.getPiece() != null) {\n if (space.getPiece().getColor() == Piece.COLOR.RED) {\n // and if it's red, we have now seen at least one red piece\n anyRedPieces = true;\n } else if (space.getPiece().getColor() == Piece.COLOR.WHITE) {\n // and if it's white, we have now seen at least one white piece\n anyWhitePieces = true;\n }\n }\n }\n }\n // if we haven't seen any pieces of a color, then the other player has won\n if (!anyRedPieces) {\n // white player has won\n markGameAsDone(getWhitePlayer().getName() + \" has captured all the pieces.\");\n return true;\n } else if (!anyWhitePieces) {\n // red player has won\n markGameAsDone(getRedPlayer().getName() + \" has captured all the pieces.\");\n return true;\n }\n return false;\n }",
"public static boolean isActive() {\n\t\treturn activated;\n\t}",
"@Override\n public boolean isActive() {\n return active;\n }"
] | [
"0.71956795",
"0.7031622",
"0.70163035",
"0.6935316",
"0.6867512",
"0.67245716",
"0.668336",
"0.66748697",
"0.66449225",
"0.66068536",
"0.6506858",
"0.6498915",
"0.6490283",
"0.6433491",
"0.6428545",
"0.6428545",
"0.6428545",
"0.63833964",
"0.635478",
"0.63532776",
"0.63504285",
"0.6343383",
"0.63338846",
"0.62796235",
"0.62766653",
"0.62076116",
"0.61916584",
"0.6188159",
"0.61608636",
"0.61608636",
"0.6119657",
"0.61135596",
"0.61135596",
"0.61135596",
"0.61135596",
"0.61135596",
"0.61135596",
"0.61135596",
"0.61135596",
"0.61135596",
"0.61135596",
"0.61135596",
"0.61135596",
"0.61135596",
"0.61135596",
"0.61135596",
"0.6112348",
"0.608456",
"0.6079828",
"0.6072637",
"0.606853",
"0.60569805",
"0.6042654",
"0.6042654",
"0.6042654",
"0.6042654",
"0.6042654",
"0.6042654",
"0.6040046",
"0.60376716",
"0.6018458",
"0.60134816",
"0.60022515",
"0.5993281",
"0.596897",
"0.59639305",
"0.5962704",
"0.5958026",
"0.59540004",
"0.59512615",
"0.5948907",
"0.5948907",
"0.5948907",
"0.5948907",
"0.5948907",
"0.5948907",
"0.59373647",
"0.59325624",
"0.59289944",
"0.59111494",
"0.59083974",
"0.5905029",
"0.5901663",
"0.5900991",
"0.5900514",
"0.5889493",
"0.5888051",
"0.5877592",
"0.5869885",
"0.5864317",
"0.58566296",
"0.58461607",
"0.584488",
"0.584488",
"0.5843043",
"0.58393437",
"0.5839132",
"0.5838526",
"0.58346355",
"0.5834381",
"0.5831272"
] | 0.0 | -1 |
Activates piece and sets image to glowing space | public void setActiveImage() {
setGraphic(new ImageView(activePiece));
isActiveImageOn = true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void reactMain_region_digitalwatch_Display_glowing_GlowOn() {\n\t\tif (sCIButtons.topRightReleased) {\n\t\t\tnextStateIndex = 3;\n\t\t\tstateVector[3] = State.$NullState$;\n\n\t\t\ttimer.setTimer(this, 5, 2 * 1000, false);\n\n\t\t\tnextStateIndex = 3;\n\t\t\tstateVector[3] = State.main_region_digitalwatch_Display_glowing_GlowDelay;\n\t\t}\n\t}",
"protected void doMoreLight() {\r\n\t\talpha = Math.min(1f, alpha + 0.05f);;\r\n\t\tsetAlphaOnTiles();\r\n\t\trepaint();\r\n\t}",
"public void drawHit(){\n image(explode[5],posX,posY,10,10);\n }",
"@Override\n\tpublic void pintar() {\n\t\n\t\tapp.image(water, this.px, this.py);\n\t\t\n\t}",
"public void Boom()\r\n {\r\n image1 = new GreenfootImage(\"Explosion1.png\");\r\n image2 = new GreenfootImage(\"Explosion2.png\");\r\n image3 = new GreenfootImage(\"Explosion3.png\");\r\n image4 = new GreenfootImage(\"Explosion4.png\");\r\n image5 = new GreenfootImage(\"Explosion5.png\");\r\n image6 = new GreenfootImage(\"Explosion6.png\");\r\n setImage(image1);\r\n\r\n }",
"protected void doLessLight() {\r\n\t\talpha = Math.max(0, alpha - 0.05f);\r\n\t\tsetAlphaOnTiles();\r\n\t\trepaint();\r\n\t}",
"public void setGlowing ( boolean flag ) {\n\t\texecute ( handle -> handle.setGlowing ( flag ) );\n\t}",
"public void makesHereBack(){this.piece.affect();}",
"public void powerOn() \n\t{\n\t\t//put active to true\n\t\tactive = true;\n\t\t\n\t\t// Set attached lever\n\t\tif (FactoryModPlugin.LEVER_OUTPUT_ENABLED) {\n\t\t\tsetActivationLever(true);\n\t\t}\n\t\t\n\t\t//lots of code to make the furnace light up, without loosing contents.\n\t\tFurnace furnace = (Furnace) factoryPowerSourceLocation.getBlock().getState();\n\t\tbyte data = furnace.getData().getData();\n\t\tItemStack[] oldContents = furnace.getInventory().getContents();\n\t\tfurnace.getInventory().clear();\n\t\tfactoryPowerSourceLocation.getBlock().setType(Material.BURNING_FURNACE);\n\t\tfurnace = (Furnace) factoryPowerSourceLocation.getBlock().getState();\n\t\tfurnace.setRawData(data);\n\t\tfurnace.update();\n\t\tfurnace.getInventory().setContents(oldContents);\n\t\t//reset the production timer\n\t\tcurrentProductionTimer = 0;\n\t}",
"@Override\n\t\tpublic void update(Graphics g) {\n\t\t\t\n\t\t\tImage pieceImg = null;\n\t\t\tif (board.square(row,column).isOccupied()) {\n\t\t\t\tint index = board.square(row,column).piece().imageIndex();\n\t\t\t\tpieceImg = pieceImages[index];\n\t\t\t}\n\t\t\tif (lightSquare)\n\t\t\t\t{ setIcon(new ImageIcon(combine(pieceImg, lightSquareImg))); }\n\t\t\telse\n\t\t\t\t{ setIcon(new ImageIcon(combine(pieceImg, darkSquareImg))); }\n\t\t}",
"private void updateLight() {\r\n\t}",
"@Override\r\n protected void paintComponent(Graphics g) {\n paintWater(g);\r\n \r\n g.setColor(new Color(255, 255, 255, 70));\r\n g.fillRect(0, 0, 500, 500);\r\n \r\n \r\n // Paint the Grid ------------------------------------------\r\n g.setColor(Color.BLACK);\r\n \r\n for (int i = -1; i < 500; i += 50) {\r\n \r\n g.fillRect(i, 0, 2, 500);\r\n g.fillRect(0, i, 500, 2);\r\n \r\n }\r\n \r\n paintShips(g);\r\n paintHits(g);\r\n \r\n \r\n if (isPainted && shortBoard == ATTACK_BOARD && newGD.isMyTurn() && !missile.isPlaced()) {\r\n g.drawImage(Assets.imgMissile, mouseX, mouseY, null);\r\n }\r\n \r\n if (shortBoard == ATTACK_BOARD && newGD.isMyTurn() && missile.isPlaced()) {\r\n g.drawImage(Assets.imgMissile, missile.getPosition().x, missile.getPosition().y, null);\r\n }\r\n \r\n // Paint square under mouse pointer (also for testing)\r\n /*if (isPainted) {\r\n \r\n g.setColor(colorSquare);\r\n g.fillRect(mouseX, mouseY, 50, 50);\r\n \r\n }*/\r\n \r\n }",
"private void paintTheImage() {\n SPainter klee = new SPainter(\"Red Cross\", 600,600);\n SRectangle rectangle = new SRectangle(500, 100);\n klee.setColor(Color.RED);\n klee.paint(rectangle);\n klee.tl();\n klee.paint(rectangle);\n }",
"public void changeImage() {\r\n this.image = ColourDoor.image2;\r\n }",
"public void affectPiece(Piece piece){\r\n this.piece = piece;\r\n this.piece.affect();\r\n }",
"public void lightMove() {\n movePawn.setStyle(\"-fx-background-color: YELLOW;\"\n + \"-fx-background-radius: 30;\"\n + \"-fx-border-radius: 30;\"\n + \"-fx-border-color: 363507;\");\n buildPawn.setStyle(\"-fx-background-color: null\");\n stopPawn.setStyle(\"-fx-background-color: null\");\n }",
"void sharpen();",
"void sharpen();",
"public void drawUnderGlass(Graphics g, ImageObserver c) {\n\tif(isOn == true)\n\t\tg.drawImage(ovenOnBase.getImage(),baseXCoord, baseYCoord, c);\n\telse \n\t\tg.drawImage(ovenOffBase.getImage(),baseXCoord, baseYCoord, c);\n\t\n}",
"@Override\n public void process() {\n getTelemetry().addData(\" start move\", \"BaseColor %s relic side %s\", baseColor.name(), (relicSide)?\"true\" :\"false\" );\n getTelemetry().update();\n if (JewelSensorAutoArmProcessor.JewelColor.RED.equals(baseColor)){\n if (relicSide) {\n RedRelicCorner();\n } else{\n RedNonRelicCorner();\n }\n }else{\n if (relicSide) {\n BlueRelicCorner();\n } else{\n BlueNonRelicCorner();\n }\n }\n releaseGlyph();\n }",
"@Override\n\tpublic void draw(){\n\t\tif( HighGui.queryFrame(capture, im) ){\n\t\t\tbackground(70);\n\n\t\t\t// Draw it\n\t\t\timage(PUtils.getPImage(im), 0, 0);\n\n\t\t\tSmoothType type = SmoothType.CV_BLUR;\n\t\t\tif( r.value() != -1) type = SmoothType.values()[(int)r.value()-1];\n\n\t\t\tint size1 = (int)size1_slider.value();\n\t\t\tif( size1%2 == 0 ) size1++;\n\t\t\tint size2 = (int)size2_slider.value();\n\t\t\tif( size2%2 == 0 ) size2++;\n\n\t\t\tImgProc.smooth(im, im_smooth, type, size1, size2, param3_slider.value(), param4_slider.value());\n\t\t\timage(PUtils.getPImage(im_smooth), w, 0);\n\t\t}\n\t}",
"private void newPowerUp() {\r\n int row = 0;\r\n int column = 0;\r\n do {\r\n row = Numbers.random(0,maxRows-1);\r\n column = Numbers.random(0,maxColumns-1);\r\n } while(isInSnake(row,column,false));\r\n powerUp = new Location(row,column,STOP);\r\n grid[powerUp.row][powerUp.column].setBackground(POWER_UP_COLOR);\r\n }",
"public void setGlowing(boolean glowing) {\n _glowing = glowing;\n }",
"private void firepowerBar(Entity entity, CannonPart cannonPart, SpriteBatch batch) {\n pixmap = new Pixmap(1, 1, Pixmap.Format.RGBA8888);\n pixmap.setColor(Color.CYAN);\n pixmap.fill();\n firepowerTexture = new Texture(pixmap);\n batch.begin();\n batch.draw(firepowerTexture, cannonPart.getJointX() + xOffSet, cannonPart.getJointY() + yOffSet, barWidth\n , barHeight * cannonPart.getFirepower() / cannonPart.getMaxFirepower());\n batch.end();\n pixmap.dispose();\n firepowerTexture.dispose();\n }",
"public void lightBuild() {\n buildPawn.setStyle(\"-fx-background-color: YELLOW;\"\n + \"-fx-background-radius: 30;\"\n + \"-fx-border-radius: 30;\"\n + \"-fx-border-color: 363507;\");\n movePawn.setStyle(\"-fx-background-color: null\");\n stopPawn.setStyle(\"-fx-background-color: null\");\n }",
"@Override\n \t\t\t\tpublic void doCreatePointLight() {\n \n \t\t\t\t}",
"private void sepiaTone(){\n int len= currentIm.getRows() * currentIm.getCols();\n \n for (int p= 0; p < len; p= p+1) {\n int rgb= currentIm.getPixel(p);\n int red= DM.getRed(rgb);\n int blue= DM.getBlue(rgb);\n int green= DM.getGreen(rgb);\n int alpha= DM.getAlpha(rgb);\n \n double brightness = 0.3 * red + 0.6 * green + 0.1 * blue;\n \n currentIm.setPixel(p,\n (alpha << 24) | ((int)brightness << 16) | ((int)(brightness*0.6) << 8) | \n (int)(brightness*0.4));\n \n }\n }",
"public void enable() {\n\t\tif (!permanent) {\n\t\t\tenabled = true;\n\t\t\trect.setColor(c);\n\t\t}\n\t}",
"@Override\n public void onLockDoorRaised() {\n BufferedImage myPicture = null;\n try {\n myPicture = ImageIO.read(new File(\"./picts/Stainless-Steel-Doors-2.jpg\"));\n } catch (IOException e) {\n e.printStackTrace();\n }\n currentPicture.setIcon(new ImageIcon(myPicture));\n takeCupButton.setVisible(false);\n }",
"private void drawHeart (float sx, float sy, float sz, Appearance[] app)\n {\n\tfloat x, y, z, r;\n\n BranchGroup tBG = new BranchGroup();\n\ttBG.setCapability (BranchGroup.ALLOW_DETACH);\n\n\tx = sx+0f; y = sy+0.04f; z = sz+0f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[0]);\n\tsceneBG.addChild (makeText (new Vector3d (sx+0,sy+1.1,sz+0), \"AP\"));\n\t\n\tx = sx-0.2f; y = sy-0.1f; z = sz+0.2f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[1]);\n\tsceneBG.addChild (makeText (new Vector3d (sx-2,sy+0,sz+1.5), \"IS_\"));\n\n\tx = sx+0.2f; y = sy-0.1f; z = sz+0.2f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[2]);\n\tsceneBG.addChild (makeText (new Vector3d (sx+2,sy+0,sz+1.5), \"IL\"));\n\n\tx = sx-0.32f; y = sy-0.1f; z = sz+0.1f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[3]);\n\tsceneBG.addChild (makeText (new Vector3d (sx-2.5,sy+0,sz+0.5), \"SI\"));\n\n\tx = sx+0.32f; y = sy-0.1f; z = sz+0.1f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[4]);\n\tsceneBG.addChild (makeText (new Vector3d (sx+2.5,sy+0,sz+0.5), \"LI\"));\n\n\tx = sx-0.32f; y = sy-0.1f; z = sz-0.1f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[5]);\n\tsceneBG.addChild (makeText (new Vector3d (sx-2.5,sy+0,sz-0.5), \"SA\"));\n\n\tx = sx+0.32f; y = sy-0.1f; z = sz-0.1f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[6]);\n\tsceneBG.addChild (makeText (new Vector3d (sx+2.5,sy+0,sz-0.5), \"LA\"));\n\n\tx = sx-0.2f; y = sy-0.1f; z = sz-0.2f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[7]);\n\tsceneBG.addChild (makeText (new Vector3d (sx-2,sy+0,sz-1.5), \"AS_\"));\n\n\tx = sx+0.2f; y = sy-0.1f; z = sz-0.2f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[8]);\n\tsceneBG.addChild (makeText (new Vector3d (sx+2,sy+0,sz-1.5), \"AL\"));\n\n\tsceneBG.addChild (tBG);\n }",
"@Override\r\n\tpublic void autoSeatHeat() {\n\t\t\r\n\t}",
"private static void hold(int piece){\n\t\tholdPiece = piece;\n\t\tMain.hold();\n\t}",
"void draw() {\n\n // SeamInfo lowestSeam = this.lowestSeamVert();\n // lowestSeam.changeColor();\n\n ComputedPixelImage seamRemovedImg = new ComputedPixelImage(this.newImg.width,\n this.newImg.height);\n int countRow = 0;\n int countCol = 0;\n\n Pixel current = this.curPixel;\n Pixel temp;\n\n while (current.down != null) {\n temp = current.down;\n while (current.right != null) {\n Color c = Color.MAGENTA;\n if (current.highlighted) {\n c = Color.RED;\n }\n else {\n c = current.color;\n }\n if (this.showType.equals(\"e\")) {\n int energy = (int) (current.energy * 100);\n if (energy > 255) {\n System.out.println(\"energy: \" + energy + \" to 255\");\n energy = 255;\n }\n c = new Color(energy, energy, energy);\n }\n else if (this.showType.equals(\"w\")) {\n int weight = (int) (current.seam.totalWeight);\n if (weight > 255) {\n System.out.println(\"weight: \" + weight + \" to 255\");\n weight = 255;\n }\n c = new Color(weight, weight, weight);\n }\n\n seamRemovedImg.setColorAt(countCol, countRow, c);\n countCol += 1;\n current = current.right;\n }\n countCol = 0;\n countRow += 1;\n current = temp;\n }\n countCol = 0;\n\n this.newImg = seamRemovedImg;\n\n }",
"public Glow(double level) {\n setLevel(level);\n }",
"private void registerGlow()\n {\n try {\n Field f = Enchantment.class.getDeclaredField(\"acceptingNew\");\n f.setAccessible(true);\n f.set(null, true);\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n try {\n GlowEnchantment glow = new GlowEnchantment(70);\n Enchantment.registerEnchantment(glow);\n }\n catch (IllegalArgumentException e){\n }\n catch(Exception e){\n e.printStackTrace();\n }\n }",
"private void drawHeart2 (float sx, float sy, float sz, Appearance[] app)\n {\n\tfloat x, y, z, r;\n \n BranchGroup tBG = new BranchGroup();\n\ttBG.setCapability (BranchGroup.ALLOW_DETACH);\n\n System.out.println(\"Aqui\");\n \n\tx = sx+0f; y = sy+0.04f; z = sz+0f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[0]);\n\t//tBG.addChild (makeText (new Vector3d (sx+0,sy+1.1,sz+0), \"AP\"));\n\n\tx = sx-0.2f; y = sy-0.1f; z = sz+0.2f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[1]);\n\t//tBG.addChild (makeText (new Vector3d (sx-2,sy+0,sz+1.5), \"IS_\"));\n\n\tx = sx+0.2f; y = sy-0.1f; z = sz+0.2f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[2]);\n\t//tBG.addChild (makeText (new Vector3d (sx+2,sy+0,sz+1.5), \"IL\"));\n\n\tx = sx-0.32f; y = sy-0.1f; z = sz+0.1f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[3]);\n\t//tBG.addChild (makeText (new Vector3d (sx-2.5,sy+0,sz+0.5), \"SI\"));\n\n\tx = sx+0.32f; y = sy-0.1f; z = sz+0.1f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[4]);\n\t//tBG.addChild (makeText (new Vector3d (sx+2.5,sy+0,sz+0.5), \"LI\"));\n\n\tx = sx-0.32f; y = sy-0.1f; z = sz-0.1f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[5]);\n\t//tBG.addChild (makeText (new Vector3d (sx-2.5,sy+0,sz-0.5), \"SA\"));\n\n\tx = sx+0.32f; y = sy-0.1f; z = sz-0.1f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[6]);\n\t//tBG.addChild (makeText (new Vector3d (sx+2.5,sy+0,sz-0.5), \"LA\"));\n\n\tx = sx-0.2f; y = sy-0.1f; z = sz-0.2f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[7]);\n\t//tBG.addChild (makeText (new Vector3d (sx-2,sy+0,sz-1.5), \"AS_\"));\n\n\tx = sx+0.2f; y = sy-0.1f; z = sz-0.2f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[8]);\n\t//tBG.addChild (makeText (new Vector3d (sx+2,sy+0,sz-1.5), \"AL\"));\n\n\tsceneBG.addChild (tBG);\n }",
"public Glow() {}",
"private void reactMain_region_digitalwatch_Display_glowing_GlowDelay() {\n\t\tif (timeEvents[5]) {\n\t\t\tnextStateIndex = 3;\n\t\t\tstateVector[3] = State.$NullState$;\n\n\t\t\ttimer.unsetTimer(this, 5);\n\n\t\t\tsCIDisplay.operationCallback.unsetIndiglo();\n\n\t\t\tnextStateIndex = 3;\n\t\t\tstateVector[3] = State.main_region_digitalwatch_Display_glowing_GlowOff;\n\t\t} else {\n\t\t\tif (sCIButtons.topRightPressed) {\n\t\t\t\tnextStateIndex = 3;\n\t\t\t\tstateVector[3] = State.$NullState$;\n\n\t\t\t\ttimer.unsetTimer(this, 5);\n\n\t\t\t\tsCIDisplay.operationCallback.setIndiglo();\n\n\t\t\t\tnextStateIndex = 3;\n\t\t\t\tstateVector[3] = State.main_region_digitalwatch_Display_glowing_GlowOn;\n\t\t\t}\n\t\t}\n\t}",
"public void lightPause() {\n stopPawn.setStyle(\"-fx-background-color: RED;\"\n + \"-fx-background-radius: 30;\"\n + \"-fx-border-radius: 30;\"\n + \"-fx-border-color: 363507;\");\n movePawn.setStyle(\"-fx-background-color: null\");\n buildPawn.setStyle(\"-fx-background-color: null\");\n }",
"public void intakeGlyph(){\n ILM.setPower(1);\n IRM.setPower(1);\n }",
"public void makeActive(){\n active = true;\n \n // loads in asset and turns it into bitmaps\n ballBitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.ball);\n ballBitmap = Bitmap.createScaledBitmap(ballBitmap,\n bitmapDimensions.width, bitmapDimensions.height, true);\n }",
"private void reactMain_region_digitalwatch_Display_glowing_GlowOff() {\n\t\tif (sCIButtons.topRightPressed) {\n\t\t\tnextStateIndex = 3;\n\t\t\tstateVector[3] = State.$NullState$;\n\n\t\t\tsCIDisplay.operationCallback.setIndiglo();\n\n\t\t\tnextStateIndex = 3;\n\t\t\tstateVector[3] = State.main_region_digitalwatch_Display_glowing_GlowOn;\n\t\t}\n\t}",
"private void start(){\n character.fillEnergy();\n piles.getDrawPile().shuffle();\n for(int i = 1 ; i <= 5 ; i++ ){\n piles.drawCard();\n }\n effectHandler.startFight();\n\n }",
"public void mousePressed() {\n sharkSwarm.addShark(new Shark(mouseX, mouseY, 1));\n}",
"public void turnOn ()\n\t{\n\t\tthis.powerState = true;\n\t}",
"public void explode(){\n\t\timage = explosion;\n\t\tisExploded = true;\n\t}",
"public void setLight1(){\n }",
"public void enterHatchingState() {\n\n\t}",
"public void toggleGrab(){\n \tif (isClosed == true){\n \t\ttriggerTimer.reset();\n \t\tisClosed = false;\n \t\tClawAct.set(false);\n \t\tRobot.oi.armRumble(RUMBLE_DURATION);\n\n \t} else {\n \t\tisClosed = true;\n \t\tClawAct.set(true);\n \t\tRobot.oi.armRumble(RUMBLE_DURATION);\n\n \t}\n }",
"@Override\n public void excute() {\n drawable.setColor(color);\n }",
"private void changeGraphic(ToggleButton toggleButton, Image diceImage){\n\t toggleButton.setGraphic(new ImageView(diceImage));\n\t}",
"@Override\r\n\tpublic void draw(Graphics2D g2d)\r\n\t{\n\t\tif (glowRange > 0 || Game.tiles.get(y).get(x).getLightSources().size() > 0)\r\n\t\t{\r\n\t\t\tint convertedX = x*Game.tileSize;\r\n\t\t\tint convertedY = y*Game.tileSize;\r\n\t\t\tint convertedW = width*Game.tileSize;\r\n\t\t\tint convertedH= height*Game.tileSize;\r\n\t\t\tg2d.drawImage(getImage(), convertedX, convertedY, convertedX + convertedW, convertedY + convertedH,\r\n\t\t\t\t\t(int)(getImage().getWidth() * rotation.val()), 0, (int) (getImage().getWidth() * (rotation.val() + Direction.INTERVAL)), image.getHeight(), null);\r\n\t\t}\r\n\t}",
"public void attack(int x, int y, int xx, int yy) {\n int result = ((MovablePiece)(controller.getBoard().getPiece(x, y))).attack(controller.getBoard().getPiece(xx,yy));\n int player;\n \n if(result < 4) {\n mc.playMusic(\"sounds\\\\Bomb.wav\");\n }\n \n if(result == 1) {\n controller.getPlayer(controller.getTurn()).getMyGraveyard().setPiece(controller.getBoard().getPiece(xx, yy));\n controller.getBoard().setPiece(controller.getBoard().getPiece(x, y), xx, yy);\n controller.getBoard().deletePiece(x, y);\n Cell[xx][yy].setIcon(new ImageIcon(\"pieces\\\\\" + this.getName()));\n } else if(result == 2) {\n controller.getPlayer(controller.getTurn()).getMyGraveyard().setPiece(controller.getBoard().getPiece(xx, yy));\n controller.getPlayer(prevTurn).getMyGraveyard().setPiece(controller.getBoard().getPiece(x, y));\n controller.getBoard().deletePiece(xx,yy);\n controller.getBoard().deletePiece(x, y);\n Cell[xx][yy].setIcon(null);\n Cell[xx][yy].setBackground(Color.white);\n } else if(result == 3){\n controller.getPlayer(prevTurn).getMyGraveyard().setPiece(controller.getBoard().getPiece(x, y));\n controller.getBoard().deletePiece(x, y);\n } else if(result == 5) {\n mc.playMusic(\"sounds\\\\Sorceress.wav\");\n try {\n Thread.sleep(4000);\n } catch (InterruptedException ex) {\n Logger.getLogger(Graphics.class.getName()).log(Level.SEVERE, null, ex);\n }\n piece = controller.getBoard().getTable()[xx][yy];\n if(piece.getLevel()< controller.getBoard().getPiece(x, y).getLevel() && piece.getLevel() != 0 ) {\n if(piece.getColour() == 'R') {\n piece.setColour('B');\n piece.setName(piece.getName().replace(\"R\", \"B\"));\n } else {\n piece.setColour('R');\n piece.setName(piece.getName().replace(\"B\", \"R\"));\n }\n piece.setIcon(piece.getName());\n }\n } else {\n /* NOTHING IS CHARGED */\n }\n Cell[x][y].setIcon(null);\n Cell[x][y].setBackground(Color.white);\n for(int i = 0; i < 12; i++) {\n RGrave[i].setToolTipText(controller.getPlayer(2).getMyGraveyard().getQuantity(i) + \"/\" + (new Collection('R')).getQuantity(i));\n BGrave[i].setToolTipText(controller.getPlayer(1).getMyGraveyard().getQuantity(i) + \"/\" + (new Collection('B')).getQuantity(i));\n }\n }",
"public static void main(String [] args)\n{\n //this is something to memorize \n\nDrawingTool pencil;\nSketchPad paper;\n//these two were object declarations \npaper = new SketchPad (300,300); \npencil = new DrawingTool(paper); \n//these two were to create instances of the DrawingTool and SketchPad that are in the library today \n\n//now, directions: memorize the format for the instructions \npencil.forward (100);\npencil.turnRight (90);\npencil.forward (200);\npencil.turnRight (90);\npencil.forward (100);\npencil.turnRight (90);\npencil.forward (200);\npencil.turnRight (90);\npencil.forward (100);\npencil.turnRight (45);\npencil.forward (142);\npencil.turnRight (90); \npencil.forward (142);\npencil.turnRight (45);\npencil.forward (100);\npencil.turnRight (90);\npencil.forward (80);\npencil.turnRight (90);\npencil.forward (40);\npencil.turnLeft (90);\npencil.forward (20);\npencil.turnLeft (90);\npencil.forward (40);\n/*a few questions I have: can I change the color of the pencil, can I lift\n * it or choose where to start\n */\npencil.turnRight(90);\npencil.forward (100);\npencil.turnRight (90);\npencil.forward (160);\npencil.turnRight (90);\npencil.forward (30);\npencil.turnRight (90);\npencil.forward (30);\n\n\n\n \n\n//how can I add a new color in this? I requested access for the video \n//that the logo team made\n \n \n}",
"public void effect() {\n if (course == 2) {\n //RIGHT\n x += fac;\n } else if (course == 5) {\n //LEFT\n x -= fac;\n } else {\n y = (int)(origY + fac * f * Math.tan(angle)) + offsetY;\n x = (int)(origX + fac * f) + offsetX;\n }\n boolean b = computeCell();\n\n if (b) {\n //Detect ennemy\n if (current != null) {\n Player p = current.getOccupied();\n if (p != null && p != thrower) {\n p.makeHimWait((Params.howLongBlockingMagician * 1000) / 2);\n this.destroy();\n }\n }\n }\n //Detect ennemy's cell\n if (current != null) {\n Team te = current.getOwner();\n if (te != thrower.getTeam() && current.getType() == 1) {\n current.setHp(current.getHp() - Params.archerDammage);\n if (current.getHp() <= 0) {\n current.setOwner(thrower.getTeam());\n current.setHp(thrower.getInitHP());\n }\n }\n if (current.isHeight()) {\n this.destroy();\n }\n } else {\n int bound = 10;\n //System.out.println(game.getWidth());\n if (this.x < -bound || this.x > game.getWidth() + bound || this.y < -bound ||\n this.y > game.getHeight() + bound) {\n this.destroy();\n }\n }\n\n f++;\n }",
"public void setState(boolean isOn, boolean isClicked) {\n\n // YOUR CODE HERE\n \n BufferedImage img0 = ImageIO.read(new File(\"./Icons/Light-0.png\"));\n icon0 = new ImageIcon(img0);\n \n \n \n\n BufferedImage img1 = ImageIO.read(new File(\"./Icons/Light-1.png\"));\n icon1=new ImageIcon(img1);\n \n \n \n\n BufferedImage img2 = ImageIO.read(new File(\"./Icons/Light-2.png\"));\n icon2=new ImageIcon(img2);\n \n \n\n BufferedImage img3 = ImageIO.read(new File(\"./Icons/Light-3.png\"));\n icon3=new ImageIcon(img3);\n \n \n \n\n\n if(isOn == true){\n lbl.setIcon(icon0);\n state = 1; \n }else{ \n lbl.setIcon(icon1);\n state = 0;\n }\n if(isClicked == true){\n //0 means light off\n //1 means light on\n //2 means light on for solution\n //3 means light on for optimal solution\n if(state == 0 ){\n lbl.setIcon(icon0);\n state = 1;\n }\n if(state == 1){\n lbl.setIcon(icon1);\n state = 0; \n }\n if(state == 2 ){\n lbl.setIcon(icon2);\n state = 1;\n }\n if(state == 3){\n lbl.setIcon(icon3);\n state = 1;\n }\n }\n\n }",
"public void turnOn() {\n // set the flag\n onFlag = true;\n \n // set the image\n setIcon(Utilities.resizeImageIcon(getWidth(), getHeight(), onImageIcon));\n }",
"public Rock(int x, int y, int fx, int fy)\n {\n ImageIcon ii =\n new ImageIcon(this.getClass().getResource(\"stone.png\"));\n image = ii.getImage();\n visible = true;\n width = image.getWidth(null);\n height = image.getHeight(null);\n this.x = x;\n this.y = y;\n if(fx == 1) //right\n {\n thrown = 1;\n }\n if(fx == -1) // left\n {\n thrown = 2;\n }\n if(fy == -1)//up\n {\n thrown = 3;\n }\n if(fy == 1) // down\n {\n thrown = 4;\n }\n \n }",
"@Override\n public void steppedOn(Player p) {\n standingHere++;\n Game.log.format(\"# SnowyHole>steppedOn : Stepped on SnowyHole(%d, %d)\\n\", x, y);\n p.fallInWater();\n }",
"void setStone(int x, int y, int color);",
"void effect(Entity e, BoardPosition bp);",
"public void act() \n {\n setImage(\"1up.png\");\n setImage(\"acrate.png\");\n setImage(\"Betacactus.png\");\n setImage(\"bullet1.png\");\n setImage(\"bullet2.png\");\n setImage(\"burst.png\");\n setImage(\"cowboy.png\");\n setImage(\"fOxen1.png\");\n setImage(\"fOxen2.png\");\n setImage(\"fOxen3.png\");\n setImage(\"fOxen4.png\");\n setImage(\"fOxenH.png\");\n setImage(\"fWagon1.png\");\n setImage(\"fWagon2.png\");\n setImage(\"fWagon3.png\");\n setImage(\"fWagon4.png\");\n setImage(\"fWagonH.png\");\n setImage(\"health.png\");\n setImage(\"indian.png\");\n setImage(\"normal.png\");\n setImage(\"oxen.png\");\n setImage(\"oxen2.png\");\n setImage(\"oxen3.png\");\n setImage(\"oxen4.png\");\n setImage(\"oxen-hit.png\");\n setImage(\"plasma.png\");\n setImage(\"rapid.png\");\n setImage(\"snake1.png\");\n setImage(\"snake2.png\");\n setImage(\"snake3.png\");\n setImage(\"snake4.png\");\n setImage(\"spread.png\");\n setImage(\"theif.png\");\n setImage(\"train1.png\");\n setImage(\"train-hit.png\");\n setImage(\"wagon.png\");\n setImage(\"wagonhit.png\");\n setImage(\"wave.png\");\n getWorld().removeObject(this);\n }",
"void start() throws LWJGLException {\n\t\tthis.drawable = getDrawable();\n\t}",
"@Override\n public void paint(Graphics g) {\n\tsuper.paint(g);\n\t// getContentPane().setBackground(Color.orange);\n\timg = Util.createImage(getContentPane());\n\tbackColor = new Color(img.getRGB(3, 3));\n\t// img.getGraphics().setColor(Color.blue);\n\t// img.getGraphics().fillRect(0, 0, img.getWidth(), img.getHeight());\n\tdrawEntrance(new Point(557, 70), 0, img.getGraphics());\n\tgetContentPane().getGraphics().drawImage(img, 0, 0, null);\n\tanimate(g);\n\t// img = Util.createImage(getContentPane());\n\n }",
"public void drawImage()\n {\n imageMode(CORNERS);\n //image(grayImgToFit, firstCellPosition[0], firstCellPosition[1]);\n image(canvas, firstCellPosition[0], firstCellPosition[1]);\n //image(tileMiniaturesV[0],10,250);\n //if(avaragedImgs.length > 4)\n // image(avaragedImgs[3],200,200);\n //getTileIntensityAtIndex(15,15);\n //println(tiles[7].getEndBrightness());\n \n }",
"public void startAttack() {\n if(toSpot == 0) {\n \tst = new RedAlienState.Attacking(this.x, this.y);\n toSpot++;\n this.column = this.x;\n this.row = this.y;\n isAttacking = true;\n }\n }",
"public void eat(){\n if (threshold<=0 && !lapar) revLapar();\n if (lapar && Common.gamemap.get(getX()).get(getY()).showSymbol()=='@'){\n Common.gamemap.get(getX()).get(getY()).ungrowGrass();\n revLapar();\n threshold = 12;\n }\n }",
"public void startExploration() {\n watermarkGoalTick = currentTick;\n }",
"public static void shovelSnow() {\n currentBackground.getSnow().shovelSnow(currentShovel.getShovelPower(),\n currentBackground.getSnowFall());\n }",
"private void turnAround() {\n d = Math.random();\n if (d < 0.1) {\n changeAppearance();\n }\n }",
"public void gossipGirl(){\n\t\tfor(Point p: currentPiece){\n\t\t\twell[p.x + pieceOrigin.x][p.y + pieceOrigin.y] = currentColor;\n\t\t}\n\t\trowChecked();\n\n\t\tsetNewPiece();\n\t\tgetNewPiece();\n\t}",
"public void clawOpen(){\n claw.setPosition(0.1);\n }",
"public void setGlow(final boolean GLOW) {\n glow = GLOW;\n init(getInnerBounds().width, getInnerBounds().height);\n repaint(getInnerBounds());\n }",
"public void draw()\n {\n myPencil.up();\n myPencil.backward(100);\n myPencil.down();\n myPencil.turnRight(90);\n myPencil.forward(200);\n myPencil.turnLeft(90);\n myPencil.forward(200);\n myPencil.turnLeft(90);\n myPencil.forward(400);\n myPencil.turnLeft(90);\n myPencil.forward(200);\n myPencil.turnLeft(90);\n myPencil.forward(200);\n // Roof\n myPencil.up();\n myPencil.move(0,200);\n myPencil.down();\n myPencil.setDirection(333.435);\n myPencil.forward(223.607);\n myPencil.setColor(new Color(2, 0, 0));\n myPencil.up();\n myPencil.move(0,200);\n myPencil.setDirection(206.565);\n myPencil.down();\n myPencil.forward(223.607);\n // Windows\n myPencil.up();\n myPencil.move(-150,0);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(75);\n myPencil.turnLeft(90);\n myPencil.forward(75);\n myPencil.turnLeft(90);\n myPencil.forward(75);\n myPencil.turnLeft(90);\n myPencil.forward(75);\n myPencil.up();\n myPencil.move(75,0);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(75);\n myPencil.turnLeft(90);\n myPencil.forward(75);\n myPencil.turnLeft(90);\n myPencil.forward(75);\n myPencil.turnLeft(90);\n myPencil.forward(75);\n myPencil.up();\n myPencil.move(-50,-100);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(75);\n myPencil.turnLeft(90);\n myPencil.forward(100);\n myPencil.turnLeft(90);\n myPencil.forward(50);\n myPencil.turnLeft(90);\n myPencil.forward(100);\n myPencil.up();\n myPencil.move(-50,-100);\n myPencil.setDirection(60);\n myPencil.down();\n myPencil.backward(150);\n myPencil.up();\n myPencil.move(50,-100);\n myPencil.setDirection(120);\n myPencil.down();\n myPencil.backward(150);\n myPencil.up();\n myPencil.move(150,-150);\n myPencil.down();\n myPencil.drawCircle(25);\n myPencil.up();\n myPencil.move(-150,-150);\n myPencil.down();\n myPencil.drawCircle(25);\n myPencil.up();\n myPencil.move(-150,-175);\n myPencil.setDirection(90);\n myPencil.down();\n myPencil.backward(20);\n myPencil.up();\n myPencil.move(150,-175);\n myPencil.setDirection(90);\n myPencil.down();\n myPencil.backward(20);\n myPencil.up();\n myPencil.move(-150,37.5);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(75);\n myPencil.up();\n myPencil.move(75,37.5);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(75);\n myPencil.up();\n myPencil.move(-112.5,0);\n myPencil.setDirection(90);\n myPencil.down();\n myPencil.forward(75);\n myPencil.up();\n myPencil.move(112.5,0);\n myPencil.setDirection(90);\n myPencil.down();\n myPencil.forward(75);\n // House Sidewalk\n myPencil.up();\n myPencil.move(-250,-112.5);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(192.5);\n myPencil.up();\n myPencil.move(250,-112.5);\n myPencil.setDirection(180);\n myPencil.down();\n myPencil.forward(192.5);\n myPencil.up();\n myPencil.move(-250,-100);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(90);\n myPencil.forward(193);\n myPencil.up();\n myPencil.move(250,-100);\n myPencil.setDirection(180);\n myPencil.down();\n myPencil.forward(90);\n myPencil.up();\n myPencil.move(-75,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(-100,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(-125,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(-150,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(-175,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(-200,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(-225,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(-250,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(75,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(100,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(125,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(150,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(175,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(200,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(225,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(250,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n // Chimney\n myPencil.up();\n myPencil.move(125,190);\n myPencil.setDirection(270);\n myPencil.down();\n myPencil.forward(52);\n myPencil.up();\n myPencil.move(100,190);\n myPencil.setDirection(270);\n myPencil.down();\n myPencil.forward(40);\n myPencil.up();\n myPencil.move(100,190);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(25);\n // Door window\n myPencil.up();\n myPencil.move(0,-25);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.drawCircle(8);\n myPencil.up();\n myPencil.move(-8,-25);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(16);\n myPencil.up();\n myPencil.move(0,-17);\n myPencil.setDirection(270);\n myPencil.down();\n myPencil.forward(16);\n // Door knob\n myPencil.up();\n myPencil.move(14,-55);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.drawCircle(2);\n }",
"public void switchLight(){\r\n _switchedOn = !_switchedOn;\r\n }",
"protected void doBright() {\r\n\t\talpha = 1.0f;\r\n\t\tsetAlphaOnTiles();\r\n\t\trepaint();\r\n\t}",
"private void activeDrawEffects() {\n }",
"private void drawPiece(Piece piece) {\n int kind = piece.getKind() + 1;\n int pos0 = piece.getPos(0);\n int pos1 = piece.getPos(1);\n int pos2 = piece.getPos(2);\n int pos3 = piece.getPos(3);\n\n g.drawImage(tile[kind], (pos0%12)*23-3, (pos0/12)*23+17, this);\n g.drawImage(tile[kind], (pos1%12)*23-3, (pos1/12)*23+17, this);\n g.drawImage(tile[kind], (pos2%12)*23-3, (pos2/12)*23+17, this);\n g.drawImage(tile[kind], (pos3%12)*23-3, (pos3/12)*23+17, this);\n }",
"public void gripGlyph(){\n grabberRearLeft.setPosition(glyphClosePosBL);\n grabberFrontLeft.setPosition(glyphClosePosFL);\n grabberFrontRight.setPosition(glyphClosePosFR);\n grabberRearRight.setPosition(glyphClosePosBR);\n isGripped = true;\n }",
"private void update() {\n setPieceType();\n initBackground(pieceIndex);\n }",
"public void act() \n {\n setLocation(getX(),getY()+1);\n givePower();\n delete();\n }",
"public void draw() {\n p.pushMatrix(); // save old visual style for other sprites\n p.translate(pos.x, pos.y); \n if (localpen) p.image(pen.get(0,0,p.width,p.height),p.width/2-pos.x, p.height/2-pos.y);\n if (visible) {\n // locked left-right rotation\n if (((direction%360<=270) & (direction%360>=90)) & rotationStyle==rotationStyle_leftRight) p.scale(-1.0f,1.0f);\n if (rotationStyle==rotationStyle_allAround) p.rotate(p.radians(-direction));\n if (ghostEffect > 0) {\n int calculatedAlpha = (int)p.map(ghostEffect,100,0,0,255);\n \n int[] alpha = new int[costumes.get(costumeNumber).width*costumes.get(costumeNumber).height];\n for (int i=0; i<alpha.length; i++) {\n // only fade non-zero pixels; 0 is full-transparency\n if (costumes.get(costumeNumber).pixels[i]!=0) alpha[i]=calculatedAlpha;\n }\n costumes.get(costumeNumber).mask(alpha);\n }\n p.image(costumes.get(costumeNumber), 0, 0, costumes.get(costumeNumber).width*(size/100),\n costumes.get(costumeNumber).height*(size/100));\n }\n p.popMatrix(); // restore default visual style\n }",
"private void ignite(boolean boosterOn) \n {\n if(boosterOn) {\n //setImage(rocketWithThrust);\n acceleration.setDirection(getRotation());\n increaseSpeed(acceleration);\n }\n else {\n //setImage(\"Fighter.png\"); \n }\n }",
"@Override\n public void chew() {\n MessageUtility.logSound(name,\"Bleats and Stomps its legs, then chews\");\n }",
"private void enhanceImage(){\n }",
"@Override\n\tprotected void enterEffect() {\n\t\t\n\t}",
"private void generateGhost() {\r\n\t\ttry {\r\n\t\t\tghost = (FallingPiece)falling.clone();\r\n\t\t} catch (CloneNotSupportedException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\twhile(moveIfNoConflict(ghost.moveDown(), ghost));\t\t\r\n\t\tfor (BlockDrawable block : ghost.allBlocks())\r\n\t\t\tblock.setGhost(true);\r\n\t}",
"public void clickExplode() {\n\t\tsetBorder(UNLOCKED_BORDER);\n\t\tsetIcon(HIT_MINE_PIC);\n\t\tsetBackground(Color.RED);\n\t\tunlocked = true;\n\t}",
"public void mousePressed(MouseEvent me, int x_p, int y_p, double mag) {\n \t\tint x_pd = x_p;\n \t\tint y_pd = y_p;\n \t\tif (!this.at.isIdentity()) {\n \t\t\tfinal Point2D.Double po = inverseTransformPoint(x_p, y_p);\n \t\t\tx_p = (int)po.x;\n \t\t\ty_p = (int)po.y;\n \t\t}\n \n \t\tfinal int tool = ProjectToolbar.getToolId();\n \n \t\tfinal Display display = ((DisplayCanvas)me.getSource()).getDisplay();\n \t\tfinal long layer_id = display.getLayer().getId();\n \n \t\tindex = findPoint(x_p, y_p, layer_id, mag);\n \n \t\tif (ProjectToolbar.PENCIL == tool && n_points > 0 && -1 == index && !me.isShiftDown() && !Utils.isControlDown(me)) {\n \t\t\t// Use Mark Longair's tracing: from the clicked point to the last one\n \t\t\tfinal double scale = layer_set.getVirtualizationScale();\n \t\t\t// Ok now with all found images, create a virtual stack that provides access to them all, with caching.\n \t\t\tfinal Worker[] worker = new Worker[2];\n \n \t\t\tTraceParameters tr_ = tr_map.get(layer_set);\n \t\t\tfinal TraceParameters tr = null == tr_ ? new TraceParameters() : tr_;\n \t\t\tif (null == tr_) {\n \t\t\t\tsynchronized (tr_map) {\n \t\t\t\t\ttr_map.put(layer_set, tr);\n \t\t\t\t}\n \t\t\t}\n \n \t\t\tif (tr.update) {\n \t\t\t\tworker[0] = new Worker(\"Preparing Hessian...\") { public void run() {\n \t\t\t\t\tstartedWorking();\n \t\t\t\t\ttry {\n \t\t\t\tUtils.log(\"Push ESCAPE key to cancel autotrace anytime.\");\n \t\t\t\tImagePlus virtual = new LayerStack(layer_set, scale, ImagePlus.GRAY8, Patch.class, display.getDisplayChannelAlphas()).getImagePlus();\n \t\t\t\t//virtual.show();\n \t\t\t\tCalibration cal = virtual.getCalibration();\n \t\t\t\tdouble minimumSeparation = 1;\n \t\t\t\tif (cal != null) minimumSeparation = Math.min(cal.pixelWidth,\n \t\t\t\t\t\t\t\t\t Math.min(cal.pixelHeight,\n \t\t\t\t\t\t\t\t\t\t cal.pixelDepth));\n \t\t\t\tComputeCurvatures hessian = new ComputeCurvatures(virtual, minimumSeparation, null, cal != null);\n \t\t\t\thessian.run();\n \n \t\t\t\ttr.virtual = virtual;\n \t\t\t\ttr.scale = scale;\n \t\t\t\ttr.hessian = hessian;\n \t\t\t\ttr.update = false;\n \n \t\t\t\t\t} catch (Exception e) {\n \t\t\t\t\t\tIJError.print(e);\n \t\t\t\t\t}\n \t\t\t\t\tfinishedWorking();\n \t\t\t\t}};\n \t\t\t\tBureaucrat.createAndStart(worker[0], project);\n \t\t\t}\n \n \t\t\tPoint2D.Double po = transformPoint(p[0][n_points-1], p[1][n_points-1]);\n \t\t\tfinal int start_x = (int)po.x;\n \t\t\tfinal int start_y = (int)po.y;\n \t\t\tfinal int start_z = layer_set.indexOf(layer_set.getLayer(p_layer[n_points-1])); // 0-based\n \t\t\tfinal int goal_x = (int)(x_pd * scale); // must transform into virtual space\n \t\t\tfinal int goal_y = (int)(y_pd * scale);\n \t\t\tfinal int goal_z = layer_set.indexOf(display.getLayer());\n \n \t\t\t/*\n \t\t\tUtils.log2(\"x_pd, y_pd : \" + x_pd + \", \" + y_pd);\n \t\t\tUtils.log2(\"scale: \" + scale);\n \t\t\tUtils.log2(\"start: \" + start_x + \",\" + start_y + \", \" + start_z);\n \t\t\tUtils.log2(\"goal: \" + goal_x + \",\" + goal_y + \", \" + goal_z);\n \t\t\tUtils.log2(\"virtual: \" + tr.virtual);\n \t\t\t*/\n \n \n \t\t\tfinal boolean simplify = me.isAltDown();\n \n \t\t\tworker[1] = new Worker(\"Tracer - waiting on hessian\") { public void run() {\n \t\t\t\tstartedWorking();\n \t\t\t\ttry {\n \t\t\t\tif (null != worker[0]) {\n \t\t\t\t\t// Wait until hessian is ready\n \t\t\t\t\tworker[0].join();\n \t\t\t\t}\n \t\t\t\tsetTaskName(\"Tracing path\");\n \t\t\t\tfinal int reportEveryMilliseconds = 2000;\n \t\t\t\ttr.tracer = new TracerThread(tr.virtual, 0, 255,\n \t\t\t\t\t\t 120, // timeout seconds\n \t\t\t\t\t\t\t\t reportEveryMilliseconds,\n \t\t\t\t\t\t\t\t start_x, start_y, start_z,\n \t\t\t\t\t\t\t\t goal_x, goal_y, goal_z,\n \t\t\t\t\t\t\t\t true, // reciproal pix values at start and goal\n \t\t\t\t\t\t\t\t tr.virtual.getStackSize() == 1,\n \t\t\t\t\t\t\t\t tr.hessian,\n \t\t\t\t\t\t\t\t null == tr.hessian ? 1 : 4,\n \t\t\t\t\t\t\t\t null,\n \t\t\t\t\t\t\t\t null != tr.hessian);\n \t\t\t\ttr.tracer.addProgressListener(new SearchProgressCallback() {\n \t\t\t\t\tpublic void pointsInSearch(SearchThread source, int inOpen, int inClosed) {\n \t\t\t\t\t\tworker[1].setTaskName(\"Tracing path: open=\" + inOpen + \" closed=\" + inClosed);\n \t\t\t\t\t}\n \t\t\t\t\tpublic void finished(SearchThread source, boolean success) {\n \t\t\t\t\t\tif (!success) {\n \t\t\t\t\t\t\tUtils.logAll(\"Could NOT trace a path\");\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t\tpublic void threadStatus(SearchThread source, int currentStatus) {\n \t\t\t\t\t\t// This method gets called every reportEveryMilliseconds\n \t\t\t\t\t\tif (worker[1].hasQuitted()) {\n \t\t\t\t\t\t\tsource.requestStop();\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t});\n \n \t\t\t\ttr.tracer.run();\n \n \t\t\t\tfinal Path result = tr.tracer.getResult();\n \n \t\t\t\ttr.tracer = null;\n \n \t\t\t\tif (null == result) {\n \t\t\t\t\tUtils.log(\"Finding a path failed\"); //: \"+ \n \t\t\t\t\t\t// not public //SearchThread.exitReasonStrings[tracer.getExitReason()]);\n \t\t\t\t\treturn;\n \t\t\t\t}\n \n \t\t\t\t// TODO: precise_x_positions etc are likely to be broken (calibrated or something)\n \n \n \t\t\t\t// Remove bogus points: those at the end with 0,0 coords\n \t\t\t\tint len = result.points;\n \t\t\t\tfinal double[][] pos = result.getXYZUnscaled();\n \t\t\t\tfor (int i=len-1; i>-1; i--) {\n \t\t\t\t\tif (0 == pos[0][i] && 0 == pos[1][i]) {\n \t\t\t\t\t\tlen--;\n \t\t\t\t\t} else break;\n \t\t\t\t}\n \t\t\t\t// Transform points: undo scale, and bring to this Polyline AffineTransform:\n \t\t\t\tfinal AffineTransform aff = new AffineTransform();\n \t\t\t\t/* Inverse order: */\n \t\t\t\t/* 2 */ aff.concatenate(Polyline.this.at.createInverse());\n \t\t\t\t/* 1 */ aff.scale(1/scale, 1/scale);\n \t\t\t\tfinal double[] po = new double[len * 2];\n \t\t\t\tfor (int i=0, j=0; i<len; i++, j+=2) {\n \t\t\t\t\tpo[j] = pos[0][i];\n \t\t\t\t\tpo[j+1] = pos[1][i];\n \t\t\t\t}\n \t\t\t\tfinal double[] po2 = new double[len * 2];\n \t\t\t\taff.transform(po, 0, po2, 0, len); // what a stupid format: consecutive x,y pairs\n \n \t\t\t\tlong[] p_layer_ids = new long[len];\n \t\t\t\tdouble[] pox = new double[len];\n \t\t\t\tdouble[] poy = new double[len];\n \t\t\t\tfor (int i=0, j=0; i<len; i++, j+=2) {\n \t\t\t\t\tp_layer_ids[i] = layer_set.getNearestLayer(pos[2][i]).getId(); // z_positions in 0-(N-1), not in 0-N like slices!\n \t\t\t\t\tpox[i] = po2[j];\n \t\t\t\t\tpoy[i] = po2[j+1];\n \t\t\t\t}\n \n \t\t\t\t// Simplify path: to steps of 5 calibration units, or 5 pixels when not calibrated.\n \t\t\t\tif (simplify) {\n \t\t\t\t\tObject[] ob = Polyline.simplify(pox, poy, p_layer_ids, 10000, layer_set);\n \t\t\t\t\tpox = (double[])ob[0];\n \t\t\t\t\tpoy = (double[])ob[1];\n \t\t\t\t\tp_layer_ids = (long[])ob[2];\n \t\t\t\t\tlen = pox.length;\n \t\t\t\t}\n \n \t\t\t\t// Record the first newly-added autotraced point index:\n \t\t\t\tlast_autotrace_start = Polyline.this.n_points;\n \t\t\t\tPolyline.this.appendPoints(pox, poy, p_layer_ids, len);\n \n \t\t\t\tPolyline.this.repaint(true);\n \t\t\t\tUtils.logAll(\"Added \" + len + \" new points.\");\n \n \t\t\t\t} catch (Exception e) { IJError.print(e); }\n \t\t\t\tfinishedWorking();\n \t\t\t}};\n \t\t\tBureaucrat.createAndStart(worker[1], project);\n \n \t\t\tindex = -1;\n \t\t\treturn;\n \n \t\t}\n \n \t\tif (ProjectToolbar.PEN == tool || ProjectToolbar.PENCIL == tool) {\n \n \t\t\tif (Utils.isControlDown(me) && me.isShiftDown()) {\n \t\t\t\tfinal long lid = Display.getFrontLayer(this.project).getId();\n \t\t\t\tif (-1 == index || lid != p_layer[index]) {\n \t\t\t\t\tindex = findNearestPoint(x_p, y_p, layer_id);\n \t\t\t\t}\n \t\t\t\tif (-1 != index) {\n \t\t\t\t\t//delete point\n \t\t\t\t\tremovePoint(index);\n \t\t\t\t\tindex = -1;\n \t\t\t\t\trepaint(false);\n \t\t\t\t}\n \n \t\t\t\t// In any case, terminate\n \t\t\t\treturn;\n \t\t\t}\n \n \t\t\tif (-1 != index && layer_id != p_layer[index]) index = -1; // disable!\n \n \t\t\t//if no conditions are met, attempt to add point\n \t\t\telse if (-1 == index && !me.isShiftDown() && !me.isAltDown()) {\n \t\t\t\t//add a new point\n \t\t\t\tindex = addPoint(x_p, y_p, layer_id, mag);\n \t\t\t\tis_new_point = true;\n \t\t\t\trepaint(false);\n \t\t\t\treturn;\n \t\t\t}\n \t\t}\n \t}",
"public void turnOn() {\n this.status = true;\n update(this.redValue, this.greenValue, this.blueValue);\n }",
"public void draw() {\r\n\t\tif (active_)\r\n\t\t\tGlobals.getInstance().getCamera().drawImageOnHud(posx_, posy_, currentImage());\r\n\t}",
"protected int setSpiderEyeBrightness(EntitySpider par1EntitySpider, int par2, float par3)\n/* */ {\n/* 43 */ if (par2 != 0)\n/* */ {\n/* 45 */ return -1;\n/* */ }\n/* */ \n/* */ \n/* 49 */ UtilsFX.bindTexture(\"textures/models/taint_spider_eyes.png\");\n/* 50 */ float f1 = 1.0F;\n/* 51 */ GL11.glEnable(3042);\n/* 52 */ GL11.glDisable(3008);\n/* 53 */ GL11.glBlendFunc(1, 1);\n/* */ \n/* 55 */ if (par1EntitySpider.func_82150_aj())\n/* */ {\n/* 57 */ GL11.glDepthMask(false);\n/* */ }\n/* */ else\n/* */ {\n/* 61 */ GL11.glDepthMask(true);\n/* */ }\n/* */ \n/* 64 */ char c0 = 61680;\n/* 65 */ int j = c0 % 65536;\n/* 66 */ int k = c0 / 65536;\n/* 67 */ OpenGlHelper.func_77475_a(OpenGlHelper.field_77476_b, j / 1.0F, k / 1.0F);\n/* 68 */ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);\n/* 69 */ GL11.glColor4f(1.0F, 1.0F, 1.0F, f1);\n/* 70 */ return 1;\n/* */ }",
"public PowerUp(String imagePath){\r\n super(imagePath);\r\n this.setPosition();\r\n setAlive(false);\r\n point=new Point(rand.nextDouble()* Window.getWidth(),rand.nextDouble()* Window.getHeight());\r\n }",
"public void drawOn(Graphics page) {\n\t\tif(num != 1) {\n\t\t\tpage.drawImage(image, x, y, size, size, null);\n\t\t} else {\n\t\t\t// Creates a \"blank piece\" for the Piece\n\t\t\t// with a num id of 1\n\t\t\tpage.setColor(Color.white);\n\t\t\tpage.fillRect(x, y, size, size);\n\t\t}\n\t}",
"public void attack() {\n if (st instanceof RedAlienState.Attacking) {\n \tRedAlienState.Attacking att = (RedAlienState.Attacking)st;\n \ttry{\n \t\tDelta d = att.path.remove();\n \t\tthis.x += d.xd;\n \t\tthis.y += d.yd;\n \t\tif(Math.random() > .99){\n \t\t\tthis.fire();\n \t\t}\n \t}catch(NoSuchElementException e){\n \t\tthis.x = this.column;\n \t\tthis.y = this.row;\n \t\tst = new RedAlienState.Normal();\n \t\tthis.isAttacking = false;\n \t}\n }\n }",
"@Override\n public void onHeatWaterRaised() {\n heaterState = true;\n addCupButton.setVisible(false);\n takeCupButton.setVisible(false);\n }",
"public void update() {\n if (this.active) {\n GameObject.processing.image(this.image, this.xPosition, this.yPosition);\n }\n }",
"public void draw(){\n\t\tif(selected){\n\t\t\timg.draw(xpos,ypos,scale,Color.blue);\n\t\t}else{\n\t\t\timg.draw(xpos, ypos, scale);\n\t\t}\n\t}",
"public void setHotImage (Image image) {\r\n\tcheckWidget();\r\n\tif (image != null && image.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);\r\n\tif ((style & SWT.SEPARATOR) != 0) return;\r\n\r\n\t/* TEMPORARY CODE: remove when when FLAT tool bars are implemented */\r\n\tif ((parent.style & SWT.FLAT) != 0) setImage (image);\r\n\r\n\thotImage = image;\r\n}",
"@Override\n public void drawHeatFlux() {\n }"
] | [
"0.63544875",
"0.6242791",
"0.6144422",
"0.61339116",
"0.61091805",
"0.6102603",
"0.59916836",
"0.5952238",
"0.5919449",
"0.58685625",
"0.5866647",
"0.58066046",
"0.5775525",
"0.57006043",
"0.56948596",
"0.56897587",
"0.5686826",
"0.5686826",
"0.5683214",
"0.5681024",
"0.56661505",
"0.5664768",
"0.56594205",
"0.5646023",
"0.56351924",
"0.563275",
"0.56307817",
"0.5628761",
"0.5619525",
"0.55881023",
"0.55729103",
"0.5565883",
"0.5554026",
"0.5553727",
"0.55511475",
"0.5545717",
"0.5542768",
"0.55408293",
"0.5522661",
"0.5514694",
"0.5507858",
"0.55038476",
"0.54963994",
"0.54960877",
"0.54900223",
"0.54865867",
"0.5479104",
"0.5477673",
"0.54737926",
"0.54701513",
"0.54655224",
"0.54608893",
"0.54556376",
"0.54546833",
"0.5447923",
"0.5446156",
"0.5428758",
"0.54273057",
"0.5422423",
"0.54193026",
"0.54190284",
"0.541643",
"0.54122263",
"0.5410818",
"0.54105955",
"0.54098976",
"0.5403778",
"0.5402211",
"0.54004943",
"0.5400377",
"0.53943026",
"0.5393367",
"0.5387044",
"0.53848994",
"0.5383449",
"0.53831697",
"0.5381644",
"0.538061",
"0.5375983",
"0.5373546",
"0.53731704",
"0.53692895",
"0.5368395",
"0.5367669",
"0.53673315",
"0.53590304",
"0.53567094",
"0.53550637",
"0.5350908",
"0.53455514",
"0.53397715",
"0.5336021",
"0.53354",
"0.5332274",
"0.53283066",
"0.5327782",
"0.5323869",
"0.53221947",
"0.53210825",
"0.5318719"
] | 0.6258525 | 1 |
Sets piece image to white or black piece | public void setPlayer(boolean isWhiteTurn) {
if (isWhiteTurn == true) setGraphic(new ImageView(whitePiece));
if (isWhiteTurn == false) setGraphic(new ImageView(blackPiece));
isActiveImageOn = false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setBoard(){\n \n\t m_Pieces[3][3]= WHITE_PIECE;\n m_Pieces[4][4]= WHITE_PIECE;\n m_Pieces[3][4]= BLACK_PIECE;\n m_Pieces[4][3]= BLACK_PIECE;\n for(int x=0;x<WIDTH;x++){\n for(int y=0;y<HEIGHT;y++){\n if(m_Pieces[x][y]==null){\n m_Pieces[x][y]=NONE_PIECE;\n }\n }\n }\n }",
"public final void setPiece(String piece){\r\n switch (piece) {\r\n case \"black King\":\r\n {\r\n this.piece = new King(\"black King\");\r\n ImagePattern imagePattern = new ImagePattern(this.piece.getImage());\r\n space.setFill(imagePattern);\r\n break;\r\n }\r\n case \"black Rook\":\r\n {\r\n this.piece = new Rook(\"black Rook\");\r\n ImagePattern imagePattern = new ImagePattern(this.piece.getImage());\r\n space.setFill(imagePattern);\r\n break;\r\n }\r\n case \"black Knight\":\r\n {\r\n this.piece = new Knight(\"black Knight\");\r\n ImagePattern imagePattern = new ImagePattern(this.piece.getImage());\r\n space.setFill(imagePattern);\r\n break;\r\n }\r\n case \"black Bishop\":\r\n {\r\n this.piece = new Bishop(\"black Bishop\");\r\n ImagePattern imagePattern = new ImagePattern(this.piece.getImage());\r\n space.setFill(imagePattern);\r\n break;\r\n }\r\n case \"black Queen\":\r\n {\r\n this.piece = new Queen(\"black Queen\");\r\n ImagePattern imagePattern = new ImagePattern(this.piece.getImage());\r\n space.setFill(imagePattern);\r\n break;\r\n }\r\n case \"black Pawn\":\r\n {\r\n this.piece = new Pawn(\"black Pawn\");\r\n ImagePattern imagePattern = new ImagePattern(this.piece.getImage());\r\n space.setFill(imagePattern);\r\n break;\r\n }\r\n case \"white King\":\r\n {\r\n this.piece = new King(\"white King\");\r\n ImagePattern imagePattern = new ImagePattern(this.piece.getImage());\r\n space.setFill(imagePattern);\r\n break;\r\n }\r\n case \"white Rook\":\r\n {\r\n this.piece = new Rook(\"white Rook\");\r\n ImagePattern imagePattern = new ImagePattern(this.piece.getImage());\r\n space.setFill(imagePattern);\r\n break;\r\n }\r\n case \"white Knight\":\r\n {\r\n this.piece = new Knight(\"white Knight\");\r\n ImagePattern imagePattern = new ImagePattern(this.piece.getImage());\r\n space.setFill(imagePattern);\r\n break;\r\n }\r\n case \"white Bishop\":\r\n {\r\n this.piece = new Bishop(\"white Bishop\");\r\n ImagePattern imagePattern = new ImagePattern(this.piece.getImage());\r\n space.setFill(imagePattern);\r\n break;\r\n }\r\n case \"white Queen\":\r\n {\r\n this.piece = new Queen(\"white Queen\");\r\n ImagePattern imagePattern = new ImagePattern(this.piece.getImage());\r\n space.setFill(imagePattern);\r\n break;\r\n }\r\n case \"white Pawn\":\r\n {\r\n this.piece = new Pawn(\"white Pawn\");\r\n ImagePattern imagePattern = new ImagePattern(this.piece.getImage());\r\n space.setFill(imagePattern);\r\n break;\r\n }\r\n default:\r\n {\r\n this.piece = new Empty(\" \");\r\n ImagePattern imagePattern = new ImagePattern(this.piece.getImage());\r\n space.setFill(imagePattern);\r\n this.piece.color=\"empty\";\r\n this.piece.imageName=\"empty\";\r\n break;\r\n }\r\n }\r\n }",
"public Piece(boolean white) {\n\t\tthis.white = white;\n\t\tthis.moved = false;\n\t}",
"public void setBlackAndWhite()\n {\n if (wall != null) // only if it's painted already...\n {\n wall.changeColor(\"black\");\n window.changeColor(\"white\");\n roof.changeColor(\"black\");\n sun.changeColor(\"black\");\n }\n }",
"public void setBlackAndWhite()\n {\n if(wall != null) // only if it's painted already...\n {\n wall.changeColor(\"black\");\n window.changeColor(\"white\");\n roof.changeColor(\"black\");\n sun.changeColor(\"black\");\n }\n }",
"public void setBlackAndWhite()\n {\n if(wall != null) // only if it's painted already...\n {\n wall.changeColor(\"black\");\n window.changeColor(\"white\");\n roof.changeColor(\"black\");\n sun.changeColor(\"black\");\n }\n }",
"public Pic blackAndWhite() {\n Pic output = image.deepCopy();\n Pixel[][] outputPixels = output.getPixels();\n for (int row = 0; row < output.getHeight(); row++) {\n for (int col = 0; col < output.getWidth(); col++) {\n Pixel current = outputPixels[row][col];\n int average = (current.getRed() + current.getGreen()\n + current.getBlue()) / 3;\n if (average > 127) {\n current.setRed(255);\n current.setGreen(255);\n current.setBlue(255);\n } else {\n current.setRed(0);\n current.setGreen(0);\n current.setBlue(0);\n }\n }\n }\n return output;\n }",
"@Override\n\t\tpublic void update(Graphics g) {\n\t\t\t\n\t\t\tImage pieceImg = null;\n\t\t\tif (board.square(row,column).isOccupied()) {\n\t\t\t\tint index = board.square(row,column).piece().imageIndex();\n\t\t\t\tpieceImg = pieceImages[index];\n\t\t\t}\n\t\t\tif (lightSquare)\n\t\t\t\t{ setIcon(new ImageIcon(combine(pieceImg, lightSquareImg))); }\n\t\t\telse\n\t\t\t\t{ setIcon(new ImageIcon(combine(pieceImg, darkSquareImg))); }\n\t\t}",
"public void setBlackAndWhite()\n {\n if(eyeL != null) // only if it's painted already...\n {\n eyeL.changeColor(\"black\");\n eyeR.changeColor(\"black\");\n nose.changeColor(\"black\");\n mouthM.changeColor(\"black\");\n mouthL.changeColor(\"black\");\n mouthR.changeColor(\"black\");\n }\n }",
"public void setPiece(Piece piece) {\n\t\troot.getChildren().clear();\n\t\tthis.piece = piece;\n\t\troot.getChildren().addAll(piece.getImage(),rectangle);\n\t}",
"private void white(){\n\t\tthis.arretes_fW();\n\t\tthis.coins_fW();\n\t\tthis.coins_a1W();\n\t\tthis.coins_a2W();\n\t\tthis.aretes_aW();\n\t\tthis.cube[4] = \"W\";\n\t}",
"@Override\r\n\tpublic String getPicture(boolean whiteSquare, boolean whitePiece) {\n\t\tif (whiteSquare){\r\n\t\t\t//if white piece\r\n\t\t\tif (whitePiece) {\r\n\t\t\t\treturn \"wrookWsq.jpeg\";\r\n\t\t\t}else{//black piece\r\n\t\t\t\treturn \"brookWsq.jpeg\";\r\n\t\t\t}\r\n\t\t}else{// square is black\r\n\t\t\t//if white piece\r\n\t\t\tif (whitePiece) {\r\n\t\t\t\treturn \"wrookBsq.jpeg\";\r\n\t\t\t}else{//black piece\r\n\t\t\t\treturn \"brookBsq.jpeg\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t}",
"public void setActiveImage() {\n\t\tsetGraphic(new ImageView(activePiece));\n\t\tisActiveImageOn = true;\t\t\n\t}",
"public void setPiece(Piece piece){\n this.piece = piece;\n this.pieceName = piece.pieceName;\n this.pieceColor = piece.pieceColor;\n this.firstMove = piece.firstMove;\n this.Enpassant = piece.Enpassant;\n }",
"public void changePiece() {\n if (piece == 1) {\n piece = 2;\n } else {\n piece = 1;\n }\n //System.out.println(\"Nu ben ik piece \" + piece);\n }",
"void setColor(char c, char t) {\n\t\tif(c == 'b' && t == 'b') pI = PieceImage.B_BISHOP;\n\t\tif(c == 'b' && t == 'k') pI = PieceImage.B_KING;\n\t\tif(c == 'b' && t == 'c') pI = PieceImage.B_KNIGHT;\n\t\tif(c == 'b' && t == 'p') pI = PieceImage.B_PAWN;\n\t\tif(c == 'b' && t == 'q') pI = PieceImage.B_QUEEN;\n\t\tif(c == 'b' && t == 'r') pI = PieceImage.B_ROOK;\n\t\t\n\t\tif(c == 'w' && t == 'b') pI = PieceImage.W_BISHOP;\n\t\tif(c == 'w' && t == 'k') pI = PieceImage.W_KING;\n\t\tif(c == 'w' && t == 'c') pI = PieceImage.W_KNIGHT;\n\t\tif(c == 'w' && t == 'p') pI = PieceImage.W_PAWN;\n\t\tif(c == 'w' && t == 'q') pI = PieceImage.W_QUEEN;\n\t\tif(c == 'w' && t == 'r') pI = PieceImage.W_ROOK;\n\t\n\t\tif(c == 'c' && t == 'b') pI = PieceImage.C_BISHOP;\n\t\tif(c == 'c' && t == 'k') pI = PieceImage.C_KING;\n\t\tif(c == 'c' && t == 'c') pI = PieceImage.C_KNIGHT;\n\t\tif(c == 'c' && t == 'p') pI = PieceImage.C_PAWN;\n\t\tif(c == 'c' && t == 'q') pI = PieceImage.C_QUEEN;\n\t\tif(c == 'c' && t == 'r') pI = PieceImage.C_ROOK;\n\t\t\n\t\tif(c == 'p' && t == 'b') pI = PieceImage.P_BISHOP;\n\t\tif(c == 'p' && t == 'k') pI = PieceImage.P_KING;\n\t\tif(c == 'p' && t == 'c') pI = PieceImage.P_KNIGHT;\n\t\tif(c == 'p' && t == 'p') pI = PieceImage.P_PAWN;\n\t\tif(c == 'p' && t == 'q') pI = PieceImage.P_QUEEN;\n\t\tif(c == 'p' && t == 'r') pI = PieceImage.P_ROOK;\n\t\t}",
"public void drawOn(Graphics page) {\n\t\tif(num != 1) {\n\t\t\tpage.drawImage(image, x, y, size, size, null);\n\t\t} else {\n\t\t\t// Creates a \"blank piece\" for the Piece\n\t\t\t// with a num id of 1\n\t\t\tpage.setColor(Color.white);\n\t\t\tpage.fillRect(x, y, size, size);\n\t\t}\n\t}",
"public void setPiece(Tetrimino piece)\n {\n this.piece = piece;\n }",
"private void drawWhite() throws IOException, ReversiException {\n playSound(PLAY_SOUND);\n // get the list of stones need to be changed\n String list = fromServer.readUTF();\n // draw white the list of stones\n boardComponent.drawWhite(list);\n setScoreText();\n\n // followed by the TURN command\n responseToServer();\n }",
"public void displayPiece() {\n if (isOccupied())\n this.setIcon(piece.getPieceImg());\n else\n this.setIcon(null);\n }",
"static void markPiece(Piece piece, boolean flag) {\n\t\t/* flag = true means that the piece is correctly placed */\n\t\tif (flag) {\n\t\t\tPlay.pieceViews.get(piece.getPosition()).setImageBitmap(piece.getCorrectImage()); //show correctImage\n\t\t} else {\n\t\t\tPlay.pieceViews.get(piece.getPosition()).setImageBitmap(piece.getImage()); //show the bordered image\n\t\t}\n\t\t//(Note: pieceViews is arranged in the same order as jigsawPieces. Both are arranged by currentPosition)\n\t}",
"boolean setPiece(int x, int y, Piece.OthelloPieceColour colour) {\n return false;\n }",
"public Piece(PieceType type, boolean isWhite) {\n this.type = type;\n this.isWhite = isWhite;\n }",
"public void setKing(PieceColor color, Square sq) {\n \tif(color == PieceColor.White) wKing = sq;\n \telse if(color == PieceColor.Black) bKing = sq;\n }",
"private void setThePieces(){\n for(int i = 0; i<HEIGHT;i++){\n for(int j = 0; j<WIDTH;j++){\n if(piecesToSwap[i][j]==null){\n \n }else{\n m_Pieces[i][j]=piecesToSwap[i][j];\n \n }\n }\n }\n }",
"private void sepiaTone(){\n int len= currentIm.getRows() * currentIm.getCols();\n \n for (int p= 0; p < len; p= p+1) {\n int rgb= currentIm.getPixel(p);\n int red= DM.getRed(rgb);\n int blue= DM.getBlue(rgb);\n int green= DM.getGreen(rgb);\n int alpha= DM.getAlpha(rgb);\n \n double brightness = 0.3 * red + 0.6 * green + 0.1 * blue;\n \n currentIm.setPixel(p,\n (alpha << 24) | ((int)brightness << 16) | ((int)(brightness*0.6) << 8) | \n (int)(brightness*0.4));\n \n }\n }",
"private void drawPiece(Piece piece) {\n int kind = piece.getKind() + 1;\n int pos0 = piece.getPos(0);\n int pos1 = piece.getPos(1);\n int pos2 = piece.getPos(2);\n int pos3 = piece.getPos(3);\n\n g.drawImage(tile[kind], (pos0%12)*23-3, (pos0/12)*23+17, this);\n g.drawImage(tile[kind], (pos1%12)*23-3, (pos1/12)*23+17, this);\n g.drawImage(tile[kind], (pos2%12)*23-3, (pos2/12)*23+17, this);\n g.drawImage(tile[kind], (pos3%12)*23-3, (pos3/12)*23+17, this);\n }",
"public void changeImage() {\r\n this.image = ColourDoor.image2;\r\n }",
"private void killPiece(Piece piece) {\r\n\t\tif (piece.getPlayer().color == Color.BLACK) {\r\n\t\t\tblack.removeElement(piece);\r\n\t\t}\r\n\t\telse {\r\n\t\t\twhite.removeElement(piece);\r\n\t\t}\r\n\t\t\r\n\t}",
"public void setPiece(PieceIF p);",
"public static void makeBoardChess() {\r\n \r\n white = new AllPiece(\"White\");\r\n black = new AllPiece(\"Black\");\r\n \r\n }",
"public PieceView(Piece piece){\n if (piece.pieceColor == Piece.PColor.red) {\n this.color = Color.RED;\n } else {\n this.color = Color.WHITE;\n }\n\n if (piece.pieceType == Piece.PType.king) {\n this.type = Type.KING;\n } else {\n this.type = Type.SINGLE;\n }\n }",
"public static void setPieceInBoard(int[] piece, int pos) {\n for (int f = 0; f < ColorFrames.FRAMES_DIM; ++f) { // For each frame dimension\n int color = piece[f];\n if (color != ColorFrames.NO_FRAME) {\n Panel.printFrame(f, color, pos); // Displays the frame with (f) dimension and (color)\n Panel.clearFrame(f, 0); // Clean the frame of piece.\n pieces[pos - 1][f] = color;\n }\n }\n\n checkGridPos(pos);\n }",
"public void update() {\n\t\t//Start updting the image\n\t\timg.loadPixels();\n\t\t\n\t\t//for every cell apply a color\n\t\tGridCell[] cells = grid.getCells();\n\t\tfor(int i = 0 ; i < cells.length; i++) {\n\t\t\timg.pixels[i] = cells[i].getMiniMapColor(ignoreDiscovered);\n\t\t}\n\t\t\n\t\t//Now update the image\n\t\timg.updatePixels();\n\t}",
"public void setNewPiece(){\n\t\tcurrentPiece = Pentominoes.Pentomino_array[this.next_piece_index];\n\t\tcurrentColor = Pentominoes.color_array[this.next_piece_colour];\n\t\tpieceOrigin = new Point(6, 2);\n\t}",
"public static void paintPixelOnWhiteboard(int drawingTool, int x, int y, int col){\n\t\t\n\t\tif(drawingTool == 1){\n\t\t\twhiteboardBi.setRGB(x, y, col);\n\t\t} else if(drawingTool == 2){\n\t\t\twhiteboardBi.setRGB(x, y, col);\n\t\t\twhiteboardBi.setRGB(x + 1, y + 0, col);\n\t\t\twhiteboardBi.setRGB(x + 2, y + 0, col);\n\t\t\twhiteboardBi.setRGB(x + 1, y + 1, col);\n\t\t\twhiteboardBi.setRGB(x + 0, y + 1, col);\n\t\t\twhiteboardBi.setRGB(x + 0, y + 2, col);\n\t\t\twhiteboardBi.setRGB(x + 1, y - 1, col);\n\t\t\twhiteboardBi.setRGB(x + 0, y - 1, col);\n\t\t\twhiteboardBi.setRGB(x + 0, y - 2, col);\n\t\t\twhiteboardBi.setRGB(x - 1, y + 0, col);\n\t\t\twhiteboardBi.setRGB(x - 2, y + 0, col);\n\t\t\twhiteboardBi.setRGB(x - 1, y + 1, col);\n\t\t\twhiteboardBi.setRGB(x - 1, y + 1, col);\n\t\t\twhiteboardBi.setRGB(x - 1, y - 1, col);\n\t\t\t\n\t\t} else if(drawingTool == 3){\n\t\t\twhiteboardBi.setRGB(x, y, col);\n\t\t\twhiteboardBi.setRGB(x + 1, y - 1, col);\n\t\t\twhiteboardBi.setRGB(x + 2, y - 2, col);\n\t\t\twhiteboardBi.setRGB(x + 3, y - 3, col);\n\t\t\twhiteboardBi.setRGB(x + 4, y - 4, col);\n\t\t\twhiteboardBi.setRGB(x + 1, y - 1, col);\n\t\t\twhiteboardBi.setRGB(x + 2, y - 2, col);\n\t\t\twhiteboardBi.setRGB(x + 3, y - 3, col);\n\t\t\twhiteboardBi.setRGB(x + 4, y - 4, col);\n\t\t} else if(drawingTool == 4){\n\t\t\twhiteboardBi.setRGB(x, y, col);\n\t\t\twhiteboardBi.setRGB(x + 0, y + 1, col);\n\t\t\twhiteboardBi.setRGB(x + 0, y + 2, col);\n\t\t\twhiteboardBi.setRGB(x + 0, y + 3, col);\n\t\t\twhiteboardBi.setRGB(x + 0, y + 4, col);\n\t\t\twhiteboardBi.setRGB(x + 0, y - 1, col);\n\t\t\twhiteboardBi.setRGB(x + 0, y - 2, col);\n\t\t\twhiteboardBi.setRGB(x + 0, y - 3, col);\n\t\t\twhiteboardBi.setRGB(x + 0, y - 4, col);\n\t\t} else if(drawingTool == 5){\n\t\t\twhiteboardBi.setRGB(x, y, col);\n\t\t\twhiteboardBi.setRGB(x + 1, y + 0, col);\n\t\t\twhiteboardBi.setRGB(x + 2, y + 0, col);\n\t\t\twhiteboardBi.setRGB(x + 3, y + 0, col);\n\t\t\twhiteboardBi.setRGB(x + 4, y + 0, col);\n\t\t\twhiteboardBi.setRGB(x - 1, y + 0, col);\n\t\t\twhiteboardBi.setRGB(x - 2, y + 0, col);\n\t\t\twhiteboardBi.setRGB(x - 3, y + 0, col);\n\t\t\twhiteboardBi.setRGB(x - 4, y + 0, col);\n\t\t} else if(drawingTool == 6){\n\t\t\twhiteboardBi.setRGB(x, y, col);\n\t\t\twhiteboardBi.setRGB(x - 4, y + 4, col);\n\t\t\twhiteboardBi.setRGB(x - 3, y + 3, col);\n\t\t\twhiteboardBi.setRGB(x - 3, y - 2, col);\n\t\t\twhiteboardBi.setRGB(x - 1, y + 0, col);\n\t\t\twhiteboardBi.setRGB(x + 0, y + 3, col);\n\t\t\twhiteboardBi.setRGB(x + 0, y - 3, col);\n\t\t\twhiteboardBi.setRGB(x + 0, y - 4, col);\n\t\t\twhiteboardBi.setRGB(x + 1, y + 0, col);\n\t\t\twhiteboardBi.setRGB(x + 3, y - 3, col);\n\t\t\twhiteboardBi.setRGB(x + 3, y + 3, col);\n\t\t\twhiteboardBi.setRGB(x + 4, y + 2, col);\n\t\t}\n\t\twhiteboardPanel.repaint();\n\t}",
"public static void setPieceTest2() {\n\t\t\t\tOthelloBoard Board = new OthelloBoard(BOARD_SIZE,BOARD_SIZE);\n\t\t\t \tBoard.setBoard();\n\t\t\t\tBoard.decPieceCount();\n\t\t\t \tSystem.out.println(Board.getPieceCount());\t\n\t\t\t\tSystem.out.println(Board.move(\n\t\t\t\t\t\tTEST_MOVE_X1, TEST_MOVE_Y1, Board.WHITE_PIECE));\n\t\t\t\tBoard.m_Pieces[TEST_PIECE_X][TEST_PIECE_Y]=Board.WHITE_PIECE;\n\t\t\t\tSystem.out.println(\"\");\n\t\t\t\tSystem.out.println(\"\");\n\t\t\t\tBoard.checkWin();\n\t\t\t\tSystem.out.println(\"Valid inputs\");\n\t\t\t\tSystem.out.println(\"OthelloBoard.clearPieces() - Begin\");\n\t\t\t\tSystem.out.println(\"Expected output: Throws exception\");\n\t\t\t\tSystem.out.println(\"\");\n\t\t\t\ttry{\n\t\t\t\t\t\n\t\t\t\t}catch(UnsupportedOperationException e){\n\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"\");\n\t\t}",
"public void affectPiece(Piece piece){\r\n this.piece = piece;\r\n this.piece.affect();\r\n }",
"public List<Piece> whitePieces();",
"Piece (Piece original) {\n this.isWhite = original.isWhite();\n this.type = original.getType();\n this.pawnHasJustMoved2 = original.isPawnHasJustMoved2();\n }",
"private void copyToBoard(FallingPiece piece) {\r\n \ttablero.reverse();\r\n \tfor (BlockDrawable block : piece.allBlocks()){\r\n \t\tBlockDrawable aux = new BlockDrawable(piece.toOuterPoint(block.getPoint()), block.getStyle(), false, block.getTextureRegion()); \r\n\t\t\ttablero.add(aux);\r\n\t\t}\r\n \ttablero.reverse();\r\n }",
"@Override\n public void setColor(Color newColor) {\n BufferedImage bufferedImage;\n try {\n bufferedImage = ImageIO.read(new URL(this.pieceType.getFileName2D()));\n BufferedImage coloredImage = colorImage(bufferedImage,newColor);\n Image image = SwingFXUtils.toFXImage(coloredImage, null);\n view = new ImageView(image);\n\n //these are temporary\n view.setFitHeight(80);\n view.setFitWidth(80);\n\n } catch (IOException e) {\n System.err.println(\"Error with creating the buffered image\");\n e.printStackTrace();\n }\n }",
"public void setPiece(int x, int y, Piece piece) {\n \tboard[y][x] = piece;\n }",
"public TilePiece(){\n\t\t\n\t\tiColour = null;\n\t\tiShape = null;\n\t}",
"public void setPiece(Piece p) {\n\tpiece = p;\n }",
"public static void setPieceTest() {\n\t\tOthelloBoard Board = new OthelloBoard(BOARD_SIZE,BOARD_SIZE);\n\t\tBoard.setBoard();\n\t\tBoard.decPieceCount();\n\t\tSystem.out.println(Board.getPieceCount());\n\t\tSystem.out.println(Board.move(\n\t\t\t\tTEST_MOVE_X1, TEST_MOVE_Y1, Board.WHITE_PIECE));\n\t\tBoard.m_Pieces[TEST_PIECE_X][TEST_PIECE_Y]=Board.WHITE_PIECE;\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.println(\"\");\n\t\tBoard.checkWin();\n\t\tSystem.out.println(\"Valid inputs\");\n\t\tSystem.out.println(\"OthelloBoard.setPiece() - Begin\");\n\t\tSystem.out.println(\"Expected output: true\");\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.println(\"Actual output: \" + \n\t\tBoard.setPiece(\n\t\t\t\tOUTPUT_SETPIECE_TEST_X,OUTPUT_SETPIECE_TEST_Y,Board.BLACK_PIECE));\n\t\tSystem.out.println(\"\");\n\t}",
"public SVGBuilder setWhiteMode() {\n this.fillColorFilter = new PorterDuffColorFilter(Color.WHITE, PorterDuff.Mode.SRC_IN);\n return this;\n }",
"boolean moveBlack(int piece) {\n\t\treturn ((piece == 2 || piece == 4) && curPlayer == 2);\n\t}",
"private Image blackSquare() {\n\t\tWritableImage wImage = new WritableImage(40, 40);\n\t\tPixelWriter writer = wImage.getPixelWriter();\n\t\tfor (int i = 0; i < 30; i++) {\n\t\t\tfor (int j = 0; j < 30; j++) {\n\t\t\t\twriter.setColor(i, j, Color.BLACK);\n\t\t\t}\n\t\t}\n\t\treturn wImage;\n\t}",
"public void setPiece(Piece newPiece) {\n this.piece = newPiece;\n }",
"public Piece(Color color) {\r\n this.type = Type.SINGLE;\r\n this.color = color;\r\n }",
"void setStone(int x, int y, int color);",
"public void prepare(int posx, int posy, int piece, String color) {\n\t\tColor clr;\n\t\tif (color == \"black\")\n\t\t\tclr = Color.black;\n\t\telse\n\t\t\tclr = Color.red;\n\t\tif (prevComp != null)\n\t\t\tchangeBackground(prevComp, null, false);\n\t\tchangeBackground(curComp, clr, true);\n\t\tstoreValues(posx, posy, piece);\n\t}",
"private void paintTheImage() {\n SPainter bruhmoment = new SPainter(\"Kanizsa Square\" ,400,400);\n\n SCircle dot = new SCircle(75);\n paintBlueCircle(bruhmoment,dot);\n paintRedCircle(bruhmoment,dot);\n paintGreenCircles(bruhmoment,dot);\n\n SSquare square= new SSquare(200);\n paintWhiteSquare(bruhmoment,square);\n\n\n }",
"void drawCurrentToBoard () {\n board.clearTemp();\n for (int r = 0; r < currentPiece.height; ++r)\n for (int c = 0; c < currentPiece.width; ++c)\n if (currentPiece.blocks[r][c] == 1)\n board.addBlock(new Block(currentPiece.color), r + currentRow, c + currentColumn);\n }",
"public static void main(String[] args)\n {\n \n //opens selfie picture \n /**/ \n //relative path\n //og pics\n Picture apic = new Picture(\"images/selfie.jpg\");\n Picture obama = new Picture(\"images/obama.jpg\");\n apic.explore();\n obama.explore();\n\n //change with selfie picture\n Picture me = new Picture(\"images/selfie.jpg\"); \n Picture me1 = new Picture(\"images/selfie.jpg\");\n Picture me2 = new Picture(\"images/selfie.jpg\");\n \n //initializes array pix\n Pixel[] pix;\n \n /**\n * method 1 change\n * divides colors into 4 equal groups\n */\n //initializes vars for rgb values\n int red;\n int blue;\n int green;\n pix = me.getPixels(); \n \n for (Pixel spot: pix) {\n //gets rgb values of colors\n red = spot.getRed();\n blue = spot.getBlue();\n green = spot.getGreen();\n \n //if pixel under a certain value then the color is changed\n if (red < 63 && blue < 63 && green < 63) {\n spot.setColor(new Color(2, 32, 62));\n }\n else if (red < 127 && blue < 127 && green < 127) {\n spot.setColor(new Color(198, 37, 8));\n }\n else if (red < 191 && blue < 191 && green < 191) {\n spot.setColor(new Color(102, 157, 160));\n }\n else {\n spot.setColor(new Color(250, 238, 192));\n }\n }\n me.explore();\n me.write(\"images/selfie1.jpg\");\n\n /**\n * method 2 change\n * changes color based on intensity using max and min grayscale values\n */\n pix = me1.getPixels(); \n int s = 0; //smallest pix value\n int b = 255; //largest pix value\n int ave;\n int quads; //size of four equal range of colors\n \n for (Pixel spot: pix) {\n red = spot.getRed();\n blue = spot.getBlue();\n green = spot.getGreen();\n \n ave = (red + blue + green)/3;\n if (ave > b) { //gets maximum grayscale\n b = ave;\n }\n if (ave < s) { //gets min grayscale\n s = ave;\n }\n quads = (b-s)/4; //divides range of pix values into 4\n \n //sees if pixel value is less than the factor of quad\n if (red < quads && blue < quads && green < quads) {\n spot.setColor(new Color(2, 32, 62));\n }\n else if (red < quads*2 && blue < quads*2 && green < quads*2 ) {\n spot.setColor(new Color(198, 37, 8));\n }\n else if (red < quads*3 && blue < quads*3 && green < quads*3) {\n spot.setColor(new Color(102, 157, 160));\n }\n else {\n spot.setColor(new Color(250, 238, 192));\n }\n }\n me1.explore();\n me1.write(\"images/selfie2.jpg\");\n \n /**\n * custom color palette\n */\n pix = me2.getPixels();\n \n for (Pixel spot: pix) {\n red = spot.getRed();\n blue = spot.getBlue();\n green = spot.getGreen();\n \n //sets color to new value if under a certain value\n if (red < 63 && blue < 63 && green < 63) {\n spot.setColor(new Color(77, 105, 170));\n }\n else if (red < 127 && blue < 127 && green < 127) {\n spot.setColor(new Color(71, 183, 116));\n }\n else if (red < 191 && blue < 191 && green < 191) {\n spot.setColor(new Color(254, 129, 99));\n }\n else {\n spot.setColor(new Color(254, 202, 99));\n }\n }\n me2.explore();\n me2.write(\"images/selfie3.jpg\");\n \n }",
"public void setPieces(){\r\n Pawn[] arrwPawn = new Pawn[8];\r\n for (int i=0 ; i<8 ; i++){\r\n pos.setPosition(6,i);\r\n arrwPawn[i] = new Pawn (pos , piece.Colour.WHITE);\r\n GameBoard.putPiece(arrwPawn[i]);\r\n }\r\n\r\n Pawn[] arrbPawn = new Pawn[8];\r\n for(int i=0 ; i<8 ; i++){\r\n pos.setPosition(0,i);\r\n arrbPawn[i] = new Pawn(pos , piece.Colour.BLACK);\r\n GameBoard.putPiece(arrbPawn[i]);\r\n }\r\n\r\n\r\n //set black pieces in the board\r\n\r\n pos.setPosition(0,0);\r\n Rook bRook1 = new Rook(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bRook1);;\r\n\r\n pos.setPosition(0,7);\r\n Rook bRook2 = new Rook(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bRook2);\r\n\r\n\r\n pos.setPosition(0,1);\r\n Knight bKnight1 = new Knight(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bKnight1);\r\n\r\n pos.setPosition(0,6);\r\n Knight bKnight2 = new Knight(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bKnight1);\r\n\r\n pos.setPosition(0,2);\r\n Bishop bBishop1 = new Bishop(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bBishop1);\r\n\r\n pos.setPosition(0,5);\r\n Bishop bBishop2 = new Bishop(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bBishop2);\r\n\r\n pos.setPosition(0,3);\r\n Queen bQueen = new Queen(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bQueen);\r\n\r\n pos.setPosition(0,4);\r\n King bKing = new King(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bKing);\r\n\r\n //set white pieces in the board\r\n\r\n pos.setPosition(7,0);\r\n Rook wRook1 = new Rook(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wRook1);\r\n\r\n pos.setPosition(7,7);\r\n Rook wRook2 = new Rook(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wRook2);\r\n\r\n pos.setPosition(7,1);\r\n Knight wKnight1 = new Knight(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wKnight1);\r\n\r\n pos.setPosition(7,6);\r\n Knight wKnight2 = new Knight(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wKnight1);\r\n\r\n pos.setPosition(7,2);\r\n Bishop wBishop1 = new Bishop(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wBishop1);\r\n\r\n pos.setPosition(7,5);\r\n Bishop wBishop2 = new Bishop(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wBishop2);\r\n\r\n pos.setPosition(7,3);\r\n Queen wQueen = new Queen(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wQueen);\r\n\r\n pos.setPosition(7,4);\r\n King wKing = new King(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wKing);\r\n\r\n\r\n\r\n Rook arrwRook[] = {wRook1,wRook2};\r\n Rook arrbRook[] = {bRook1,bRook2};\r\n Queen arrwQueen[] = {wQueen};\r\n Queen arrbQueen[] = {bQueen};\r\n Knight arrwKnight[] = {wKnight1,wKnight2};\r\n Knight arrbKnight[] = {bKnight1,bKnight2};\r\n King arrwKing[] = {wKing};\r\n King arrbKing[] = {bKing};\r\n Bishop arrwBishop[] = {wBishop1,wBishop2};\r\n Bishop arrbBishop[] = {bBishop1,bBishop2};\r\n }",
"public void reset()\n {\n playersPiece = -1;\n king = false;\n empty = true;\n setTileColor(-1);\n }",
"public void changeAction()\r\n {\r\n bufferedImage = imageCopy[0];\r\n edited = imageCopy[1];\r\n cropedPart = imageCopy[2];\r\n bufferedImage = imageCopy[3];\r\n\r\n isBlured = statesCopy[0];\r\n isReadyToSave = statesCopy[1];\r\n isChanged = statesCopy[2];\r\n isInverted = statesCopy[3];\r\n isRectangularCrop = statesCopy[4];\r\n isCircularCrop = statesCopy[5];\r\n isImageLoaded = statesCopy[6];\r\n }",
"@Test\n\tpublic void kingOnThroneBlackPieceRightWhiteCapture()\n\t{\n\t\tData d=new Data();\n\t\t//moving pieces out so capture can occur\n\t\td.set(24,68);\n\t\td.set(7,29);\n\t\td.set(36,119);\n\t\td.set(11,106);\n\t\td.set(20,33);\n\t\td.set(4,85);\n\t\td.set(35,118);\n\t\td.set(3,95);\n\t\td.set(25,62);\n\t\td.set(4,63);\n\t\tArrayList<Coordinate> test_arr=d.pieceLost(63);\n\t\tassertTrue(6==test_arr.get(0).getX() && 5==test_arr.get(0).getY());\n\n\t}",
"public void drawImage()\n {\n imageMode(CORNERS);\n //image(grayImgToFit, firstCellPosition[0], firstCellPosition[1]);\n image(canvas, firstCellPosition[0], firstCellPosition[1]);\n //image(tileMiniaturesV[0],10,250);\n //if(avaragedImgs.length > 4)\n // image(avaragedImgs[3],200,200);\n //getTileIntensityAtIndex(15,15);\n //println(tiles[7].getEndBrightness());\n \n }",
"public void runDarken() {\n BufferedImage transformedImage = new BufferedImage(this.image.getWidth(), this.image.getHeight(), this.image.getType());\n\n try {\n for(int i = 0; i < this.image.getWidth(); i++) {\n for(int j = 0; j < this.image.getHeight(); j++) {\n transformedImage.setRGB(i, j, image.getRGB(i,j));\n }\n }\n float scaleFactor = 0.5f;\n RescaleOp op = new RescaleOp(scaleFactor, 0, null);\n transformedImage = op.filter(transformedImage, null);\n\n File outputImageFileLocation = new File(this.exportLocation);\n ImageIO.write(transformedImage, Files.getFileExtension(this.imageLocation), outputImageFileLocation);\n System.out.println(\"Success\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void setCell(int color) {\r\n\t\tSound sound = Assets.manager.get(Assets.CLICK_SOUND);\r\n\t\tsound.play();\r\n\t\toccupied = color;\r\n\t\tif (color == -1) {\r\n\t\t\tpiece = new Image(Assets.manager.get(Assets.RED_TXT, Texture.class));\r\n\t\t} else {\r\n\t\t\tpiece = new Image(Assets.manager.get(Assets.YELLOW_TXT, Texture.class));\r\n\t\t}\r\n\t\tpiece.setPosition(img.getX() + OFFSET, img.getY() + OFFSET);\r\n\t\tstage.addActor(piece);\r\n\t}",
"public void setHiddenPiece() {\n for(int j = 0; j < 12; j++) {\n controller.getBoard().setPiece(new Forbidden(), 0, j);\n Cell[0][j] = new JButton();\n }\n for(int j = 0; j < 12; j++) {\n controller.getBoard().setPiece(new Forbidden(), 9, j);\n Cell[9][j] = new JButton();\n }\n for(int j = 0; j < 10; j++) {\n controller.getBoard().setPiece(new Forbidden(), j, 0);\n Cell[j][0] = new JButton();\n }\n for(int j = 0; j < 10; j++) {\n controller.getBoard().setPiece(new Forbidden(), j, 11);\n Cell[j][11] = new JButton();\n }\n }",
"public void setToWhite();",
"public void black() {\n g2.setPaint(Color.black);\r\n }",
"private void displayBoard() {\r\n\r\n for (int r = 0; r < 8; r++) {\r\n for (int c = 0; c < 8; c++) {\r\n if (model.pieceAt(r, c) == null)\r\n board[r][c].setIcon(null);\r\n else if (model.pieceAt(r, c).player() == Player.WHITE) {\r\n if (model.pieceAt(r, c).type().equals(\"Pawn\"))\r\n board[r][c].setIcon(wPawn);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"Rook\"))\r\n board[r][c].setIcon(wRook);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"Knight\"))\r\n board[r][c].setIcon(wKnight);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"Bishop\"))\r\n board[r][c].setIcon(wBishop);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"Queen\"))\r\n board[r][c].setIcon(wQueen);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"King\"))\r\n board[r][c].setIcon(wKing);\r\n } else if (model.pieceAt(r, c).player() == Player.BLACK) {\r\n if (model.pieceAt(r, c).type().equals(\"Pawn\"))\r\n board[r][c].setIcon(bPawn);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"Rook\"))\r\n board[r][c].setIcon(bRook);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"Knight\"))\r\n board[r][c].setIcon(bKnight);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"Bishop\"))\r\n board[r][c].setIcon(bBishop);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"Queen\"))\r\n board[r][c].setIcon(bQueen);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"King\"))\r\n board[r][c].setIcon(bKing);\r\n }\r\n repaint();\r\n }\r\n }\r\n if (model.inCheck(Player.WHITE))\r\n JOptionPane.showMessageDialog(null, \"White King in Check\");\r\n if (model.inCheck(Player.BLACK))\r\n JOptionPane.showMessageDialog(null, \"Black King in Check\");\r\n if (model.movingIntoCheck())\r\n JOptionPane.showMessageDialog(null, \"Cannot move into check\");\r\n if (model.isComplete())\r\n JOptionPane.showMessageDialog(null, \"Checkmate\");\r\n }",
"public static void boardInit() {\n ArrayList<Piece> white_piece_list = new ArrayList<>();\n ArrayList<Piece> black_piece_list = new ArrayList<>();\n ArrayList<Piece> piece_array = PieceFactory.createPieces();\n for(Piece p : piece_array)\n {\n if(p.getColor())\n {\n black_piece_list.add(p);\n }\n else\n {\n white_piece_list.add(p);\n }\n }\n white_player.setpieceList(white_piece_list);\n white_player.setKingXYCoords(PieceFactory.KING_INITIAL_X, PieceFactory.INITAL_Y_COORD_WHITE_PLAYER_OTHER);\n black_player.setpieceList(black_piece_list);\n black_player.setKingXYCoords(PieceFactory.KING_INITIAL_X, PieceFactory.INITAL_Y_COORD_WHITE_PLAYER_OTHER + PieceFactory.DIST_BETWEEN_PIECES);\n }",
"@Test\n\tpublic void kingOnThroneBlackPieceLeftWhiteCapture()\n\t{\n\t\tData d=new Data();\n\t\td.set(29,100);\n\t\td.set(1,103);\n\t\td.set(27,89);\n\t\td.set(5,46);\n\t\td.set(24,58);\n\t\td.set(2,16);\n\t\td.set(24,60);\n\t\td.set(5,27);\n\t\td.set(32,112);\n\t\td.set(5,49);\n\t\tArrayList<Coordinate> test_arr=d.pieceLost(49);\n\t\tassertTrue(4==test_arr.get(0).getX() && 5==test_arr.get(0).getY());\n\t}",
"public void setDead(boolean dead) {\n this.dead = dead;\n Graphics g = image.getGraphics();\n g.setColor(Color.BLACK);\n g.fillRect(0,0,pieceSize,pieceSize);\n g = getCoveredImage().getGraphics();\n g.setColor(Color.BLACK);\n g.fillRect(0,0,pieceSize,pieceSize);\n }",
"public void setPixel(int x, int y, short red, short green, short blue) {\n // Your solution here, but you should probably leave the following line\n // at the end.\n\t //if setPixel at the first location.\n\t if((x==0) && (y==0)) {\n\t\t if(red!=runs.getFirst().item[1]) {\n\t\t\t if(runs.getFirst().item[0]!=1) {\n\t\t\t\t int[] item= new int[] {1,red,green,blue};\n\t\t\t\t runs.getFirst().item[0]=runs.getFirst().item[0]-1;\n\t\t\t\t runs.addFirst(item);\n\t\t\t }\n\t\t\t else {\n\t\t\t\t if(red!=runs.getFirst().next.item[1]) {\n\t\t\t\t runs.remove(runs.nth(1));\n\t\t\t\t int[] item= new int[] {1,red,green,blue};\n\t\t\t\t runs.addFirst(item);\n\t\t\t\t System.out.println(runs.toString());\n\t\t\t\t }\n\t\t\t\t else {\n\t\t\t\t\t runs.remove(runs.nth(1));\n\t\t\t\t\t runs.getFirst().item[0]=runs.getFirst().item[0]+1;\n\t\t\t\t }\n\t\t\t }\n\t\t }\n\t }\n\t \n\t //if setPixel at the last location.\n\t else if((x==(width-1)) && (y==(height-1))) {\n\t\t if(runs.getLast().item[0]==1) {\n\t\t\t if(red!=runs.getLast().prev.item[1]) {\n\t\t\t\t int[] item= new int[] {1,red,green,blue}; \n\t\t\t\t runs.remove(runs.getLast());\n\t\t\t\t runs.addLast(item);\n\t\t }\n\t\t \n\t\t\t else {\n\t\t\t\t runs.remove(runs.getLast());\n\t\t\t\t runs.getLast().item[0]=runs.getLast().item[0]+1;\n\t\t\t }\n\t\t\t \n\t\t }\n\t\t else {\n\t\t\t int[] item= new int[] {1,red,green,blue};\n\t\t\t runs.addLast(item);\n\t\t\t runs.getLast().prev.item[0]=runs.getLast().prev.item[0]-1;\n\t\t }\n\t }\n\t \n\t //if Pixel is at a random location.\n//\t if(((x>0) && (y>0)) && ((x!=(width-1)) && (y!=(height-1))) ) {\n//\t if((x>0)&&(x!=(width-1))){\n\t else {\n\t int loc=y*(width)+x+1; \n\t int count=0;\n\t for(int i=0;i<runs.length();i++) {\n\t\t \n\t\tloc=loc-runs.nth(i+1).item[0] ;\n\t\tcount++;\n\t\tif (loc<=0) {\n\t\t\tbreak;\n\t\t}\n\t }\n\t if((loc==0) && (runs.nth(count).item[0]==1)){\n\t\t if((red!=runs.nth(count).next.item[1])&&(red!=runs.nth(count).prev.item[1])) { \n\t\t\t int[] item= new int[] {1,red,green,blue};\n\t\t\t runs.addAfter(runs.nth(count), item);\n\t\t\t runs.remove(runs.nth(count));\n\t\t }\n\t\t if((red==(runs.nth(count).next).item[1])&& (red!=runs.nth(count).prev.item[1])){\n\t\t\t runs.remove(runs.nth(count));\n\t\t\t runs.nth(count).item[0]=runs.nth(count).item[0]+1;\n\t\t }\t\n\t\t if((red==(runs.nth(count).prev).item[1])&&(red!=runs.nth(count).next.item[1])) {\n\t\t\t runs.remove(runs.nth(count));\n\t\t\t runs.nth(count).prev.item[0]=runs.nth(count).prev.item[0]+1;\n\t\t }\t\n\t\t if((red==(runs.nth(count).prev).item[1])&&(red==runs.nth(count).next.item[1])) {\n\t\t\t runs.nth(count).prev.item[0]=runs.nth(count).prev.item[0]+1+runs.nth(count).next.item[0];\n\t\t\t runs.remove(runs.nth(count));\n\t\t\t runs.remove(runs.nth(count));\n\t\t }\n\t }\n\t else if((loc==0) && (runs.nth(count).item[0]!=1)) {\n\t\t if(red!=runs.nth(count).next.item[1]) {\n\t\t\t runs.nth(count).item[0]=runs.nth(count).item[0]-1;\n\t\t\t int[] item= new int[] {1,red,green,blue};\n\t\t\t runs.addAfter(runs.nth(count), item);\t \n\t\t }\n\t\t else {\n\t\t\t runs.nth(count+1).item[0]=runs.nth(count+1).item[0]+1;\n\t\t }\t\t \n\t } \n\t else if(loc!=0) {\n\t\t \n\t\t int[] item= new int[] {1,red,green,blue};\n\n//\t\t DListNode<int[]> dup=runs.nth(count);\n//\t\t System.out.println(\"This is dup\"+dup.item[0]+\" \"+dup.item[1]+\" \"+dup.item[2]+\" \"+dup.item[0]);\t\t \n\t\t runs.addAfter(runs.nth(count), item);\n\t\t int[] dup=new int[] {runs.nth(count).item[0],runs.nth(count).item[1],runs.nth(count).item[2],runs.nth(count).item[3]};\n\t\t runs.addAfter(runs.nth(count).next, dup);\n\t\t System.out.println(runs.nth(count).item[0]+\"This is loc \"+loc+\"THis is count \"+count);\n\t\t runs.nth(count).item[0]=runs.nth(count).item[0]+loc-1;\n\t\t System.out.println(runs.nth(count).next.next.item[0]+\"This is loc \"+loc+\"THis is count \"+count);\n\t\t runs.nth(count).next.next.item[0]=runs.nth(count).next.next.item[0]+loc-1;\t\n\t\t }\n\t\t \n\t \n\t }\n check();\n}",
"public void apply(OFImage image)\n {\n int height = image.getHeight();\n int width = image.getWidth();\n OFImage original = new OFImage(image);\n \n for(int y = 0; y < height; y++) {\n for(int x = 0; x < width; x++) {\n Color currentPixel = original.getPixel(x,y);\n int grn,blu,red;\n grn = 255 - currentPixel.getGreen();\n red = 255 - currentPixel.getRed();\n blu = 255 - currentPixel.getBlue();\n image.setPixel(x, y, new Color(red,blu,grn));\n }\n }\n }",
"public void blackScreen() {\n boolean var5 = field_759;\n int var1 = this.field_723 * this.field_724;\n int var2;\n if(this.interlace) {\n var2 = 0;\n int var3 = -this.field_724;\n if(var5 || var3 < 0) {\n do {\n int var4 = -this.field_723;\n if(var5) {\n this.pixels[var2++] = 0;\n ++var4;\n }\n\n while(var4 < 0) {\n this.pixels[var2++] = 0;\n ++var4;\n }\n\n var2 += this.field_723;\n var3 += 2;\n } while(var3 < 0);\n\n }\n } else {\n var2 = 0;\n if(var5 || var2 < var1) {\n do {\n this.pixels[var2] = 0;\n ++var2;\n } while(var2 < var1);\n\n }\n }\n }",
"public synchronized void method_219() {\n if(this.field_730 != null) {\n this.field_730.setPixels(0, 0, this.field_723, this.field_724, this.field_728, this.pixels, 0, this.field_723);\n this.field_730.imageComplete(2);\n }\n }",
"public BufferedImage getWhiteImage() {\n return whiteImages[imageNumber];\n }",
"public ScoreBoard()\r\n {\r\n super();\r\n int boardWidth = 200;\r\n int boardHeight = 30;\r\n \r\n board = new GreenfootImage(boardWidth,boardHeight);\r\n board.setColor(Color.green); \r\n //&& Color.blue);\r\n board.fillRect(0, 0, boardWidth,boardHeight);\r\n this.setImage(board);\r\n \r\n //draw it\r\n update();\r\n }",
"@Test\n\tpublic void kingOnThroneBlackPieceUpWhiteCapture()\n\t{\n\t\tData d=new Data();\n\t\td.set(8,35);\n\t\td.set(6,39);\n\t\td.set(24,79);\n\t\td.set(6,40);\n\t\td.set(18,50);\n\t\td.set(6,39);\n\t\tArrayList<Coordinate> test_arr=d.pieceLost(39);\n\t\tassertTrue(5==test_arr.get(0).getX() && 4==test_arr.get(0).getY());\n\t}",
"void draw() {\n\n // SeamInfo lowestSeam = this.lowestSeamVert();\n // lowestSeam.changeColor();\n\n ComputedPixelImage seamRemovedImg = new ComputedPixelImage(this.newImg.width,\n this.newImg.height);\n int countRow = 0;\n int countCol = 0;\n\n Pixel current = this.curPixel;\n Pixel temp;\n\n while (current.down != null) {\n temp = current.down;\n while (current.right != null) {\n Color c = Color.MAGENTA;\n if (current.highlighted) {\n c = Color.RED;\n }\n else {\n c = current.color;\n }\n if (this.showType.equals(\"e\")) {\n int energy = (int) (current.energy * 100);\n if (energy > 255) {\n System.out.println(\"energy: \" + energy + \" to 255\");\n energy = 255;\n }\n c = new Color(energy, energy, energy);\n }\n else if (this.showType.equals(\"w\")) {\n int weight = (int) (current.seam.totalWeight);\n if (weight > 255) {\n System.out.println(\"weight: \" + weight + \" to 255\");\n weight = 255;\n }\n c = new Color(weight, weight, weight);\n }\n\n seamRemovedImg.setColorAt(countCol, countRow, c);\n countCol += 1;\n current = current.right;\n }\n countCol = 0;\n countRow += 1;\n current = temp;\n }\n countCol = 0;\n\n this.newImg = seamRemovedImg;\n\n }",
"private void drawBlack() throws IOException, ReversiException {\n playSound(PLAY_SOUND);\n // get the list of stones need to be changed\n String list = fromServer.readUTF();\n // draw black the list of stones\n boardComponent.drawBlack(list);\n\n setScoreText();\n\n // followed by the TURN command\n responseToServer();\n }",
"@Test\n\tpublic void testSetColor() {\n\n\t\tproc = new ByteProcessor(1,3,new byte[] {1,2,3},new IndexColorModel(8,1,new byte[]{1},new byte[]{2},new byte[]{3}));\n\n\t\tif (IJInfo.RUN_ENHANCED_TESTS)\n\t\t{\n\t\t\t// this test crashes with a null ptr exception\n\t\t\tip = new ImagePlus(\"MyChemicalRomance\", proc);\n\t\t\tip.setColor(null);\n\t\t}\n\n\t\t// try to set color of ImagePlus with no processor\n\t\t// ... should do nothing\n\t\tip = new ImagePlus();\n\t\t// can't rely on as packages may change : assertNull(ip.ip);\n\t\tip.setColor(Color.yellow);\n\t\t// can't do due to access: assertEquals(ip.ip.drawingColor,Color.black);\n\n\t\t// try to set color of processor when it exists\n\t\t// ... should set something lower -> defers to ImageProcessor.setColor() -> test there\n\t\tip = new ImagePlus(\"MyChemicalRomance\", proc);\n\t\t// can't rely on as packages may change : assertEquals(proc,ip.ip);\n\t\tip.setColor(Color.magenta);\n\t\t// can't do due to access: assertEquals(ip.ip.drawingColor,Color.magenta);\n\t}",
"public Knight(ChessBoard board, Player player) {\n super(\"knight\", board, player);\n if (player == Player.WHITE) { // White player\n this.piece_image_path = \"assets/white_knight.png\";\n } else { // Black player\n this.piece_image_path = \"assets/black_knight.png\";\n }\n }",
"private void setPieceIconAndName(int rowIndex, int colIndex, PieceName pieceName){\n\t\tboolean isBlack = (rowIndex == 0 || rowIndex == 1) ? true : false;\n\t\tboolean isWhite = (rowIndex == 6 || rowIndex == 7) ? true : false;\n\t\tString fileExt = \".gif\";\n\t\tString filePackagePath = \"chess/icon/\";\n\t\tString fileName; \n\t\tPieceColor pieceColor; \n\n\t\tif(isBlack||isWhite){\n\t\t\tif(isBlack)\n\t\t\t{\t\n\t\t\t\tfileName = filePackagePath+\"b\"+pieceName+fileExt;\n\t\t\t\tpieceColor = PieceColor.BLACK;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tfileName = filePackagePath+\"w\"+pieceName+fileExt; \n\t\t\t\tpieceColor = PieceColor.WHITE;\n\t\t\t} \n\t\t\tpieces[pieceCounter].setPieceIcon(getImage(getCodeBase(), fileName)); \n\t\t\tpieces[pieceCounter].setColor(pieceColor);\n\t\t}else{\n\t\t\tSystem.out.println(\"Error input Position\");\n\t\t} \n\t}",
"private void createPieces() {\n\t\t// Create and fill up the array, iterating by piece row and piece column.\n\t\tpieces = new ArrayList<CvMat>();\n\t\tfor (int pi = 0; pi < prows; pi++) {\n\t\t\tfor (int pj = 0; pj < pcols; pj++) {\n\t\t\t\tCvMat piece = CvMat.create(pieceHeight, pieceWidth, image.type());\n\t\t\t\tpieces.add(piece);\n\t\t\t\t// Copy pixels from image to piece (as usual, do it by hand rather than OpenCV).\n\t\t\t\tfor (int i = 0; i < pieceHeight; i++) {\n\t\t\t\t\tfor (int j = 0; j < pieceWidth; j++) {\n\t\t\t\t\t\tfor (int c = 0; c < 3; c++) {\n\t\t\t\t\t\t\tpiece.put(i, j, c, image.get(i + pi * pieceHeight, j + pj * pieceWidth, c));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void initPieces() {\r\n\t\tfor (int i = 0; i < 64; i++) {\r\n\t\t\tif (i < 12) {\r\n\t\t\t\tblackPieces[i] = new ChessPiece(\"black\", \"\");\r\n\t\t\t\tblackPieces[i].setBackground(Color.BLACK);\r\n\t\t\t\tblackPieces[i].addMouseMotionListener(this);\r\n\t\t\t\tblackPieces[i].addMouseListener(this);\r\n\t\t\t\tblackPieces[i].setText(null);\r\n\t\t\t\twhitePieces[i] = new ChessPiece(\"white\", \"\");\r\n\t\t\t\twhitePieces[i].setBackground(Color.WHITE);\r\n\t\t\t\twhitePieces[i].addMouseMotionListener(this);\r\n\t\t\t\twhitePieces[i].addMouseListener(this);\r\n\t\t\t\twhitePieces[i].setText(null);\r\n\t\t\t}\r\n\t\t\tspacePieces[i] = new ChessPiece(\"empty\", \"\");\r\n\t\t\tspacePieces[i].setEnabled(false);\r\n\t\t\tspacePieces[i].setVisible(false);\r\n\t\t\tspacePieces[i].setText(null);\r\n\t\t}\r\n\t}",
"public void landPiece() {\n\t\t// current rotation of piece\n\t\tint rot = currentPiece.getPieceRotation();\n\t\t\n\t\t// x coordinate of current piece's northwest corner\n\t\tint row = currentPieceGridPosition[0];\n\t\t\n\t\t// y coordinate of current piece's northwest corner\n\t\tint col = currentPieceGridPosition[1];\t\n\n\t\t// adds currentPiece's landing positions to be true in blockMatrix\n\t\tfor(int i = 0; i < 4; i++) { \n\t\t\tfor(int j = 0; j < 4; j++) { \n\t\t\t\tif(currentPiece.isFilled(rot, i, j)) {\n\t\t\t\t\tblockMatrix[i + row][j + col] = true; \n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t//add up scores\n\t\tnumLines += numberOfFormedLines(); \n\t\tif(numberOfFormedLines() >= 4) {\n\t\t\tnumTetrises++; \n\t\t}\n\t\t\n\t\t//clear out full lines\n\t\tfor(int i = 0; i < blockMatrix.length; i++) { \n\t\t\tif(fullLine(i)) { \n\t\t\t\tremoveLine(i);\n\t\t\t\t//find rows with blocks filled above cleared line to drop those down\n\t\t\t\tfor(int m = i-1; m >= 0; m--) { \n\t\t\t\t\tfor(int n = 0; n < NUM_COLS; n++) {\n\t\t\t\t\t\t// fill in space below, clear out current row \n\t\t\t\t\t\tif(hasBlock(m, n)) { \n\t\t\t\t\t\t\tblockMatrix[m][n] = false;\n\t\t\t\t\t\t\tblockMatrix[m+1][n] = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// ready for next piece\n\t\taddNewPiece();\n\t}",
"void defaultsetup(int phi) \n {// The Images should be loded here... Also add labels here\n System.out.println(\"IN DEFAULT SETUP..\");\n if( phi == 0) \n whiteToPlay = true;\n else if (phi == 1) \n whiteToPlay = false;\n // White Chess Pieces\n whiteHorse1.position = 1; whiteHorse1.color = 0;\n whiteHorse2.position = 6; whiteHorse2.color = 0;\n whiteQueen.position = 3; whiteQueen.color = 0;\n whiteKing.position =4 ; whiteKing.color = 0;\n whiteCastle1.position = 0; whiteCastle1.color = 0;\n whiteCastle2.position = 7; whiteCastle2.color = 0;\n whiteBishop1.position = 2; whiteBishop1.color = 0;\n whiteBishop2.position = 5; whiteBishop2.color = 0;\n int y = 8;\n for(int x = 0 ; x < 8; x++)\n {\n whitePawn[x] = new pawn();\n whitePawn[x].position = 8+x;\n whitePawn[x].color = 0;\n }\n //Black Chess Pieces\n blackHorse1.position = 57; blackHorse1.color = 1;\n blackHorse2.position = 62; blackHorse2.color = 1;\n blackQueen.position = 59; blackQueen.color = 1;\n blackKing.position = 60; blackKing.color = 1;\n blackCastle1.position = 56;blackCastle1.color = 1;\n blackCastle2.position = 63;blackCastle2.color = 1;\n blackBishop1.position = 58;blackBishop1.color = 1;\n blackBishop2.position = 61;blackBishop2.color = 1;\n y = 8;\n for(int x = 0 ; x < 8; x++)\n {\n blackPawn[x] = new pawn();\n blackPawn[x].position = 48+x;\n blackPawn[x].color = 1;\n }\n \n this.updatePositions();\n }",
"private void update() {\n setPieceType();\n initBackground(pieceIndex);\n }",
"@Test\n\tpublic void kingNotOnThroneWhitePieceLeftBlackCapture()\n\t{\n\t\tData d=new Data();\n\t\td.set(1,15);\n\t\td.set(5,27);\n\t\td.set(2,80);\n\t\td.set(0,37);\n\t\td.set(24,60);\n\t\td.set(2,59);\n\t\tArrayList<Coordinate> test_arr=d.pieceLost(59);\n\t\tassertTrue(4==test_arr.get(0).getX() && 5==test_arr.get(0).getY());\n\t}",
"public void setImage(Image newImage)\n {\n if (newImage == null)\n {\n setFill(null);\n }\n else\n {\n setFill(new ImageFill(newImage));\n }\n }",
"public void updateBoard(int[][] board, int piece){\r\n this.board=board;\r\n this.piece=piece;\r\n columns = board.length;\r\n rows = board[0].length;\r\n save = Math.min((size / columns), (size / rows));\r\n this.repaint();\r\n repaint();\r\n }",
"private boolean removePieceFromBoardTile(Piece piece) {\n\n\t\tif(piece == null) return false; \n\t\tLocation pieceLoc = piece.getLocation();\n\n\t\tTile tile=null;\n\t\ttry {\n\t\t\ttile = getTileInLocation(pieceLoc);\n\t\t\ttile.setPiece(null);\n\t\t\tthis.replaceTileInSameTileLocation(tile);\n\t\t\treturn true;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t}",
"public Piece flip(){\n if(this == BLACK){\n return WHITE;\n }\n else{\n return BLACK;\n }\n }",
"public static void clearBoard(){\n for(int i = 0; i < Board.X_UPPER_BOUND * Board.Y_UPPER_BOUND ; i++){\n Board.board[i] = null;\n }\n white_player.setpieceList(null);\n black_player.setpieceList(null);\n }",
"@Test\n\tpublic void kingNotOnThroneBlackPieceRightWhiteCapture()\n\t{\n\t\tData d=new Data();\n\t\td.set(4,52);\n\t\td.set(4,53);\n\t\td.set(11,84);\n\t\td.set(3,29);\n\t\td.set(0,65);\n\t\td.set(35,85);\n\t\td.set(4,64);\n\t\td.set(35,63);\n\t\td.set(35,62);\n\t\td.set(4,63);\n\t\tArrayList<Coordinate> test_arr=d.pieceLost(63);\n\t\tassertTrue(6==test_arr.get(0).getX() && 5==test_arr.get(0).getY());\n\n\t}",
"@Test\n\tpublic void kingNotOnThroneBlackPieceDownWhiteCapture()\n\t{\n\t\tData d=new Data();\n\t\td.set(11,76);\n\t\td.set(9,68);\n\t\td.set(10,69);\n\t\td.set(0,75);\n\t\td.set(12,84);\n\t\td.set(31,72);\n\t\td.set(12,83);\n\t\tArrayList<Coordinate> test_arr=d.pieceLost(83);\n\t\tassertTrue(5==test_arr.get(0).getX() && 6==test_arr.get(0).getY());\n\t}",
"@Override\n\tpublic void pintar() {\n\t\n\t\tapp.image(water, this.px, this.py);\n\t\t\n\t}",
"public void setBoard() {\n bestPieceToMove = null;\n bestPieceFound = false;\n bestMoveDirectionX = 0;\n bestMoveDirectionY = 0;\n bestMoveFound = false;\n killAvailable = false;\n lightCounter = 12;\n darkCounter = 12;\n for (int y = 0; y < boardSize; y++) {\n for (int x = 0; x < boardSize; x++) {\n board[y][x] = new Field(x, y);\n if (y < 3 && board[y][x].getPlaceable()) {\n board[y][x].setPiece(new Piece(PieceColor.DARK, PieceType.MEN));\n } else if (y > 4 && board[y][x].getPlaceable()) {\n board[y][x].setPiece(new Piece(PieceColor.LIGHT, PieceType.MEN));\n }\n }\n }\n }",
"@Test\n\tpublic void kingOnThroneBlackPieceDownWhiteCapture()\n\t{\n\t\tData d=new Data();\n\t\td.set(12,86);\n\t\td.set(9,82);\n\t\td.set(11,75);\n\t\td.set(10,70);\n\t\td.set(34,72);\n\t\td.set(9,83);\n\t\tArrayList<Coordinate> test_arr=d.pieceLost(83);\n\t\tassertTrue(5==test_arr.get(0).getX() && 6==test_arr.get(0).getY());\n\t}",
"public GamePiece(Color color, int x, int y){\n king = false;\n this.x = x;\n this.y = y;\n this.color = color;\n // Aligns to correct position on centre of the correct tile\n setCenterX(30 + (x * 60));\n setCenterY(30 + (y * 60));\n setRadius(20);\n // Sets the colour of the piece to visually show who it belongs to\n setFill(color);\n }",
"public boolean setPiece (int x, int y, OthelloPiece colour) {\n m_Pieces[x][y]=colour;\n \n return true;\n \n }"
] | [
"0.6612954",
"0.65371966",
"0.6532363",
"0.6362466",
"0.63580316",
"0.63580316",
"0.6317772",
"0.6308455",
"0.62310636",
"0.6128841",
"0.60913885",
"0.6077768",
"0.60594726",
"0.5989386",
"0.59845865",
"0.5980072",
"0.59476984",
"0.5937468",
"0.5927907",
"0.59205925",
"0.59157187",
"0.5912494",
"0.5905911",
"0.5844483",
"0.58245206",
"0.5818642",
"0.58058685",
"0.5794617",
"0.57927203",
"0.57922715",
"0.5792048",
"0.5783895",
"0.5783686",
"0.57582515",
"0.57425624",
"0.57409865",
"0.57368577",
"0.5721077",
"0.56922626",
"0.56839633",
"0.5673178",
"0.5669728",
"0.5668473",
"0.5658753",
"0.5654516",
"0.565205",
"0.5644758",
"0.564218",
"0.5642172",
"0.5631489",
"0.5599359",
"0.55975306",
"0.5589581",
"0.55849785",
"0.55812246",
"0.55800116",
"0.55631435",
"0.5561734",
"0.55598515",
"0.5549029",
"0.5546475",
"0.55336446",
"0.5526465",
"0.5515342",
"0.55119073",
"0.5494899",
"0.54824615",
"0.54799825",
"0.5479787",
"0.54738253",
"0.54653233",
"0.5461039",
"0.54582185",
"0.5453163",
"0.54511994",
"0.5448108",
"0.5444439",
"0.5442871",
"0.5433529",
"0.5429168",
"0.5428553",
"0.54250187",
"0.5418025",
"0.54160744",
"0.5415266",
"0.5405347",
"0.5397615",
"0.53882587",
"0.53807634",
"0.5380359",
"0.5378948",
"0.53746945",
"0.5372662",
"0.53714067",
"0.53695595",
"0.53687006",
"0.5368127",
"0.53666896",
"0.53575337",
"0.5356392"
] | 0.57634276 | 33 |
Lectura de XML de spring con los beans | public static void main(String[] args) {
ApplicationContext ctx = new ClassPathXmlApplicationContext("beans-cp.xml");
SpringJdbc springJdbc=ctx.getBean(SpringJdbc.class);
springJdbc.actionMethod();
//Lectura de Bean
//OrganizationDao organizationDao = (OrganizationDao) ctx.getBean("organizationDao");
((ClassPathXmlApplicationContext) ctx).close();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main(String[] args)\n {\n ApplicationContext context=new ClassPathXmlApplicationContext(\"beans.xml\");\n Movie movie=context.getBean(\"movie\",Movie.class);\n movie.displayActor();\n\n // intialize XmlBeanFactory with beanx.xml\n BeanFactory beanFactory=new XmlBeanFactory(new ClassPathResource(\"beans.xml\"));\n Movie movie1=(Movie) beanFactory.getBean(\"movie\");\n movie1.displayActor();\n // intialize BeanDefinitionRegistry and BeanDefinitionReader with beanx.xml\n DefaultListableBeanFactory factory=new DefaultListableBeanFactory();\n BeanDefinitionRegistry registry=new GenericApplicationContext(factory);\n BeanDefinitionReader reader = new XmlBeanDefinitionReader(registry);\n reader.loadBeanDefinitions(\"beans.xml\");\n Movie picture1 = (Movie) factory.getBean(\"movie\");\n picture1.displayActor();\n\n\n }",
"public static void main(String[] args) {\n\t\tClassPathXmlApplicationContext contexto= new ClassPathXmlApplicationContext(\"applicationContext.xml\");\r\n\t\t \r\n\t\tdirectorEmpleado Juan=contexto.getBean(\"miEmpleado\",directorEmpleado.class);\r\n\t\tSystem.out.println(Juan.getTareas());\r\n\t\tSystem.out.println(Juan.getInforme());\r\n\t\tSystem.out.println(Juan.getEmail());\r\n\t\tSystem.out.println(Juan.getNombreEmpresa());\r\n\t\t\r\n\t\t/*secretarioEmpleado Maria=contexto.getBean(\"miSecretarioEmpleado\",secretarioEmpleado.class);\r\n\t\tSystem.out.println(Maria.getTareas());\r\n\t\tSystem.out.println(Maria.getInforme());\r\n\t\tSystem.out.println(\"Email= \"+Maria.getEmail());\r\n\t\tSystem.out.println(\"Nombre Empresa= \"+Maria.getNombreEmpresa());*/\r\n\t\t\r\n\t\tcontexto.close();\r\n\t}",
"public static void main(String[] args) {\n\n\n\n\n\n ClassPathXmlApplicationContext contexto=new ClassPathXmlApplicationContext(\"applicationContext3.xml\");\n \n \n\n Empleados Maria=contexto.getBean(\"secretarioEmpleado2\",Empleados.class);\n\n \n \n \n //System.out.println(\"Tareas del director: \"+Maria.getTareas());\n System.out.println(\"Informes del director: \"+Maria.getInformes());\n //System.out.println(\"El correo es: \"+Maria.getEmail());\n //System.out.println(\"El nombre de la empresa es: \"+Maria.getNombreEmpresa());\n \n\n contexto.close();\n\n\n \n }",
"public static void main(String[] args) {\n\t\tResource resource = new ClassPathResource(\"config/p51.xml\");\n\t\tBeanFactory factory = new XmlBeanFactory(resource);\n\t\t\n\t\tApplicationContext context = new ClassPathXmlApplicationContext(\"config/p51.xml\");\n\t\t//context.getBean()....\n\t\t\n\t\t\n\t\tGreetingService greetingService =(GreetingService)factory.getBean(\"greeting\");\n\t\tSystem.out.println(greetingService.sayHello(\"아무거나 \"));\n\t\tGreetingService greetingService2 =(GreetingService)factory.getBean(\"greeting2\");\n\t\tSystem.out.println(greetingService2.sayHello(\"아무거나 \"));\n\n\t}",
"public static void main(String args[]){\n ApplicationContext context=new ClassPathXmlApplicationContext(\"bean.xml\");\n Movie movie=context.getBean(\"movie\", Movie.class);\n movie.movieDisplay();\n\n BeanFactory beanfactory=new XmlBeanFactory(new ClassPathResource(\"bean.xml\"));\n //getBean() returns instance\n Movie movie1=beanfactory.getBean(\"movie\", Movie.class);\n movie1.movieDisplay();\n\n DefaultListableBeanFactory defaultListableBeanFactory=new DefaultListableBeanFactory();\n BeanDefinitionRegistry beanDefinitionRegistry=new GenericApplicationContext(defaultListableBeanFactory);\n BeanDefinitionReader beanDefintionReader=new XmlBeanDefinitionReader(beanDefinitionRegistry);\n beanDefintionReader.loadBeanDefinitions(\"bean.xml\");\n Movie movie2=defaultListableBeanFactory.getBean(\"movie\",Movie.class);\n movie2.movieDisplay();\n }",
"private static BeanFactory getBeanFactory() {\n\t\tBeanFactory factory = new ClassPathXmlApplicationContext(\"withauto/beans.xml\");\n\t\treturn factory;\n\t}",
"public static void main( String[] args )\n {\n \tApplicationContext context=new FileSystemXmlApplicationContext(\"beans.xml\");\n \tTraveller traveller=(Traveller)context.getBean(\"traveller\"); //SPRING CONTAINER\n \tSystem.out.println(traveller.getTravelDetails());\n\n }",
"@Test\n public void testOrders(){\n ClassPathXmlApplicationContext context=\n new ClassPathXmlApplicationContext(\"bean4.xml\");\n Orders orders = context.getBean(\"orders\", Orders.class);\n System.out.println(\"第四步 得到bean实例\");\n System.out.println(orders);\n// orders.initMethod();\n context.close();\n }",
"public static void main(String[] args) {\n ApplicationContext applicationContext = new ClassPathXmlApplicationContext(\"bean.xml\");\n SingletonComponent singletonComponent = applicationContext.getBean(SingletonComponent.class);\n singletonComponent.setComponentProperty(\"Hello\");\n System.out.println(singletonComponent.getComponentProperty());\n\n SingletonComponent singletonComponent2 = applicationContext.getBean(SingletonComponent.class);\n System.out.println(singletonComponent2.getComponentProperty());\n\n\n PrototypeComponent prototypeComponent = applicationContext.getBean(PrototypeComponent.class);\n prototypeComponent.setComponentProperty(\"Hello\");\n System.out.println(prototypeComponent.getComponentProperty());\n\n PrototypeComponent prototypeComponent2 = applicationContext.getBean(PrototypeComponent.class);\n prototypeComponent2.setComponentProperty(\"Hello2\");\n System.out.println(prototypeComponent2.getComponentProperty());\n\n\n ComplexComponent bean = applicationContext.getBean(ComplexComponent.class);\n System.out.println(applicationContext.getBean(AutowiredComponent.class));\n bean.printAutoWiredComponent();\n\n\n System.out.println(applicationContext.getBean(AutowiredPrototypeComponent.class));\n bean.printAutoWiredPrototypeComponent();\n\n\n }",
"public static void main(String[] args) {\n\t\tApplicationContext appContext=(ApplicationContext) new ClassPathXmlApplicationContext(\"beans.xml\");\n\t\t\n\t\tEtudiant etu1=(Boursier) appContext.getBean(\"etudiant-boursier\");\n\t\tEtudiant etu2=(NonBousier) appContext.getBean(\"etudiant-non-boursier\");\n\t\tEtudiantServiceImp serviceEtudiant=(EtudiantServiceImp) appContext.getBean(\"service-etudiant\");\n\t\tClasseServiceImp serviceClasse= (ClasseServiceImp) appContext.getBean(\"service-classe\");\n\t\t\n\t\tSystem.out.println(\"etudiant boursier : \"+etu1.toString());\n\t\tSystem.out.println(\"etudiant non boursier: \"+etu2.toString());\n\t\t\n\t\t//Etudiant et=null;\n //double total=1000;\n //et=serviceEtudiant.creerEtudiantt(false);\n //serviceEtudiant.afficherNomComplet(et);\n System.out.println(\"scolarite: \"+serviceEtudiant.CalculScolarite(etu1));\n\t\t\n\n\t\t\n\t\t//List<Etudiant> etudiants = new ArrayList<Etudiant>();\n\t\t//etudiants.add(nonBEtudiant);\n\t\t//etudiants.add(boursier);\n\t\t//System.out.println(serviceClasse.SommeScollarite(etudiants));\n\t}",
"public static void main(String[] args) {\n ApplicationContext ctx=new ClassPathXmlApplicationContext(\"applicationContext.xml\");\n HelloWord h=(HelloWord) ctx.getBean(\"helloWord\");\n h.sayHello();\n Car car=(Car) ctx.getBean(\"car\");\n System.out.println(car);\n Person person=(Person) ctx.getBean(\"person\");\n System.out.println(person);\n\t}",
"public static void main(String[] args) {\n\t\tApplicationContext context = new ClassPathXmlApplicationContext(\"spring.xml\");\n\t\tAuteurDao auteurDao = (AuteurDao) context.getBean(\"auteurDAO\");\n\t\t\n\t\tSystem.out.println(System.getProperty(\"spring.xml\"));\n\t\t\n\t\tList<AuteurPojo> auteurs = new ArrayList<AuteurPojo>();\n\t\t\n\t\tauteurs = auteurDao.findAll();\n\t\t\n\t\tSystem.out.println(auteurs);\n\t\t\n\t\tAuteurPojo auteur = (AuteurPojo) context.getBean(\"auteurPojo\");\n\t\t\n\t\tAuteurResponse AR = (AuteurResponse) context.getBean(\"auteurResponse\");\n\t\t\n\t\tPretResponse PR = (PretResponse) context.getBean(\"pretResponse\");\n\t\t\n\t\tPretDao pretDao = (PretDao) context.getBean(\"pretDAO\");\n\t\t\n\t\t//PR.setPrets(pretDao.findAll());\n\t\t\n\t\ttry {\n\t\t\tPR.setPrets(pretDao.findAll());\n\t\t}catch(DaoException e) {\n\t\t\tAR.setErrorMessage(e.getMessage());\n\t\t}\n\t\t\n//\t\ttry {\n//\t\t\tauteur = auteurDao.findById(0);\n//\t\t\tAR.getAuteurs().add(auteur);\n//\t\t}catch(DaoException e) {\n//\t\t\tAR.setErrorMessage(e.getMessage());\n//\t\t}\n\t\t\n\t\tUtilisateurDao utilisateurDao = (UtilisateurDao) context.getBean(\"utilisateurDAO\");\n\t\tUtilisateurResponse UR = (UtilisateurResponse) context.getBean(\"utilisateurResponse\");\n\t\t\n\t\tif(utilisateurDao.checkPassword(\"alainTerrieur\", \"motDePasse\"))\n\t\t{\n\t\t\ttry {\n\t\t\t\tUR.getUtilisateurs().add(utilisateurDao.findByPseudo(\"alexTerrieur\"));\n\t\t\t}catch(HibernateException e) {\n\t\t\t\tUR.setErrorType(2);\n\t\t\t\tUR.setErrorMessage(e.getMessage());\n\t\t\t}\n\t\t}else {\n\t\t\tUR.setErrorType(2);\n\t\t\tUR.setErrorMessage(\"Pseudo or password invalid\");\n\t\t}\n\t\t\n\t\tSystem.out.println(UR);\n\t\t\n\t}",
"public static void main(String[] args) {\n ApplicationContext applicationContext = new ClassPathXmlApplicationContext(\"complex-config.xml\");\n Complex complex = applicationContext.getBean(\"complexBean\",Complex.class);\n System.out.println(complex.getList());\n System.out.println(complex.getSet());\n System.out.println(complex.getMap());\n\n }",
"public static void main(String args[]) {\r\n\t\tApplicationContext appContext=new ClassPathXmlApplicationContext(\"beans.xml\");\r\n\t\tEmployeeBean emp1=(EmployeeBean) appContext.getBean(\"Employee\");\r\n\t\tSystem.out.println(emp1.getName());\r\n\t}",
"public static void main(String args[]) {\n\r\n\t\r\n\tApplicationContext ac = new ClassPathXmlApplicationContext(\"com/springcore/annotations/anootationconfig.xml\");\r\n\t \r\n Employee emp = ac.getBean(\"myemployee\", Employee.class);\r\n System.out.println(emp.toString());\r\n\t}",
"public ObjetosBeans() {\n this.init();\n }",
"public static void main(String[] args) {\n\t\tGenericXmlApplicationContext ctx = new GenericXmlApplicationContext(\"Echo.xml\");\r\n\t\t\r\n\t\tEchobean bean = ctx.getBean(\"aaa\", Echobean.class);\r\n\t\t \r\n\t\tOneService one = bean.getOne();\r\n\t\tTwoService two = bean.getTwo(); \r\n\t\t \r\n\t\tone.one();\r\n\t\ttwo.two();\r\n\t}",
"public static void main( String[] args )\r\n {\r\n \tApplicationContext context = new ClassPathXmlApplicationContext(\"beans.xml\");\r\n \t\r\n \t/* Recupera un bean avente id='helloWorld' nel file di configurazione\r\n \t * beans.xml */\r\n \tHelloWorld obj = (HelloWorld) context.getBean(\"helloWorld\");\r\n \t\r\n \t/* Invoco il metodo che stampa il messaggio su tale oggetto */\r\n \tSystem.out.println(\"Messaggio: \" + obj.getMessage());\r\n \t\r\n \tobj = (HelloWorld) context.getBean(\"moseca\");\r\n \tSystem.out.println(\"Messaggio: \" + obj.getMessage());\r\n }",
"public static void main(String[] args) {\n\t\tResource r = new ClassPathResource(\"spring/b01_di/diexp_p_c.xml\");\n\t\tBeanFactory bean1 = new XmlBeanFactory(r);\n\t\tPerson p01 = (Person)bean1.getBean(\"p01\");\n\t\tSystem.out.println(\"À̸§: \"+p01.getName());\n\t\tSystem.out.println(\"³ªÀÌ: \"+p01.getAge());\n\t\tAbstractApplicationContext aactx = new GenericXmlApplicationContext(\"spring/b01_di/diexp_p_c.xml\");\n\t\tProduct prod1 = aactx.getBean(\"prod1\", Product.class);\n\t\tSystem.out.println(prod1.getName()+\" : \"+prod1.getPrice());\n\t\t\n\t\tBeanFactory bean2 = new XmlBeanFactory(r);\n\t\tProduct prod2 = (Product)bean2.getBean(\"prod1\");\n\t\tSystem.out.println(prod2.getName());\n\t\t\n\t\tPerson p02 = aactx.getBean(\"p01\", Person.class);\n\t\tSystem.out.println(p02.getName());\n\t}",
"public static void main(String[] args) {\n\t\t\tResource r = new ClassPathResource(\"resources/spring.xml\");\n\t\t\tBeanFactory factory = new XmlBeanFactory(r);\n\t\t//ApplicationContext factory1 = new ClassPathXmlApplicationContext(\"resources/spring.xml\");\n\t\t\n\t\t\n\t\t\t//Test t1 = (Test)factory1.getBean(\"t\");\n\t\t\t//Test t2 = (Test)factory1.getBean(\"t\");\n\t\t\t//t1.hello();\n\t\t\t//t2.hello();\n\t\t\t//System.out.println(t1==t2);\n\t\t\n\t\tfactory.getBean(\"t\");\n\t}",
"public UniqueResourcesAndLocations() {\n this.context = new ClassPathXmlApplicationContext(\"spring-dao.xml\");\n this.jtemp = (JdbcTemplate)context.getBean(\"jt\");\n\t}",
"@Before\n public void setUp() {\n this.context = new AnnotationConfigApplicationContext(\"com.fxyh.spring.config\");\n// this.context = new ClassPathXmlApplicationContext(\"classpath*:applicationContext-bean.xml\");\n this.user = this.context.getBean(User.class);\n this.user2 = this.context.getBean(User.class);\n this.department = this.context.getBean(Department.class);\n this.userService = (UserService) this.context.getBean(\"userService\");\n }",
"public void configureContextInitializationComponents(AppConfiguration appConfig,\n\t SpringBeansXMLBuilder builder);",
"public static void main(String[] args) throws Exception {\n \tString filename = \"boGen.conf.xml\";\n\n \ttry{\n\t\t\tSAXReader saxReader = new SAXReader();\n\t\t\tDocument document = saxReader.read(filename);\n\n\t\t\tList<Node> boList = document.selectNodes(\"//bo\");\n\n\t \tfor(Node bo : boList)\n\t \t{\n\t \t\tString boName = bo.selectSingleNode(\"@name\").getStringValue();\n\t\t String className = bo.selectSingleNode(\"@class\").getStringValue();\n\n\t\t Class<? extends BusinessObject> boClass = (Class<? extends BusinessObject>)Class.forName( className );\n\t\t PropertyDescriptor[] props = PropertyUtils.getPropertyDescriptors( boClass );\n\n\t\t StringBuffer sb = new StringBuffer( 4000 );\n\t\t sb.append( \"<beans xmlns=\\\"http://www.springframework.org/schema/beans\\\"\\r\\n\" +\n\t\t \t\t\" xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\"\\r\\n\" +\n\t\t \t\t\" xmlns:p=\\\"http://www.springframework.org/schema/p\\\"\\r\\n\" +\n\t\t \t\t\" xsi:schemaLocation=\\\"http://www.springframework.org/schema/beans\\r\\n\" +\n\t\t \t\t\" http://www.springframework.org/schema/beans/spring-beans-2.0.xsd\\\">\\r\\n\" +\n\t\t \t\t\"\\r\\n\" +\n\t\t \t\t\" <bean id=\\\"\" );\n\t\t sb.append( boClass.getSimpleName() );\n\t\t sb.append( \"\\\" parent=\\\"\" );\n\t\t sb.append( boClass.getSimpleName() );\n\t\t sb.append( \"-parentBean\\\" />\\r\\n\" +\n\t\t \t\t\"\\r\\n\" +\n\t\t \t\t\" <bean id=\\\"\" );\n\t\t sb.append( boClass.getSimpleName() );\n\t\t sb.append( \"-parentBean\\\" abstract=\\\"true\\\" parent=\\\"BusinessObjectEntry\\\"\\r\\n\" +\n\t\t \t\t\" p:businessObjectClass=\\\"\" );\n\t\t sb.append( boClass.getName() );\n\t\t sb.append( \"\\\"\\r\\n\" );\n\t\t sb.append( \" p:titleAttribute=\\\"\" );\n\t\t sb.append( \"FILL ME IN\" );\n\t\t sb.append( \"\\\"\\r\\n\" );\n\t\t sb.append( \" p:objectLabel=\\\"\" );\n\t\t sb.append( camelCaseToString( boClass.getSimpleName() ) );\n\t\t sb.append( \"\\\"\\r\\n\" );\n\t\t sb.append( \" p:inquiryDefinition-ref=\\\"\" );\n\t\t sb.append( boClass.getSimpleName() );\n\t\t sb.append( \"-inquiryDefinition\\\"\\r\\n\" );\n\t\t sb.append( \" p:lookupDefinition-ref=\\\"\" );\n\t\t sb.append( boClass.getSimpleName() );\n\t\t sb.append( \"-lookupDefinition\\\" >\\r\\n\" );\n\t\t sb.append( \" <property name=\\\"attributes\\\" >\\r\\n\" +\n\t\t \t\t\" <list>\\r\\n\" );\n\t\t for ( PropertyDescriptor p : props ) {\n\t\t if ( isNormalProperty(p) ) {\n\t\t sb.append( \" <ref bean=\\\"\" ).append( boClass.getSimpleName() ).append( '-' );\n\t\t sb.append( p.getName() );\n\t\t sb.append( \"\\\" />\\r\\n\" );\n\t\t }\n\t\t }\n\n\t\t sb.append( \" </list>\\r\\n\" +\n\t\t \t\t\" </property>\\r\\n\" +\n\t\t \t\t\" </bean>\\r\\n\" +\n\t\t \t\t\"\\r\\n\" );\n\t\t for ( PropertyDescriptor p : props ) {\n\t\t if ( isNormalProperty(p) ) {\n\n\t\t if ( p.getName().equals( \"versionNumber\" ) ) {\n\t\t sb.append( getSimpleParentBeanReference( boClass, p.getName() ) );\n\t\t sb.append( getSimpleAbstractInheritanceBean(boClass, p.getName(), \"AttributeReferenceDummy-versionNumber\" ) );\n\n\t\t } /*else if ( p.getName().endsWith(\"chartOfAccountsCode\" ) ) {\n\t\t sb.append( getSimpleParentBeanReference( boClass, p.getName() ) );\n\t\t sb.append( getSimpleAbstractInheritanceBean(boClass, p.getName(), \"Chart-chartOfAccountsCode\" ) );\n\n\t\t } else if ( p.getName().endsWith(\"organizationCode\" ) ) {\n\t\t sb.append( getSimpleParentBeanReference( boClass, p.getName() ) );\n\t\t sb.append( getSimpleAbstractInheritanceBean(boClass, p.getName(), \"Org-organizationCode\" ) );\n\n\t\t } else if ( p.getName().endsWith(\"accountNumber\" ) ) {\n\t\t sb.append( getSimpleParentBeanReference( boClass, p.getName() ) );\n\t\t sb.append( getSimpleAbstractInheritanceBean(boClass, p.getName(), \"Account-accountNumber\" ) );\n\n\t\t } else if ( p.getName().equals(\"active\" ) ) {\n\t\t sb.append( getSimpleParentBeanReference( boClass, p.getName() ) );\n\t\t sb.append( getSimpleAbstractInheritanceBean(boClass, p.getName(), \"GenericAttributes-activeIndicator\" ) );\n\n\t\t } else if ( p.getName().equals(\"codeAndDescription\" ) ) {\n\t\t sb.append( getSimpleParentBeanReference( boClass, p.getName() ) );\n\t\t sb.append( getSimpleAbstractInheritanceBeanWithLabel(boClass, p.getName(), \"CommonField-CodeAndDescription\", camelCaseToString(boClass.getSimpleName()) ) );\n\n\t\t } else if ( p.getPropertyType() == Boolean.TYPE ) {\n\t\t sb.append( getSimpleParentBeanReference( boClass, p.getName() ) );\n\t\t sb.append( getSimpleAbstractInheritanceBean(boClass, p.getName(), \"GenericAttributes-genericBoolean\" ) );\n\n\t\t } else if ( p.getPropertyType() == Date.class && !p.getName().equals(\"lastUpdateDate\")) {\n\t\t sb.append( getSimpleParentBeanReference( boClass, p.getName() ) );\n\t\t sb.append( getSimpleAbstractInheritanceBeanWithLabel(boClass, p.getName(), \"GenericAttributes-genericDate\", camelCaseToString(p.getName()) ) );\n\n\t\t } else if( p.getName().equals(\"lastUpdateDate\")) {\n\t\t \tsb.append( getSimpleParentBeanReference( boClass, p.getName() ) );\n\t\t sb.append( getSimpleAbstractInheritanceBeanWithLabel(boClass, p.getName(), \"GenericAttributes-genericTimestamp\", camelCaseToString(p.getName()) ) );\n\t\t }\n\t\t */else {\n\t\t // attribute bean\n\t\t sb.append( getSimpleParentBeanReference( boClass, p.getName() ) );\n\t\t // attribute parent bean\n\t\t sb.append( \" <bean id=\\\"\" ).append( boClass.getSimpleName() ).append( '-' );\n\t\t sb.append( p.getName() ).append( \"-parentBean\\\" parent=\\\"AttributeDefinition\\\" abstract=\\\"true\\\"\\r\\n\" );\n\t\t sb.append( \" p:name=\\\"\" ).append( p.getName() ).append( \"\\\"\\r\\n\" );\n\t\t sb.append( \" p:forceUppercase=\\\"false\\\"\\r\\n\" );\n\t\t sb.append( \" p:label=\\\"\" ).append( camelCaseToString(p.getName()) ).append( \"\\\"\\r\\n\" );\n\t\t sb.append( \" p:shortLabel=\\\"\" ).append( camelCaseToString(p.getName()) ).append( \"\\\"\\r\\n\" );\n\t\t sb.append( \" p:maxLength=\\\"10\\\"\\r\\n\" );\n\t\t sb.append( \" p:required=\\\"false\\\" >\\r\\n\" );\n\t\t sb.append( \" <property name=\\\"validationPattern\\\" >\\r\\n\" +\n\t\t \" <bean parent=\\\"AnyCharacterValidationPattern\\\"\\r\\n\" +\n\t\t \" p:allowWhitespace=\\\"true\\\" />\\r\\n\" +\n\t\t \" </property>\\r\\n\" +\n\t\t \" <property name=\\\"control\\\" >\\r\\n\");\n\t\t if(p.getName().equals(\"lastUpdateDate\"))\t{\n\t\t \tsb.append( \" <bean parent=\\\"HiddenControlDefinition\\\" />\\r\\n\");\n\t\t }\n\t\t else if (p.getName().equals(\"lastUpdateId\"))\t{\n\t\t \tsb.append( \" <bean parent=\\\"HiddenControlDefinition\\\" />\\r\\n\");\n\t\t }\n\t\t else {\n\t\t \tsb.append( \" <bean parent=\\\"TextControlDefinition\\\"\\r\\n\" +\n\t\t \t\" p:size=\\\"10\\\" />\\r\\n\");\n\t\t }\n\t\t sb.append( \" </property>\\r\\n\" +\n\t\t \" </bean>\\r\\n\" );\n\n\t\t }\n\t\t sb.append( \"\\r\\n\" );\n\t\t }\n\t\t }\n\t\t // inquiry definition\n\t\t sb.append(\"<!-- Business Object Inquiry Definition -->\\r\\n\");\n\t\t sb.append( \"\\r\\n\" );\n\t\t sb.append( getSimpleParentBeanReference( boClass, \"inquiryDefinition\" ) );\n\t\t sb.append( \"\\r\\n\" );\n\t\t sb.append( \" <bean id=\\\"\" );\n\t\t sb.append( boClass.getSimpleName() );\n\t\t sb.append( \"-inquiryDefinition-parentBean\\\" abstract=\\\"true\\\" parent=\\\"InquiryDefinition\\\"\\r\\n\" +\n\t\t \t\t\" p:title=\\\"\" );\n\t\t sb.append( camelCaseToString(boClass.getSimpleName() ) );\n\t\t sb.append( \" Inquiry\\\" >\\r\\n\" +\n\t\t \t\t\" <property name=\\\"inquirySections\\\" >\\r\\n\" +\n\t\t \t\t\" <list>\\r\\n\" +\n\t\t \t\t\" <bean parent=\\\"InquirySectionDefinition\\\"\\r\\n\" +\n\t\t \t\t\" p:title=\\\"\" );\n\t\t sb.append( camelCaseToString(boClass.getSimpleName() ) );\n\t\t sb.append( \" Attributes\\\"\\r\\n\" +\n\t\t \t\t\" p:numberOfColumns=\\\"1\\\" >\\r\\n\" +\n\t\t \t\t\" <property name=\\\"inquiryFields\\\" >\\r\\n\" +\n\t\t \t\t\" <list>\\r\\n\" );\n\t\t for ( PropertyDescriptor p : props ) {\n\t\t if ( isNormalProperty(p) ) {\n\t\t sb.append(\" <bean parent=\\\"FieldDefinition\\\" p:attributeName=\\\"\" );\n\t\t sb.append( p.getName() ).append( \"\\\" />\\r\\n\" );\n\t\t }\n\t\t }\n\t\t sb.append( \" </list>\\r\\n\" +\n\t\t \t\t\" </property>\\r\\n\" +\n\t\t \t\t\" </bean>\\r\\n\" +\n\t\t \t\t\" </list>\\r\\n\" +\n\t\t \t\t\" </property>\\r\\n\" +\n\t\t \t\t\" </bean>\\r\\n\" +\n\t\t \t\t\"\\r\\n\" );\n\n\t\t sb.append(\"<!-- Business Object Lookup Definition -->\");\n\t\t sb.append( \"\\r\\n\" );\n\t\t sb.append( getSimpleParentBeanReference( boClass, \"lookupDefinition\" ) );\n\t\t sb.append( \"\\r\\n\" );\n\t\t sb.append( \" <bean id=\\\"\" );\n\t\t sb.append( boClass.getSimpleName() );\n\t\t sb.append( \"-lookupDefinition-parentBean\\\" abstract=\\\"true\\\" parent=\\\"LookupDefinition\\\"\\r\\n\" +\n\t\t \" p:title=\\\"\" );\n\t\t sb.append( camelCaseToString(boClass.getSimpleName() ) );\n\t\t sb.append( \" Lookup\\\" \\r\\n\" );\n\t\t sb.append( \" >\\r\\n\" );\n\t\t sb.append( \" <property name=\\\"defaultSort\\\" >\\r\\n\" +\n\t\t \t\t\" <bean parent=\\\"SortDefinition\\\">\\r\\n\" +\n\t\t \t\t\" <property name=\\\"attributeNames\\\" >\\r\\n\" +\n\t\t \t\t\" <list>\\r\\n\" +\n\t\t \t\t\" <value>FILL ME IN</value>\\r\\n\" +\n\t\t \t\t\" </list>\\r\\n\" +\n\t\t \t\t\" </property>\\r\\n\" +\n\t\t \t\t\" <property name=\\\"sortAscending\\\" value=\\\"true\\\" />\\r\\n\" +\n\t\t \t\t\" </bean>\\r\\n\" +\n\t\t \t\t\" </property>\\r\\n\" +\n\t\t \t\t\" <property name=\\\"lookupFields\\\" >\\r\\n\" +\n\t\t \t\t\" <list>\\r\\n\" );\n\t\t for ( PropertyDescriptor p : props ) {\n\t\t if ( isNormalProperty(p) ) {\n\t\t sb.append(\" <bean parent=\\\"FieldDefinition\\\" p:attributeName=\\\"\" );\n\t\t sb.append( p.getName() ).append( \"\\\" />\\r\\n\" );\n\t\t }\n\t\t }\n\t\t sb.append( \" </list>\\r\\n\" +\n\t\t \t\t\" </property>\\r\\n\" +\n\t\t \t\t\" <property name=\\\"resultFields\\\" >\\r\\n\" +\n\t\t \t\t\" <list>\\r\\n\" );\n\t\t for ( PropertyDescriptor p : props ) {\n\t\t if ( isNormalProperty(p) ) {\n\t\t sb.append(\" <bean parent=\\\"FieldDefinition\\\" p:attributeName=\\\"\" );\n\t\t sb.append( p.getName() ).append( \"\\\" />\\r\\n\" );\n\t\t }\n\t\t }\n\t\t sb.append( \" </list>\\r\\n\" +\n\t\t \t\t\" </property>\\r\\n\" +\n\t\t \t\t\" </bean>\\r\\n\" );\n\t\t sb.append( \"\\r\\n</beans>\" );\n\n\t\t FileWriter outputfile = null;\n\t\t try\n\t\t {\n\t\t \toutputfile = new FileWriter(getOutputFilePath(className, false) + boName + \".xml\");\n\t\t \toutputfile.write(sb.toString());\n\t\t }\n\t\t catch(IOException e)\n\t\t {\n\t\t \tSystem.err.println(\"Error writing bean data to file.\");\n\t\t }\n\t\t finally {\n\t\t \toutputfile.close();\n\t\t }\n\t \t}\n \t}\n \tcatch(DocumentException e)\n \t{\n \t\tSystem.err.println(\"Error parsing xml document.\");\n \t}\n }",
"@Test\n public void testBeanFactoryCreateBean() {\n ClassPathResource resource = new ClassPathResource(\"spring-bean.xml\");\n XmlBeanFactory factory = new XmlBeanFactory(resource);\n //\n System.out.println(\"begin get bean.\");\n factory.getBean(\"bean\");\n System.out.println(\"end get bean.\");\n }",
"public TiposDocumentosBean(){\r\n }",
"public static void main(String[] args) {\n\t\tResource rs = new FileSystemResource(\"src/main/resources/beans.xml\");\n\t\tBeanFactory bF = new XmlBeanFactory(rs);\n\t\tStudent s1 = (Student) bF.getBean(\"student1\");\n\t\tSystem.out.println(s1);\n\t\tStudent s2 = (Student) bF.getBean(\"student2\");\n\t\tSystem.out.println(s2);\n\t}",
"public static void main( String[] args )\n {\n ApplicationContext bean = new ClassPathXmlApplicationContext(\"beans.xml\");\n Movie movie = (Movie) bean.getBean(\"movie1\");\n System.out.println(movie);\n }",
"public static void main(String[] args) {\n ClassPathXmlApplicationContext appContext = new ClassPathXmlApplicationContext(ANNOTATE_XML);\n\n // ask container for the Bean that is ready to use\n Car car = appContext.getBean(\"dmc12autowire\", Car.class);\n car.go();\n\n System.out.println(car.getClass().getName());\n\n appContext.close();\n }",
"@Bean\n public Jaxb2Marshaller jaxb2Marshaller(){\n Jaxb2Marshaller jaxb2Marshaller = new Jaxb2Marshaller();\n jaxb2Marshaller.setContextPath(\"hellios.wsdl\");\n return jaxb2Marshaller;\n }",
"public static void main(String[] args) {\n\n ApplicationContext context = new ClassPathXmlApplicationContext(new String[]{\"applicationContext.xml\",\"application.xml\"});\n\n Student student = (Student) context.getBean(\"student\");\n\n\n// ClassPathResource resource = new ClassPathResource(\"applicationContext.xml\");\n// XmlBeanFactory beanFactory = new XmlBeanFactory(resource);\n// Student student = (Student) beanFactory.getBean(\"student\");\n//\n// //资源\n// ClassPathResource resource = new ClassPathResource(\"applicationContext.xml\");\n// //容器\n// DefaultListableBeanFactory factory = new DefaultListableBeanFactory();\n// //BeanDefinition读取器,通过回调配置给容器\n// XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(factory);\n// //读取配置\n// reader.loadBeanDefinitions(resource);\n\n// Student student = (Student) factory.getBean(\"student\");\n// System.out.println(student);\n }",
"public static void main(String[] args) {\n\t\tResource resource = new FileSystemResource(\"src/main/resources/beanContainer.xml\");\t\t// 경로 지정해서 설정\n\t\tBeanFactory factory = new XmlBeanFactory(resource);\n\t\t\n\t\tHello obj = (Hello)factory.getBean(\"hello\");\n\t\tobj.printMsg();\n\t\t\n\t\tHello obj2 = (Hello)factory.getBean(\"hello2\");\n\t\tobj2.printMsg();\n\t\t\n\t\tHello obj3 = (Hello)factory.getBean(\"hello\");\n\t\tobj3.printMsg();\n\t\t\n\t\tSystem.out.println(obj);\n\t\tSystem.out.println(obj2);\n\t\tSystem.out.println(obj3);\n\t}",
"public static void main(String[] args) {\n\t\tClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(\"spring-test.xml\");\n\t\tSystem.out.println(context.getBean(\"test\"));\n\t\tSystem.out.println(context.getBean(MyConfig.class));\n\t\t//context.close();\n\t}",
"public static void main(String[] args) \r\n\t{\n\t\tString s = \"resources/spring.xml\";\r\nApplicationContext ac = new ClassPathXmlApplicationContext(s);\r\nCar c=(Car)ac.getBean(\"c\");\r\nc.printCarDetails();\r\n\t}",
"public static void main(String[] args) {\n \n ApplicationContext context =\n new ClassPathXmlApplicationContext(\"spring-beans.xml\");\n \n \n Dependant dependant = context.getBean(\"dependant\", Dependant.class);\n \n }",
"public static void main(String[] args) {\n\t\t\r\n\t\tApplicationContext factory = new ClassPathXmlApplicationContext(new String[]{\r\n\t\t\t\t\"config/userservice01.xml\", \"config/userservice02.xml\"\r\n\t\t});\r\n\t\t\r\n\t\tSystem.out.println(\"\\n=================================================\");\r\n\t\tUser user01 = (User)factory.getBean(\"user05\");\r\n\t\tSystem.out.println(user01);\r\n\t\t\r\n\t\tSystem.out.println(\"\\n=================================================\");\r\n\t\tUser user02 = (User)factory.getBean(\"user06\");\r\n\t\tSystem.out.println(user02);\r\n\t\t\r\n\t\tSystem.out.println(\"\\n=================================================\");\r\n\t\tUser user03 = (User)factory.getBean(\"user07\");\r\n\t\tSystem.out.println(user03);\r\n\t\t\r\n\t\tSystem.out.println(\"\\n=================================================\");\r\n\t\tUser user04 = (User)factory.getBean(\"user08\");\r\n\t\tSystem.out.println(user04);\r\n\t\t\r\n\t}",
"@RequestMapping(value = \"/load\")\n public @ResponseBody void load(String username,String password) {\n System.out.print(username+\" \"+password);\n// ApplicationContext ctx = new ClassPathXmlApplicationContext(\"classpath:spring-config.xml\");\n// SQLDao dao = ctx.getBean(\"SQLDao\", SQLDao.class);\n\n }",
"public static void main(String[] args) {\n\t\tClassPathXmlApplicationContext context= \r\n\t\t\t\tnew ClassPathXmlApplicationContext(new String[] {\"spring.xml\"});\r\n\t\t\r\n\t\t\r\n\t\tIBanqueService metier= (IBanqueService) context.getBean(\"banqueServiceImpl\");\r\n\t\t\r\n//\tmetier.addClientSf(new Client(\"P8\", \"GZZZLLZG\")); \r\n\t\t\r\n\t\tList<Operation> ops= metier.consulterOperation(\"FR1545457\");\r\n\tCompte cp= metier.consulterCompte(\"FR1545457\");\r\n\t\tfor(Operation op: ops){\r\n\t\t\tSystem.out.println(\"************\");\r\n\t\t\tSystem.out.println(\"operation numero : \"+ op.getNumOperation());\r\n\t\t\tSystem.out.println(\"date operation \"+op.getDateOperation());\r\n\t\t\tSystem.out.println(\" Montant transaction \"+op.getMontant());\r\n\t\t\tSystem.out.println(\"type tranbsaction: \"+op.getClass().getSimpleName());\r\n\t\t}\r\n\t\tSystem.out.println(\"************\");\r\n\t\t\r\n\t\tSystem.out.println(\"solde restant: \"+cp.getSolde());\r\n\t\t\r\n\t\t//Compte ce= (Compte) metier.consulterCompte(\"TN55566644\");\r\n\t\t//String codeCli= ce.getNumCompte();\r\n\t//\tmetier.verser(200L, \"TN55566644\", 2L);\r\n\t//\tmetier.virement(100, \"TN55566644\", \"FR1545457\", 3L);\r\n\t\t\r\n\t\t\r\n//\t\tmetier.addClient(new Client(\"A1\", \"fjedncjd\"));\r\n//\t\tmetier.addClient(new Client(\"B5\", \"njedvvv\"));\r\n//\t\tmetier.addClient(new Client(\"R5\", \"njeddd\"));\r\n//\t\tmetier.addClient(new Client(\"Y4\", \"njedzzzd\"));\r\n//\t\t\r\n//\t\tmetier.addEmploye(new Employe(\"1E\"), null);\r\n//\t\tmetier.addEmploye(new Employe(\"2E\"), (long) 1);\r\n//\t\tmetier.addEmploye(new Employe(\"3E\"), (long) 1);\r\n//\r\n//\t\tmetier.addGroupe(new Groupe(\"G1\"));\r\n//\t\tmetier.addEmployeToGroupe(2L, 1L);\r\n//\t\tmetier.addEmployeToGroupe(1L, 1L);\r\n//\t\tmetier.addEmployeToGroupe(3L, 1L);\r\n//\t\tCompteCourant cp= (CompteCourant) context.getBean(\"compteCourant\");\r\n//\t\tcp.setDateCreation(new Date());\r\n//\t\tcp.setNumCompte(\"TN13212545\");\r\n//\t\tcp.setSolde(999.222);\r\n//\t\tmetier.addCompte(new CompteCourant(\"TN1562321544\", new Date(), 1000L, 100L), 1L, 2L);\r\n\t\t\r\n//\t\tCompteCourant cc=(CompteCourant) context.getBean(\"compteCourant\");\r\n//\t\tcc.setNumCompte(\"TN55566644\");\r\n//\t\tcc.setDateCreation(new Date());\r\n//\t\tcc.setSolde(300L);\r\n//\t\tcc.setDecouvert(100L);\r\n//\t\tmetier.addCompte(new CompteCourant(\"TN55566644\", new Date(), 300L, 100L), 2L, 3L);\r\n//\t\tmetier.addCompte(new CompteEpargne(\"FR1545457\", new Date(), 2000L, 4.5), 2L, 3L);\r\n\t\t//metier.addCompte(cc, 2L, 3L);\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\n\t\tApplicationContext context = new AnnotationConfigApplicationContext(AppConfig.class);\r\n\t\t \r\n\t\tIMensaje mensaje = context.getBean(\"miBean\", Mensaje.class);\r\n\t\t\r\n\t\tmensaje.printHelloWorld(\"prueba Spring\");\r\n\t\t\r\n\t\t((AnnotationConfigApplicationContext) context).close();\r\n\t}",
"public static void main(String[] args) {\n\t\t Resource res = new ClassPathResource(\"applicationContext.xml\");\n\t BeanFactory factory = new XmlBeanFactory(res);\n\t \n\t Object o = factory.getBean(\"department\");\n\t Department dep = (Department)o;\n\t \n\t dep.show();\n\t}",
"public void init() {\n\t\tregisterBeanDefinitionParser(\"component-scan\", new AutoComponentScanBeanDefinitionParser());\n\t}",
"protected Spring() {}",
"public static void main(String[] args){\n ApplicationContext context = new ClassPathXmlApplicationContext(\"beans.xml\");\n TestMVC test = (TestMVC)context.getBean(\"MVC\"); //SpringIoC\n test.setControleur( (Controleur)context.getBean(\"Controleur\") ); //SpringIoC\n test.setVueg( (VueG)context.getBean(\"Vue\") ); //SpringIoC\n \n Panier p = new Panier(10); \n test.getControleur().setPanier(p); \n \n p.addObserver(test.getVueg());\n test.getVueg().addControleur(test.getControleur());\n \n VueConsole vuec = new VueConsole();\n p.addObserver(vuec);\n }",
"public RegistroBean() {\r\n }",
"public static void main(String[] args) {\n BeanFactory beanFactory = new ClassPathXmlApplicationContext(\"/com/bridgelabz/Spring/bean.xml\"); \n /* beans are loaded as soon as bean factory instance is created but \n * the beans are created only when getBean() method is called.\n * getBean: Return an instance, which may be shared*/\n GreetingMessage obj = (GreetingMessage) beanFactory.getBean(\"greetingMessage\"); \n String message = obj.getMessage();\n System.out.println(message);\n }",
"public static void main(String[] args) {\n\t\tApplicationContext factory =\n\t\t\t\tnew ClassPathXmlApplicationContext(\"resources/messageBean1.xml\");\n\t\tSystem.out.println(\"1. 공장 생성..\");\n\t\t//3. 생성되어서 공장이 가지고 있는 빈을 요청 :: getBean()\n\t\tSystem.out.println(\"2. 공장에서 빈을 가져옵니다...\");\n\t\t/*MemberService bean=factory.getBean(\"messageBean\", MemberService.class);*/\n\t\tMemberService bean=factory.getBean(\"message1\", MemberService.class);\n\t\t\n\t\t//4. 빈의 메소드를 수행.. 결과를 확인\n\t\tSystem.out.println(\"3. 빈의 메소드를 호출...\"+bean.msg());\n\t\n\t\n\t}",
"public ClasificacionBean() {\r\n }",
"public static void main(String[] args) {\n ApplicationContext context =new ClassPathXmlApplicationContext(\"spring.xml\");\n\t \n\t\tService ser= context.getBean(Service.class);\n\t\tSystem.out.println(ser.getAccountID());\n\t}",
"private CommonConfigBean(){\n\t\tsuper();\n\t\t\n\t\t\n\t\ttry {\n\n\t\t\tFile fXmlFile = new File(PathTool.getAbsolute(RELATIVE_FILE_PATH));\n\t\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder dBuilder = dbFactory.newDocumentBuilder();\n\t\t\tDocument doc = dBuilder.parse(fXmlFile);\n\t\t\t\t\t\n\t\t\t//optional, but recommended\n\t\t\t//read this - http://stackoverflow.com/questions/13786607/normalization-in-dom-parsing-with-java-how-does-it-work\n\t\t\tdoc.getDocumentElement().normalize();\n\n\t\t\tSystem.out.println(\"Root element :\" + doc.getDocumentElement().getNodeName());\n\t NodeList nList = doc.getElementsByTagName(\"param\");\n\t params = new HashMap<>();\n\t for (int temp = 0; temp < nList.getLength(); temp++) {\n\t Node nodo = nList.item(temp);\n\t System.out.println(\"Elemento:\" + nodo.getNodeName());\n\t if (nodo.getNodeType() == Node.ELEMENT_NODE) {\n\t Element element = (Element) nodo;\n\t params.put(element.getAttribute(\"name\"), element.getAttribute(\"value\"));\n\t }\n\t }\n\t\t\t\n\t\t\t\n\t\t } catch (Exception e) {\n\t\t \te.printStackTrace();\n\t\t }\n\t}",
"public static void main(String[] args) {\n\n ApplicationContext context = new ClassPathXmlApplicationContext(\"applicationContext_work.xml\");\n SqlSessionFactory c = context.getBean(\"C\", SqlSessionFactory.class);\n System.out.println(c);\n\n\n }",
"public static void main(String[] args) {\n\t\n\t\n\tResource r = new ClassPathResource(\"employee.xml\");\n\tBeanFactory bf = new XmlBeanFactory(r);\n\tObject obj = bf.getBean(\"t\");\n\tTest t1=(Test)obj;\n\n}",
"public static void main(String[] args) {\n\t\tResource res = new ClassPathResource(\"spconfig.xml\"); \n BeanFactory fac = new XmlBeanFactory(res);\n MyBean bean1 = (MyBean)fac.getBean(\"myBean1\");\n MyBean bean2 = (MyBean)fac.getBean(\"myBean2\");\n \n System.out.println(\"Bean 1\");\n bean1.execute();\n \n System.out.println(\"\\nBean 2\");\n bean2.execute();\n\n\t}",
"public static void main(String[] args) {\n\n System.out.println(\"开始初始化容器\");\n ApplicationContext ac = new ClassPathXmlApplicationContext(\"classpath:dispatcher-servlet.xml\");\n\n System.out.println(\"xml加载完毕\");\n Person person1 = (Person) ac.getBean(\"person1\");\n System.out.println(person1);\n System.out.println(\"关闭容器\");\n ((ClassPathXmlApplicationContext)ac).close();\n\n }",
"public static void main(String[] args) {\r\n\t\t\t\t\r\n\t\tResource resource = new ClassPathResource(\"beans.xml\");\r\n\t\tBeanFactory factory = new XmlBeanFactory(resource);\r\n\t\tEmployee employee = (Employee) factory.getBean(\"emp\");\r\n\t\tSystem.out.println(employee);\r\n\t\t}",
"public static void main(String[] args) {\n ApplicationContext context = new ClassPathXmlApplicationContext(\"classpath:data.xml\");\n\n Employee emp1 = context.getBean(\"employee1\", Employee.class);\n\n System.out.println(\"Employee Details \" + emp1);\n\n }",
"@Bean\n public Jaxb2Marshaller marshaller() {\n Jaxb2Marshaller marshaller = new Jaxb2Marshaller();\n // this package must match the package in the <generatePackage>\n // specified in pom.xml\n marshaller.setContextPath(CONTEXT_PATH);\n return marshaller;\n }",
"public static void main(String[] args) {\n\t\tApplicationContext context =\n\t\t\t new ClassPathXmlApplicationContext(new String[] {\"services.xml\"});\n\t\t\tHelloBean xmlBean = (HelloBean)context.getBean(\"xmlHelloID\");\n\t\t\tSystem.out.println(xmlBean.getMsg() + \" called \" + xmlBean.getCount() + \" times.\");\n\t\t\t\n\t\t//\tAnnotation example\n\t\t\tApplicationContext ctx = new AnnotationConfigApplicationContext(AppConfig.class);\n\t\t\t HelloBean annotationBean = ctx.getBean(HelloBean.class);\n\t\t\t System.out.println(annotationBean.getMsg() + \" called \" + annotationBean.getCount() + \" times.\");\n\t}",
"public static void main(String[] args) {\n\n IOCBeanLoadByXML iocBeanLoadByXML = (IOCBeanLoadByXML) BeanFactory.getBean(\"beanLoadByXML\");\n iocBeanLoadByXML.say();\n// IIOCBean iocBeanWithField = (IIOCBean) BeanFactory.getBean(\"testautowired\");\n// iocBeanWithField.say(\"param1\");\n }",
"protected void init() { \n ServletContext servletContext = getServletContext();\n applicationContext = WebApplicationContextUtils.getWebApplicationContext(servletContext);\n\n String names[] = applicationContext.getBeanDefinitionNames();\n\n for (String name : names) {\n System.out.println(\"name:\" + name);\n }\n }",
"public static void main(String[] args) {\n ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(\"beans.xml\");\n Person person = context.getBean(\"person\", Person.class);\n System.out.println(person.getName());\n System.out.println(person.getMessage());\n System.out.println(\"Shutting down...\");\n context.close();\n }",
"public static void main(String[] args) {\n ApplicationContext context = new AnnotationConfigApplicationContext(AppConfig.class);\n//\n// SpeakerService service = context.getBean(\"speakerService\", SpeakerService.class);\n//\n// System.out.println(service);\n//\n// System.out.println(service.findAll().get(0).getFirstName());\n//\n /*\n * In case of Singleton\n * This will not instantiate new object of SpeakerService because it is singleton\n * Same reference will be returned\n * */\n// SpeakerService service2 = context.getBean(\"speakerService\", SpeakerService.class);\n// System.out.println(service2);\n\n // XML Configuration\n// ApplicationContext context = new ClassPathXmlApplicationContext(\"ApplicationContext.xml\");\n// SpeakerService service2 = context.getBean(\"speakerService\", SpeakerService.class);\n// System.out.println(service2);\n }",
"public static void main(String[] args) {\n\t\tApplicationContext ac = new ClassPathXmlApplicationContext(\"applicationContext.xml\");\r\n\t\t//System.out.println(ac.getBean(\"user\"));\r\n\t\t//User user = ac.getBean(User.class);\r\n\t\tString[] beanNames = ac.getBeanNamesForType(User.class);\r\n\t\t//System.out.println(user);\r\n\t\tfor (String string : beanNames) {\r\n\t\t\tSystem.out.println(string);\r\n\t\t\t\r\n\t\t}\r\n\t\tUser user = (User) ac.getBean(\"hkk.spring.javaBeans.User#0\");\r\n\t\tUser user2 = (User) ac.getBean(\"user\");\r\n\t\tUser user3 = (User) ac.getBean(\"user\");\r\n\t\tSystem.out.println(user3==user2);\r\n\t}",
"public static void main(String[] args) {\n\tBeanFactory factory;\n\tfactory=new XmlBeanFactory(new ClassPathResource(\"kcp/spring/configuration/applicationContext.xml\"));\n\tClass c1=null;\n\tc1=factory.getBean(\"c1\",Class.class);\n\tSystem.out.println(c1+\" \"+c1.getClass());\n\t Properties c2=factory.getBean(\"c2\",Properties.class);\n\tSystem.out.println(c2+\" \"+c2.getClass());\n }",
"public UsuariosBean() {\n }",
"public static void main(String[] args) {\n\t\tApplicationContext context = new ClassPathXmlApplicationContext(\"beans.xml\");\n\t\tSystem.out.println(\"context loaded\");\n\t\t// Sim sim = (Sim) context.getBean(\"sim\");\n\t\t/**\n\t\t * Avoid above type casting\n\t\t */\n\t\tSim sim = context.getBean(\"sim\", Sim.class);\n\t\tsim.calling();\n\t\tsim.data();\n\t}",
"@Override\n public void onStartup(ServletContext sc) throws ServletException {\n AnnotationConfigWebApplicationContext rootApplicationContext = new AnnotationConfigWebApplicationContext();\n rootApplicationContext.register(RootAppConfig.class);\n sc.addListener(new ContextLoaderListener(rootApplicationContext));\n \n //kreiraj web application kontekst koji se vezuje za dispatcher servlet\n AnnotationConfigWebApplicationContext webApplicationContext = new AnnotationConfigWebApplicationContext();\n webApplicationContext.register(MvcConfig.class);\n \n //konfigurisanje dispatcher servlet-a\n ServletRegistration.Dynamic dispatcher = sc\n .addServlet(\"dispatcher\", new DispatcherServlet(webApplicationContext));\n dispatcher.addMapping(\"/\");\n dispatcher.setLoadOnStartup(1);\n }",
"public static void main(String[] args) {\n ConfigurableApplicationContext ctx = new ClassPathXmlApplicationContext(\"config.xml\");\n // ctx.start();\n Database d =ctx.getBean(\"mysql\",Database.class);\n System.out.println(\"name --->\" + d.getName() + \" port-->\" + d.getPort());\n d.connect();\n // d.getInteger();\n // d.throwException();\n // d.checkdata(\"richa\");\n // d.getIntdata(200);\n // Dummy dummy = ctx.getBean(\"dummy\", Dummy.class);\n // dummy.display();\n // ctx.stop();\n /* Dummytest dummytest=ctx.getBean(\"dummyTest\",Dummytest.class);\nSystem.out.print(dummytest);\n PersonalisedService personalisedService=ctx.getBean(\"personalisedService\",PersonalisedService.class);\n System.out.println(personalisedService);\n System.out.println(personalisedService.employee.getCity());\n*/\n\n }",
"public static void main(String[] args) {\n\t\tApplicationContext container = new ClassPathXmlApplicationContext(\"context.xml\");\n\t\tSystem.out.println(\"container created\");\n\n\t\t//Animal dog = container.getBean(\"animal\", Animal.class);\n\t\t//System.out.println(dog);\n\n\t}",
"public static void main(String[] args) {\n\t\tApplicationContext ac=new ClassPathXmlApplicationContext(\"springcore.xml\");\n\t\t//identify bean by its id\n\t\tGreet gt=(Greet)ac.getBean(\"g1\");\n\t\tSystem.out.println(gt.getMessage());\n\n\n\t}",
"public static void main(String[] args) throws Exception\n\t\t{\n\t\t\tApplicationContext context = new ClassPathXmlApplicationContext(\"applicationContext.xml\");\n\t\t\t\t\n\t\t\t//HelloBean helloBean = (HelloBean) bean.getBean(\"myBean\");\n\t\t\tHelloBean helloBean = (HelloBean) context.getBean(\"myBean\");\n\t\t\thelloBean.getMessage();\n\t\t\t//System.out.println(helloBean.getAdd());\n\t\t\t\n\t\t\t\n//\t\t\tExpression expression = expressionParser.parseExpression(\"'Hello SpEL'\");\n//\t\t\tString strVal = (String) expression.getValue();\n//\t System.out.println(\"STR VALUE: \" + strVal);\n\t\t}",
"public NaviProxyFactoryBean() {\r\n\r\n }",
"public static void main(String[] args) {\n\t\t DefaultListableBeanFactory factory=new DefaultListableBeanFactory();\r\n\t\t XmlBeanDefinitionReader reader=new XmlBeanDefinitionReader(factory);\r\n\t\t reader.loadBeanDefinitions(new FileSystemResource(\"src/test/resources/com/bike/applicationcontest.xml\"));\r\n\t\t//GET BEAN meythod\r\n\t\t \r\n\t\t Bikes bike=(Bikes) factory.getBean(\"pulsor1\");\r\n\t\t System.out.println(bike);\r\n\t\t Bikes bike2=(Bikes) factory.getBean(\"pulsor2\",Bikes.class);\r\n\t\t System.out.println(bike2);\r\n\t}",
"private void registerBeanDefinitions(Document doc, Resource res) {\n Element root = doc.getDocumentElement();\n if(!root.getNodeName().equals(BEANS_ELEMENT)){\n throw new IllegalArgumentException(\"The\"+root+\"element has not implement yet\");\n }\n parseBeanDefinitionElement(root);\n }",
"public PessoaService(){\n\t\n\t\tApplicationContext context =SpringUtil.getContext();\n\t\tdb = context.getBean(PessoaRepository.class);\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\tApplicationContext context = new FileSystemXmlApplicationContext(\"beans.xml\");\n\n\t\tPerson p1 = (Person) context.getBean(\"p1\");\n\t\tPerson p2 = (Person) context.getBean(\"p2\");\n\t\tPerson p3 = (Person) context.getBean(\"p3\");\n\t\tPerson p4 = (Person) context.getBean(\"p4\");\n\t\t\n\t\tAddress add1 = (Address) context.getBean(\"add1\");\n\t\tSystem.out.println(add1);\n\n\t\tList<Person> personList = new ArrayList<Person>();\n\t\tpersonList.add(p1);\n\t\tpersonList.add(p2);\n\t\tpersonList.add(p3);\n\t\tpersonList.add(p4);\n\n\t\tfor (Person person : personList) {\n\t\t\tSystem.out.println(person);\n\t\t}\n\n\t\t\t\tAddress johnAddress = new Address(1234, \"Heavenly Lane\", \"Warren\", \"MI\", 48092);\n\n\t\t\t\t// Dependecy injection of johnAddress\n\t\t\t\tPerson john = new Person(\"John Doe\", 22, \"blue\", 5.5, johnAddress);\n\n\t\t\t\tSystem.out.println(john);\n\t\t\t}",
"@Bean\n\tpublic Jaxb2Marshaller marshaller() {\n\t\tJaxb2Marshaller marshaller = new Jaxb2Marshaller();\n\t\tmarshaller.setContextPath(\"be.kroma.soapmessages\");\n\t\treturn marshaller;\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\tApplicationContext context = new AnnotationConfigApplicationContext(JavaConfig.class);\n\nStudent s1 = context.getBean(\"s1\", Student.class);\n\nSystem.out.println(s1);\n\n\n\t}",
"public ContactoFormBean() {\r\n setContexto();\r\n }",
"@Test\n public void test_BeanFactoryMethod() {\n Resource res = new ClassPathResource(\"beanfactory-example.xml\");\n BeanFactory factory = new XmlBeanFactory(res);\n User user = (User) factory.getBean(\"user\");\n\n assertTrue(factory.isSingleton(\"user\"));\n assertTrue(factory.getBean(\"user\") instanceof User);\n assertTrue(factory.isTypeMatch(\"user\", User.class));\n assertTrue(factory.getAliases(\"user\").length > 0);\n }",
"public static void main(String[] args) {\n\t\tApplicationContext ctx=new ClassPathXmlApplicationContext(\"com/Kamal/SpringCoreAdvanced/InterfaceInjection/config.xml\");\n\t\tOrderBo impl=(OrderBo)ctx.getBean(\"bo\");\n\t\timpl.placeOrder();\n\t\t\n\t\t\n\t\t\n\t\t\n\t}",
"public interface ConfigService {\n\n\n /**\n * eureka配置\n *\n * @param sb\n * @param addr\n */\n void eureka(StringBuilder sb, String addr);\n\n /**\n * redis配置\n *\n * @param sb\n * @param addr\n */\n void redis(StringBuilder sb, String addr);\n\n\n /**\n * 数据源配置\n *\n * @param sb\n */\n void thymeleafAndDatasource(StringBuilder sb);\n\n\n /**\n * 关于mybatis的配置\n *\n * @param sb\n * @param packages\n */\n void mybatis(StringBuilder sb, String packages);\n\n\n /**\n * 分页插件配置\n *\n * @param sb\n */\n void pagehelper(StringBuilder sb);\n\n /**\n * 生成application.yml\n *\n * @param name\n */\n void application(String name);\n\n\n /**\n * 生成application-xxx.yml\n *\n * @param branch\n * @param packages\n */\n void applicationBranch(String branch, String packages);\n\n\n /**\n * log文件\n *\n */\n void logBack();\n}",
"public ProductBeans() {\n \n services = BeanHelper.getService();\n list = services.listOfProducts();\n\n }",
"public static void main(String[] args) {\n AbstractApplicationContext context = new AnnotationConfigApplicationContext(\"com.ravindra\");\n Product p =(Product)context.getBean(\"product \");\n p.setId(\"123\");\n p.setName(\"Dell\");\n p.setPrice(400);\n System.out.println(p.toString());\n }",
"public static void main(String[] args) {\n\r\n\t\tApplicationContext ctx = new ClassPathXmlApplicationContext(\"empaccconfig.xml\");\r\n\t\t\r\n\t\tEmployee em = (Employee)ctx.getBean(\"emp\");\r\n\t\tem.printValues();\r\n\t}",
"public static void main(String[] args) {\n\t\tApplicationContext actx = new FileSystemXmlApplicationContext(\"/src/main/java/com/baby/springStudy/echoMsgConfig.xml\");\n\t\tEchoMsg echoMsg = (EchoMsg)actx.getBean(\"EchoMsg\");\n\t\tSystem.out.println(echoMsg.sayHello());\n\t}",
"@Override\n\tpublic void init() throws ServletException {\n\t\tsuper.init();\n\t\t\n\t\tApplicationContext applicationContext=new ClassPathXmlApplicationContext(\"applicationContext.xml\");\n\t\tmservice= (MemberService) applicationContext.getBean(\"memberservice\");\n\t\tbservice=(BookService) applicationContext.getBean(\"bookservice\");\n\t\toservice=(OrderService) applicationContext.getBean(\"orderservice\");\n\t\t\n\t}",
"private AnnotationConfigWebApplicationContext getGlobalApplicationContext() {\r\n\t\tAnnotationConfigWebApplicationContext rootContext = new AnnotationConfigWebApplicationContext();\r\n\t\t//rootContext.register(ApplicationConfig.class);\r\n\t\trootContext.register(new Class[] {ApplicationConfig.class});\r\n\t\treturn rootContext;\r\n\t}",
"@PostConstruct\n\tpublic void inicializar() {\n\t}",
"@Bean\n public WebServiceTemplate webServiceTemplate(){\n WebServiceTemplate webServiceTemplate = new WebServiceTemplate();\n webServiceTemplate.setMarshaller(jaxb2Marshaller());\n webServiceTemplate.setUnmarshaller(jaxb2Marshaller());\n webServiceTemplate.setDefaultUri(defaultUri);\n return webServiceTemplate;\n }",
"public static void main(String[] args) {\n\t\tClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext(\"springconfig.xml\");\n\t\t\n\t\t//2.Retrive Bean object from Bean Factory\n\t\tPhysicsTeacher teacherService = applicationContext.getBean(\"teacherService\", PhysicsTeacher.class);\n\t\t\n\t\t//3.1 Call the methods of bean to check dependency injection using setter injection\n\t\tteacherService.getHomeWork();\n\t\tteacherService.getQuotes();\n\t\t\n\t\t//3.2 Call the getters of literal values which are set through config file\n\t\tSystem.out.println(\"Name is: \"+teacherService.getName());\n\t\tSystem.out.println(\"Age is: \"+teacherService.getAge());\n\t\tSystem.out.println(\"City : \"+teacherService.getCity());\n\n\t\t\n\t\t//4 Close the Context\n\t\tapplicationContext.close();\n\n\t}",
"public static void main(String[] args) {\n\t\tAbstractApplicationContext appContext = new FileSystemXmlApplicationContext(\"src/ApplicationMetaData.xml\");\n\t\tEmployee employee = appContext.getBean(\"tcsEmployee\", Employee.class);\n\t\t//2.Print out Employee Bean\n\t\tSystem.out.println(\"**************\");\n\t\tSystem.out.println(\"Employee Id::\"+ employee.getEmployeeId());\n\t\tSystem.out.println(\"Employee Name::\" + employee.getEmployeeName());\n\t\tSystem.out.println(\"**************\");\n\t\tappContext.close();\n\n\t}",
"public interface BeanAutowired {\n}",
"public static void main(String[] args) {\n\t\tApplicationContext ac=new ClassPathXmlApplicationContext(\"com/nt/cfgs/applicationContext.xml\");\n\t\t\n\t\t//get Bean\n\t\tVechile vechile = ac.getBean(\"vech\", Vechile.class);\n\t\tvechile.move();\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\tClassPathResource res=new ClassPathResource(\"com/springcore/pns/cfg/Bean.xml\");\n\t\tBeanFactory factory=new XmlBeanFactory(res);\n\t\tBankAccount ba=factory.getBean(\"bankaccount\",BankAccount.class);\n\t\tSystem.out.println(\"....Using P-Namespaces....\\n\");\n\n\t\tSystem.out.println(ba);\n\t\t\n\t\t/*we need to include p namespace in bean \n\t\tconfiguration file while create Bean.xml file*/\n\t\t\n\t}",
"@Bean(name = \"product\")\n\tpublic Product getProduct() {\n\t\treturn new Product(\"C0001\", \"테스트\", 1000); // Constructor Injection\n\t}",
"protected void initSpring() {\n\t\tgetComponentInstantiationListeners().add(new SpringComponentInjector(this));\n\t}",
"public AtributoAsientoBean() {\n }",
"public JerseyConfig() {\n\t\tregister(StudentService.class);\n\t\tregister(PromotionService.class);\n\t\tregister(GroupService.class);\n\t\tregister(RoleService.class);\n\t\tregister(RightService.class);\n\t\tregister(AccountService.class);\n\t\tregister(TimesheetService.class);\n\t\tthis.configureSwagger();\n\t}",
"public static void main(String[] args) {\r\nApplicationContext context=new ClassPathXmlApplicationContext(\"/beans.xml\");\t\t\r\n\tServlet s=(Servlet)context.getBean(\"servletRef\");\r\n\ts.serviceMethod();\r\n\t}",
"public static void main(String args[])\r\n\t{\n\t\tResource res=new ClassPathResource(\"/com/excel/core_01/iocContainer/_01FirstApp/spring.cfg.xml\");\r\n\r\n\t\t//activation of spring container & reading spring configuration file\r\n\t\tBeanFactory factory=new XmlBeanFactory(res);\r\n\r\n\t\t//getting object of implementation class\r\n\t\t//DemoInter d = (DemoInter)factory.getBean(\"com.excel.core_01.iocContainer._01FirstApp.DemoInterImpl\");\r\n\t\tDemoInterImpl d = (DemoInterImpl)factory.getBean(\"com.excel.core_01.iocContainer._01FirstApp.DemoInterImpl\");\r\n//\t\td.setMessage(\"Hi\");\r\n\t\t/**\r\n\t\tDemoInterImpl d1 = (DemoInterImpl) factory.getBean(\"p1.DemoInterImpl\");\r\n\t\tDemoInterImpl d2=(DemoInterImpl)factory.getBean(\"p1.DemoInterImpl\");\r\n\t\tSystem.out.println(d.hashCode());\r\n\t\tSystem.out.println(d1.hashCode());\r\n\t\tSystem.out.println(d2.hashCode());\r\n\t\t */\r\n\t\tSystem.out.println(d.wish(\"Rahul\"));\r\n\t}"
] | [
"0.6385085",
"0.62522167",
"0.62140715",
"0.6088287",
"0.6073375",
"0.6044397",
"0.596",
"0.5958542",
"0.5915337",
"0.58728105",
"0.5868681",
"0.58319587",
"0.5822739",
"0.5821355",
"0.58134145",
"0.580716",
"0.57885915",
"0.5786012",
"0.577307",
"0.57728624",
"0.57654977",
"0.57447475",
"0.57378507",
"0.57357",
"0.5734049",
"0.5732019",
"0.5731337",
"0.5723504",
"0.5707333",
"0.5703759",
"0.5689542",
"0.5680591",
"0.5679271",
"0.5667535",
"0.56655604",
"0.564606",
"0.5643194",
"0.56378776",
"0.56291497",
"0.5595242",
"0.55842155",
"0.55814797",
"0.5565686",
"0.5565651",
"0.55656475",
"0.5557156",
"0.5556981",
"0.5541065",
"0.5533482",
"0.55312777",
"0.55138165",
"0.55066574",
"0.5506408",
"0.54926926",
"0.54924834",
"0.5490759",
"0.5472104",
"0.54695135",
"0.54545677",
"0.5440943",
"0.54391897",
"0.54314184",
"0.5417572",
"0.53993136",
"0.5395833",
"0.53853786",
"0.5384813",
"0.5380542",
"0.5375475",
"0.5372015",
"0.5359796",
"0.535366",
"0.5352994",
"0.5352667",
"0.53495884",
"0.5333398",
"0.53308535",
"0.5320808",
"0.5314129",
"0.53101903",
"0.5302687",
"0.53001386",
"0.52916765",
"0.5291125",
"0.5269627",
"0.5263127",
"0.5260364",
"0.5254921",
"0.5254692",
"0.5253654",
"0.5243086",
"0.5234101",
"0.52339536",
"0.52291864",
"0.5216336",
"0.52162987",
"0.52150077",
"0.52118367",
"0.5195255",
"0.519211"
] | 0.5716276 | 28 |
physical location of item | private Item(){} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Long getItemLocationId() {\r\n return itemLocationId;\r\n }",
"public int getLocation() {\n\t\treturn 0;\n\t}",
"public PVector getLoc() {\n return location;\n }",
"public PVector getLoc() {\n return location;\n }",
"@Nullable\n protected String location() {\n String location = null;\n\n if (parent != null) {\n ItemPresentation itemPresentation = parent.getPresentation();\n\n if (itemPresentation instanceof Parent) {\n Parent parentPresentation = (Parent) itemPresentation;\n location = parentPresentation.getLocatedPresentableText();\n }\n }\n\n return location;\n }",
"public int getLocation()\r\n {\r\n return location;\r\n }",
"@Override\n\tpublic long getLocation() {\n\t\treturn _buySellProducts.getLocation();\n\t}",
"@Override\n\tpublic Point getLocation() {\n\t\treturn position;\n\t}",
"public Point getLocation() { return loc; }",
"@Override\n\tpublic int findItemPosition(Object arg0) {\n\t\treturn 0;\n\t}",
"public PVector getLocation()\n\t{\n\t\treturn location;\n\t}",
"public int getLocation() {\n\t\tint location=super.getLocation();\n\t\treturn location;\n\t}",
"public int getLocation()\r\n {\n }",
"public Point getLocation() {\r\n return layout.location;\r\n }",
"public String getLocationStringForItem(Item item) {\n if (item != null) {\n if (item.getLocationString() == null) {\n loadLocationStringForItem(item);\n if (item.getLocationString() == null) {\n // Avoid unecessary checks.\n item.setLocationString(\"\");\n }\n }\n return item.getLocationString();\n }\n return null;\n }",
"private String describeLocation() {\n\t\tSWLocation location = this.world.getEntityManager().whereIs(this);\n\t\treturn this.getShortDescription() + \" [\" + this.getHitpoints() + \"] is at \" + location.getShortDescription();\n\t}",
"public Point location( Solid shape ) {\n Double ex = x;\n Double wy = y;\n Double ze = z;\n\n Double lastWidth = 0.0;\n\n for ( Thing item : thingsOnThis) {\n ex = Math.max( ex, item.point.x() );\n wy = Math.max( wy, item.point.y() );\n ze = Math.max( ze, item.point.z() );\n\n lastWidth = item.solid.width();\n }\n Thing thing = new Thing();\n thing.point = new Point( x, wy + lastWidth, z + height );\n thing.solid = shape;\n\n thingsOnThis.add( thing );\n\n return thing.point;\n }",
"int locationOffset(Location location);",
"public int getPosition(E item) {\n\t\treturn data.indexOf(item);\n\t}",
"public int getX() { return loc.x; }",
"MapLocation getPosition(Unit unit);",
"BlockPos getPosTarget() {\n BlockPosDim loc = LocationGpsCard.getPosition(inventory.getStackInSlot(0));\n if (loc != null && loc.getPos() != null) {\n return loc.getPos();\n }\n return this.getBlockPos();\n }",
"private ItemElementRelationship findItemLocationRelationship(Item item) {\n if (item.getSelfElement().getId() != null) {\n return itemElementRelationshipFacade\n .findItemElementRelationshipByNameAndItemElementId(ItemElementRelationshipTypeNames.itemLocation.getValue(),\n item.getSelfElement().getId());\n } else {\n return null;\n }\n }",
"public int getMapItem() {\n\t\treturn mapItem;\n\t}",
"@Override\n\tpublic Point getLocation() {\n\t\treturn new Point(x,y);\n\t}",
"public Point getAddToListButtonLoc(){\r\n\t\treturn button.getLocationOnScreen();\r\n\t}",
"public Location getInventoryLocation() \n\t{\n\t\treturn factoryInventoryLocation;\n\t}",
"public int getPosition(AudioFile item) {\n return mObjects.indexOf(item);\n }",
"public Location getLocation() {\n return ((Location) tile);\n }",
"@Override \n public Vector getLocation() {\n return this.getR();\n }",
"@Override\n public PointF getLocation() {\n return location;\n }",
"IntPoint getLocation();",
"Tile getPosition();",
"public Point getLocation() {\n return pos;\n }",
"public int locationOf(E elem) {\r\n\t\tInteger tentativeLoc = this.locations.get(elem);\r\n\t\tif (tentativeLoc == null){\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\treturn this.locations.get(elem);\r\n\t}",
"public Point getLocation() {\n\t\treturn location;\n\t}",
"public ImPoint getCurrentLoc() {\n \treturn this.startLoc;\n }",
"public Point getLocation();",
"public Point readPosition(String itemName) {\n int i;\n String pos = \"\";\n for (i = 0; i < inventory.size(); i++) {\n Map<String, Object> newItem = new HashMap<>();\n newItem = inventory.get(i);\n if (itemName.equals(newItem.get(\"Name\").toString())) {\n pos = newItem.get(\"Position\").toString();\n }\n }\n\n String sx = (pos.split(\",\"))[0];\n String sy = (pos.split(\",\"))[1];\n\n sx = sx.substring(1, sx.length());\n sy = sy.substring(0, sy.length() - 1);\n\n //transfer string to int\n int row = Integer.parseInt(sx);\n int col = Integer.parseInt(sy);\n\n //System.out.println(x);\n //System.out.println(y);\n Point a = new Point();\n a.x = row;\n a.y = col;\n //System.out.println(a);\n return a;\n\n }",
"public Point getLocPoint(){\n return super.getLocation();\n }",
"public int getPointer(){\n return this.pointInventory;\n }",
"String location();",
"String location();",
"String location();",
"String location();",
"String location();",
"String location();",
"String location();",
"String location();",
"public Point getLocationUsed() {\n return (Point)this.locationUsed.clone();\n }",
"public Vector getLocation();",
"public double getLocation(){\n\t\treturn location;\n\t}",
"SiteLocation getLocatedAt();",
"public abstract int getStartPosition();",
"public Location getCurrentLocation() { return entity.getLocation(); }",
"public Point getThisPosition() {\n \n return location_;\n \n }",
"Object getPosition();",
"public Point getLocation(){\r\n return super.getLocation();\r\n }",
"public abstract String getDisplayLocation();",
"public native final String location() /*-{\n\t\treturn this[\"location\"];\n\t}-*/;",
"@Override\n\tpublic double getXLoc() {\n\t\tdouble side = Math.sqrt(getMySize())/2;\n\t\treturn x+side;\n\t}",
"RealLocalizable getPosition();",
"private void updateItemLocation(Item item) {\n Item existingItem = null;\n ItemElementRelationship itemElementRelationship = null;\n\n if (item.getId() != null) {\n existingItem = itemFacade.findById(item.getId());\n // Item is not new\n if (existingItem != null) {\n setItemLocationInfo(existingItem);\n itemElementRelationship = findItemLocationRelationship(item);\n }\n }\n\n Boolean newItemWithNewLocation = (existingItem == null\n && (item.getLocation() != null || (item.getLocationDetails() != null && !item.getLocationDetails().isEmpty())));\n\n Boolean locationDifferentOnCurrentItem = false;\n\n if (existingItem != null) {\n // Empty String should be the same as null for comparison puposes. \n String existingLocationDetails = existingItem.getLocationDetails();\n String newLocationDetails = item.getLocationDetails();\n\n if (existingLocationDetails != null && existingLocationDetails.isEmpty()) {\n existingLocationDetails = null;\n }\n if (newLocationDetails != null && newLocationDetails.isEmpty()) {\n newLocationDetails = null;\n }\n\n locationDifferentOnCurrentItem = ((!Objects.equals(existingItem.getLocation(), item.getLocation())\n || !Objects.equals(existingLocationDetails, newLocationDetails)));\n }\n\n if (newItemWithNewLocation || locationDifferentOnCurrentItem) {\n\n if (item.getLocation() != null) {\n logger.debug(\"Updating location for Item \" + item.toString()\n + \" to: \" + item.getLocation().getName());\n } else if (item.getLocationDetails() != null) {\n logger.debug(\"Updating location details for Item \" + item.toString()\n + \" to: \" + item.getLocationDetails());\n }\n\n if (itemElementRelationship == null) {\n itemElementRelationship = new ItemElementRelationship();\n itemElementRelationship.setRelationshipType(getLocationRelationshipType());\n itemElementRelationship.setFirstItemElement(item.getSelfElement());\n List<ItemElementRelationship> itemElementRelationshipList = item.getSelfElement().getItemElementRelationshipList();\n if (itemElementRelationshipList == null) {\n itemElementRelationshipList = new ArrayList<>();\n item.getSelfElement().setItemElementRelationshipList(itemElementRelationshipList);\n }\n itemElementRelationshipList.add(itemElementRelationship);\n }\n\n List<ItemElementRelationship> itemElementRelationshipList = item.getSelfElement().getItemElementRelationshipList();\n\n Integer locationIndex = itemElementRelationshipList.indexOf(itemElementRelationship);\n\n if (item.getLocation() != null && item.getLocation().getSelfElement() != null) {\n itemElementRelationshipList.get(locationIndex).setSecondItemElement(item.getLocation().getSelfElement());\n } else {\n // No location is set. \n itemElementRelationshipList.get(locationIndex).setSecondItemElement(null);\n }\n itemElementRelationshipList.get(locationIndex).setRelationshipDetails(item.getLocationDetails());\n\n // Add Item Element relationship history record. \n ItemElementRelationship ier = itemElementRelationshipList.get(locationIndex);\n ItemElementRelationshipHistory ierh;\n ierh = ItemElementRelationshipUtility.createItemElementHistoryRecord(\n ier, (UserInfo) SessionUtility.getUser(), new Date());\n List<ItemElementRelationshipHistory> ierhList;\n ierhList = item.getSelfElement().getItemElementRelationshipHistoryList();\n if (ierhList == null) {\n ierhList = new ArrayList<>();\n item.getSelfElement().setItemElementRelationshipHistoryList(ierhList);\n }\n\n ierhList.add(ierh);\n }\n }",
"public Location getOffset() {\n\t\treturn pos;\n\t}",
"public String location()\n {\n return String.format(\"(%d,%d)\", line, column);\n }",
"public int getPlaceLocation() {\n return mPlaceLocation;\n }",
"public GridLocation getLocation();",
"@Override\n\tpublic String getLocation() {\n\t\treturn this.location;\n\t}",
"public String getLocation() {\r\n\t\treturn location; \r\n\t}",
"public void updateLocationStringForItem(Item item) {\n if (item != null) {\n Item locationItem = item.getLocation();\n item.setLocationString(ItemDomainLocationController.generateLocatonHierarchyString(locationItem));\n }\n }",
"public String getLocation() { return location; }",
"public String getLocation() { return location; }",
"@Override\n\tpublic String getLocation() {\n\t\treturn location;\n\t}",
"public final Point getLocation() {\n return this.location ;\n }",
"public Point getLocation() {\n return location;\n }",
"public Coordinate getLocation();",
"@Override\r\n public String toString() {\r\n return \"Location:: xPos: \" + xPos + \" yPos: \" + yPos + \"\\nBoundingBox: \" + boundingBox;\r\n }",
"public Object getLocation() {\n return leftSide.getLocation();\n }",
"public Point getLocation ( )\r\n\t{\r\n\t\treturn new Point ( currentCol, currentRow );\r\n\t}",
"public String getLocation() {\r\n\t\treturn location;\r\n\t}",
"@Override\n public Point3D getLocation() {\n return myMovable.getLocation();\n }",
"String getLocation();",
"String getLocation();",
"String getLocation();",
"public int getX(){\n\t\treturn this.x_location;\n\t}",
"public final BlockPos getPos() {\n\t\treturn baseTile.getPos();\n\t}",
"public Point getLocation() {\n\t\treturn location.getCopy();\n\t}",
"@Override\n public Location getDisplayedLocation() {\n this.displayedLocation = new Location((int)pane.getHvalue(), (int)pane.getVvalue(), curFloor, \"Unknown\");\n return displayedLocation;\n }",
"public int getY() { return loc.y; }",
"public int getAnchorPosition(Items item) {\n\t\tint count = -1;\n\t\tint position = -1;\n\t\tfor(Items args: this.getAnchors()) {\n\t\t\tcount = count + 1;\n\t\t\tif (args == item)\n\t\t\t\tposition = count;\n\t\t}\n\t\treturn position;\n\t}",
"public byte[] getLocation() {\r\n return location;\r\n }",
"public void alignLocation();",
"public String getLocation() {\r\n return location;\r\n }",
"public String location() {\n return this.location;\n }",
"public String location() {\n return this.location;\n }",
"public String getLocation() {\n\t\treturn location;\n\t}",
"public String getLocation() {\n\t\treturn mLocation;\n\t}",
"public abstract String getLocation();",
"public Point getLocation(){\n\t\tint x = widgetchild.getAbsoluteX();\n\t\tint y = widgetchild.getAbsoluteY();\n\t\tint rx = Random.nextInt(0, widgetchild.getWidth());\n\t\tint ry = Random.nextInt(0, widgetchild.getHeight());\n\t\treturn new Point(x+rx,y+ry);\n\t}",
"public int getX() { return position.x; }",
"public String getLocation() {\r\n return location;\r\n }"
] | [
"0.6755554",
"0.66249776",
"0.6618763",
"0.6618763",
"0.6556062",
"0.6497729",
"0.64766765",
"0.6475534",
"0.6468109",
"0.642313",
"0.6417052",
"0.6395075",
"0.6393325",
"0.63801354",
"0.6368711",
"0.6334289",
"0.6332129",
"0.63212043",
"0.63114375",
"0.6234995",
"0.6234885",
"0.6222901",
"0.6216144",
"0.6193786",
"0.61688995",
"0.61604047",
"0.6158251",
"0.61435115",
"0.6116228",
"0.61152226",
"0.61143196",
"0.6094624",
"0.6094547",
"0.6092719",
"0.6087318",
"0.6073205",
"0.6050173",
"0.6048552",
"0.604679",
"0.6039078",
"0.60304075",
"0.6020808",
"0.6020808",
"0.6020808",
"0.6020808",
"0.6020808",
"0.6020808",
"0.6020808",
"0.6020808",
"0.6006151",
"0.5998426",
"0.599636",
"0.599275",
"0.59881943",
"0.5983273",
"0.59817857",
"0.59808934",
"0.5980759",
"0.59803236",
"0.5975807",
"0.5975168",
"0.59707",
"0.59696877",
"0.59684986",
"0.59631526",
"0.5961699",
"0.5955655",
"0.5954418",
"0.59499896",
"0.5940712",
"0.5938424",
"0.5938424",
"0.59322655",
"0.59312415",
"0.5924891",
"0.5918748",
"0.59135574",
"0.5910622",
"0.5907643",
"0.59016705",
"0.5899497",
"0.58900774",
"0.58900774",
"0.58900774",
"0.5872842",
"0.5870594",
"0.5861293",
"0.5861087",
"0.58592683",
"0.58514625",
"0.58454376",
"0.5843533",
"0.5838262",
"0.58287084",
"0.58287084",
"0.5826972",
"0.5823343",
"0.5817827",
"0.5817306",
"0.58116937",
"0.5810628"
] | 0.0 | -1 |
prevent default Constuctor for the Item class | protected Item(String name, int level, String location){
this.name = name;
this.level = level;
this.location = location;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Item(){}",
"protected Item() {\n }",
"@SuppressWarnings(\"unused\")\n public Item() {\n }",
"public Item(){}",
"public Item() {}",
"public Item()\n {\n super();\n }",
"public Item() {\n\t}",
"public Item() {\n\t}",
"public Item() {\n }",
"public Item() {\n }",
"public Item()\r\n {\r\n // Initialize instance variables\r\n \r\n }",
"public Item() \r\n\t{\r\n\t\tname = \"AbstractItem\";\r\n\t\tdescription = \"Example Item Generated\";\r\n\t\tprice = 0;\r\n\t}",
"public ItemInfo () {}",
"public NewItems() {\n super();\n }",
"public EnterpriseBeansItem() {\n super();\n }",
"public Item() {\r\n this.name = \"\";\r\n this.description = \"\";\r\n this.price = 0F;\r\n this.type = \"\";\r\n this.available = 0;\r\n this.wholesaler = new Wholesaler();\r\n this.wholesalerId = 0;\r\n this.category = new Category();\r\n this.categoryId = 0; \r\n }",
"public Item_Record() {\n super(Item_.ITEM_);\n }",
"public PurchaseOrderItem () {\n\t\tsuper();\n\t}",
"public Item(){\n description = \"No description avaible for this item\";\n weight = 0;\n }",
"Item(){\r\n\t\tthis(0, new Weight(5), new DukatAmount(0));\r\n\t}",
"public ItemRecord() {\n super(Item.ITEM);\n }",
"public OrderItem() {}",
"public Item()\r\n\t{\r\n\t\tserialNum = 00000;\r\n\t\tweight = 0.0;\r\n\t}",
"public ModuleObjectAttributeItem() {}",
"public DessertItem() {\n this(\"\");\n }",
"public Item(String itemName, String itemDescription){\n this.itemName = itemName;\n this.itemDescription = itemDescription;\n}",
"public ItemManager() {\n itemMap = new HashMap<>();\n importantItemList = new ArrayList<>();\n\n }",
"public ItemmatlBean() {\n }",
"Items(){\n}",
"public CartItem() {\n }",
"protected StockItem()\r\n \t{\r\n \t\tlimit = new LimitSystem(this);\r\n \t}",
"public OrderItem_() {\n }",
"protected Item(Point pos)\n\t{\n\t\tthis.pos = pos;\n\t}",
"public ItemMenu() {\n super(null, null);\n }",
"public ListItems() {\n itemList = new ArrayList();\n }",
"public ShoppingListItem() {}",
"private TaskItem()\n {\n }",
"public RecentItem() {\n }",
"public RestaurantItem() {\n }",
"public QuestionPoolItemData(){\n }",
"public GIPIQuoteItemMC()\t{\n \t}",
"private Item initItem() {\n String name = inputName.getText().toString();\n int quantityToBuy = -1;\n if (!inputQuantityToBuy.getText().toString().equals(\"\"))\n quantityToBuy = Integer.parseInt(inputQuantityToBuy.getText().toString());\n String units = inputUnits.getText().toString();\n double price = 0;\n if (!inputPrice.getText().toString().equals(\"\"))\n price = Double.parseDouble(inputPrice.getText().toString());\n int calories = 0;\n if (!inputCalories.getText().toString().equals(\"\"))\n calories = Integer.parseInt(inputCalories.getText().toString());\n ArrayList<String> allergies = allergyActions.getAllergies();\n return new Item(name, 0, units, quantityToBuy, 0, allergies, calories, price);\n }",
"public AbstractItemFactory(){\n this.setDefault();\n }",
"public ItemCommand() {\n }",
"public UseCaseItem() {\n delegate = new MyModel.Builder().build();\n }",
"public CustomerCartItem() {\n }",
"public AList() {\n size = 0;\n items = (Item[]) new Object[100];\n }",
"public AList() {\n size = 0;\n items = (Item[]) new Object[100];\n }",
"public ItemInvalidoException() {\r\n }",
"Item(DukatAmount price){\r\n\t\tthis(0, new Weight(5), price);\r\n\t}",
"public ItemPrice() {\n }",
"public Items(String image, int y, int x) {\r\n\t\tsuper(image, y, x);\r\n\t}",
"public POJOCompteItem() {\n compte = new TreeMap<Date, Integer>();\n items = new ArrayList<Item>();\n }",
"public ItemsAdapter() {\n\n\n }",
"public ActiveSurveyQuestionItem() {\n }",
"protected FollowersItem() {\n hashDupA = hashDupB = \"\";\n aw = null;\n }",
"public LaPatilla()\n\t{\n\t\tsuper(TAG_ITEM_ITEMS,\n\t\t\t\tnew int[]{TAG_TITLE},\n\t\t\t\tnew int[]{TAG_LINK},\n\t\t\t\tnew int[]{TAG_DESCRIPTION},\n\t\t\t\tnew int[]{TAG_CONTENT_ENCODED},\n\t\t\t\tnew int[]{TAG_PUBDATE},\n\t\t\t\tnew int[]{TAG_CATEGORY},\n\t\t\t\tnew int[]{},\n\t\t\t\t\"\");\n\t}",
"public EntityHierarchyItem() {\n }",
"public Item(String initName, String itemDesc)\n {\n // initialise instance variables\n name = initName;\n desc = itemDesc;\n }",
"Item(Weight weight){\r\n\t\tthis(0, weight, new DukatAmount(0));\r\n\t}",
"public VKApiItem() {\n\n }",
"public PerishableItem(){\n super();\n //perishable = false;\n }",
"public TreeItem() {\n\t\tsuper();\n\t\tdecideNorm = true;\n\t\tisNorm = true;\n\n\t}",
"public Item(String input) {\n name = input;\n }",
"public ItemSummary() {\n }",
"public FlyerFeaturedItem() {}",
"public InventoryItem(){\r\n this.itemName = \"TBD\";\r\n this.sku = 0;\r\n this.price = 0.0;\r\n this.quantity = 0;\r\n nItems++;\r\n }",
"public InventoryItem(String name) { \n\t\tthis(name, 1);\n\t}",
"public Item() {\n\t\tmenu.add(new Item(\"Snickers\", 10, 1.50, \"1\"));\n\t\tmenu.add(new Item(\"Chips\", 10, .50, \"2\"));\n\t\tmenu.add(new Item(\"Coke\", 10, 1.75, \"3\"));\n\n\t}",
"@Override // see item.java\n\tpublic void useItem() {\n\n\t}",
"public PurchaseOrderItem (\n\t\t Integer in_purchaseOrderItemId\n\t\t) {\n\t\tsuper (\n\t\t in_purchaseOrderItemId\n\t\t);\n\t}",
"public Library()\r\n\t{\r\n\t\titems = new ArrayList<Book>();\r\n\t}",
"public Item(Integer itemSlot) {\n this.itemSlot = itemSlot;\n }",
"public GItem(Item i) {\n this.mGItem = i.getId();\n this.title = i.getTitle();\n\n if (!i.getAddress().equals(\"\")){\n this.address = i.getAddress();\n }\n\n if (i instanceof OfficerItem){\n this.type = 1;\n\n } else if (i instanceof CompanyItem){\n this.type = 0;\n }\n\n }",
"public itemDBContract(){}",
"public Item(String name, ItemType type)\n {\n\tthis.name = name;\n\tthis.type = type;\n }",
"public Item() {\n\t\tthis(rand.nextDouble() * GameManager.NATIVE_WIDTH, -30.0, PowerUp[new Random().nextInt(PowerUp.length)]);\n\t}",
"public Inventory(){\n this.items = new ArrayList<InventoryItem>(); \n }",
"public ItemNotFoundException() {\n super();\n }",
"public Item()\r\n {\r\n gen = new Random();\r\n color = new Color(gen.nextInt());\r\n x = 200;\r\n w = 100;\r\n h = 18;\r\n }",
"protected abstract void makeItem();",
"protected PickaxeItem(Tier debug1, int debug2, float debug3, Item.Properties debug4) {\n/* 100 */ super(debug2, debug3, debug1, DIGGABLES, debug4);\n/* */ }",
"public FinalMysteryItem() {\n int randomIndex = new Random().nextInt(7);\n item = new Item(listOfPossibleNames[randomIndex], PRICE_TO_BUY);\n }",
"public AList() {\n items = (TypeHere[]) new Object[100];\n size = 0;\n }",
"public Objects(String item, double baseprice){\r\n this.item = item;\r\n this.baseprice = baseprice;\r\n }",
"ItemType(String itemCode) {\n code = itemCode;\n }",
"public ItemFragment() {\n }",
"Item(int i, String n, String c, double p) {\n this.id = i;\n this.name = n;\n this.category = c;\n this.price = p;\n }",
"public TitleIconItem(){}",
"public SellItem() {\n initComponents();\n }",
"public Item(String description) {\n this.description = description;\n }",
"public Item() {\r\n this.quantidade = 0;\r\n this.nome = \"\";\r\n this.myLock = new ReentrantLock();\r\n this.myCond = myLock.newCondition();\r\n }",
"public ItemExample() {\n oredCriteria = new ArrayList<Criteria>();\n }",
"public Item(String id, int index) {\n this.id = id;\n this.itemIndex = index;\n this.dataBank = new DataBank();\n this.usersRatings = new SortedRatingList();\n }",
"public DuplicateItemException() {\r\n super();\r\n }",
"Item(long ID, DukatAmount price){\r\n\t\tthis(ID, new Weight(5), price);\r\n\t}",
"@Test\n\tpublic void constructor1Test() {\n\t\tOrderItem orderItem = new OrderItem(1L, 2L, 3L, 2, 22.5);\n\t\tassertTrue(orderItem instanceof OrderItem);\n\t}",
"public Item(\n int itemId ,\n int currentQty ,\n int minQty ,\n int maxQty ,\n BufferedImage icon ,\n String label, \n String desc ,\n String attr)\n {\n this.itemId = itemId ;\n this.currentQty=currentQty;\n this.minQty=minQty;\n this.maxQty=maxQty;\n this.icon=icon;\n this.label=label;\n }",
"public Inventory() {\n \titems = new ArrayList<Collectable>();\n \tnumTokens = 0;\n }",
"public TileItem(Game game, Element e) {\n super(game, e);\n }"
] | [
"0.8806651",
"0.87184525",
"0.8575929",
"0.8514344",
"0.84873325",
"0.8462928",
"0.8408533",
"0.8408533",
"0.8291381",
"0.8291381",
"0.81791085",
"0.79517114",
"0.77699083",
"0.77096397",
"0.77076524",
"0.7654477",
"0.7550244",
"0.7533536",
"0.75120395",
"0.75040084",
"0.74988955",
"0.7395745",
"0.7390147",
"0.73604274",
"0.7353508",
"0.733889",
"0.7261633",
"0.722309",
"0.72022593",
"0.71876454",
"0.7174616",
"0.716553",
"0.716428",
"0.7147581",
"0.71396023",
"0.7056691",
"0.70247763",
"0.69916654",
"0.6973578",
"0.6953761",
"0.69333345",
"0.6897386",
"0.6887336",
"0.68788505",
"0.68741864",
"0.6870554",
"0.6862619",
"0.6862619",
"0.682813",
"0.68278897",
"0.6813282",
"0.6806227",
"0.6792989",
"0.67719537",
"0.67327386",
"0.6724331",
"0.6724116",
"0.67155427",
"0.6711503",
"0.66945827",
"0.6687095",
"0.66490304",
"0.66404736",
"0.6633388",
"0.6628419",
"0.66280574",
"0.66182846",
"0.66071993",
"0.6606081",
"0.6597883",
"0.65967757",
"0.65931857",
"0.65910804",
"0.6584382",
"0.6580882",
"0.6578681",
"0.6575923",
"0.6574918",
"0.6559934",
"0.65572435",
"0.6537947",
"0.65352637",
"0.6534711",
"0.6527034",
"0.652632",
"0.65221316",
"0.65213317",
"0.65048665",
"0.65040207",
"0.64953375",
"0.64950687",
"0.64796436",
"0.647473",
"0.6471294",
"0.64652383",
"0.64600563",
"0.6459279",
"0.6456023",
"0.64490515",
"0.64373124"
] | 0.6510101 | 87 |
method to return item name | protected String getName(){
return this.name;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getName()\r\n\t{\r\n\t\treturn theItem.getName();\r\n\t}",
"public String getName() {\n return item.getName();\n }",
"public String getItemName()\n {\n return itemName;\n }",
"public String getName() {\n\t\treturn itemName;\n\t}",
"public String getItemName() {\r\n return itemName;\r\n }",
"public String getItemName() {\r\n return itemName;\r\n }",
"public String getItemName() {\r\n return itemName;\r\n }",
"public String getItemName() {\r\n\t\treturn itemName;\r\n\t}",
"public String getItemName() {\n return itemName;\n }",
"public String getItemName() {\n return itemName;\n }",
"public String getItemName() {\n return itemName;\n }",
"public String getItemName() {\n return itemName;\n }",
"public String getItemName() {\n return itemName;\n }",
"public String getItemName() {\n\t\treturn ((name != null) ? name : (name = MiscUtils.getName(this)));\n\t}",
"public synchronized String getName(){\n \treturn item_name;\n }",
"public String getItemName() {\n\t\treturn _itemName;\n\t}",
"@Override\n\tpublic String getName() {\n\t\treturn ((Extension)_item).getId() + \".\" + ((Extension)_item).getTitle();\n\t}",
"public String getName(int position){\n Item current = getItem(position);\n return current.Name();\n }",
"String getItemName(ItemStack itemStack) {\r\n\t\treturn WordUtils.capitalizeFully(itemStack.getType().name().toLowerCase().replace('_', ' '));\r\n\t}",
"@Override\n public String toString()\n {\n \treturn getName() + \" (\" + numItem + \")\";\n }",
"public String obtenirNomItem() {\n\t\treturn this.nomItem;\n\t}",
"public String getNomeItem() {\r\n\t\treturn this.emprestimoid.getNomeItem();\r\n\t}",
"@Override\n\tpublic String getDisplayName() {\n\t\treturn item.getItemStackDisplayName(stack);\n\t\t//#endif\n\t}",
"public String getAsNameAbbreviated(String itemName);",
"public static String getNameByID(int itemID) {\n try {\n PreparedStatement st = conn.prepareStatement(\"SELECT `Name` FROM `iteminformation` WHERE itemID=?\");\n st.setInt(1, itemID);\n ResultSet rs = st.executeQuery();\n if (rs.next()) {\n return rs.getString(\"name\");\n }\n } catch (SQLException ex) {\n Logger.getLogger(itemDAO.class.getName()).log(Level.SEVERE, null, ex);\n }\n return \"\";\n }",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"@Override\n public String toString() {\n return NameProvider.getNameOfBlockOrItem(this.id, this.data);\n }",
"@Override\n\t\t\t\tpublic String getName(HashMap<String, String> item) {\n\t\t\t\t\treturn item.get(\"pro_cn_name\");\n\t\t\t\t}",
"@Override\n\t\t\t\tpublic String getName(HashMap<String, String> item) {\n\t\t\t\t\treturn item.get(\"pro_cn_name\");\n\t\t\t\t}",
"String getName() ;",
"public String getComponentName(ItemStack item) \t{ return tag(item) ? item.stackTagCompound.getString(\"componentName\") : null; }",
"public java.lang.String getName();",
"@Override\r\n\tpublic Object getItem(int arg0) {\n\t\treturn grid_names.get(arg0);\r\n\t}",
"public String getKeyBuyItemName() {\r\n return getKeyShootName();\r\n }",
"public String getItemDetailName() {\n return itemDetailName;\n }",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();"
] | [
"0.8637249",
"0.84667224",
"0.83652365",
"0.832071",
"0.8305821",
"0.8305821",
"0.8305821",
"0.8234951",
"0.8232058",
"0.8232058",
"0.8232058",
"0.8232058",
"0.8232058",
"0.8166161",
"0.80448854",
"0.7993519",
"0.7975322",
"0.7846647",
"0.7519038",
"0.7490104",
"0.74167866",
"0.7311692",
"0.7305434",
"0.72132677",
"0.71063447",
"0.7082794",
"0.7082794",
"0.7082794",
"0.7082794",
"0.7082794",
"0.7082794",
"0.7082794",
"0.7082794",
"0.7082794",
"0.7082794",
"0.7082794",
"0.7082794",
"0.7082794",
"0.7082794",
"0.7082794",
"0.7082794",
"0.7082794",
"0.7082794",
"0.7082794",
"0.7082794",
"0.7082794",
"0.7082794",
"0.7082794",
"0.7082794",
"0.7082794",
"0.7082794",
"0.7082794",
"0.7082794",
"0.7082794",
"0.7082794",
"0.7082794",
"0.7082794",
"0.7082794",
"0.7082794",
"0.7082794",
"0.7082794",
"0.7082794",
"0.7082794",
"0.7082794",
"0.7082794",
"0.7082794",
"0.7082794",
"0.7082794",
"0.7082794",
"0.7082794",
"0.7082794",
"0.7082794",
"0.7082794",
"0.7082794",
"0.7082794",
"0.7082794",
"0.7082794",
"0.7076929",
"0.7047052",
"0.7047052",
"0.70135206",
"0.7011083",
"0.7001612",
"0.6955802",
"0.69421273",
"0.6934942",
"0.68870884",
"0.68870884",
"0.68870884",
"0.68870884",
"0.68870884",
"0.68870884",
"0.68870884",
"0.68870884",
"0.68870884",
"0.68870884",
"0.68870884",
"0.68870884",
"0.68870884",
"0.68870884",
"0.68870884"
] | 0.0 | -1 |
method to return item level | protected int getLevel(){
return this.level;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getItemLevel() {\treturn level; }",
"int getLevel();",
"int getLevel();",
"int getLevel();",
"int getLevel();",
"int getLevel();",
"public int getLevel()\r\n {\r\n return level;\r\n }",
"public int getLevel()\n {\n return m_level;\n }",
"public int getLevel()\n {\n return level;\n }",
"public int getLevel()\n {\n return level; \n }",
"public int getLevel()\n {\n return m_nLevel;\n }",
"public int getLevel()\r\n {\r\n return r_level;\r\n }",
"public int getLevel() {\r\n return level;\r\n }",
"int getLevelAt(int pos) {\n return levels[pos];\n }",
"public int getLevel() {\n return level;\n }",
"public int getLevel() {\n return level;\n }",
"public int getLevel() {\n return level;\n }",
"public int getLevel() {\n return level;\n }",
"public int getLevel() {\n return level;\n }",
"public int getLevel() {\n return level;\n }",
"public int getLevel() {\n return level;\n }",
"public int getLevel() {\n return level;\n }",
"public int getLevel() {\n return level;\n }",
"public int getLevel() {\n return level;\n }",
"public int getLevel() { \r\n\t\treturn level; \r\n\t}",
"public void setItemLevel(int level) { this.level = level; }",
"public int getLevel() {\n return this.level;\n }",
"public int getLevel() {\n \t\treturn level;\n \t}",
"public static int getLevel()\n {\n return level;\n }",
"public int getLevel() {\n return level_;\n }",
"public int getLevel() {\n return level_;\n }",
"public static int getLevel()\r\n\t{\r\n\t\treturn level;\r\n\t}",
"public int getLevel(){\n return level;\n }",
"public int getLevel(){\n return level;\n }",
"public int getLevel() {\n \treturn this.level;\n }",
"public int getLevel() {\n\t\treturn 1 + this.iter / this.levelfk;\n\t}",
"int getLevel()\n\t{\n\t\treturn this.level;\n\t}",
"public int getLevelNo() {\n return levelNo;\n }",
"public double Getlevel()\r\n {\r\n return level;\r\n }",
"public int getLevel(){\n\t\treturn this.level;\n\t}",
"public int getLevel(){\n\t\treturn level;\n\t}",
"public int getLevel() {\n\t\treturn 0;\n\t}",
"public int getLevel() {\n\t\treturn 0;\n\t}",
"public int getLevel() {\r\n\t\treturn level;\r\n\t}",
"public int getLevel() {\r\n\t\treturn level;\r\n\t}",
"public int getLevel() {\n\t\treturn level;\r\n\t}",
"public int level();",
"abstract int getItemID(int level);",
"public int getLevel(){\n return this.level;\n }",
"public int getLevel(){\n return this.level;\n }",
"public Integer getLevel() {\n return level;\n }",
"public Integer getLevel() {\n return level;\n }",
"public Integer getLevel() {\n return level;\n }",
"public Integer getLevel() {\n return level;\n }",
"public Integer getLevel() {\n return level;\n }",
"public static int getLevel() {\n return level;\n }",
"public int getLevel() {\n\t\treturn level;\n\t}",
"public int getLevel() {\n\t\treturn level;\n\t}",
"public int getLevel() {\n\t\treturn level;\n\t}",
"public int getLevel() {\n\t\treturn this.level;\n\t}",
"public int getLevel() {\n return level_;\n }",
"public int getLevel() {\n return level_;\n }",
"private int getLevel() {\n return getStat(currentLevel);\n }",
"public int getLevel() {\n return level_;\n }",
"public int getLevel() {\n return level_;\n }",
"public int getLevel() {\n return level_;\n }",
"public int getLevel() {\n return level_;\n }",
"public int getLevel()\n\t{\n\t\treturn this.value;\n\t}",
"public int getCurLevel();",
"public int getLevel ( ) {\n\t\treturn extract ( handle -> handle.getLevel ( ) );\n\t}",
"double getLevel();",
"double getLevel();",
"public String getLevel()\n {\n return level;\n }",
"@Override\n\tpublic int getLevelNumber() {\n\t\treturn numLevel;\n\t}",
"public String getLevel ()\n {\n return level;\n }",
"public double getLevel() {\n\t\treturn level;\n\t}",
"public int getCurrentLevel() {\n return currentLevel;\n }",
"public int getLevelIndex() {\n\t\treturn levelIndex;\n\t}",
"public String getLevel() {\n return this.level;\n }",
"public Level getCurrentLevel(){\r\n return currentLevel;\r\n }",
"public String getLevel() {\n return level;\n }",
"public String getLevel() {\n return level;\n }",
"public String getLevel() {\n return level;\n }",
"public String getLevel() {\n return level;\n }",
"public String getLevel() {\n return level;\n }",
"public int getDataLevel();",
"public String getCurrentLevel() \n { \n return currentLevel; \n }",
"public String getLevel(){\n\t\treturn level;\n\t}",
"public Level getLevel() {\n\t\treturn myLevel;\n\t}",
"public String getLevel() {\n return level;\n }",
"public final String getLevel() {\n return this.level;\n }",
"String levelName();",
"public String getLevel() {\n return level;\n }",
"public int getLevelValue() {\n return level_;\n }",
"public Level getLevel() {\r\n\t\treturn level;\r\n\t}",
"public int \t\t\t\t\t\t\tgetLevel()\t\t\t\t\t\t\t\t\t{ return this.currentLevel; }",
"public int getCurrentLevelId()\n {\n return currentLevelId;\n }",
"int getOnLevel();",
"public int getLevel(int slot) {\r\n return dynamicLevels[slot];\r\n }",
"public String getLevel() {\n\t\treturn level;\n\t}"
] | [
"0.797001",
"0.74425495",
"0.74425495",
"0.74425495",
"0.74425495",
"0.74425495",
"0.7413794",
"0.7412075",
"0.73817635",
"0.7338205",
"0.7330019",
"0.73260564",
"0.73108995",
"0.7304406",
"0.72565997",
"0.72565997",
"0.72565997",
"0.72565997",
"0.72565997",
"0.72565997",
"0.72565997",
"0.72565997",
"0.72565997",
"0.72565997",
"0.7234666",
"0.72333527",
"0.72024167",
"0.71936923",
"0.7189507",
"0.7188131",
"0.7188131",
"0.71880776",
"0.71780926",
"0.71780926",
"0.71764517",
"0.7163114",
"0.7159484",
"0.7156432",
"0.71554506",
"0.71519005",
"0.71459675",
"0.7128967",
"0.7128967",
"0.71214753",
"0.71214753",
"0.7106429",
"0.7105611",
"0.70975685",
"0.7089705",
"0.7089705",
"0.7085009",
"0.7085009",
"0.7085009",
"0.7085009",
"0.7085009",
"0.70627755",
"0.7059634",
"0.7059634",
"0.7059634",
"0.704552",
"0.70380497",
"0.70380497",
"0.7002413",
"0.6982589",
"0.6982589",
"0.6982589",
"0.6982589",
"0.6973039",
"0.6967667",
"0.6956571",
"0.69549793",
"0.69549793",
"0.6933466",
"0.6863288",
"0.6848631",
"0.6845492",
"0.6836622",
"0.6826829",
"0.6822094",
"0.68081796",
"0.6796905",
"0.6796905",
"0.6796905",
"0.6796905",
"0.6796905",
"0.6796549",
"0.67951924",
"0.67940915",
"0.679313",
"0.67874783",
"0.67857563",
"0.67855823",
"0.6773595",
"0.6751367",
"0.6730272",
"0.67171985",
"0.67000794",
"0.669545",
"0.66826695",
"0.6672805"
] | 0.7131515 | 41 |
change level value of an item | protected void setLevel(int level){
this.level = level;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setItemLevel(int level) { this.level = level; }",
"public void setLevel(int newlevel)\n {\n level = newlevel; \n }",
"public void setLevel (String newLevel)\n {\n this.level = newLevel; \n }",
"protected void restockItem(int x){\r\n this.level += x;\r\n }",
"public void setLevel(int value) {\n this.level = value;\n }",
"public void setLevel(int v)\n {\n m_level = v;\n }",
"public void changeLVL(int index){\n level +=index;\n changeLvL=true;\n }",
"public void setLevel(String newLevel) {\n level = newLevel;\n }",
"public void incLevel(int lvl){this.Level=this.XP/(100);}",
"public Builder setLevelValue(int value) {\n level_ = value;\n onChanged();\n return this;\n }",
"@Override\n public void setLevel(int level) {\n if (level > 1) {\n this.level = level;\n scaleUp();\n percentageScaling();\n }\n }",
"public void setLevel(String level);",
"public void setLevel(Level level) { this.currentLevel = level; }",
"public void setLevel(int level) { \r\n\t\tthis.level = level; \r\n\t}",
"protected void setLevel(int level)\n {\n this.level = level;\n }",
"public void setLevel(int level)\r\n {\r\n\tthis.level = level;\r\n }",
"public void setLevel(int level) {\n if(level > Constant.MAX_LEVEL){\n this.level = Constant.MAX_LEVEL;\n }else {\n this.level = level;\n }\n this.expToLevelUp = this.expValues[this.level];\n }",
"public void setFoodLevel ( int value ) {\n\t\texecute ( handle -> handle.setFoodLevel ( value ) );\n\t}",
"protected void pickItem(int x ){\r\n this.level -=x;\r\n }",
"private void setLevel(int level) {\n setStat(level, currentLevel);\n }",
"public void setLevel(int level){\n\t\tthis.level = level;\n\t}",
"abstract void applyItem(JuggernautPlayer player, int level);",
"public void setLevel(String value) {\n this.level = value;\n }",
"private void setEliteMobLevel(int newLevel) {\n if (newLevel < 1)\n newLevel = 1;\n this.eliteMobLevel = newLevel;\n }",
"public void\t\t\t\t\t\t\tincreaseLevel()\t\t\t\t\t\t\t\t{ this.currentLevel += 1; }",
"public void setLevel(double amt) {\n\t\tlevel += amt;\n\t}",
"public void setLevel(int level) {\n \t\tthis.level = level;\n \t}",
"public void setEnchantLevel(CustomEnchantment ce, Player p, long level){\n ItemStack is;\n ItemMeta im;\n List<String> lore;\n if(p == null || (is = p.getInventory().getItemInMainHand()) == null || (im = is.getItemMeta()) == null || (is.getType() != Material.DIAMOND_PICKAXE)) return;\n lore = im.getLore();\n if(lore == null)\n lore = new ArrayList<>();\n boolean containsEnchant = false;\n for(int i = 0; i < lore.size(); i++){\n if(lore.get(i).contains(ce.getDisplayName())){\n containsEnchant = true;\n lore.set(i, ce.getColor() + ce.getDisplayName() + \" \" + level);\n }\n }\n if(!containsEnchant) lore.add(ce.getColor() + ce.getDisplayName() + \" \" + level);\n im.setLore(lore);\n is.setItemMeta(im);\n\n\n\n\n\n }",
"public void setLevel(int level) {\r\n\t\t\r\n\t\tthis.level = level;\r\n\t\t\r\n\t}",
"public void setLevel(int level) {\n this.level = level;\n }",
"public void setLevel(int level) {\n this.level = level;\n }",
"public void setLevel(Integer level) {\n this.level = level;\n }",
"public void setLevel(Integer level) {\n this.level = level;\n }",
"public void setLevel(Integer level) {\n this.level = level;\n }",
"public void setLevel(Integer level) {\n this.level = level;\n }",
"public void setLevel(Integer level) {\n this.level = level;\n }",
"public void setLevel(int level) {\n\t\tthis.level = level;\t\n\t}",
"public Builder setLevel(int value) {\n bitField0_ |= 0x00000002;\n level_ = value;\n \n return this;\n }",
"public static void setLevel(int current)\r\n\t{\r\n\t\tGame.level = current;\r\n\t}",
"public Builder setLevel(int value) {\n bitField0_ |= 0x00000001;\n level_ = value;\n \n return this;\n }",
"public Builder setLevel(int value) {\n bitField0_ |= 0x00000008;\n level_ = value;\n onChanged();\n return this;\n }",
"@Override\n public void update() {\n selectedLevel.update();\n }",
"@Override\n\tdouble updateLevel() {\n\t\treturn 0;\n\t}",
"public Builder setLevel(int value) {\n bitField0_ |= 0x00000001;\n level_ = value;\n onChanged();\n return this;\n }",
"public void setLevel(Level level) {\r\n\t\tthis.level = level;\r\n\t}",
"Update withLevel(LockLevel level);",
"public void setLevel(int level) {\n\t\tthis.level = level;\n\t}",
"public void setLevel(int level) {\n\t\tthis.level = level;\n\t}",
"public void updateLevel(){\n level = parent.level+1;\n if(noOfChildren != 0){\n for (int i = 0; i<noOfChildren; i++) {\n getChild(i).updateLevel();\n }\n }\n }",
"@Override\n\tpublic void setLevelNumber(int i) {\n\t\tnumLevel =i;\n\t}",
"public void setLevel(Level level) {\n\t\tthis.level = level;\n\t}",
"public void setDataLevel(int dataLevel);",
"public void Setlevels(int lvl)\r\n {\r\n level = lvl;\r\n }",
"public void setLevel(String level){\n\t\tthis.level = level;\n\t}",
"public final void setLevel(final int level) {\n\t\tthis.level = level;\n\t}",
"public Builder setLevel(double value) {\n \n level_ = value;\n onChanged();\n return this;\n }",
"public Builder setLevel(double value) {\n \n level_ = value;\n onChanged();\n return this;\n }",
"public void setLevel(Long value) {\r\n setAttributeInternal(LEVEL, value);\r\n }",
"public void setLevel(int level) {\n if (level < 1)\n throw new IllegalArgumentException(\"Cannot be a level less than 0\");\n\n this.level = level;\n }",
"@Override\n public void upgrade(int level){\n System.out.println(\"Level adfasdfasdf: \" + level);\n System.out.println(getLevel());\n\n if(level > 5) level = 5;\n\n if(level > 1){\n for (int i = 1; i < level; i++) levelUp();\n }\n\n /*\n //System.out.println(\"\\n-------\");\n //System.out.println(\"Se va a aumentar: \" + getName() + \"Stacks actuales: Health\" + getHealth() + \" range: \" + range + \" stroke\" + strokePerTime+ \" speed: \" + getSeep());\n\n double percentage = growth(level);\n\n setHealth((int) (getHealth() + getHealth() * percentage));\n strokePerTime = (int) (strokePerTime + strokePerTime * percentage);\n\n // Aumenta el rango si el nivel es 3 o 5\n // Luego quedan muy rotos xD\n if (level % 2 != 0) range++;\n\n //System.out.println(\"resultado: \" + getName() + \"Stacks actuales: Health\" + getHealth() + \" range: \" + range + \" stroke\" + strokePerTime+ \" speed: \" + getSeep());\n //System.out.println(\"-------\\n\");*/\n }",
"public void updateLevel(int id, int newLevel) {\n SQLiteDatabase db = getWritableDatabase();\n\n // get new value of level\n ContentValues values = new ContentValues();\n values.put(\"level\", newLevel);\n\n // update database\n String[] rowId = new String[] {\"\" + id};\n db.update(\"exercises\",values, \"_id=?\", rowId);\n }",
"public void switchPowerLevel()\n {\n // If power level is 1, set this.powerLevel to 3 - 1 = 2.\n // If power level is 2, set this.powerLevel to 3 - 2 = 1.\n this.powerLevel = (3 - this.powerLevel);\n }",
"void createNewLevel(int level);",
"private void setLevel(){\n\t\tif(getD(y) <= T)\n\t\t\tlevel = \"lower\";\n\t\telse\n\t\t\tlevel = \"higher\";\n\t}",
"public void setStaticLevel(int skill, int level, boolean update) {\r\n experience[skill] = getExperienceForLevel(staticLevels[skill] = dynamicLevels[skill] = level);\r\n if (entity instanceof Player && update) {\r\n PacketRepository.send(SkillLevel.class, new SkillContext((Player) entity, skill));\r\n }\r\n }",
"public int getItemLevel() {\treturn level; }",
"public void a(World world, BlockPosition blockposition, IBlockData iblockdata, int i) {\n/* 211 */ changeLevel(world, blockposition, iblockdata, i, (Entity)null, CauldronLevelChangeEvent.ChangeReason.UNKNOWN);\n/* */ }",
"public void changeLevel(Level level) {\n gameState.setCurrentLevel(level);\n\n }",
"public int getLevelValue() {\n return level_;\n }",
"public void setLevel(String level) {\n this.level = level;\n }",
"public void setLevel(String level) {\n this.level = level;\n }",
"public abstract void setForceLevel(int level);",
"public void changeLevel(Level level) {\n if (Consts.TEST) {\n this.level = level;\n return;\n }\n\n try {\n level.validate();\n } catch (Exception e) {\n e.printStackTrace();\n level = this.level;\n }\n this.level = level;\n entities.clear();\n pacman.respawn(level.getRandomPacmanSpawn());\n // items spawnen\n for (int y = 0; y < level.getHeight(); y++) {\n for (int x = 0; x < level.getWidth(); x++) {\n if (level.getField(x, y) == MapModule.DOT)\n entities.add(new Dot(x, y));\n else if (level.getField(x, y) == MapModule.POWERUP)\n entities.add(new PowerUp(x, y));\n else if (level.getField(x, y) == MapModule.SPEEDUP)\n entities.add(new SpeedUp(x, y));\n else if (level.getField(x, y) == MapModule.TELEPORT)\n entities.add(new Teleporter(x, y));\n }\n }\n\n // 4 Geister im normalen Spiel, 1 Geist fuer Tests\n for (int i = 0; i < (Consts.TEST ? 1 : Consts.NUM_GHOSTS); i++) {\n Ghost g = new Ghost(i);\n g.respawn(level.getNextGhostSpawn());\n entities.add(g);\n }\n }",
"protected int getLevel(){\r\n return this.level;\r\n }",
"public void setLvl(int lvl) {\r\n\t\tfor(int i = this.nivelArma; i < lvl; i++) {\r\n\t\t\tstatsLvlUp();\r\n\t\t\tnivelArma += 1;\r\n\t\t}\r\n\t}",
"public int getLevel(){\n return this.level;\n }",
"public int getLevel(){\n return this.level;\n }",
"public void incrementLevel()\r\n {\r\n counts.addFirst( counts.removeFirst() + 1 );\r\n }",
"protected void setItemDamageLevel(Material material, double damage) \r\n\t{\tthis.itemDamageLevel.put(material, damage);\t}",
"public void setLevel(int slot, int level, boolean update) {\r\n if (slot == HITPOINTS) {\r\n lifepoints = level;\r\n } else if (slot == PRAYER) {\r\n prayerPoints = level;\r\n }\r\n dynamicLevels[slot] = level;\r\n if (restoration[slot] != null) {\r\n int ticks = 100;\r\n if (entity instanceof Player) {\r\n if (((Player) entity).getPrayer().get(PrayerType.BERSERKER)) {\r\n ticks = 75;\r\n }\r\n }\r\n restoration[slot].restart(ticks);\r\n }\r\n if (entity instanceof Player && update) {\r\n PacketRepository.send(SkillLevel.class, new SkillContext((Player) entity, slot));\r\n }\r\n }",
"public void setUserLevel(Integer userLevel) {\n this.userLevel = userLevel;\n }",
"public void setLevel(int aLevel, Context context){\n this.level = aLevel;\n writeFile(context);\n }",
"public void setLevel ( int level ) {\n\t\texecute ( handle -> handle.setLevel ( level ) );\n\t}",
"public int getLevel(){\n return level;\n }",
"public int getLevel(){\n return level;\n }",
"public int getLevelValue() {\n return level_;\n }",
"public void setLevel(Level mLevel) {\n this.level = mLevel;\n level.increaseChamberCount();\n }",
"public int getLevel()\n {\n return level; \n }",
"public synchronized void setLevel(int actId) {\n/* 76 */ this.component.setLevels(actId);\n/* */ }",
"public void setLevel(String lev) {\n\t\tlevel = lev;\n\t}",
"private void updateSkiTreeLevel(SkiNode head) {\n\t\tfor (SkiNode nextNode : head.next) {\n\t\t\tif (nextNode != null) {\n\t\t\t\tupdateSkiTreeLevel(nextNode);\n\t\t\t\thead.level = Math.max(head.level, nextNode.level + 1);\n\t\t\t}\n\t\t}\n\t\thead.level = Math.max(head.level, 1);\n\t\thMap[head.i][head.j] = head.level;\n\t}",
"public void setVolume(int level);",
"public void levelUp(int newLvl) {\n\t\tsuper.levelUp(newLvl);\n\n\t\t// Add artifacts bonus stats\n\t\tif (armor != null) {\n\t\t\tdefense += armor.getDefense();\n\t\t}\n\t\tif (helm != null) {\n\t\t\tmaxHp += helm.getHp();\n\t\t\thp = maxHp;\n\t\t}\n\t\tif (weapon != null) {\n\t\t\tattack += weapon.getAttack();\n\t\t}\n\n\t\t// Update after levelUp\n\t\tneededXp = level * 1000 + (int)Math.pow(level - 1, 2) * 450;\n\t\txp = tmpXp;\n\t}",
"public void setLevel(Level level) throws SQLException\r\n\t{\r\n\t\tif (level == null)\r\n\t\t{\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tString SQL_USER = \"UPDATE user SET level =? WHERE id=?;\";\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//Prepare the statement\r\n\t\t\tPreparedStatement statement = this.getConn().prepareStatement(SQL_USER);\r\n\r\n\t\t\t//Bind the variables\r\n\t\t\tstatement.setString(1, level.name());\r\n\t\t\tstatement.setInt(2, userId);\r\n\r\n\t\t\t//Execute the update\r\n\t\t\tstatement.executeUpdate();\r\n\r\n\t\t} catch (SQLException e)\r\n\t\t{\r\n\t\t\tGWT.log(\"Error in SQL: Student->setLevel(Level \"+ level.name() + \")\", e);\r\n\t\t\tthis.getConn().rollback();\r\n\t\t\tthrow e;\t\r\n\t\t}\r\n\t\t\r\n\t\t//commit change\r\n\t\tDatabase.get().commit();\r\n\t}",
"public void setCurrentLevel(Level level){\r\n currentLevel = level;\r\n currentLevel.setObserver(this);\r\n }",
"public boolean onLevelChange(int i) {\n return this.f1995c.setLevel(i);\n }",
"public double Getlevel()\r\n {\r\n return level;\r\n }",
"private void updateGroup(String newGroupName, int level) {\r\n Equals levelFilter = new Equals(fieldName[level], previousNodeValue);\r\n CoeusVector cvFilteredData = (CoeusVector)cvHierarchyData.filter(levelFilter);\r\n if(cvFilteredData != null && cvFilteredData.size()>0) {\r\n for (int index=0; index < cvFilteredData.size(); index++) {\r\n sponsorHierarchyBean = (SponsorHierarchyBean)cvFilteredData.get(index);\r\n sponsorHierarchyBean.setAcType(TypeConstants.UPDATE_RECORD);\r\n switch(level) {\r\n case 1:\r\n sponsorHierarchyBean.setLevelOne(newGroupName);\r\n break;\r\n case 2:\r\n sponsorHierarchyBean.setLevelTwo(newGroupName);\r\n break;\r\n case 3:\r\n sponsorHierarchyBean.setLevelThree(newGroupName);\r\n break;\r\n case 4:\r\n sponsorHierarchyBean.setLevelFour(newGroupName);\r\n break;\r\n case 5:\r\n sponsorHierarchyBean.setLevelFive(newGroupName);\r\n break;\r\n case 6:\r\n sponsorHierarchyBean.setLevelSix(newGroupName);\r\n break;\r\n case 7:\r\n sponsorHierarchyBean.setLevelSeven(newGroupName);\r\n break;\r\n case 8:\r\n sponsorHierarchyBean.setLevelEight(newGroupName);\r\n break;\r\n case 9:\r\n sponsorHierarchyBean.setLevelNine(newGroupName);\r\n break;\r\n case 10:\r\n sponsorHierarchyBean.setLevelTen(newGroupName);\r\n break;\r\n }\r\n }\r\n }\r\n }",
"private void incrementLevels(int levels){\n this.level += levels;\n if (this.level > 10){\n this.level = 10;\n }\n }",
"abstract int getItemID(int level);"
] | [
"0.7705982",
"0.76749927",
"0.72569597",
"0.7217828",
"0.72116435",
"0.7058518",
"0.7055173",
"0.69649404",
"0.68683785",
"0.68220407",
"0.6708092",
"0.6646229",
"0.66217554",
"0.66112655",
"0.65947425",
"0.6583989",
"0.6576528",
"0.6573158",
"0.6569806",
"0.656279",
"0.65565044",
"0.652427",
"0.6514217",
"0.6502357",
"0.6495016",
"0.6464779",
"0.64606214",
"0.6453896",
"0.6447117",
"0.64410996",
"0.64410996",
"0.6417525",
"0.6417525",
"0.6417525",
"0.6417525",
"0.6417525",
"0.6417104",
"0.64013505",
"0.63861877",
"0.6378361",
"0.6377332",
"0.63684016",
"0.6357665",
"0.63555485",
"0.6310973",
"0.62941426",
"0.6285861",
"0.6285861",
"0.6258426",
"0.62497205",
"0.62405",
"0.62399477",
"0.621884",
"0.6195399",
"0.6185543",
"0.6180995",
"0.6180995",
"0.6177833",
"0.6145211",
"0.6131953",
"0.6129567",
"0.6101471",
"0.6096613",
"0.60885346",
"0.60847765",
"0.60699445",
"0.60612583",
"0.60547674",
"0.6049245",
"0.6020394",
"0.6020394",
"0.6020089",
"0.6018718",
"0.6012239",
"0.6010668",
"0.60062796",
"0.60062796",
"0.59878933",
"0.597729",
"0.5960697",
"0.5954175",
"0.5940921",
"0.5931201",
"0.59180635",
"0.59180635",
"0.591218",
"0.5901131",
"0.58964485",
"0.58928955",
"0.5889868",
"0.58718354",
"0.58631754",
"0.5849774",
"0.5836419",
"0.5832279",
"0.5826953",
"0.582332",
"0.58047855",
"0.57945997",
"0.57792634"
] | 0.679735 | 10 |
method to return item location | protected String getLocation(){
return this.location;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Long getItemLocationId() {\r\n return itemLocationId;\r\n }",
"public String getLocationStringForItem(Item item) {\n if (item != null) {\n if (item.getLocationString() == null) {\n loadLocationStringForItem(item);\n if (item.getLocationString() == null) {\n // Avoid unecessary checks.\n item.setLocationString(\"\");\n }\n }\n return item.getLocationString();\n }\n return null;\n }",
"@Override\n\tpublic long getLocation() {\n\t\treturn _buySellProducts.getLocation();\n\t}",
"@Nullable\n protected String location() {\n String location = null;\n\n if (parent != null) {\n ItemPresentation itemPresentation = parent.getPresentation();\n\n if (itemPresentation instanceof Parent) {\n Parent parentPresentation = (Parent) itemPresentation;\n location = parentPresentation.getLocatedPresentableText();\n }\n }\n\n return location;\n }",
"public PVector getLoc() {\n return location;\n }",
"public PVector getLoc() {\n return location;\n }",
"public int getLocation()\r\n {\r\n return location;\r\n }",
"@Override\n\tpublic int findItemPosition(Object arg0) {\n\t\treturn 0;\n\t}",
"public int getLocation() {\n\t\tint location=super.getLocation();\n\t\treturn location;\n\t}",
"public int getLocation()\r\n {\n }",
"private ItemElementRelationship findItemLocationRelationship(Item item) {\n if (item.getSelfElement().getId() != null) {\n return itemElementRelationshipFacade\n .findItemElementRelationshipByNameAndItemElementId(ItemElementRelationshipTypeNames.itemLocation.getValue(),\n item.getSelfElement().getId());\n } else {\n return null;\n }\n }",
"public PVector getLocation()\n\t{\n\t\treturn location;\n\t}",
"String location();",
"String location();",
"String location();",
"String location();",
"String location();",
"String location();",
"String location();",
"String location();",
"public Point getLocation() { return loc; }",
"public Location getInventoryLocation() \n\t{\n\t\treturn factoryInventoryLocation;\n\t}",
"@Override\n\tpublic String getLocation() {\n\t\treturn this.location;\n\t}",
"SiteLocation getLocatedAt();",
"@Override\n\tpublic Point getLocation() {\n\t\treturn position;\n\t}",
"public int getPosition(E item) {\n\t\treturn data.indexOf(item);\n\t}",
"public Point readPosition(String itemName) {\n int i;\n String pos = \"\";\n for (i = 0; i < inventory.size(); i++) {\n Map<String, Object> newItem = new HashMap<>();\n newItem = inventory.get(i);\n if (itemName.equals(newItem.get(\"Name\").toString())) {\n pos = newItem.get(\"Position\").toString();\n }\n }\n\n String sx = (pos.split(\",\"))[0];\n String sy = (pos.split(\",\"))[1];\n\n sx = sx.substring(1, sx.length());\n sy = sy.substring(0, sy.length() - 1);\n\n //transfer string to int\n int row = Integer.parseInt(sx);\n int col = Integer.parseInt(sy);\n\n //System.out.println(x);\n //System.out.println(y);\n Point a = new Point();\n a.x = row;\n a.y = col;\n //System.out.println(a);\n return a;\n\n }",
"@Override\n\tpublic String getLocation() {\n\t\treturn location;\n\t}",
"@Override\n\tpublic Object getItem(int location) {\n\t\treturn lists.get(location);\n\t}",
"public native final String location() /*-{\n\t\treturn this[\"location\"];\n\t}-*/;",
"public String returnTagLocation(){\n\t\treturn (String) tagLocationBox.getSelectedItem();//Return the tag location options\n\t}",
"public String getLocation() {\r\n\t\treturn location; \r\n\t}",
"public ImPoint getCurrentLoc() {\n \treturn this.startLoc;\n }",
"BlockPos getPosTarget() {\n BlockPosDim loc = LocationGpsCard.getPosition(inventory.getStackInSlot(0));\n if (loc != null && loc.getPos() != null) {\n return loc.getPos();\n }\n return this.getBlockPos();\n }",
"public Location getLocation ( ) {\n\t\treturn extract ( handle -> handle.getLocation ( ) );\n\t}",
"public String getLocation() { return location; }",
"public String getLocation() { return location; }",
"public int getMapItem() {\n\t\treturn mapItem;\n\t}",
"public String location() {\n return this.location;\n }",
"public String location() {\n return this.location;\n }",
"public Location getLocation() {\n return ((Location) tile);\n }",
"@Override\n public String getLocation() {\n return location;\n }",
"public int getLocation() {\n\t\treturn 0;\n\t}",
"public String getLocation() {\r\n\t\treturn location;\r\n\t}",
"public String getLocation() {\r\n return location;\r\n }",
"private int getCurrentItemOfWrapper() {\n return super.getCurrentItem();\n }",
"public String getLocation() {\n\t\treturn location;\n\t}",
"public String getLocation() {\n\t\treturn mLocation;\n\t}",
"public Point getLocation() {\n\t\treturn location;\n\t}",
"private int findItem(String searchItem){\n return myGrocery.indexOf(searchItem);\n }",
"int locationOffset(Location location);",
"public String getLocation() {\r\n return location;\r\n }",
"public Point getAddToListButtonLoc(){\r\n\t\treturn button.getLocationOnScreen();\r\n\t}",
"public String getLocation(){\n return this.location;\n }",
"public int getX() { return loc.x; }",
"public int getPosition(AudioFile item) {\n return mObjects.indexOf(item);\n }",
"MapLocation getPosition(Unit unit);",
"public String getLocation()\n {\n return location;\n }",
"public String location()\n {\n return String.format(\"(%d,%d)\", line, column);\n }",
"public String getLocation(){\r\n return location;\r\n }",
"public String getLocation() {\n return this.location;\n }",
"public String getLocation() {\n return location;\n }",
"@Override\n public PointF getLocation() {\n return location;\n }",
"public String getLocation(){\r\n return Location;\r\n }",
"public String getLocation() {\n\t\t\treturn location;\n\t\t}",
"public String getLocation() {\n return this.location;\n }",
"public String getLocation() {\n return this.location;\n }",
"public String getLocation() {\n return this.location;\n }",
"public String getLocation() {\n return this.location;\n }",
"public String getLocation() {\n return this.location;\n }",
"public Location getLocation() \n\t{\n\t\treturn location;\n\t}",
"public String getLocation() {\n return location;\n }",
"String getLocation();",
"String getLocation();",
"String getLocation();",
"public Point getLocation() {\r\n return layout.location;\r\n }",
"public int getPlaceLocation() {\n return mPlaceLocation;\n }",
"public Location getCurrentLocation() { return entity.getLocation(); }",
"public String getLocation() {\n return location;\n }",
"public String getLocation() {\n return location;\n }",
"public String getLocation() {\n return location;\n }",
"public String getLocation() {\n return location;\n }",
"public String getLocation() {\n return location;\n }",
"public String getLocation() {\n return location;\n }",
"public String getLocation() {\n return location;\n }",
"public String getLocation() {\n return location;\n }",
"public String getLocation() {\n return location;\n }",
"public String getLocation() {\n return location;\n }",
"public String getLocation() {\n return location;\n }",
"public String getLocation() {\n return location;\n }",
"public String getLocation(){\n return location;\n }",
"Object getPosition();",
"public L getDocumentLocation();",
"public Point getLocation() {\n return pos;\n }",
"public Location getLocation() {\n\t\treturn loc;\n\t}",
"@Override\n\tpublic Point getLocation() {\n\t\treturn new Point(x,y);\n\t}",
"public Location location()\n {\n return myLoc;\n }",
"public String getLocation() {\n return mLocation;\n }",
"public int getPointer(){\n return this.pointInventory;\n }",
"public abstract String getDisplayLocation();",
"public String getCurrentItem() {\n\t\treturn currentItem;\n\t}"
] | [
"0.70304483",
"0.6823181",
"0.67305917",
"0.6711315",
"0.66891986",
"0.66891986",
"0.6660791",
"0.6604487",
"0.6546831",
"0.6514906",
"0.64990735",
"0.6489671",
"0.6464773",
"0.6464773",
"0.6464773",
"0.6464773",
"0.6464773",
"0.6464773",
"0.6464773",
"0.6464773",
"0.64388716",
"0.642842",
"0.64106244",
"0.6378928",
"0.6376598",
"0.63741237",
"0.63666916",
"0.63530976",
"0.6338683",
"0.6325289",
"0.63127357",
"0.63080597",
"0.6301588",
"0.62980896",
"0.6295719",
"0.62941164",
"0.62941164",
"0.62800914",
"0.6258505",
"0.6258505",
"0.6257827",
"0.6248142",
"0.62470424",
"0.62446177",
"0.6220996",
"0.6203539",
"0.619776",
"0.6197648",
"0.61809653",
"0.61725503",
"0.61708903",
"0.6169206",
"0.61691296",
"0.61654097",
"0.61622083",
"0.6160632",
"0.6159077",
"0.61586875",
"0.61479235",
"0.61443186",
"0.6137982",
"0.61374795",
"0.61261046",
"0.61255956",
"0.6122849",
"0.612114",
"0.612114",
"0.612114",
"0.612114",
"0.612114",
"0.6110965",
"0.6104797",
"0.6102433",
"0.6102433",
"0.6102433",
"0.60951775",
"0.6088471",
"0.608651",
"0.6085025",
"0.6085025",
"0.6085025",
"0.6085025",
"0.6085025",
"0.6085025",
"0.6085025",
"0.6085025",
"0.6085025",
"0.6085025",
"0.6085025",
"0.6085025",
"0.60757244",
"0.60746646",
"0.60683405",
"0.60617334",
"0.6055182",
"0.6054954",
"0.6054327",
"0.6052806",
"0.6052182",
"0.60408735",
"0.6038769"
] | 0.0 | -1 |
change location of an item | protected void setLocation(String location){
this.location = location;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void placeItemInRoomAtCoords(WorldItem item, int row, int column) {\n Point targetPoint = getPointAtLocation(row, column);\n targetPoint.setContainedItem(item);\n if (item instanceof FlammableItem) {\n flammableItemCount++;\n }\n }",
"public void update(int location, Object o)\n {\n notifyItemChanged(location);\n }",
"public void changeItem(int pos, MenuItem newItem) {\n set.set(pos-1, newItem);\n viewSetPackage();\n }",
"public void setPosition(Point newPosition);",
"public void updateLocationStringForItem(Item item) {\n if (item != null) {\n Item locationItem = item.getLocation();\n item.setLocationString(ItemDomainLocationController.generateLocatonHierarchyString(locationItem));\n }\n }",
"public void place(Position position) { this.position = position; }",
"void setPosition(Tile t);",
"public void setPosition(int position);",
"public void setPosition(Position pos);",
"void setLocation(int x, int y);",
"@Override\n\tpublic void setLocation(long location) {\n\t\t_buySellProducts.setLocation(location);\n\t}",
"private void updateItemLocation(Item item) {\n Item existingItem = null;\n ItemElementRelationship itemElementRelationship = null;\n\n if (item.getId() != null) {\n existingItem = itemFacade.findById(item.getId());\n // Item is not new\n if (existingItem != null) {\n setItemLocationInfo(existingItem);\n itemElementRelationship = findItemLocationRelationship(item);\n }\n }\n\n Boolean newItemWithNewLocation = (existingItem == null\n && (item.getLocation() != null || (item.getLocationDetails() != null && !item.getLocationDetails().isEmpty())));\n\n Boolean locationDifferentOnCurrentItem = false;\n\n if (existingItem != null) {\n // Empty String should be the same as null for comparison puposes. \n String existingLocationDetails = existingItem.getLocationDetails();\n String newLocationDetails = item.getLocationDetails();\n\n if (existingLocationDetails != null && existingLocationDetails.isEmpty()) {\n existingLocationDetails = null;\n }\n if (newLocationDetails != null && newLocationDetails.isEmpty()) {\n newLocationDetails = null;\n }\n\n locationDifferentOnCurrentItem = ((!Objects.equals(existingItem.getLocation(), item.getLocation())\n || !Objects.equals(existingLocationDetails, newLocationDetails)));\n }\n\n if (newItemWithNewLocation || locationDifferentOnCurrentItem) {\n\n if (item.getLocation() != null) {\n logger.debug(\"Updating location for Item \" + item.toString()\n + \" to: \" + item.getLocation().getName());\n } else if (item.getLocationDetails() != null) {\n logger.debug(\"Updating location details for Item \" + item.toString()\n + \" to: \" + item.getLocationDetails());\n }\n\n if (itemElementRelationship == null) {\n itemElementRelationship = new ItemElementRelationship();\n itemElementRelationship.setRelationshipType(getLocationRelationshipType());\n itemElementRelationship.setFirstItemElement(item.getSelfElement());\n List<ItemElementRelationship> itemElementRelationshipList = item.getSelfElement().getItemElementRelationshipList();\n if (itemElementRelationshipList == null) {\n itemElementRelationshipList = new ArrayList<>();\n item.getSelfElement().setItemElementRelationshipList(itemElementRelationshipList);\n }\n itemElementRelationshipList.add(itemElementRelationship);\n }\n\n List<ItemElementRelationship> itemElementRelationshipList = item.getSelfElement().getItemElementRelationshipList();\n\n Integer locationIndex = itemElementRelationshipList.indexOf(itemElementRelationship);\n\n if (item.getLocation() != null && item.getLocation().getSelfElement() != null) {\n itemElementRelationshipList.get(locationIndex).setSecondItemElement(item.getLocation().getSelfElement());\n } else {\n // No location is set. \n itemElementRelationshipList.get(locationIndex).setSecondItemElement(null);\n }\n itemElementRelationshipList.get(locationIndex).setRelationshipDetails(item.getLocationDetails());\n\n // Add Item Element relationship history record. \n ItemElementRelationship ier = itemElementRelationshipList.get(locationIndex);\n ItemElementRelationshipHistory ierh;\n ierh = ItemElementRelationshipUtility.createItemElementHistoryRecord(\n ier, (UserInfo) SessionUtility.getUser(), new Date());\n List<ItemElementRelationshipHistory> ierhList;\n ierhList = item.getSelfElement().getItemElementRelationshipHistoryList();\n if (ierhList == null) {\n ierhList = new ArrayList<>();\n item.getSelfElement().setItemElementRelationshipHistoryList(ierhList);\n }\n\n ierhList.add(ierh);\n }\n }",
"public void changeAnchors(int point, Items item) throws Exception {\n\t\tif (point < 0 || point > this.getAnchors().length)\n\t\t\tthrow new Exception(\"That's not a valid point.\");\n\t\tif (point < 2)\n\t\t\tif (item instanceof Weapons || item == null) {\n\t\t\t\tthis.anchors[point] = item;\n\t\t\t\tif (item != null)\n\t\t\t\t\titem.setHolder(this);\n\t\t\t}\n\t\t\telse\n\t\t\t\tthrow new Exception (\"That item cannot go into that position.\");\n\t\telse if (point == 2)\n\t\t\tif (item instanceof Backpacks || item == null) {\n\t\t\t\tthis.anchors[point] = item;\n\t\t\t\tif (item != null)\n\t\t\t\t\titem.setHolder(this);\n\t\t\t}\n\t\t\telse\n\t\t\t\tthrow new Exception(\"That item cannot go into that position.\");\n\t\telse {\n\t\t\tthis.anchors[point] = item;\n\t\t\tif (item != null)\n\t\t\t\titem.setHolder(this);\n\t\t}\n\t}",
"void setPosition(Position position);",
"void setPosition(Position position);",
"public void moveTo(Actor newActor, int location) throws IllegaleToestandsUitzondering, IllegalArgumentException {\r\n\t\tHolder oldActor = getHolder();\r\n\t\tif(newActor == null)\r\n\t\t\tthrow new IllegalArgumentException();\r\n\t\tif(!newActor.canHoldItem(this,location) || !isValidHolder(newActor)) { \r\n\t\t\tthrow new IllegaleToestandsUitzondering(\"the given holder isn't valid for this item\");\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tsetHolder(newActor);\r\n\t\t\toldActor.removeItem(this);\r\n\t\t\tnewActor.addItem(this, location); \r\n\t\t} catch (IllegaleToestandsUitzondering e) {\r\n\t\t\treset(oldActor);\r\n\t\t\tthrow e;\r\n\t\t} catch (IllegalArgumentException e) {\r\n\t\t\treset(oldActor);\r\n\t\t\tthrow e;\r\n\t\t} \r\n\t}",
"public void updateLocationTreeForItem(Item item) {\n if (item != null) {\n Item location = item.getLocation();\n item.setLocationTree(ItemDomainLocationController.generateLocationNodeTreeBranch(location));\n }\n }",
"private void moveItem(int oldPos, int newPos) {\n adapter.notifyItemMoved(oldPos, newPos);\n }",
"public void setLocation(Point p) {\n // Not supported for MenuComponents\n }",
"void onItemModify(int position, String str);",
"public void setItemOnCursor ( ItemStack item ) {\n\t\texecute ( handle -> handle.setItemOnCursor ( item ) );\n\t}",
"public void setLocation(float x, float y);",
"public void setPos(int pos);",
"public void setPos(int pos);",
"void setPosition(Unit unit, MapLocation position);",
"@Override\n public void setLocation(Point3D loc) throws InvalidDataException {\n myMovable.setLocation(loc);\n }",
"protected abstract void editItem();",
"void setPosition(Position p);",
"public void setPosition(Position p);",
"void updateItem(E itemElementView);",
"void actionEdit(int position);",
"public abstract void setPosition(Position position);",
"public void updateLocation();",
"@Override\n\tpublic void updatePosition() {\n\t\t\n\t}",
"public void setObjectAtLocation(Point p, Object o);",
"public void updateItem(Item item) {\n\t\taddItem(item);\n\t}",
"void setPosition(double xPos, double yPos);",
"public void setItem(Object item, int i)\n {\n items.setElementAt(item, i);\n }",
"public void getItem(int pos){\n getItemCard(itemList.get(pos).getId());\n itemPos = pos;\n }",
"@Override\n public void setPosition(float x, float y) {\n }",
"public void setPosition(Integer position);",
"void insertItem(Position position, IItem item);",
"void setPosition(Point point);",
"@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int pos, long l) {\n move(view,pos);\n\n }",
"@Override\n public void setCurrentItem(int item) {\n super.setCurrentItem(item, false);\n }",
"public void setPosition(float x, float y);",
"public void setEditedItem(Object item) {editedItem = item;}",
"private void approveItem(final int position){\n }",
"private void setLocation(Location newLocation) {\n\t\tif (location != null) {\n\t\t\tfield.clear(location);\n\t\t}\n\t\tlocation = newLocation;\n\t\tfield.place(this, newLocation);\n\t}",
"public void setItem (Item item)\n\t{\n\t\tthis.item = item;\n\t}",
"public void setItem(Item item) {\n this.item = item;\n }",
"@Override\n public void itemClick(int pos) {\n }",
"public void setLocation(Point newLocation) {\r\n this.p = newLocation;\r\n }",
"public void PositionSet(int position);",
"private void setLocationRelativeTo(Object object) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }",
"private void setLocationRelativeTo(Object object) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }",
"public void giveItem(Item item) {\n\t\tif (hasItem()) return;\n\t\tthis.item = item;\n\t}",
"void updateItem(IDAOSession session, Item item);",
"void setPos(float x, float y);",
"public void setPosition(int newPosition) {\n if (newPosition != position) {\n position = newPosition;\n notifyListeners(getCurrentItem());\n }\n }",
"public void putRandomOnTile(Item item) {\n/* 4677 */ float newPosX = (this.tilex << 2) + 0.5F + Server.rand.nextFloat() * 3.0F;\n/* 4678 */ float newPosY = (this.tiley << 2) + 0.5F + Server.rand.nextFloat() * 3.0F;\n/* 4679 */ item.setPosXY(newPosX, newPosY);\n/* */ }",
"public void setTopLeft(Item item) {\n topLeft = item;\n }",
"public void setItem(Item item) {\n\t\tthis.item = item;\n\t}",
"public void setItem(Item item) {\n\t\tthis.item = item;\n\t}",
"public void dropItemAtCurrentPlace(Item it)\r\n\t{\r\n\t\tthis.currentPlace.addItem(it);\r\n\t}",
"public void setPosition(){\r\n currentPosition = 0; \r\n }",
"public void setPosition(Position pos) {\n \tthis.position = pos;\n \t//setGrade();\n }",
"public void updateXLoc();",
"@Override\r\n public void update(int index, Movie object, String value) {\n \tobject.setPlace(value);\r\n \tmovieTable.redraw();\r\n }",
"void changeOrder(GeometricalObject object, int offset);",
"void changeOrder(GeometricalObject object, int offset);",
"public void setPosition(Point position);",
"public void setPosition(int position) {\r\r\r\r\r\r\n this.position = position;\r\r\r\r\r\r\n }",
"@Override\n\tpublic void update() {\n\t\tmove();\n\t\tplace();\n\t}",
"public void updateRoomItem(RoomItem item)\r\n\t{\r\n\t\ttheGridView.updateRoomItem(item);\r\n\t}",
"public void moveItem(Item item, float newPosX, float newPosY, float newPosZ, float newRot, boolean surf, float oldPosZ) {\n/* 5033 */ float diffX = newPosX - item.getPosX();\n/* 5034 */ float diffY = newPosY - item.getPosY();\n/* 5035 */ if (diffX != 0.0F || diffY != 0.0F) {\n/* */ \n/* 5037 */ int newTileX = (int)newPosX >> 2;\n/* 5038 */ int newTileY = (int)newPosY >> 2;\n/* 5039 */ long newBridgeId = item.getBridgeId();\n/* 5040 */ long oldBridgeId = item.getBridgeId();\n/* */ \n/* 5042 */ if (newTileX != this.tilex || newTileY != this.tiley || surf != isOnSurface()) {\n/* */ \n/* 5044 */ VolaTile dt = Zones.getTileOrNull(Zones.safeTileX(newTileX), Zones.safeTileY(newTileY), surf);\n/* 5045 */ if (item.onBridge() == -10L && dt != null && dt.getStructure() != null && dt.getStructure().isTypeBridge()) {\n/* */ \n/* */ \n/* 5048 */ if (item.getBridgeId() == -10L) {\n/* */ \n/* */ \n/* 5051 */ BridgePart bp = Zones.getBridgePartFor(newTileX, newTileY, surf);\n/* 5052 */ if (bp != null && bp.isFinished() && bp.hasAnExit())\n/* */ {\n/* 5054 */ if (Servers.isThisATestServer() && item.isWagonerWagon())\n/* */ {\n/* */ \n/* 5057 */ Players.getInstance().sendGmMessage(null, \"System\", \"Debug: Wagon \" + item.getName() + \" bid:\" + oldBridgeId + \" z:\" + item\n/* 5058 */ .getPosZ() + \" fl:\" + item.getFloorLevel() + \" bp:\" + bp\n/* 5059 */ .getStructureId() + \" N:\" + bp.getNorthExit() + \" E:\" + bp.getEastExit() + \" S:\" + bp\n/* 5060 */ .getSouthExit() + \" W:\" + bp.getWestExit() + \" @\" + item\n/* 5061 */ .getTileX() + \",\" + item.getTileY() + \" to \" + newTileX + \",\" + newTileY + \",\" + surf, false);\n/* */ }\n/* */ \n/* */ \n/* */ \n/* 5066 */ if (newTileY < item.getTileY() && bp.getSouthExitFloorLevel() == item.getFloorLevel()) {\n/* 5067 */ newBridgeId = bp.getStructureId();\n/* */ }\n/* 5069 */ else if (newTileX > item.getTileX() && bp.getWestExitFloorLevel() == item.getFloorLevel()) {\n/* 5070 */ newBridgeId = bp.getStructureId();\n/* */ }\n/* 5072 */ else if (newTileY > item.getTileY() && bp.getNorthExitFloorLevel() == item.getFloorLevel()) {\n/* 5073 */ newBridgeId = bp.getStructureId();\n/* */ }\n/* 5075 */ else if (newTileX < item.getTileX() && bp.getEastExitFloorLevel() == item.getFloorLevel()) {\n/* 5076 */ newBridgeId = bp.getStructureId();\n/* */ } \n/* 5078 */ if (Servers.isThisATestServer() && newBridgeId != oldBridgeId)\n/* */ {\n/* 5080 */ Players.getInstance().sendGmMessage(null, \"System\", \"Debug: Wagon \" + item.getName() + \" obid:\" + oldBridgeId + \" z:\" + item\n/* 5081 */ .getPosZ() + \" fl:\" + item.getFloorLevel() + \" nbid:\" + newBridgeId + \" N:\" + bp\n/* 5082 */ .getNorthExit() + \" E:\" + bp.getEastExit() + \" S:\" + bp.getSouthExit() + \" W:\" + bp.getWestExit() + \" @\" + item\n/* 5083 */ .getTileX() + \",\" + item.getTileY() + \" to \" + newTileX + \",\" + newTileY + \",\" + surf, false);\n/* */ \n/* */ }\n/* */ }\n/* */ else\n/* */ {\n/* 5089 */ newBridgeId = -10L;\n/* 5090 */ item.setOnBridge(-10L);\n/* 5091 */ sendSetBridgeId(item, -10L);\n/* 5092 */ item.calculatePosZ(dt, null);\n/* */ }\n/* */ \n/* */ }\n/* */ else {\n/* */ \n/* 5098 */ BridgePart bp = Zones.getBridgePartFor(newTileX, newTileY, surf);\n/* 5099 */ if (bp == null) {\n/* */ \n/* */ \n/* 5102 */ newBridgeId = -10L;\n/* 5103 */ item.setOnBridge(-10L);\n/* 5104 */ sendSetBridgeId(item, -10L);\n/* 5105 */ item.calculatePosZ(dt, null);\n/* */ } \n/* */ } \n/* */ \n/* 5109 */ if (item.onBridge() != newBridgeId) {\n/* */ \n/* 5111 */ float nz = Zones.calculatePosZ(newPosX, newPosY, dt, isOnSurface(), false, oldPosZ, null, newBridgeId);\n/* */ \n/* */ \n/* 5114 */ if (Servers.isThisATestServer() && item.isWagonerWagon()) {\n/* 5115 */ Players.getInstance().sendGmMessage(null, \"System\", \"Debug: Wagon \" + item.getName() + \" moving onto, or off, a bridge from bid:\" + oldBridgeId + \" z:\" + item\n/* */ \n/* 5117 */ .getPosZ() + \" fl:\" + item.getFloorLevel() + \" to bp:\" + newBridgeId + \" newZ:\" + nz + \" @\" + item\n/* */ \n/* 5119 */ .getTileX() + \",\" + item.getTileY() + \" to \" + newTileX + \",\" + newTileY + \",\" + surf, false);\n/* */ }\n/* */ \n/* 5122 */ if (Math.abs(oldPosZ - nz) < 10.0F)\n/* */ {\n/* */ \n/* 5125 */ if (!item.isBoat())\n/* */ {\n/* 5127 */ item.setOnBridge(newBridgeId);\n/* */ \n/* 5129 */ newPosZ = nz;\n/* */ \n/* 5131 */ sendSetBridgeId(item, newBridgeId);\n/* */ }\n/* */ \n/* */ }\n/* */ } \n/* 5136 */ } else if (item.onBridge() > 0L && (dt == null || dt\n/* 5137 */ .getStructure() == null || dt.getStructure().getWurmId() != item.onBridge())) {\n/* */ \n/* 5139 */ boolean leave = true;\n/* 5140 */ BridgePart bp = Zones.getBridgePartFor(newTileX, newTileY, surf);\n/* 5141 */ if (bp != null && bp.isFinished())\n/* */ {\n/* */ \n/* 5144 */ if (bp.getDir() == 0 || bp.getDir() == 4) {\n/* */ \n/* 5146 */ if (getTileX() != newTileX)\n/* */ {\n/* 5148 */ leave = false;\n/* */ \n/* */ }\n/* */ \n/* */ }\n/* 5153 */ else if (getTileY() != newTileY) {\n/* */ \n/* 5155 */ leave = false;\n/* */ } \n/* */ }\n/* */ \n/* 5159 */ if (leave) {\n/* */ \n/* 5161 */ newBridgeId = -10L;\n/* 5162 */ item.setOnBridge(-10L);\n/* 5163 */ sendSetBridgeId(item, -10L);\n/* */ } \n/* */ } \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 5174 */ if (surf != isOnSurface())\n/* */ {\n/* 5176 */ item.newLayer = (byte)(isOnSurface() ? -1 : 0);\n/* */ }\n/* 5178 */ removeItem(item, true);\n/* */ \n/* 5180 */ if (diffX != 0.0F && diffY != 0.0F) {\n/* */ \n/* 5182 */ item.setPosXYZRotation(newPosX, newPosY, newPosZ, newRot);\n/* */ }\n/* */ else {\n/* */ \n/* 5186 */ item.setRotation(newRot);\n/* 5187 */ if (diffX != 0.0F)\n/* 5188 */ item.setPosX(newPosX); \n/* 5189 */ if (diffY != 0.0F)\n/* 5190 */ item.setPosY(newPosY); \n/* 5191 */ item.setPosZ(newPosZ);\n/* */ } \n/* */ \n/* */ try {\n/* 5195 */ Zone _zone = Zones.getZone((int)newPosX >> 2, (int)newPosY >> 2, surf);\n/* 5196 */ _zone.addItem(item, true, (surf != isOnSurface()), false);\n/* */ }\n/* 5198 */ catch (NoSuchZoneException nsz) {\n/* */ \n/* 5200 */ logger.log(Level.WARNING, item.getName() + \", \" + nsz.getMessage(), (Throwable)nsz);\n/* */ } \n/* 5202 */ if (surf != isOnSurface()) {\n/* 5203 */ item.newLayer = Byte.MIN_VALUE;\n/* */ \n/* */ \n/* */ \n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ }\n/* */ else {\n/* */ \n/* */ \n/* */ \n/* 5216 */ if (diffX != 0.0F)\n/* 5217 */ item.setTempXPosition(newPosX); \n/* 5218 */ if (diffY != 0.0F)\n/* 5219 */ item.setTempYPosition(newPosY); \n/* 5220 */ item.setTempZandRot(newPosZ, newRot);\n/* */ } \n/* */ \n/* */ \n/* */ \n/* 5225 */ for (VirtualZone vz : getWatchers()) {\n/* */ \n/* */ \n/* */ try {\n/* 5229 */ if (vz.isVisible(item, this)) {\n/* */ \n/* 5231 */ if (item.getFloorLevel() <= 0 && item.onBridge() <= 0L) {\n/* */ \n/* 5233 */ if (Structure.isGroundFloorAtPosition(newPosX, newPosY, item.isOnSurface()))\n/* */ {\n/* 5235 */ vz.sendMoveMovingItemAndSetZ(item.getWurmId(), item.getPosX(), item.getPosY(), item\n/* 5236 */ .getPosZ(), (int)(newRot * 256.0F / 360.0F));\n/* */ }\n/* */ else\n/* */ {\n/* 5240 */ vz.sendMoveMovingItem(item.getWurmId(), item.getPosX(), item.getPosY(), (int)(newRot * 256.0F / 360.0F));\n/* */ }\n/* */ \n/* */ } else {\n/* */ \n/* 5245 */ vz.sendMoveMovingItemAndSetZ(item.getWurmId(), item.getPosX(), item.getPosY(), item\n/* 5246 */ .getPosZ(), (int)(newRot * 256.0F / 360.0F));\n/* */ } \n/* */ } else {\n/* 5249 */ vz.removeItem(item);\n/* */ } \n/* 5251 */ } catch (Exception e) {\n/* */ \n/* 5253 */ logger.log(Level.WARNING, e.getMessage(), e);\n/* */ } \n/* */ } \n/* */ } \n/* */ }",
"public void setItem (Object anObject)\r\n {\r\n // TODO: implement (?)\r\n }",
"public void AssegnaSlot(Slot S)\r\n {\r\n position = S;\r\n }",
"@Override\n public void setLocation(double x, double y, double z) throws InvalidDataException {\n myMovable.setLocation(x, y, z);\n }",
"public void setLocation(Vector location);",
"public void changeOrder(GeometricalObject object, int offset);",
"public void setPosition(int position)\r\n {\r\n this.position = position;\r\n }",
"@Override\n\tpublic ThematicItem changeItem(ThematicItem item) {\n\t\treturn repository.changeItem(item);\n\t}",
"public void moveTo(int newX, int newY) {\n xPosition = newX-radius;\n yPosition = newY-radius;\n }",
"public void updatePosition(Location loc)\n {\n position = new BlockVector(loc.getX(), loc.getY(), loc.getZ());\n }",
"Item(int x, int y) {\n this.posX = x;\n this.posY = y;\n }",
"public abstract Piece setLocation(int row, int column);",
"private void SetLocationRelative(Object object) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }",
"@Override\n public void OnItemClick(int position) {\n }",
"@Override\n\tpublic void modifyItem(Object toUpdated) {}",
"public void place(Object animal, int row, int column) {\n place(animal, new Position(row, column));\n }",
"public void changeLocationOfTurtle(Point2D newLoc){ //WORKS\n\t\tsetTurtleLocToViewTurtleLoc();\n\t\tPoint2D locOrig = myTurtle.getLoc();\n\t\tmyTurtle.setLocation(newLoc);\n\t\tPoint2D locNew = myTurtle.getLoc();\n\t\tthis.moveTurtleImageAndDraw(locOrig, locNew);\n\t\tsetTurtleLocToViewTurtleLoc();\n\t\tthis.updateTurtleOnView();\n\t}",
"private void setLocation() {\n switch (getKey()) {\n case UP:\n this.y_location = -136.8 - 6;\n this.y_tile = -1;\n this.positive = false;\n break;\n case DOWN:\n this.y_location = 136.8 + 6;\n this.y_tile = 1;\n break;\n case LEFT:\n this.x_location = -140.6 - 6;\n this.x_tile = -1;\n this.positive = false;\n break;\n case RIGHT:\n this.x_location = 140.6 + 6;\n this.x_tile = 1;\n break;\n default:\n break;\n }\n }",
"@Override\n public void setLoc(Point p) {\n this.rect.setLocation(p);\n }",
"public void setPosition(int newPos) {\n this.position = newPos;\n\n this.database.update(\"AnswerOptions\", \"matchingPosition = '\" + position + \"'\", \"optionId = \" + this.optionId);\n }",
"protected void setPosition(Position p) {\n\t\tposition = p;\n\t}",
"public void setPosition(int indexInST, float time, Vector3f position) {\n PointInTime toAdd=findTime(time);\n toAdd.setTranslation(indexInST,position);\n }",
"protected void changeLocation(Location newLoc)\n {\n // Change location and notify the environment.\n Location oldLoc = location();\n myLoc = newLoc;\n environment().recordMove(this, oldLoc);\n\n // object is again at location myLoc in environment\n }",
"@Override\n public void pickItem(int position) {\n setProductPicked(-1, position);\n }",
"public void onItemClick(AdapterView<?> parent, View view, \n\t \t int position, long id) {\n\t \t\t\t\t\n\t \t\t\t//global int so we can edit the correct position upon \n\t \t //return\n\t \t\t\teditPosition = position;\n\t \t\t\tupdateItemList(position); \t\t\t\t\t\t\t\n\t \t\t}",
"public void setData(Item i)\r\n\t{\r\n\t\ttheItem = i;\r\n\t}"
] | [
"0.66488236",
"0.66379845",
"0.66083246",
"0.6593377",
"0.6530565",
"0.6526533",
"0.6524454",
"0.6476782",
"0.6460728",
"0.6444939",
"0.64283645",
"0.6395338",
"0.63839346",
"0.63382375",
"0.63382375",
"0.6333086",
"0.6326388",
"0.62827146",
"0.6277228",
"0.62763774",
"0.6272329",
"0.62706906",
"0.6251938",
"0.6251938",
"0.61926365",
"0.6172129",
"0.6171562",
"0.61710894",
"0.6169395",
"0.6169002",
"0.6162879",
"0.61607003",
"0.61493796",
"0.6125372",
"0.6113808",
"0.6111232",
"0.61017966",
"0.609279",
"0.60745543",
"0.6052268",
"0.6049409",
"0.60339826",
"0.60331523",
"0.60296834",
"0.602863",
"0.6022085",
"0.60050124",
"0.6003098",
"0.59714377",
"0.59709406",
"0.59676003",
"0.5951407",
"0.5945049",
"0.594061",
"0.5934042",
"0.5934042",
"0.59290236",
"0.59242207",
"0.5918924",
"0.5912987",
"0.59036297",
"0.5885034",
"0.5882629",
"0.5882629",
"0.58793974",
"0.58687055",
"0.5865237",
"0.58546144",
"0.5854039",
"0.5850866",
"0.5850866",
"0.5839538",
"0.5831641",
"0.5822491",
"0.58206815",
"0.5816739",
"0.58139056",
"0.5807086",
"0.58054346",
"0.5803814",
"0.5795338",
"0.5787295",
"0.57802933",
"0.5776749",
"0.57750076",
"0.57687056",
"0.57615805",
"0.5760118",
"0.5753112",
"0.5745097",
"0.5741384",
"0.5732808",
"0.5732066",
"0.5730834",
"0.5724699",
"0.57234204",
"0.5720748",
"0.5719948",
"0.57179135",
"0.57133406",
"0.57036495"
] | 0.0 | -1 |
removes x amount of items from inventory | protected void pickItem(int x ){
this.level -=x;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void removeItem(int n)\n {\n items.remove(n);\n }",
"public void removeItem(Item iToRemove, int amount) {\n for (Item i : inventory) {\n if (iToRemove.getClass().equals(i.getClass())) {\n int tempQuantity = i.getQuantity() - amount;\n if (tempQuantity > 0) {\n i.setQuantity(tempQuantity);\n } else {\n inventory.remove(i);\n }\n }\n }\n }",
"void removeStock(int i);",
"public void dropItems() {\n\t\tlocation.getChunk().load();\n\t\tArrays.stream(inventory.getContents())\n\t\t\t.filter(ItemStackUtils::isValid)\n\t\t\t.forEach((item) -> location.getWorld().dropItemNaturally(location, item));\n\t\tinventory.clear();\n\t}",
"public int removeItem(Item item, int n)\r\n {\r\n if(n < VALID_VALUE)\r\n {\r\n System.out.println(\"Error: Your request cannot be completed at this time. Problem: cannot \" +\r\n \"remove a negative number of items of type \" + item.getType());\r\n return INVALID_VALUE;\r\n }\r\n if(this.getItemCount(item.getType()) < n)\r\n {\r\n System.out.println(\"Error: Your request cannot be completed at this time. Problem: the locker \" +\r\n \"does not contain \" + n + \" items of type \" + item.getType());\r\n return INVALID_VALUE;\r\n }\r\n this.getInventory().replace(item.getType(), this.getItemCount(item.getType()) - n);\r\n this.setCurOccupiedCapacity(this.getCurOccupiedCapacity() - n * item.getVolume());\r\n return VALID_VALUE;\r\n }",
"public void removeItem(Item item) {\r\n for (Iterator<Item> it = inventoryItems.iterator(); it.hasNext(); ) {\r\n Item i = it.next();\r\n if (i.getId() == item.getId()) {\r\n i.setCount(i.getCount() - 1);\r\n }\r\n if (i.getCount() <= 0) {\r\n it.remove();\r\n }\r\n }\r\n }",
"public void takeItemsFromChest() {\r\n currentRoom = player.getCurrentRoom();\r\n for (int i = 0; i < currentRoom.getChest().size(); i++) {\r\n player.addToInventory(currentRoom.getChest().get(i));\r\n currentRoom.getChest().remove(i);\r\n }\r\n\r\n }",
"private void removeAtIndex(int index) {\n // save the last item\n FoodItem toMoveBack = this._stock[this._noOfItems-1];\n // make it null\n this._stock[this._noOfItems-1] = null;\n // for each item until the index to remove from:\n for (int i = this._noOfItems-2; i > index-1; i--) {\n // save the last moved back temporarily\n FoodItem tempToMoveBack = toMoveBack;\n // assign to the next iteration item to move back\n toMoveBack = this._stock[i];\n // move back the item for current iteration\n this._stock[i] = tempToMoveBack;\n }\n // we removed an item - so let's decrease the item counter.\n this._noOfItems--;\n }",
"public static void removeItems(Player player, Material material, int amount) {\n int current = amount;\n\n for (ItemStack content : player.getInventory().getContents()) {\n if (content != null && content.getType() == material) {\n if (current - content.getAmount() > 0) {\n current -= content.getAmount();\n\n content.setAmount(0);\n } else {\n content.setAmount(content.getAmount() - current);\n return;\n }\n }\n }\n }",
"@Override\r\n public void uncall() {\r\n Player player = MbPets.getInstance().getServer().getPlayer(getOwner());\r\n if (player != null) {\r\n if (getEntity().getInventory().getDecor() != null) {\r\n if (player.getInventory().firstEmpty() >= 0) {\r\n player.getInventory().addItem(getEntity().getInventory().getDecor());\r\n } else {\r\n player.getWorld().dropItemNaturally(player.getLocation(),\r\n getEntity().getInventory().getDecor());\r\n }\r\n }\r\n }\r\n super.uncall();\r\n }",
"public static void removeItemFromInventory(final Inventory inventory, final ItemStack item) throws InvalidParameterException, FailedTransactionException {\n if (!isValidInventory(inventory)) {\n throw new InvalidParameterException(\"Cannot remove item from an invalid inventory.\");\n }\n if (!ItemAPI.isValidItem(item)) {\n throw new InvalidParameterException(\"Cannot remove an invalid item from an inventory.\");\n }\n if (!hasRequiredItem(inventory, item, item.getAmount())) {\n throw new FailedTransactionException(\"That inventory does not have the amount of times to remove.\");\n }\n ItemStack[] savedInventory = duplicateInventory(inventory.getContents());\n try {\n int remaining = item.getAmount();\n for (int i = 0; i < inventory.getSize(); i++) {\n ItemStack currentItem = inventory.getItem(i);\n if (ItemAPI.isSimilarItem(currentItem, item)) {\n int currentItemAmount = currentItem.getAmount();\n // If this item can satisfy the remaining amount with some left over\n // then lower the amount of that item and break out of the loop\n if (currentItemAmount > remaining) {\n currentItem.setAmount(currentItemAmount - remaining);\n remaining = 0;\n break;\n }\n // If this item can satisfy the remaining amount exactly\n // then remove the item from the inventory and break out of the loop\n else if (currentItemAmount == remaining) {\n inventory.setItem(i, null);\n remaining = 0;\n break;\n }\n // Otherwise this item still leaves some remaining, so\n // remove the item from the inventory and reduce the remaining\n else {\n inventory.setItem(i, null);\n remaining -= currentItemAmount;\n }\n }\n }\n if (remaining != 0) {\n throw new FailedTransactionException(\"Was not able to remove the exact amount of that item!\");\n }\n }\n catch (FailedTransactionException exception) {\n // Restore the inventory to its previous state\n inventory.setContents(savedInventory);\n throw exception;\n }\n }",
"public void removeItemAt(int theIndex) {\n\t\tList<Item> keys = new ArrayList<Item>(inventory.keySet());\t\n\t\tItem item = keys.get(theIndex);\n\t\tinventory.remove(item);\t\t\n\t}",
"public void dropItem(int x, int y, int i) {\n \n ParentItem item = getInventory()[i];\n \n if (item != null) {\n \n inventory.removeItem(i);\n \n item.putOnBoard(x, y, gameboard);\n \n }\n \n }",
"public int removeItem(Item item, int n){\r\n if(unitMap.containsKey(item.getType())) {\r\n //if n negative number:\r\n if (n < 0) {\r\n System.out.println(NO_ITEMS_REMOVED_NEGATIVE + item.getType());\r\n return NO_ITEMS_ADDED;\r\n }\r\n //if not negative:\r\n else {\r\n if (unitMap.get(item.getType()) > n || unitMap.get(item.getType()) == n) {\r\n if(unitMap.get(item.getType()) == n) unitMap.remove(item.getType());\r\n else unitMap.put(item.getType(), unitMap.get(item.getType()) - n);\r\n availableCapacity += n*item.getVolume();\r\n return ZERO;\r\n }\r\n // if less then n items in the locker\r\n else {\r\n System.out.println(NO_ITEMS_REMOVED + n + NO_ITEMS_ADDED_NEW_N2 + item.getType());\r\n return NO_ITEMS_ADDED;\r\n }\r\n }\r\n }\r\n else {\r\n System.out.println(GENERAL_ERROR_MSG);\r\n return NO_ITEMS_ADDED;\r\n }\r\n }",
"public void removeItem(String itemName, int Qty) {\n if (checkExist(itemName, Qty) == true) {\n int i;\n //System.out.println(checkExist(itemName));\n for (i = 0; i < inventory.size(); i++) {\n Map<String, Object> removedItem = new HashMap<>();\n removedItem = inventory.get(i);\n\n if (itemName.equals(removedItem.get(\"Name\").toString())) {\n int a = Integer.parseInt((String) removedItem.get(\"Amount\"));\n removedItem.put(\"Amount\", a - Qty);\n\n if (a - Qty < 1) {\n removedItem.put(\"Existence\", \"N\");\n }\n }\n }\n } else {\n System.out.println(\"Item \" + itemName + \" is not available.\");\n for (int i = 0; i < inventory.size(); i++) {\n Map<String, Object> removedItem = new HashMap<>();\n removedItem = inventory.get(i);\n\n if (itemName.equals(removedItem.get(\"Name\").toString())) {\n System.out.println(\"Since item \" + itemName + \"'s amout is not enough, try less amount.\");\n }\n }\n }\n outPutFile();\n }",
"public void removePlayerItem(Player player, ItemStack item, int amountToRemove){\n\t\tint amountLeft = amountToRemove;\n\t\tdebugOut(\"Searching for \"+amountLeft+\" items\");\n\t\tItemStack[] inventory = player.getInventory().getContents();\n\t\tint invSlot = 1;\n\t\tfor(ItemStack currentItem:inventory){\n\t\t\tif(amountLeft > 0){\n\t\t\t\tdebugOut(\"Inventory slot: \"+invSlot);\n\t\t\t\tdebugOut(\"Amount remaining:\"+amountLeft);\n\t\t\t\tinvSlot++;\n\t\t\t\tif(areEqualItems(currentItem, item)){\n\t\t\t\t\tdebugOut(\"Items match -- getting stack size\");\n\t\t\t\t\tdebugOut(\"Stack size:\"+currentItem.getAmount());\n\t\t\t\t\tint stackSize = currentItem.getAmount();\n\t\t\t\t\tif(stackSize > amountLeft){\n\t\t\t\t\t\tdebugOut(\"There are more items in this stack than needed\");\n\t\t\t\t\t\tcurrentItem.setAmount(stackSize-amountLeft);\n\t\t\t\t\t\tamountLeft = 0;\n\t\t\t\t\t}else {\n\t\t\t\t\t\tdebugOut(\"This stack does not have enough to deposit the item -- deducting amount\");\n\t\t\t\t\t\tplayer.getInventory().removeItem(currentItem);\n\t\t\t\t\t\tdebugOut(\"removingItemAmount: \"+currentItem.getAmount() );\n\t\t\t\t\t\tamountLeft -= currentItem.getAmount();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}else {\n\t\t\t\t\tdebugOut(\"Not the same item\");\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\tdebugOut(\"Amount left is 0; breaking loop\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}",
"public ItemStack removeItems(int paramInt1, int paramInt2)\r\n/* 31: */ {\r\n/* 32: 47 */ if (this.a[paramInt1] != null)\r\n/* 33: */ {\r\n/* 34: 48 */ if (this.a[paramInt1].stackSize <= paramInt2)\r\n/* 35: */ {\r\n/* 36: 49 */ ItemStack localamj = this.a[paramInt1];\r\n/* 37: 50 */ this.a[paramInt1] = null;\r\n/* 38: 51 */ return localamj;\r\n/* 39: */ }\r\n/* 40: 53 */ ItemStack localamj = this.a[paramInt1].split(paramInt2);\r\n/* 41: 54 */ if (this.a[paramInt1].stackSize == 0) {\r\n/* 42: 55 */ this.a[paramInt1] = null;\r\n/* 43: */ }\r\n/* 44: 57 */ return localamj;\r\n/* 45: */ }\r\n/* 46: 60 */ return null;\r\n/* 47: */ }",
"public void decrement() {\n items--;\n }",
"public void discard(){\n for(int i = 1 ; i <= 110 ; i++) cardDeck.remove(i);\n }",
"protected void dropFewItems(boolean par1, int par2) {\r\n\t\tint var3 = this.rand.nextInt(3) + this.rand.nextInt(1 + par2);\r\n\t\t\r\n\t\tfor(int var4 = 0; var4 < var3; ++var4) {\r\n\t\t\tthis.dropItem(SorceryItems.goldfeather, 1);\r\n\t\t}\r\n\t\t\r\n\t\tif(this.isBurning()) {\r\n\t\t\tthis.dropItem(Items.cooked_chicken, 1);\r\n\t\t} else {\r\n\t\t\tthis.dropItem(Items.chicken, 1);\r\n\t\t}\r\n\t}",
"public ItemStack remove(int debug1) {\n/* 104 */ return this.container.removeItem(this.slot, debug1);\n/* */ }",
"public void removeAllItems ();",
"public void dropItem(Item seekItem)\n {\n //get each item from the items's array list.\n for (Item item : items){\n if(item.getName().equals(seekItem.getName())){\n currentRoom.getInventory().getItems().add(item);\n removePlayerItem(item);\n System.out.println(\"You have placed the \"+ item.getName() +\" in the \" + currentRoom.getName() + \".\");\n }\n }\n }",
"public void removeEmptyItems(){\n\t\tfor(int i=0; i<currentOrder.getItems().size();i++){\n\t\t\tif(currentOrder.getItems().get(i).getQuantity()<=0){\n\t\t\t\tcurrentOrder.getItems().remove(i);\n\t\t\t\ti--;\n\t\t\t}\n\t\t}\n\t}",
"public static void clearInventoryCrafting(Player player)\n\t{\n\t\tPlayerInventory inv = player.getInventory();\n\t\tfor(int i = 0; i < 4; i++)\n\t\t\tinv.setItem(1 + i, null);\n\t}",
"@Override\n protected void dropFewItems(boolean hit, int looting) {\n super.dropFewItems(hit, looting);\n for (int i = this.rand.nextInt(2 + looting); i-- > 0;) {\n this.dropItem(Items.ender_pearl, 1);\n }\n }",
"@Override\n\tprotected void dropFewItems(boolean par1, int par2) {\n\t\tsuper.dropFewItems(par1, par2);\n\n\t\t// drop saddle if equipped\n\t\tif (isSaddled()) {\n\t\t\tdropItem(Items.SADDLE, 1);\n\t\t}\n\t}",
"public static void removeItem(final Player p, final Material material, final int amount) {\n for (int i = 1; i <= amount; ++i) {\n final ItemStack ite = p.getInventory().getItem(p.getInventory().first(material));\n final ItemStack it = new ItemStack(ite.getType(), 1, ite.getDurability());\n it.setItemMeta(ite.getItemMeta());\n p.getInventory().removeItem(new ItemStack[]{it});\n }\n }",
"@Test\n public void testDecrementInventory() throws Exception {\n int firstDecrement;\n int secondDecrement;\n\n List<VendingItem> items;\n VendingItem twix;\n\n try {\n fillInventoryFileWithTestData(VALID);\n dao.loadItems();\n } catch (VendingMachinePersistenceException ex) {\n }\n\n items = dao.getItems();\n\n assertEquals(1, items.size());\n\n twix = items.get(0);\n\n // firstDecrement = 19\n firstDecrement = twix.decrementStock();\n\n // secondDecrement = 18\n secondDecrement = twix.decrementStock();\n\n assertEquals(1, firstDecrement - secondDecrement);\n }",
"public void clearRandomItems();",
"public void removeItem(int itemToRemove){\n\t\tinventoryItems[itemToRemove] = null;\n\t}",
"public void removeRemaining( int index )\n\t{\n\t\t_avTable.rm( ATTR_REMAINING , index ) ;\n\t}",
"@Override\n protected void dropFewItems(boolean hit, int looting) {\n super.dropFewItems(hit, looting);\n if (hit && (this.rand.nextInt(3) == 0 || this.rand.nextInt(1 + looting) > 0)) {\n Item drop = null;\n switch (this.rand.nextInt(5)) {\n case 0:\n drop = Items.gunpowder;\n break;\n case 1:\n drop = Items.sugar;\n break;\n case 2:\n drop = Items.spider_eye;\n break;\n case 3:\n drop = Items.fermented_spider_eye;\n break;\n case 4:\n drop = Items.speckled_melon;\n break;\n }\n if (drop != null) {\n this.dropItem(drop, 1);\n }\n }\n }",
"public void removeItemInventory(Item item){\r\n playerItem.remove(item);\r\n System.out.println(item.getName() + \" was removed from your inventory\");\r\n }",
"private void removeItem(int item) {\n\t\tboolean flag = false;\r\n\t\tfor(int i=0; i<index; i++) {\r\n\t\t\tif(products[i].getTag() == item) {\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"없어진 상품:\"+products[i].toString());\r\n\t\t\t\tproducts[i] = null;\r\n\t\t\t\tindex--;\r\n\t\t\t\tflag = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(flag == false)\r\n\t\t\tSystem.out.println(\"해당하는 상품이 없습니다.\");\r\n\t}",
"void removeDebts(int i);",
"ItemStack removePage(EntityPlayer player, ItemStack itemstack, int index);",
"public static void removeAllItems(Inventory inv) {\r\n for (ItemStack item : inv) {\r\n inv.remove(item);\r\n }\r\n }",
"public void removeItemInventory(Item item){\n playerItem.remove(item);\n System.out.println(item.getName() + \" was removed from your inventory\");\n }",
"public void withdrawAll() {\r\n for (int i = 0; i < container.capacity(); i++) {\r\n Item item = container.get(i);\r\n if (item == null) {\r\n continue;\r\n }\r\n int amount = owner.getInventory().getMaximumAdd(item);\r\n if (item.getCount() > amount) {\r\n item = new Item(item.getId(), amount);\r\n container.remove(item, false);\r\n owner.getInventory().add(item, false);\r\n } else {\r\n container.replace(null, i, false);\r\n owner.getInventory().add(item, false);\r\n }\r\n }\r\n container.update();\r\n owner.getInventory().update();\r\n }",
"default boolean removeItemsAbsolute(int amount, Predicate<ItemStack> filter) {\n for (IInventoryAdapter inventoryObject : this) {\n InventoryManipulator im = InventoryManipulator.get(inventoryObject);\n if (im.canRemoveItems(filter, amount)) {\n im.removeItems(filter, amount);\n return true;\n }\n }\n return false;\n }",
"public void unRegAll(){\n \t\t\n \t\tfor(ShopItem shopItem : itemList){\n \t\t\t//TODO: process more then one item at the same time.\n \t\t\t/*\n \t\t\tint position = shopItem.getShopPosition().getSlot();\n \t\t\tif(processedPositions.contains(position))\n \t\t\t\tcontinue;\n \t\t\tprocessedPositions.add(position);\n \t\t\tint amount = getItemAmount(position);\n \t\t\t*/\n \t\t\tint amount = 1;\n \t\t\tgetOwner().getClient().sendPacket(Type.U_SHOP, \"unreg\", 1, shopItem.getShopPosition().getSlot(), amount);\n \t\t\t\n \t\t\t//int[] freePosition = getOwner().getInventory().getFreeSlots(shopItem.getItem(), -1);\n \t\t\t//InventoryPosition inventoryPosition = new InventoryPosition(freePosition[1],freePosition[2],freePosition[0]);\n \t\t\t//InventoryItem inventoryItem = new InventoryItem(shopItem.getItem(),\tinventoryPosition);\n \t\t\t//getOwner().getInventory().addInventoryItem(inventoryItem);\n \t\t\tInventoryItem inventoryItem = getOwner().getInventory().storeItem(shopItem.getItem(), -1);\n \t\t\tgetOwner().getClient().sendPacket(Type.INVEN, inventoryItem, getOwner().getClient().getVersion());\n \t\t}\n \t\titemList.clear();\n \t}",
"public void removeItem(Carryable g) {\r\n for (int i=0; i<numItems; i++) {\r\n if (cart[i] == g) {\r\n cart[i] = cart[numItems - 1];\r\n numItems -= 1;\r\n return;\r\n }\r\n }\r\n }",
"public void decreaseQuantity(int amount) {\n this.currentQuantity -= amount;\n }",
"public void RemoveItemFromUcet(int index)\n {\n\n\n\n\n celk_kor -= ucty.get(index).kor;\n celk_hal -= ucty.get(index).hal;\n\n\n if (celk_hal < 0)\n {\n celk_kor -= 1;\n celk_hal = 100 + celk_hal;\n }\n\n TextView celkem = (TextView) findViewById(R.id.celkova_castka);\n celkem.setText(\"\"+celk_kor+\".\"+celk_hal+\" Kč\");\n\n\n for (int i = index; i < ucty.size(); i++)\n {\n ucty.get(i).index -= 1;\n }\n ucty.remove(index);\n mGalleryView.removeView(index);\n }",
"public void reduceQuantity(Integer numToRemove) throws OutOfStockException {\n if (numToRemove > this.quantity) {\n throw new OutOfStockException(\"There are less than \" + numToRemove + \" items in stock\");\n }\n this.quantity = this.quantity - numToRemove;\n }",
"public void remove(int index)\r\n {\r\n if(index<0 || measurementItems==null || measurementItems.size()<index) return;\r\n measurementItems.remove(index);\r\n \r\n itemsQuantity=(this.getMeasurementItems()!=null)?this.getMeasurementItems().size():0;\r\n }",
"public void removeFromInventoryWheels(int amountOfWheels, String inputColor, String inputStandard, int inputType){\n }",
"public final void consume(Player player, Collection<ItemStack> items)\n\t{\n\t\tInventoryHelper.remove(player, items);\n\t}",
"public void remove(int index)\n {\n numItems--;\n items[index] = null;\n }",
"public void removeFromInventoryPage(Index index) throws InventoryNotFoundException, InventoryNotRemovableException {\n\n try {\n Inventory item = list.get(index.getZeroBased());\n\n if (item.getEventInstances() == 0) {\n list.remove(index.getZeroBased());\n } else {\n throw new InventoryNotRemovableException();\n }\n\n } catch (IndexOutOfBoundsException e) {\n throw new InventoryNotFoundException();\n }\n }",
"public Itemset remove(int indexItemset) {\n Itemset itemset = itemsets.remove(indexItemset);\n numberOfItems -= itemset.size();\n return itemset;\n }",
"public void decreaseStock(int serialNum, int reduction){\n //loop through all Inventory\n for(int i=0; i<this.items.size(); i++){\n //check if inventoryItem has matching serialNumber with specified serialNum\n if(this.items.get(i).getSerialNum()==serialNum){\n //if serial numbers match, reduce inventory by specified amount\n this.items.get(i).removeFromQty(reduction);\n }\n }\n }",
"public void removeItem(int idx)\n\t{\n\t\titemList.remove(idx);\n\t\t\n\t}",
"public void remove(int index) {\n items.remove(index);\n }",
"public void removeItem(int id);",
"public void decreaseUnits(int amount) {\n\t\tfor (int i = 0; i < amount; i++) {\n\t\t\tunitsList.remove(unitsList.size() - 1);\n\t\t}\n\t\tunits -= amount;\n\t}",
"@Override\n\tpublic ItemStack decrStackSize(int index, int count) {\n\t\treturn null;\n\t}",
"public void removeItem(int i) {\n checkIndex(i);\n\n if (items[i] != null) {\n size--;\n }\n items[i] = null;\n }",
"@Test\r\n\tpublic void remove_items() {\r\n//Go to http://www.automationpractice.com\r\n//Mouse hover on product one\r\n//Click 'Add to Cart'\r\n//Click 'Continue shopping' button\r\n//Verify Cart has text '1 Product'\r\n//Mouse hover over 'Cart 1 product' button\r\n//Verify product listed\r\n//Now mouse hover on another product\r\n//click 'Add to cart' button\r\n//Click on Porceed to checkout\r\n//Mouse hover over 'Cart 2 product' button\r\n//Verify 2 product listed now\r\n//click 'X'button for first product\r\n//Verify 1 product deleted and other remain\r\n\r\n\t}",
"private void resetPlayer() {\r\n List<Artefact> inventory = currentPlayer.returnInventory();\r\n Artefact item;\r\n int i = inventory.size();\r\n\r\n while (i > 0) {\r\n item = currentPlayer.removeInventory(inventory.get(i - 1).getName());\r\n currentLocation.addArtefact(item);\r\n i--;\r\n }\r\n currentLocation.removePlayer(currentPlayer.getName());\r\n locationList.get(0).addPlayer(currentPlayer);\r\n currentPlayer.setHealth(3);\r\n }",
"public void dropEntireInventory(World world, BlockPos pos, int id, int metadata) {\n int x = pos.getX();\n int y = pos.getY();\n int z = pos.getZ();\n TileEntity tileEntity = world.getTileEntity(pos);\n if (tileEntity != null && tileEntity instanceof IInventory) {\n IInventory inventory = (IInventory) tileEntity;\n for (int i = 0; i < inventory.getSizeInventory(); ++i) {\n ItemStack stack = inventory.getStackInSlot(i);\n if (stack != null) {\n Random random = new Random();\n float sx = random.nextFloat() * 0.8F + 0.1F;\n float sy = random.nextFloat() * 0.8F + 0.1F;\n float sz = random.nextFloat() * 0.8F + 0.1F;\n while (stack.stackSize > 0) {\n int qty = random.nextInt(21) + 10;\n if (qty > stack.stackSize) {\n qty = stack.stackSize;\n }\n stack.stackSize -= qty;\n EntityItem eitem = new EntityItem(world, x + sx, y + sy, z + sz, new ItemStack(stack.getItem(), qty, stack.getItemDamage()));\n if (stack.hasTagCompound()) {\n eitem.getEntityItem().setTagCompound((NBTTagCompound) stack.getTagCompound().copy());\n }\n float displacement = 0.05F;\n eitem.motionX = (float) random.nextGaussian() * displacement;\n eitem.motionY = (float) random.nextGaussian() * displacement + 0.2F;\n eitem.motionZ = (float) random.nextGaussian() * displacement;\n world.spawnEntityInWorld(eitem);\n }\n }\n }\n }\n }",
"public void removeStock(int qtearajouter) {\n\t\tthis.stock -= qtearajouter;\n\t}",
"void removeTrafficVolume(int i);",
"public Inventory inventoryDelete (TheGroceryStore g, LinkedList<Inventory> deleter) throws ItemNotFoundException;",
"public void removeItem(int r, int c, boolean damage)\r\n\t{\n\t\tif (map[r][c].currentItems()!=0)\r\n\t\t{\r\n\t\t\tif (damage)\r\n\t\t\t{\r\n\t\t\t\tstolen++;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tbought++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//change number of items available. doesn't decrease if number of items is 0.\r\n\t\tmap[r][c].removeItem();\r\n\t}",
"int numberOfBlocksToRemove();",
"void unsetValueQuantity();",
"public void itemsSold() {\n quanitySnacks--;\n }",
"public void deleteItem(int index) {\n this.items.remove(index);\n }",
"protected abstract void removeItem();",
"default ItemStack removeOneItem(Predicate<ItemStack> filter) {\n for (IInventoryAdapter inventoryObject : this) {\n InventoryManipulator im = InventoryManipulator.get(inventoryObject);\n ItemStack stack = im.removeItem(filter);\n if (!InvTools.isEmpty(stack))\n return stack;\n }\n return InvTools.emptyStack();\n }",
"public void takeItem(String name, Player player)\n {\n int i=items.size()-1;\n while(i>=0){\n if(items.get(i).getName().equals(name))\n {\n player.addItem(items.get(i));\n System.out.println(\"You take the \"+items.get(i).getName()+\"!\");\n items.remove(i);\n return;\n }\n i--;\n }\n System.out.println(\"Action failed. Review your input and try again!\");\n }",
"public void popItems() {\n\t\t\n\t\tItemList.add(HPup);\n\t\tItemList.add(SHPup);\n\t\tItemList.add(DMGup);\n\t\tItemList.add(SDMGup);\n\t\tItemList.add(EVup);\n\t\tItemList.add(SEVup);\n\t\t\n\t\trandomDrops.add(HPup);\n\t\trandomDrops.add(SHPup);\n\t\trandomDrops.add(DMGup);\n\t\trandomDrops.add(SDMGup);\n\t\trandomDrops.add(EVup);\n\t\trandomDrops.add(SEVup);\n\t\t\n\t\tcombatDrops.add(SHPup);\n\t\tcombatDrops.add(SDMGup);\n\t\tcombatDrops.add(SEVup);\n\t}",
"public void removeItem(Item theItem) {\n\t\tinventory.remove(theItem);\t\n\t}",
"private void removeItemByCoordinates(int nodeX, int nodeY) {\n world.removeUnequippedInventoryItemByCoordinates(nodeX, nodeY);\n }",
"public void remove(int index){\n if (myBasket.size() == 0)\n System.out.println(\"List is empty.\");\n int i = 0 ;\n boolean isFound = false;\n Product toRemove = null;\n for (Product product: myBasket.keySet())\n {\n i++;\n if (i == index && myBasket.get(product) > 0)\n {\n isFound = true;\n toRemove = product;\n break;\n\n }\n }\n if (!isFound)\n System.out.println(\"Sorry. Invalid index!\");\n\n // now , checking how many of this product is in the basket\n\n else if (myBasket.get(toRemove) > 1){\n System.out.println(\"How many of this product do you want to give back?\");\n Scanner scanner = new Scanner(System.in);\n int num = scanner.nextInt();\n if (num < myBasket.get(toRemove)) {\n totalCost -= toRemove.getPrice() * num;\n myBasket.replace(toRemove,myBasket.get(toRemove) - num);\n for (int j = 0 ; j < num ; j++)\n inventory.updateStock(toRemove , '+');\n }\n else {\n totalCost -= toRemove.getPrice() * myBasket.get(toRemove);\n myBasket.remove(toRemove);\n for (int j = 0 ; j < myBasket.get(toRemove) ; j++)\n inventory.updateStock(toRemove,'+');\n }\n System.out.println(\"Product removed.\");\n }\n\n // there is just one of this product in basket\n\n else {\n totalCost -= toRemove.getPrice();\n myBasket.remove(toRemove);\n System.out.println(\"Product removed.\");\n inventory.updateStock(toRemove , '+');\n }\n }",
"public int quantityDropped(Random par1Random)\n {\n return 1;\n }",
"public int getItemsFromPlayer (Player player, int amount, boolean isAdmin) throws InsufficientPermissionException {\r\n\t\tif (!canDo(player, Type.ADD, isAdmin))\r\n\t\t\tthrow new InsufficientPermissionException();\r\n\t\t\r\n\t\tint removed\t= ItemStackHandler.removeFromInventory(player.getInventory(), getCompatibleItems(), amount, needsEqualNBTTag());\r\n\t\tsetAmount(getAmount()+removed);\r\n\t\treturn removed;\r\n\t}",
"@Test\n public void removing_item_from_menu_should_decrease_menu_size_by_1() throws itemNotFoundException {\n\n int initialMenuSize = restaurant.getMenu().size();\n restaurant.removeFromMenu(\"Vegetable lasagne\");\n assertEquals(initialMenuSize-1,restaurant.getMenu().size());\n }",
"public void consumeItems(Action action) {\r\n if (action.getConsumed().size() == 0) {\r\n return;\r\n }\r\n for (String str : action.getConsumed()) {\r\n currentLocation.removeArtefact(str);\r\n currentLocation.removeFurniture(str);\r\n currentLocation.removeCharacter(str);\r\n currentLocation.removePath(str);\r\n currentPlayer.removeInventory(str);\r\n // Check if consumed item is player health\r\n if (str.equals(\"health\")) {\r\n currentPlayer.setHealth(currentPlayer.getHealth() - 1);\r\n }\r\n }\r\n }",
"public static void removeByitems(long requestId) {\n\t\tgetPersistence().removeByitems(requestId);\n\t}",
"public void decreaseQuantity(int quantity) {\n\t\tif (quantity < 0) {\n\t\t\tthrow new IllegalArgumentException(\"null barcode\");\n\t\t}\n\t\ttotalNumOfItems -= quantity;\n\t}",
"private void removeEquippedItemByCoordinates(int nodeX, int nodeY) {\n world.removeEquippedInventoryItemByCoordinates(nodeX, nodeY);\n }",
"public ArrayList<Item> drop()\n {\n ArrayList<Item> drop = new ArrayList<>();\n for( Pair<Enums.ItemName, Integer> possibleDrop : dropTable)\n {\n if(ThreadLocalRandom.current().nextInt(100) < possibleDrop.getY())\n drop.add(new Item(possibleDrop.getX()));\n }\n return drop;\n }",
"private void deleteItem() {\n // Only perform the delete if this is an existing inventory item\n if (mCurrentInventoryUri != null) {\n // Call the ContentResolver to delete the inventory item at the given content URI.\n // Pass in null for the selection and selection args because the mCurrentInventoryUri\n // content URI already identifies the inventory item that we want.\n int rowsDeleted = getContentResolver().delete(mCurrentInventoryUri, null, null);\n\n // Show a toast message depending on whether or not the delete was successful.\n if (rowsDeleted == 0) {\n // If no rows were deleted, then there was an error with the delete.\n Toast.makeText(this, getString(R.string.editor_delete_inventory_failed),\n Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the delete was successful and we can display a toast.\n Toast.makeText(this, getString(R.string.editor_delete_inventory_successful),\n Toast.LENGTH_SHORT).show();\n }\n }\n\n // Close the activity\n finish();\n }",
"private void autoship(World world, EntityPlayer player, List<ItemStack> list) {\n Iterator<ItemStack> it = list.iterator();\n while (it.hasNext()) {\n ItemStack stack = it.next();\n if (BlockStorage.hasShippedItem(world, player, stack)) {\n it.remove();\n }\n }\n }",
"private static void removeItemFromCart() {\r\n\t\tString itemName = getValidItemNameInput(scanner);\r\n\t\tfor (Iterator<Map.Entry<Product, Integer>> it = cart.getCartProductsEntries().iterator(); it.hasNext();){\r\n\t\t Map.Entry<Product, Integer> item = it.next();\r\n\t\t if( item.getKey().getName().equals(itemName) ) {\r\n\t\t\t it.remove();\r\n\t\t }\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" Item removed from the cart successfully\");\r\n\t\tSystem.out.println();\r\n\t}",
"void delete_missiles() {\n // Player missiles\n for (int i = ship.missiles.size()-1; i >= 0; i --) {\n Missile missile = ship.missiles.get(i);\n if (missile.y_position <= Dimensions.LINE_Y) {\n ImageView ship_missile_image_view = ship_missile_image_views.get(i);\n game_pane.getChildren().remove(ship_missile_image_view);\n ship_missile_image_views.remove(i);\n ship.missiles.remove(missile);\n }\n }\n\n // Enemy missiles\n for (int i = Alien.missiles.size()-1; i >= 0; i --) {\n Missile missile = Alien.missiles.get(i);\n if (missile.y_position > scene_height) {\n ImageView alien_missile_image_view = alien_missile_image_views.get(i);\n game_pane.getChildren().remove(alien_missile_image_view);\n alien_missile_image_views.remove(i);\n Alien.missiles.remove(missile);\n }\n }\n }",
"public void Restock() {\n for (Ingredient ingredient : stock.keySet()) {\n stock.put(ingredient, inventoryMax);\n }\n }",
"void dropItem(Command command) {\n HashMap newInventory = inventory.getInventory();\n Iterator iterator = newInventory.entrySet().iterator();\n String seeItem;\n// int indexItem = -1;\n String nameOfItem = \"\";\n String dropFromInventory = \"debug\";\n\n while (iterator.hasNext()) {\n HashMap.Entry liste = (HashMap.Entry) iterator.next();\n String itemName = (String) liste.getKey();\n if (itemName.equalsIgnoreCase(command.getSecondWord())) {\n dropFromInventory = itemName;\n nameOfItem = itemName;\n break;\n }\n }\n if (!nameOfItem.equals(\"\")) {\n itemLocation.addItem(currentRoom, new PickableItem(nameOfItem, inventory.getItemWeight(nameOfItem), inventory.getUseable(nameOfItem)));\n inventory.removeItemInventory(nameOfItem);\n System.out.println(\"You have dropped: \" + nameOfItem);\n\n } else {\n System.out.println(\"Can't drop item that isn't in inventory \" + command.getSecondWord());\n }\n }",
"public int numberOfBlocksToRemove() {\r\n return 105;\r\n }",
"public void drop(){\r\n if(activeFish.isEmpty()) return;\r\n \r\n ArrayList<Fish> toremove = new ArrayList<Fish>();\r\n for(Fish bone : activeFish){\r\n bone.drop();\r\n\r\n if(!(bone.inBounds())){ // branch for out of bound fh\r\n toremove.add(bone);\r\n }\r\n }\r\n missedFish(toremove);\r\n\r\n update();\r\n }",
"private void reapDeadRabbits() {\n for (int i = (rabbitList.size() - 1); i >= 0; i--) {\n RabbitsGrassSimulationAgent rabbit = rabbitList.get(i);\n if (rabbit.getEnergy() <= 0) {\n space.removeRabbitAt(rabbit.getX(), rabbit.getY());\n rabbitList.remove(i);\n }\n }\n }",
"public void removeByequip_id(long equip_id);",
"@Override\n\tpublic Weapon sell(int itemNumber) {\n\t\t\n\t\t\n\t\treturn inventory.removeItem(itemNumber);\n\t}",
"public static void removeItem(String itemName)\n {\n inventory.remove(getItem(itemName));\n }",
"public void remove(int index) {\r\n\t\t//checks if the index is valid\r\n\t\tif(index>=0 && index<=size) {\r\n\t\t\tfor (int k=index;k<size;k++) {\t//shifting element\r\n\t\t\t\tlist[k]=list[k+1];\r\n\t\t\t}\r\n\t\t\tsize--;\t\t//decreases size\r\n\t\t\t//checks if the size of array is not 0 and less than 25% of the capacity of the array\r\n\t\t\tif (size!=0 && capacity/size >=4)\r\n\t\t\t\tresize(this.capacity/2);\t//decreasing size of array\r\n\t\t} else {\t//index is not valid\r\n\t\t\tSystem.out.println(\"index \"+index+\" is out or range!\");\r\n\t\t}\r\n\t}",
"public void itemDelete(int id)\n\t{\n\t\tEntityItem[] itemNew = new EntityItem[10];\n\t\t\n\t\t// Loop through the items and place them in the temporary array\n\t\tint eStart = id + 1;\n\t\tfor(int e=eStart;e<=itemCount;e+=1)\n\t\t{\n\t\t\tint n = e;\n\t\t\tif(e>id){n = e - 1;}\n\t\t\titemNew[e] = item[n];\n\t\t}\n\t\t\n\t\t// Overwrite the item array with the new data \n\t\titem = itemNew;\n\t\titemCount -= 1;\n\t}",
"public void deleteItemFromInventory(Item item) {\n\t\tinventory.deleteItem(item);\n\t}"
] | [
"0.70190567",
"0.6815913",
"0.6737243",
"0.6717097",
"0.67022294",
"0.6630958",
"0.6497851",
"0.64975876",
"0.6395727",
"0.63585985",
"0.6335413",
"0.63306504",
"0.63052803",
"0.6302141",
"0.6297901",
"0.6294064",
"0.62771094",
"0.6237509",
"0.62327635",
"0.6232153",
"0.6186422",
"0.61827874",
"0.61542845",
"0.6143592",
"0.6124332",
"0.6121376",
"0.6119832",
"0.6112505",
"0.61118937",
"0.6101544",
"0.6100496",
"0.60946286",
"0.6079201",
"0.6054432",
"0.604421",
"0.6042924",
"0.60402155",
"0.6038523",
"0.60334265",
"0.6019959",
"0.6011321",
"0.59944797",
"0.5993697",
"0.598635",
"0.59842485",
"0.597119",
"0.59697044",
"0.5965929",
"0.5953772",
"0.59427726",
"0.59314895",
"0.59300286",
"0.59003764",
"0.58967835",
"0.5896015",
"0.58822566",
"0.58811015",
"0.5874503",
"0.5871186",
"0.58582884",
"0.58470625",
"0.5826089",
"0.58256614",
"0.5824172",
"0.58190644",
"0.5815486",
"0.5809021",
"0.5805665",
"0.5800366",
"0.5800082",
"0.58000743",
"0.5791898",
"0.576587",
"0.57649",
"0.5763524",
"0.57610977",
"0.5760867",
"0.5756151",
"0.5753624",
"0.573517",
"0.5730042",
"0.57279754",
"0.57263535",
"0.57175684",
"0.57114154",
"0.5708719",
"0.5707023",
"0.57061094",
"0.5702157",
"0.5700451",
"0.570018",
"0.56932354",
"0.5689376",
"0.5689278",
"0.56650686",
"0.566325",
"0.566166",
"0.5659428",
"0.5653762",
"0.565025"
] | 0.59732074 | 45 |
adds x amount of items from inventory | protected void restockItem(int x){
this.level += x;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n void testAdding100Items() {\n Inventory inventory = new Inventory();\n int itemsToAdd = 100;\n\n assertEquals(0, inventory.getItems(\"\").size());\n\n for (int i = 0; i < itemsToAdd; i++) {\n inventory.addItem(\"XXXXXXXX\" + String.format(\"%02d\", i), \"Name\", 20.00, i);\n }\n\n assertEquals(100, inventory.getItems(\"\").size());\n }",
"public void addItemToInventory(Item ... items){\n this.inventory.addItems(items);\n }",
"public void addItem(Item item) {\r\n for (Item i : inventoryItems) {\r\n if (i.getId() == item.getId()) {\r\n i.setCount(i.getCount() + item.getCount());\r\n return;\r\n }\r\n }\r\n inventoryItems.add(item);\r\n }",
"public void setInventory(int inventory){\r\n inventoryNumber += inventory;\r\n }",
"public void addToInventory(IWeapon weapon){\n if (weaponsInventory.size() < 12) {\n this.weaponsInventory.add(weapon);\n lenInventory += 1;\n }\n }",
"public void withdrawAll() {\r\n for (int i = 0; i < container.capacity(); i++) {\r\n Item item = container.get(i);\r\n if (item == null) {\r\n continue;\r\n }\r\n int amount = owner.getInventory().getMaximumAdd(item);\r\n if (item.getCount() > amount) {\r\n item = new Item(item.getId(), amount);\r\n container.remove(item, false);\r\n owner.getInventory().add(item, false);\r\n } else {\r\n container.replace(null, i, false);\r\n owner.getInventory().add(item, false);\r\n }\r\n }\r\n container.update();\r\n owner.getInventory().update();\r\n }",
"public void addToInventory() {\r\n\t\tdo {\r\n\t\t\tint quantity = 0;\r\n\t\t\tString brand = getToken(\"Enter washer brand: \");\r\n\t\t\tString model = getToken(\"Enter washer model: \");\r\n\t\t\tWasher washer = store.searchWashers(brand + model);\r\n\t\t\tif (washer == null) {\r\n\t\t\t\tSystem.out.println(\"No such washer exists.\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tquantity = getInteger(\"Enter quantity to add: \");\r\n\t\t\tboolean result = store.addWasherToInventory(brand, model, quantity);\r\n\t\t\tif(result) {\r\n\t\t\t\tSystem.out.println(\"Added \" + quantity + \" of \" + washer);\r\n\t\t\t}else {\r\n\t\t\t\tSystem.out.println(\"Washer could not be added to inventory.\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} while (yesOrNo(\"Add more washers to the inventory?\"));\r\n\t}",
"public void addItem(Item item)\n\t{\n\t\tif(inventory.size()<=9)\n\t\t\tinventory.add(item);\n\t\telse\n\t\t\tSystem.out.println(\"Inventory is full.\");\n\t}",
"public int addItemStack(ItemStack itemStack) {\n Item item = itemStack.getItem();\n int amount = itemStack.getAmount();\n int added = 0;\n\n List<ItemStack> itemStacksToRemove = new ArrayList<>();\n for (ItemStack itemStack1 : this.ITEMS) {\n if (itemStack1.getItem() == item) {\n amount += itemStack1.getAmount();\n itemStacksToRemove.add(itemStack1);\n }\n }\n\n // clear inventory\n for (ItemStack itemStack1 : itemStacksToRemove)\n this.ITEMS.remove(itemStack1);\n\n System.out.println(String.format(\"Total amount of %s: %d\", item.getName(), amount));\n\n int stack_size = item.getMaxStack();\n int stacks = amount / stack_size;\n int last_stack = amount % stack_size;\n\n System.out.println(String.format(\"Stack size: %d, full stacks: %s, last stack: %d, inv size: %d, inv full: %d\", stack_size, stacks, last_stack, this.getSize(), this.ITEMS.size()));\n\n // add full stacks\n for (int i = 0; i < stacks; i++) {\n if (this.ITEMS.size() > this.getSize())\n break;\n\n System.out.println(\"Added full stack\");\n this.ITEMS.add(new ItemStack(item, stack_size));\n added += stack_size;\n }\n\n // add last (not full) stack\n if (last_stack != 0 && this.ITEMS.size() < this.getSize()) {\n System.out.println(\"Added partial stack\");\n this.ITEMS.add(new ItemStack(item, last_stack));\n added += last_stack;\n }\n\n for (InventoryChangedEvent listener : listeners)\n listener.onInventoryChanged(this);\n\n return added;\n }",
"private void addRoomItems(int itemsToAdd)\n {\n\n // Adds up to 3 random items to a random room .\n if (!(itemsToAdd == 0)){\n\n for(int j = 0; j < itemsToAdd; j++){\n Item chooseItem = chooseValidItem(); \n Room chooseRoom = rooms.get(random.nextInt(rooms.size()));\n\n chooseRoom.getInventory().getItems().add(chooseItem);\n System.out.println(chooseRoom.getName()+\": \"+chooseItem.getName());\n\n }\n }\n }",
"public int getAddItems(int totalCollected, int totalItemInGame);",
"public int addItem(String name, int value) {\n\t\tfor (int i = 0; i < inventoryslot.length; i++) {\n\t\t\tif (inventoryslot[i].getItemname()==name) {\n\t\t\t\ttempstate=inventoryslot[i].changevalue(value);\n\t\t\t\tif(tempstate>0)return tempstate;/**Item over stacksize */\n\t\t\t\telse if(tempstate<0)return tempstate;/** Item empty*/\n\t\t\t\treturn tempstate;/** item added inventory */\n\t\t\t}\t\t\t\t\n\t\t}\n\t\treturn -1;/** item does not exists in inventory */\n\t}",
"public void addItem(Item newItem) {\n for (Item i : inventory) {\n if (newItem.getClass().equals(i.getClass())) {\n i.setQuantity(i.getQuantity() + newItem.getQuantity());\n return;\n }\n }\n inventory.add(newItem);\n }",
"public void addItem(Item itemToAdd){\n\t\tif(!isFull()){\n\t\t\tint index = findFreeSlot();\n\t\t\tinventoryItems[index] = itemToAdd;\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"Inventory full.\");\n\t\t}\n\t\t\n\t}",
"public void addItemQty(int itemQty) {\n this.itemQty += itemQty;\n }",
"public void addInventory(String key, Integer value) {\n int currentValue = inventoryMap.getOrDefault(key, 0);\n inventoryMap.put(key, currentValue + value);\n }",
"public void addProduct(Product item){\n inventory.add(item);\n }",
"public void addFuel(int quantity) throws Exception;",
"public void rollItems() {\n Integer dRoll = dCalc.rollPercent();\n Integer itemGroup = dCalc.getItemGrouping(dRoll);\n Integer numItems = 0;\n if (dCalc.getPrefs().isNoRepeats()) {\n numItems = (int) (dCalc.getNumItems(dRoll) * dCalc\n .getTreasureMultiplier()) + trove.size();\n } else {\n numItems = (int) (dCalc.getNumItems(dRoll) * dCalc\n .getTreasureMultiplier()) + hoard.size();\n }\n\n // If you aren't rolling mundane items, tell the user how many\n if ((itemGroup == 1) && !dCalc.getPrefs().isRollMundane()) {\n LootOutListItem mundanes = new LootOutListItem();\n mundanes.setQuantity(dCalc.getNumItems(dRoll));\n mundanes.setName(\"Mundane Items\");\n addItem(mundanes);\n } else {\n\n // Roll each Item, then add to the ArrayList.\n while ((hoard.size() < numItems) && (trove.size() < numItems)) {\n LootOutListItem item = new LootOutListItem(\n this.dCalc.rollItem(itemGroup));\n\n addItem(item);\n\n }\n }\n }",
"public void collect(int amount){\n this.collectedItems += amount;\n }",
"public void addItem(String i) {\n\t\tItem item = Item.getItem(ItemList, i);\n\t Inventory.add(item);\n\t inventoryList.getItems().add(i);\n\n\t}",
"public InventoryItem(){\r\n this.itemName = \"TBD\";\r\n this.sku = 0;\r\n this.price = 0.0;\r\n this.quantity = 0;\r\n nItems++;\r\n }",
"@Override\r\n public boolean add(Item item){\r\n if(item.stackable&&contains(item)){\r\n stream().filter(i -> i.name.endsWith(item.name)).forEach(i -> {\r\n i.quantity += item.quantity;\r\n });\r\n }else if(capacity<=size()) return false;\r\n else super.add(item);\r\n return true;\r\n }",
"public int addItemStacks(ItemStack... itemStacks) {\n int added = 0;\n // for all itemstacks to be added in the inventory\n for (ItemStack itemStack : itemStacks)\n added += this.addItemStack(itemStack);\n\n return added;\n }",
"public void addItem(Product p, int qty){\n //store info as an InventoryItem and add to items array\n this.items.add(new InventoryItem(p, qty));\n }",
"private void updateInventory(List<Item> items) {\r\n for(Item item : items) {\r\n inventory.put(item, STARTING_INVENTORY);\r\n inventorySold.put(item, 0);\r\n itemLocations.put(item.getSlot(), item);\r\n }\r\n }",
"public int addItemsToPlayer (Player player, int amount, boolean isAdmin) throws InsufficientPermissionException {\r\n\t\tif (!canDo(player, Type.GET, isAdmin))\r\n\t\t\tthrow new InsufficientPermissionException();\r\n\t\t\r\n\t\tif (amount > getAmount())\r\n\t\t\tamount = getAmount();\r\n\t\t\r\n\t\tint added\t= ItemStackHandler.addToInventory(player.getInventory(), getItemStack(), amount);\r\n\t\tsetAmount(getAmount()-added);\r\n\t\treturn added;\r\n\t}",
"public void addItem(Item item, int x, int y) {\n\t\tInventory items = getItemsAt(x, y);\n\t\titems.add(item);\n\t}",
"@Override\n\tpublic int getSizeInventory() {\n\t\treturn inputInventory.length + outputInventory.length ;\n\t}",
"@Test\n\tpublic void testAddInventory() throws InventoryException {\n\t\tcoffeeMaker.addInventory(\"4\",\"7\",\"0\",\"9\");\n\t}",
"private void loadStartingInventory(){\n this.shelfList = floor.getShelf();\n Iterator<String> i = items.iterator();\n for (Shelf s : shelfList){\n while (s.hasFreeSpace()){\n s.addItem(i.next(), 1);\n }\n }\n }",
"public void increaseQuantity(int amount) {\n this.currentQuantity += amount;\n }",
"public void add(int index){\n int i = 0;\n boolean isFound = false;\n for (Product product:inventory.getProducts().keySet())\n {\n i++;\n if (i == index && inventory.getProducts().get(product) > 0)\n {\n if (myBasket.containsKey(product))\n {\n System.out.println(\"One more of this product added.\");\n myBasket.replace(product , myBasket.get(product) + 1);\n }\n else {\n System.out.println(\"Product added to your basket.\");\n myBasket.put(product , 1);\n }\n totalCost = totalCost + product.getPrice();\n isFound = true;\n inventory.updateStock(product , '-');\n }\n }\n if (!isFound)\n System.out.println(\"Sorry. Invalid index or not enough product in stock!\");\n }",
"public void carry(Item item)\n {\n\n // Check if item to be added doesn't go over carry limit.\n if (!((getPerson(PLAYER).getWeight() + item.getWeight()) > getPerson(PLAYER).getCarryLimit())){\n getPerson(PLAYER).getInventory().getItems().add(item); \n\n removeRoomItem(item);\n System.out.println();\n System.out.println(item.getName() + \" has been added to your bag.\");\n System.out.println(\"You are carrying \" + getPerson(PLAYER).getWeight()+ \"kg.\");\n }\n else {\n System.out.println(\"Your bag is too heavy to add more items.\");\n }\n\n }",
"private void addToInventory(Item item) {\n inventory.put(item.getName(), item);\n }",
"public void addIngredient(Ingredient ingredient) {\n stock.put(ingredient, inventoryMax);\n }",
"public void addQuantity(int quantity) {\n\t\tif (quantity < 0) {\n\t\t\tthrow new IllegalArgumentException(\"null barcode\");\n\t\t}\n\t\ttotalNumOfItems += quantity;\n\t}",
"public void addItemInventory(Item item){\r\n playerItem.add(item);\r\n System.out.println(item.getDescription() + \" was taken \");\r\n }",
"void addElementToInventory(String elementName);",
"public void takeItemsFromChest() {\r\n currentRoom = player.getCurrentRoom();\r\n for (int i = 0; i < currentRoom.getChest().size(); i++) {\r\n player.addToInventory(currentRoom.getChest().get(i));\r\n currentRoom.getChest().remove(i);\r\n }\r\n\r\n }",
"public void addIngredientQuantity(Ingredient ingredient, Integer addedValue){\n\t\tbeverageInventoryMap.put(ingredient, getInventoryForAIngredient(ingredient) + addedValue);\n\t}",
"public void moveTo(Inventory inventory) {\n for (ItemStack itemStack : this.getItemStacks()) {\n int added = inventory.addItemStack(itemStack);\n this.ITEMS.get(this.getItemStack(itemStack)).addAmount(-added);\n }\n }",
"public void addToCoins(int more) {\r\n\t\tint coins = more;\r\n\t\tif (goods.containsKey(Resource.COIN)) {\r\n\t\t\tcoins = goods.get(Resource.COIN);\r\n\t\t\tcoins += more;\r\n\t\t}\r\n\t\tgoods.put(Resource.COIN, coins);\r\n\t}",
"boolean addSteam(ItemStack me, int amount, EntityPlayer player);",
"public void add() {\n\t\tcart.add(item.createCopy());\n\t}",
"public void addItemInventory(Item item){\n playerItem.add(item);\n System.out.println(item.getDescription() + \" was taken \");\n System.out.println(item.getDescription() + \" was removed from the room\"); // add extra information to inform user that the item has been taken\n }",
"public void addHealth(int amt) {\n currentHealth = currentHealth + amt;\n }",
"public int addItem(Item i);",
"public Inventory<T> add(final Inventory<T> inventory) {\n if (inventory == null) {\n return this;\n }\n final HashMap<T, Integer> freshMap = new HashMap<>();\n for (T t : enums) {\n freshMap.put(t, inventory.quantity(t) + items.get(t));\n }\n return new Inventory<T>(enums, Collections.unmodifiableMap(freshMap));\n }",
"Items(double cost){\n\tthis.cost=cost;\n\titemId++;\n\tcurrentID=itemId;\n}",
"public void addItem(final Item item) {\n\t\tnumberOfItems++;\n\t}",
"public int addItem(Itemset i);",
"public void increaseStock(int ID, int amt) {\r\n\t\tinventory.put(ID, (inventory.get(ID)+amt));\r\n\t}",
"public void buy() throws CannotAffordException {\r\n\t\tGame game = Game.getInstance();\r\n\t\tgame.decreaseBudget(price);\r\n\t\tgame.getInventory().add(id);\r\n\t}",
"@SuppressWarnings(\"deprecation\")\r\n\t@EventHandler\r\n\tpublic void inventoryClickEvent(InventoryClickEvent e) {\r\n\t\tEntity applier = e.getWhoClicked();\r\n\t\tif (!e.isCancelled()) {\r\n\t\t\tif (applier instanceof Player) {\r\n\t\t\t\tPlayer papplier = (Player) applier;\r\n\t\t\t\t// PlayerInventory pinventory = papplier.getInventory();\r\n\t\t\t\t// inven.put(papplier, pinventory);\r\n\t\t\t\tItemStack item = e.getCurrentItem();\r\n\t\t\t\tItemStack transmog = e.getCursor();\r\n\t\t\t\tString tname = \"\";\r\n\t\t\t\tif (item != null) {\r\n\t\t\t\t\tItemMeta itemMeta = item.getItemMeta();\r\n\t\t\t\t\tArrayList<String> lore1 = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<String> lore2 = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<String> lore3 = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<String> lore4 = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<String> lore5 = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<String> lore6 = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<String> lore7 = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<String> totallore = new ArrayList<String>();\r\n\t\t\t\t\tif (item.getType() != Material.AIR) {\r\n\t\t\t\t\t\t// papplier.sendMessage(\"1\");\r\n\t\t\t\t\t\tif (transmog != null) {\r\n\t\t\t\t\t\t\t// papplier.sendMessage(\"2\");\r\n\t\t\t\t\t\t\tif (item.getType().name().endsWith(\"SWORD\") || item.getType().name().endsWith(\"AXE\")\r\n\t\t\t\t\t\t\t\t\t|| item.getType().name().endsWith(\"HELMET\")\r\n\t\t\t\t\t\t\t\t\t|| item.getType().name().endsWith(\"SHOVEL\")\r\n\t\t\t\t\t\t\t\t\t|| item.getType().name().endsWith(\"CHESTPLATE\")\r\n\t\t\t\t\t\t\t\t\t|| item.getType().name().endsWith(\"LEGGINGS\")\r\n\t\t\t\t\t\t\t\t\t|| item.getType().name().endsWith(\"BOOTS\") || item.getType().name().endsWith(\"BOW\")\r\n\t\t\t\t\t\t\t\t\t|| item.getType().name().endsWith(\"PICKAXE\")\r\n\t\t\t\t\t\t\t\t\t|| item.getType().name().endsWith(\"HOE\")) {\r\n\t\t\t\t\t\t\t\t// papplier.sendMessage(\"3\");\r\n\t\t\t\t\t\t\t\tif (item.hasItemMeta()) {\r\n\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"4\");\r\n\t\t\t\t\t\t\t\t\tif (item.getItemMeta().hasLore()) {\r\n\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"5\");\r\n\t\t\t\t\t\t\t\t\t\tif (item.getItemMeta().hasDisplayName()) {\r\n\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"6\");\r\n\t\t\t\t\t\t\t\t\t\t\tif (Methods.transmogged(item) == true) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"7\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(Api.transint(item)\r\n\t\t\t\t\t\t\t\t\t\t\t\t// + \"\");\r\n\t\t\t\t\t\t\t\t\t\t\t\tdname.put(item, item.getItemMeta().getDisplayName());\r\n\t\t\t\t\t\t\t\t\t\t\t\tI.put(papplier, Methods.transint(item));\r\n\t\t\t\t\t\t\t\t\t\t\t\ttransmogged.put(item, true);\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\tif (Methods.transmogged(item) == false) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"8\");\r\n\t\t\t\t\t\t\t\t\t\t\t\ttransmogged.put(item, false);\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tif (!item.getItemMeta().hasDisplayName()) {\r\n\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"9\");\r\n\t\t\t\t\t\t\t\t\t\t\ttransmogged.put(item, false);\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tif (transmogged.get(item) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"10\");\r\n\t\t\t\t\t\t\t\t\t\t\tif (transmogged.get(item) == false) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"11\");\r\n\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.hasItemMeta()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"12\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.getItemMeta().hasLore()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"13\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.getItemMeta().hasDisplayName()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.getItemMeta().getDisplayName()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(Methods.color(\"&e&lTransmog\"))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"14\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (String tlore : transmog.getItemMeta().getLore()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"15\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (tlore.contains(Methods.color(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"&e&oPlace scroll on item to apply.\"))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"16\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (e.getClickedInventory() instanceof PlayerInventory) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"17\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (CE.getItemEnchantments(item)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.size() > 0) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMaterial material = item.getType();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tItemStack titem = new ItemStack(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmaterial, 1);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tItemMeta titemMeta = titem\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getItemMeta();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (item.getEnchantments() == null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchanted.put(titem, false);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (item.getEnchantments() != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchants = item.getEnchantments();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tArrayList<CEnchantments> enchantes = CE\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getEnchantments();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tArrayList<String> enchanters = new ArrayList<String>();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (CEnchantments encs : enchantes) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchanters.add(Methods.removeColor(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tencs.getCustomName()));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (String ench : item.getItemMeta()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getLore()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"29\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (enchanters\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(Methods.removePower(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMethods.removeColor(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tench)))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"31\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (CEnchantments enchant : CE\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getEnchantments()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"19\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (ench.contains(enchant\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getCustomName())) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tString tier = CE\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getEnchantmentCategory(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchant);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (tier.contains(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"T1\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore1.add(0, Methods\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.color(ench));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else if (tier\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"T2\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore2.add(0, Methods\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.color(ench));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else if (tier\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"T3\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore3.add(0, Methods\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.color(ench));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else if (tier\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"T4\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore4.add(0, Methods\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.color(ench));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else if (tier\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"T5\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore5.add(0, Methods\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.color(ench));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else if (tier\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"T6\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore6.add(0, Methods\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.color(ench));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore7.add(ench);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore7);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore6);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore5);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore4);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore3);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore2);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore1);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tint enchNumber = CE\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getItemEnchantments(item)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.size();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (itemMeta.hasDisplayName()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttname = item.getItemMeta()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getDisplayName()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \" &d&l[&b&l&n\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ enchNumber + \"&d&l]\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (!itemMeta.hasDisplayName()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttname = \"&a\" + item.getType().name()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \" &d&l[&b&l&n\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ enchNumber + \"&d&l]\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.setCancelled(true);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitemMeta.setLore(totallore);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitemMeta.setDisplayName(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMethods.color(tname));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitem.setItemMeta(titemMeta);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitem.addUnsafeEnchantments(enchants);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (enchanted.get(titem) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (enchanted.get(titem) == false) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMethods.addGlow(titem);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.setCursor(null);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getInventory()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.removeItem(item);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getInventory().addItem(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew ItemStack[] { titem });\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (int i2 = 1; i2 <= 10; ++i2) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getWorld().playEffect(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getEyeLocation(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tEffect.SPELL, 1);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getWorld().playSound(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getLocation(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSound.LEVEL_UP, 1.0f, 1.0f);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchants = null;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmogged.get(item) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttransmogged.remove(item);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (dname.get(item) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdname.remove(item);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (I.get(item) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tI.remove(item);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.getWhoClicked().sendMessage(Methods.color(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"&6Swarm&eEnchants&f >> &cYou may only use Transmog scrolls in your own inventory!\"));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\tif (transmogged.get(item) == true) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"21\");\r\n\t\t\t\t\t\t\t\t\t\t\t\tString dname1 = dname.get(item).replace(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tMethods.color(\"&d&l[&b&l&n\" + I.get(papplier) + \"&d&l]\"), \"\");\r\n\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.hasItemMeta()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"22\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.getItemMeta().hasLore()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.getItemMeta().hasDisplayName()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"23\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.getItemMeta().getDisplayName()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(Methods.color(\"&e&lTransmog\"))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"24\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (String tlore : transmog.getItemMeta().getLore()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"25\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (tlore.contains(Methods.color(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"&e&oPlace scroll on item to apply.\"))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"26\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (e.getClickedInventory() instanceof PlayerInventory) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"27\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (CE.getItemEnchantments(item)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.size() > 0) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"28\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMaterial material = item.getType();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tItemStack titem = new ItemStack(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmaterial, 1);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tItemMeta titemMeta = titem\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getItemMeta();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (item.getEnchantments() == null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMethods.addGlow(titem);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (item.getEnchantments() != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchants = item.getEnchantments();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tArrayList<CEnchantments> enchantes = CE\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getEnchantments();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tArrayList<String> enchanters = new ArrayList<String>();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (CEnchantments encs : enchantes) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchanters.add(Methods.removeColor(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tencs.getCustomName()));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (String ench : item.getItemMeta()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getLore()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"29\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (enchanters\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(Methods.removePower(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMethods.removeColor(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tench)))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"31\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (CEnchantments enchant : CE\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getEnchantments()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"19\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (ench.contains(enchant\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getCustomName())) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tString tier = CE\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getEnchantmentCategory(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchant);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (tier.contains(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"T1\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore1.add(0, Methods\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.color(ench));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else if (tier\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"T2\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore2.add(0, Methods\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.color(ench));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else if (tier\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"T3\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore3.add(0, Methods\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.color(ench));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else if (tier\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"T4\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore4.add(0, Methods\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.color(ench));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else if (tier\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"T5\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore5.add(0, Methods\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.color(ench));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else if (tier\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"T6\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore6.add(0, Methods\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.color(ench));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore7.add(ench);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore7);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore6);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore5);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore4);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore3);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore2);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore1);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tint enchNumber = CE\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getItemEnchantments(item)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.size();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (itemMeta.hasDisplayName()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttname = dname1 + \" &d&l[&b&l&n\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ enchNumber + \"&d&l]\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.setCancelled(true);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitemMeta.setLore(totallore);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitemMeta.setDisplayName(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMethods.color(tname));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitem.setItemMeta(titemMeta);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitem.addUnsafeEnchantments(enchants);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.setCursor(null);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getInventory()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.removeItem(item);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getInventory().addItem(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew ItemStack[] { titem });\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (int i2 = 1; i2 <= 10; ++i2) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getWorld().playEffect(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getEyeLocation(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tEffect.SPELL, 1);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getWorld().playSound(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getLocation(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSound.LEVEL_UP, 1.0f, 1.0f);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchants = null;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmogged.get(item) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttransmogged.remove(item);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (dname.get(item) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdname.remove(item);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (I.get(item) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tI.remove(item);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.getWhoClicked().sendMessage(Methods.color(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"&6Swarm&eEnchants&f >> &cYou may only use Transmog scrolls in your own inventory!\"));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void addItems(int numberOfItems, double pricePerItem) {\n\n\t\ttotalAmountItems = numberOfItems + totalAmountItems;\n\n\t\ttotalCostCart = (numberOfItems * pricePerItem) + totalCostCart;\n\n\t\tavgPricePerItem = totalCostCart / totalAmountItems;\n\n\t}",
"@Test\r\n public void testAddInventory() throws InventoryException {\r\n coffeeMaker.addInventory(\"4\", \"7\", \"0\", \"9\");\r\n coffeeMaker.addInventory(\"0\", \"0\", \"0\", \"0\");\r\n coffeeMaker.addInventory(\"3\", \"6\", \"9\", \"12\"); // this should not fail\r\n coffeeMaker.addInventory(\"10\", \"10\", \"10\", \"10\");// this should not fail\r\n }",
"public Inventory<T> add(final T item) {\n if (item == null) {\n return this;\n }\n final HashMap<T, Integer> freshMap = new HashMap<>(items);\n freshMap.put(item, items.get(item) + 1);\n return new Inventory<T>(enums, Collections.unmodifiableMap(freshMap));\n }",
"public void addItemtoInventoryList(String item) {\r\n InventoryList.add(item);\r\n }",
"public void increment() {\n items++;\n }",
"private void addAtIndex(int index, FoodItem item) {\n // store the \"pushed\" forward item\n FoodItem toMoveNext = this._stock[index];\n // and set the new item in index\n this._stock[index] = new FoodItem(item);\n\n // \"push\" forward in the array each item, until no more items to push.\n for (int i = index+1; i < _noOfItems+1; i++) {\n FoodItem tempToMoveNext = _stock[i];\n _stock[i] = toMoveNext;\n toMoveNext = tempToMoveNext;\n }\n\n // we added a new item for _stock, so now increase the noOfItem:\n this._noOfItems++;\n }",
"public int addItem(Item item, int n) {\r\n if(isContradicting(item)){\r\n System.out.println(CONTRADICTING_MSG1+ item.getType()+CONTRADICTING_MSG2);\r\n return CONTRADICTING;\r\n }\r\n if (super.addItem(item, n) == ZERO) {\r\n if (unitMap.containsKey(item.getType())) {\r\n if ((n+ unitMap.get(item.getType()))* item.getVolume() > capacity * FIFTY_PERCENT) {\r\n return checkNewN(item,n, true);\r\n }\r\n //if less then 50%\r\n else {\r\n unitMap.put(item.getType(),unitMap.get(item.getType()) + n);\r\n availableCapacity -= item.getVolume() * n;\r\n return ZERO;\r\n }\r\n }\r\n //item not in map:\r\n else{\r\n if ((item.getVolume() * n) > capacity * 0.5){\r\n return checkNewN(item,n, false);\r\n }\r\n //if less then 50\r\n else {\r\n unitMap.put(item.getType(), n);\r\n availableCapacity -= item.getVolume() * n;\r\n return ZERO;\r\n }\r\n }\r\n }\r\n //no place in locker:\r\n else return NO_ITEMS_ADDED;\r\n }",
"@Override\n public void onReceiveItem(InventoryItem itemReceived) {\n inventory.add(itemReceived);\n }",
"@Override\r\n\t@SuppressWarnings(\"deprecation\")\r\n\tpublic void raiseEvent(Event e) {\r\n\t\tPlayer p = ((PlayerInteractEvent) e).getPlayer();\r\n\t\tPlayerStats stats = plugin.getStats(p);\r\n\t\tif (stats.subtractmoney(cost)) {\r\n\t\t\tif (!items.isEmpty()) {\r\n\t\t\t\tLinkedList<ItemStack> givenItems = new LinkedList<ItemStack>();\r\n\t\t\t\tfor (ItemStack item : items.getItemStacks()) {\r\n\t\t\t\t\tgivenItems.add(item);\r\n\t\t\t\t\tHashMap<Integer, ItemStack> failed = p.getInventory().addItem(item);\r\n\r\n\t\t\t\t\tif (failed != null && failed.size() > 0) {\r\n\t\t\t\t\t\t// the inventory may be full\r\n\t\t\t\t\t\tTribu.messagePlayer(p, (plugin.getLocale(\"Message.UnableToGiveYouThatItem\")),ChatColor.RED);\r\n\t\t\t\t\t\tstats.addMoney(cost);\r\n\t\t\t\t\t\tfor (ItemStack i : givenItems)\r\n\t\t\t\t\t\t\tp.getInventory().remove(i);\r\n\t\t\t\t\t\tgivenItems = null;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tp.updateInventory();\r\n\t\t\t\t// Alright\r\n\t\t\t\tTribu.messagePlayer(p,String.format(plugin.getLocale(\"Message.PurchaseSuccessfulMoney\"), String.valueOf(stats.getMoney())),ChatColor.GREEN);\r\n\t\t\t} else {\r\n\t\t\t\tTribu.messagePlayer(p,plugin.getLocale(\"Message.UnknownItem\"),ChatColor.RED);\r\n\t\t\t\tstats.addMoney(cost);\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\tTribu.messagePlayer(p,plugin.getLocale(\"Message.YouDontHaveEnoughMoney\"),ChatColor.RED);\r\n\t\t}\r\n\r\n\t}",
"@Test(expected = InsufficientStockException.class)\n\tpublic void testInventoryCheckOnAddingItemsToShoppingCart() throws InsufficientStockException {\n\t\tShoppingCartAggregate shoppingCartAggregate = storeFrontService.getStoreFront()\n\t\t\t\t.getShoppingCounter(SHOPPING_COUNTER_NAME).get().startShoppingCart(CUSTOMER_NAME);\n\n\t\tBigDecimal orderQuantity = TestProductInventory.iphoneInventory.getAvailableStock().add(new BigDecimal(1));\n\t\tshoppingCartAggregate.addToCart(TestProduct.phone.getProductId(), orderQuantity);\n\n\t}",
"public void add(int x)\n {\n int arrayLength = list.length; // get size of array\n if (length == arrayLength)\n {\n list = Arrays.copyOf(list, 100 + list.length);\n list[length] = x;\n length++;\n\n } else\n {\n list[length] = x;\n length++;\n }\n }",
"public void addItem(Item item){\r\n items.add(item);\r\n total = items.getTotal();\r\n }",
"@Override\n public void run() {\n int slotsUsed = 0;\n int potentialBananas = 0;\n RSItem[] items = Inventory.getAll();\n for (RSItem item : items) {\n // If this isn't a bone count it\n if (item.getID() < 6904 || item.getID() > 6907) {\n slotsUsed++;\n }\n else {\n // Item id bone amount\n // 6904 1\n // 6905 2\n // 6906 3\n // 6907 4\n potentialBananas += 1 + item.getID() - 6904;\n }\n }\n \n int slotsAvailable = 28 - slotsUsed;\n\n RSItem[] food = Inventory.find(1963);\n\n // If have bananas/peaches, deposit them, else collect bones\n if (food.length > 0) {\n // Heal and then deposit\n float eatHealth = m_settings.m_eatHealth * Skills.getActualLevel(SKILLS.HITPOINTS);\n float eatTo = m_settings.m_eatTo * Skills.getActualLevel(SKILLS.HITPOINTS);\n \n if (food.length > 0 && Skills.getCurrentLevel(SKILLS.HITPOINTS) < eatHealth) {\n // Eat\n while (food.length > 0 && Skills.getCurrentLevel(SKILLS.HITPOINTS) < eatTo) {\n food[0].click(\"Eat\");\n m_script.sleep(300, 600);\n food = Inventory.find(1963);\n }\n }\n else {\n // Deposit\n RSObject[] objs = Objects.findNearest(50, \"Food chute\");\n if (objs.length > 0) {\n while (!objs[0].isOnScreen()) {\n Walking.blindWalkTo(objs[0]);\n m_script.sleep(250);\n }\n objs[0].click(\"Deposit\");\n m_script.sleep(1200);\n }\n }\n }\n else {\n // If we have more than a full load of bananas worth of bones, cast bones to peaches\n if (potentialBananas >= slotsAvailable) {\n // Cast bones to peaches\n Magic.selectSpell(\"Bones to Bananas\");\n }\n else {\n // Collect bananas\n RSObject[] bonePiles = Objects.findNearest(10725, 10726, 10727, 10728);\n if (bonePiles.length > 0) {\n while (!bonePiles[0].isOnScreen()) {\n Walking.blindWalkTo(bonePiles[0]);\n m_script.sleep(250);\n }\n bonePiles[0].click(\"Grab\");\n m_script.sleep(150);\n }\n }\n }\n }",
"@Test(expected = InventoryException.class)\n\tpublic void testAddSugarPositiveInteger() throws InventoryException {\n\t\tcoffeeMaker.addInventory(\"0\", \"0\", \"15\", \"0\");\n\t}",
"public void stock(int number) {\r\n quantity += number;\r\n }",
"public void addNewItems(int n){\n\t\tint newindex = -1;\n\t\tfor (int i=0; i<5; ++i)\n\t\t\tfor (int index : indexSets.get(i).all())\n\t\t\t\tnewindex = Math.max(newindex, index);\n\t\tnewindex++;\n\t\tint added = 0;\n\t\tDate old = new Date(0);\n\t\twhile (newindex < AllCards.length() && (added < n || n == 0)){\n\t\t\t// Examine card here to decide if you want it\n\t\t\tCard c = AllCards.getCard(newindex);\n\t\t\tif (c.getEnglish().charAt(0) != '*'){\n\t\t\t\tindexSets.get(0).add(newindex);\n\t\t\t\ttimestamps.put(newindex, old);\n\t\t\t\tadded++;\n\t\t\t}\t\t\n\t\t\tnewindex++;\t\t\t\n\t\t}\n\t}",
"public void increaseVictoriesBy(final int amount) {\n victories += amount;\n }",
"public void softAddItem(ItemStack item, Player player){\n\t\tHashMap<Integer,ItemStack> excess = player.getInventory().addItem(item);\n\t\tfor( Map.Entry<Integer, ItemStack> me : excess.entrySet() ){\n\t\t\tplayer.getWorld().dropItem(player.getLocation(), me.getValue() );\n\t\t}\n\t}",
"public void buyItem(Player player, int idz) {\r\n\t\ttry{\r\n\t\tItemDefinitions def = ItemDefinitions.getItemDefinitions(idz);\r\n\t\tif (def == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif(!canExchange(idz) || EconomyPrices.getPrice(def.id) <= 5) {\r\n\t\t\r\n\t\t\tplayer.sendMessage(name(idz) + \" are not exchangeable~ or has not been added\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tsendPriceConfigs(player, idz);\r\n\t\tset(player, idz, EconomyPrices.getPrice(def.id), 1);\r\n\r\n\t\t}catch (Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public void addRandomItem(double x, double y) {\r\n\r\n\t\tint choice = random.nextInt(3);\r\n\r\n\t\tString weaponchoices = Resources.getString(\"weaponchoices\");\r\n\t\tString delim = Resources.getString(\"delim\");\r\n\r\n\t\tString[] options = weaponchoices.split(delim);\r\n\t\tString option = options[choice];\r\n\r\n\t\tBufferedImage itemimage = Resources.getImage(option);\r\n\t\tSpriteGroup items = playField.getGroup(\"Items\");\r\n\t\tint healthOption = Resources.getInt(\"healthOption\");\r\n\r\n\t\tif (choice == healthOption) {\r\n\t\t\tgetHealthItem(x, y, option, itemimage, items);\r\n\t\t} else {\r\n\t\t\tgetWeaponItem(x, y, option, itemimage, items);\r\n\t\t}\r\n\r\n\t}",
"public void addItem(Carryable g) {\r\n if (numItems < MAX_CART_ITEMS)\r\n cart[numItems++] = g;\r\n }",
"@Override\r\n\tpublic void AddItem(int n) {\n\t\tSystem.out.println(\"ADDED:\" + n);\r\n\r\n\t}",
"public int getInventorySize(){\n return inventory.size();\n }",
"public void buyCargoUpgrades()\n {\n if(play_state.getMoney() >= cargo_upgrade_cost) {\n play_state.setMoney(play_state.getMoney() - cargo_upgrade_cost);\n cargo_upgrade_cost += 100;\n play_state.getDriller().addCapacity(5);\n }\n }",
"private void updateItemQuantityAndTotal(Item item){\r\n\t\tItem oldItem = items.get(item.getItemIdentifier());\r\n\t\toldItem.increaseQuantity(new Amount(1));\r\n\t\titems.put(oldItem.getItemIdentifier(), oldItem);\r\n\t\ttotal.updateTotal(item);\r\n\t}",
"public void addItems() {\r\n\t\tproductSet.add(new FoodItems(1000, \"maggi\", 12.0, 100, new Date(), new Date(), \"yes\"));\r\n\t\tproductSet.add(new FoodItems(1001, \"Pulses\", 55.0, 50, new Date(), new Date(), \"yes\"));\r\n\t\tproductSet.add(new FoodItems(1004, \"Meat\", 101.53, 5, new Date(), new Date(), \"no\"));\r\n\t\tproductSet.add(new FoodItems(1006, \"Jelly\", 30.0, 73, new Date(), new Date(), \"no\"));\r\n\t\t\r\n\t\tproductSet.add(new Apparels(1005, \"t-shirt\", 1000.0, 10, \"small\", \"cotton\"));\r\n\t\tproductSet.add(new Apparels(1002, \"sweater\", 2000.0, 5,\"medium\", \"woolen\"));\r\n\t\tproductSet.add(new Apparels(1003, \"cardigan\", 1001.53,22, \"large\", \"cotton\"));\r\n\t\tproductSet.add(new Apparels(1007, \"shirt\", 500.99, 45,\"large\",\"woolen\"));\r\n\t\t\r\n\t\tproductSet.add(new Electronics(1010, \"tv\", 100000.0, 13, 10));\r\n\t\tproductSet.add(new Electronics(1012, \"mobile\", 20000.0, 20,12));\r\n\t\tproductSet.add(new Electronics(1013, \"watch\", 1101.53,50, 5));\r\n\t\tproductSet.add(new Electronics(1009, \"headphones\", 300.0, 60,2));\r\n\t\t\r\n\t}",
"void addItem (Item toAdd){\n\t\t\tthis.items.add(toAdd);}",
"@Test(expected = InventoryException.class)\n\tpublic void testAddSugarNotPositiveInteger() throws InventoryException {\n\t\tcoffeeMaker.addInventory(\"0\", \"0\", \"-15\", \"0\");\n\t}",
"@Test(expected = InventoryException.class)\n\tpublic void testAddSugarNotInteger() throws InventoryException {\n\t\tcoffeeMaker.addInventory(\"0\", \"0\", \"abcd\", \"0\");\n\t}",
"public int getSizeInventory()\n {\n return this.slotsCount;\n }",
"public void addToX(double amount) {\n x += amount;\n }",
"private void buy() {\n if (asset >= S_I.getPirce()) {\n Item item = S_I.buy();\n asset -= item.getPrice();\n S_I.setAsset(asset);\n } else {\n System.out.println(\"cannot afford\");\n }\n }",
"public void addFuel(double fuelToAdd){\n\n fuelRemaining = fuelRemaining + fuelToAdd;\n }",
"public int getSizeInventory()\n {\n return waterjetStacks.length;\n }",
"void addToAmount(double amount) {\n this.currentAmount += amount;\n }",
"private void addItemStack(Item itemStack) {\n\t\tint findStackable = findStackableItem(itemStack);\r\n\t\tif(findStackable!=-1){\r\n\t\t\tItem heldStack=tileItems.getItem(findStackable);\r\n\t\t\twhile(!heldStack.stackFull()&&\t//as long as the current stack isn't full and the stack we're picking up isn't empty\r\n\t\t\t\t!itemStack.stackEmpty()){\r\n\t\t\t\theldStack.incrementStack();\r\n\t\t\t\titemStack.decrementStack(tileItems);\r\n\t\t\t\tif(itemStack.stackEmpty())\t//will this cause an error since the item is removed by the inventory?\r\n\t\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\taddItemStack(itemStack);\r\n\t\t}\r\n\t\telse\r\n\t\t\taddFullStack(itemStack);\r\n\t}",
"private void plusQuantity(TextField source, Clothing clothing) {\n clothing.setCount(1);\n int quantity = clothing.getCount();\n double totalPriceOfClothing = 0;\n\n for (int i = 0; i < clothingArrayList.size(); i++) {\n double countOfItems = clothingArrayList.get(i).getCount();\n double clothingPricePerUnit = Double.valueOf(clothingArrayList.get(i).getPrice());\n totalPriceOfClothing += countOfItems * clothingPricePerUnit;\n\n }\n source.setText(\"\" + (quantity));\n totalPrices.setText(\"\" + totalPriceOfClothing);\n\n totalPrice.textProperty().bind(totalPrices.textProperty());\n }",
"public void fillInventory(TheGroceryStore g);",
"public void buyFuelUpgrades()\n {\n if(play_state.getMoney() >= fuel_upgrade_cost) {\n play_state.setMoney(play_state.getMoney() - fuel_upgrade_cost);\n fuel_upgrade_cost += 100;\n play_state.getDriller().addMax_fuel(10);\n }\n }",
"@Override\n\tpublic int getSizeInventory() {\n\t\treturn 0;\n\t}",
"public void addItem() {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tSystem.out.print(\"Enter Item Name: \");\n\t\tString itemName = scanner.nextLine();\n\t\tSystem.out.print(\"Enter Item Description: \");\n\t\tString itemDescription = scanner.nextLine();\n\t\tSystem.out.print(\"Enter minimum bid price for item: $\");\n\t\tdouble basePrice = scanner.nextDouble();\n\t\tLocalDate createDate = LocalDate.now();\n\t\tItem item = new Item(itemName, itemDescription, basePrice, createDate);\n\t\taddItem(item);\n\t}",
"public void addItem(LineItem item)\r\n {\r\n\t ChangeEvent event = new ChangeEvent(this);\r\n\t if(items.contains(item))\r\n\t {\r\n\t\t \r\n\t\t counter = 0;\r\n\t\t items.add(item);\r\n\t\t //tem.addQuantity();\r\n\t\t //tem.getQuantity();\r\n\t\t for(int i = 0; i < items.size(); i++)\r\n\t\t {\r\n\t\t\t if(items.get(i).equals(item))\r\n\t\t\t {\r\n\t\t\t counter++;\r\n\t\t\t }\r\n\t\t }\r\n\t\t for (ChangeListener listener : listeners)\r\n\t\t listener.stateChanged(event);\r\n\t\t System.out.print(\"\\r Quantity of \" + item.toString() + \": \"+ counter);\r\n\t\t \r\n\t }\r\n\t else\r\n\t {\r\n\t\t counter = 1;\r\n\t// item.addQuantity();\r\n\t// item.getQuantity();\r\n\t\t items.add(item);\r\n\t// System.out.println(item.getQuantity());\r\n\t\t for (ChangeListener listener : listeners)\r\n\t\t listener.stateChanged(event);\r\n\t \t\r\n\t \tSystem.out.print(\"\\n Quantity of \" + item.toString() + \": \"+ counter);\r\n\t \r\n\t\t \r\n\t }\r\n\t\t\r\n \r\n }",
"@Override\n public void addItem(ItemType item) {\n if (curArrayIndex > items.length - 1) {\n System.out.println(item.getDetails() + \" - This bin is full. Item cannot be added!\");\n }\n else if (item.getWeight() + curWeight <= maxWeight) {\n curWeight += item.getWeight();\n items[curArrayIndex++] = item;\n }\n else {\n System.out.println(item.getDetails() + \" - Overweighted. This item cannot be added!\");\n }\n if (item.isFragile()) {\n setLabel(\"Fragile - Handle with Care\");\n }\n\n }",
"public Inventory(Integer size, ItemStack... items) {\n this.setSize((size == 0) ? 2147483647 : size);\n for (ItemStack stack : items) {\n ITEMS.add(stack);\n }\n }",
"private static void addItem( String name, Integer number ) {\n\t\tItem item = container.addItem( itemId );\n\t\tsetValues( name, number, item );\n\t}"
] | [
"0.7222848",
"0.71265376",
"0.7052831",
"0.69338256",
"0.68860227",
"0.68374026",
"0.68349916",
"0.67374927",
"0.67145723",
"0.66860354",
"0.6622044",
"0.65868884",
"0.6541422",
"0.65085524",
"0.64425033",
"0.6407916",
"0.63862497",
"0.6378323",
"0.63192827",
"0.6306657",
"0.62739885",
"0.6236281",
"0.6231942",
"0.6213837",
"0.621003",
"0.6201277",
"0.6194947",
"0.6192378",
"0.61872107",
"0.6181107",
"0.61648685",
"0.6162645",
"0.6160437",
"0.61577296",
"0.61316705",
"0.610964",
"0.61087793",
"0.6093591",
"0.6042629",
"0.60383934",
"0.60264313",
"0.5998242",
"0.5990205",
"0.59841084",
"0.59826547",
"0.5961811",
"0.59406704",
"0.5931268",
"0.5927983",
"0.59101933",
"0.589851",
"0.5889561",
"0.5868366",
"0.5864278",
"0.5858857",
"0.58550966",
"0.58489233",
"0.58485717",
"0.5846535",
"0.584432",
"0.5842461",
"0.5840722",
"0.583914",
"0.58378184",
"0.58214074",
"0.5817248",
"0.5803371",
"0.57997006",
"0.5775044",
"0.5772584",
"0.5766234",
"0.57661575",
"0.5764439",
"0.57483524",
"0.5745245",
"0.57435334",
"0.5727845",
"0.57252616",
"0.5725095",
"0.570273",
"0.5698829",
"0.56934637",
"0.5689317",
"0.5687309",
"0.56861377",
"0.56835157",
"0.5670071",
"0.5664942",
"0.5656005",
"0.56559706",
"0.5655825",
"0.5655315",
"0.56503385",
"0.5646682",
"0.56442165",
"0.5640089",
"0.56344783",
"0.5632415",
"0.56284267",
"0.56280875"
] | 0.61780345 | 30 |
TODO Autogenerated method stub | public static void main(String[] args) {
int []arr1= {12,13,44};
int []arr2= {44,45,47,50};
int i,j;
int count=0;
int []merge=new int[arr1.length+arr2.length];
for(i=0;i<arr1.length;i++)
{
merge[i]=arr1[i];
count++;
}
for(i=0;i<arr2.length;i++)
{
merge[count++]=arr2[i];
}
for(i=0;i<merge.length;i++)
{
System.out.println(" " +merge[i]);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.