Example usage for java.util Locale GERMANY

List of usage examples for java.util Locale GERMANY

Introduction

In this page you can find the example usage for java.util Locale GERMANY.

Prototype

Locale GERMANY

To view the source code for java.util Locale GERMANY.

Click Source Link

Document

Useful constant for country.

Usage

From source file:com.anevis.jfreechartsamplespring.chart.ChartServiceImpl.java

private JFreeChart createRingChart() {
    List<RingChartData> dataList = ringChartDataRepository.findAll();
    DefaultPieDataset dataSet = new DefaultPieDataset();

    dataList.forEach(data -> dataSet.setValue(data.getSecurity(), data.getWeighting()));

    JFreeChart chart = ChartFactory.createRingChart("", dataSet, true, false, Locale.GERMANY);

    return chart;
}

From source file:com.mobileman.projecth.web.service.LocaleService.java

/**
 * @return public.contact.receiver.email
 *//* w  w  w .  j a va  2 s.  c om*/
public String getPublicContactReceiverEmail() {
    return messageSource.getMessage("public.contact.receiver.email", null, Locale.GERMANY);
}

From source file:com.codebutler.farebot.transit.MensacardTransitData.java

@Override
public String getBalanceString() {
    return NumberFormat.getCurrencyInstance(Locale.GERMANY).format((double) mBalance / 1000) + "\n"
            + NumberFormat.getCurrencyInstance(Locale.GERMANY).format((double) lastTransaction / 1000);
}

From source file:com.mobileman.projecth.web.service.LocaleService.java

public String getYearsUnknown() {
    return messageSource.getMessage("years.unknown", null, Locale.GERMANY);
}

From source file:com.mobileman.projecth.web.service.LocaleService.java

public String getYears() {
    return messageSource.getMessage("years", null, Locale.GERMANY);
}

From source file:de.chott.jfreechartsample.service.ChartService.java

/**
 * Diese Methode erstellt ein RingChart aus den RingChartDaten.
 * /*from   w w  w  .j  av a 2s.  c  om*/
 * @return Das fertige RingChart.
 */
private JFreeChart createRingChart() {
    DefaultPieDataset dataSet = new DefaultPieDataset();

    for (RingChartData data : ringChartDataService.loadAll()) {
        dataSet.setValue(data.getSecurity(), data.getWeighting());
    }

    JFreeChart chart = ChartFactory.createRingChart("", dataSet, true, false, Locale.GERMANY);

    return chart;
}

From source file:org.polymap.rhei.field.DateTimeFormField.java

public Control createControl(Composite parent, IFormToolkit toolkit) {
    datetime = toolkit.createDateTime(parent, new Date(), SWT.MEDIUM | SWT.DROP_DOWN);
    datetime.setEnabled(enabled);//from  w  w w.ja v  a  2 s  .  co m
    //        datetime.setBackground( enabled ? FormEditorToolkit.textBackground : FormEditorToolkit.textBackgroundDisabled );

    // selection(modify) listener
    datetime.addSelectionListener(new SelectionAdapter() {
        public void widgetSelected(SelectionEvent e) {
            Calendar cal = Calendar.getInstance(Locale.GERMANY);
            cal.set(datetime.getYear(), datetime.getMonth(), datetime.getDay(), datetime.getHours(),
                    datetime.getMinutes(), datetime.getSeconds());
            Date date = cal.getTime();
            log.info("widgetSelected(): test= " + date);

            site.fireEvent(DateTimeFormField.this, IFormFieldListener.VALUE_CHANGE,
                    loadedValue == null && date.equals(nullValue) ? null : date);
        }

    });
    // focus listener
    datetime.addFocusListener(new FocusListener() {
        public void focusLost(FocusEvent event) {
            //                datetime.setBackground( FormEditorToolkit.textBackground );
            site.fireEvent(DateTimeFormField.this, IFormFieldListener.FOCUS_LOST, null);
        }

        public void focusGained(FocusEvent event) {
            //                datetime.setBackground( FormEditorToolkit.textBackgroundFocused );
            site.fireEvent(DateTimeFormField.this, IFormFieldListener.FOCUS_GAINED, null);
        }
    });
    return datetime;
}

From source file:org.openestate.io.examples.IdxWritingExample.java

/**
 * Create an {@link IdxRecord} with some example data.
 *
 * @return//from   w  w  w. j a  v  a  2  s .  c o m
 * created example object
 */
protected static IdxRecord createRecord() {
    // create an example real estate
    IdxRecord obj = new IdxRecord();
    obj.setAdvertisementId(RandomStringUtils.randomAlphanumeric(5));
    obj.setAgencyCity("Berlin");
    obj.setAgencyCountry(Locale.GERMANY.getCountry());
    obj.setAgencyEmail("tester@test.org");
    obj.setAgencyFax("030/123456");
    obj.setAgencyId(RandomStringUtils.randomAlphanumeric(5));
    obj.setAgencyName("agency name");
    obj.setAgencyName2("additional agency name");
    obj.setAgencyPhone("030/123457");
    obj.setAgencyReference(RandomStringUtils.randomAlphanumeric(5));
    obj.setAgencyStreet("example street 123");
    obj.setAgencyZip("12345");
    obj.setAnimalAllowed(RandomUtils.nextInt(0, 2) == 1);
    obj.setAvailableFrom(Calendar.getInstance());
    obj.setBalcony(RandomUtils.nextInt(0, 2) == 1);
    obj.setBillingCompany("agency name");
    obj.setBillingCountry("Germany");
    obj.setBillingFirstName("Max");
    obj.setBillingLanguage(Language.GERMAN);
    obj.setBillingMobile("030/132456");
    obj.setBillingName("Mustermann");
    obj.setBillingPhone("030/123457");
    obj.setBillingPhone2("030/123458");
    obj.setBillingPlaceName("Berlin");
    obj.setBillingPostBox("additional address notes");
    obj.setBillingSalutation(Salutation.MALE);
    obj.setBillingStreet("example street 123");
    obj.setBillingZip("12345");
    obj.setBuildingLandConnected(RandomUtils.nextInt(0, 2) == 1);
    obj.setCableTv(RandomUtils.nextInt(0, 2) == 1);
    obj.setCarryingCapacityCrane(RandomUtils.nextDouble(500, 5000));
    obj.setCarryingCapacityElevator(RandomUtils.nextDouble(500, 5000));
    obj.setCeilingHeight(RandomUtils.nextDouble(2, 10));
    obj.setChildFriendly(RandomUtils.nextInt(0, 2) == 1);
    obj.setCornerHouse(RandomUtils.nextInt(0, 2) == 1);
    obj.setCurrency(Currency.getInstance("EUR"));
    obj.setDistanceKindergarten(RandomUtils.nextInt(50, 5000));
    obj.setDistanceMotorway(RandomUtils.nextInt(50, 5000));
    obj.setDistancePublicTransport(RandomUtils.nextInt(50, 5000));
    obj.setDistanceSchool1(RandomUtils.nextInt(50, 5000));
    obj.setDistanceSchool2(RandomUtils.nextInt(50, 5000));
    obj.setDistanceShop(RandomUtils.nextInt(50, 5000));
    obj.setElevator(RandomUtils.nextInt(0, 2) == 1);
    obj.setFireplace(RandomUtils.nextInt(0, 2) == 1);
    obj.setFlatSharingCommunity(RandomUtils.nextInt(0, 2) == 1);
    obj.setFloor(RandomUtils.nextInt(0, 10));
    obj.setGarage(RandomUtils.nextInt(0, 2) == 1);
    obj.setGardenhouse(RandomUtils.nextInt(0, 2) == 1);
    obj.setGasSupply(RandomUtils.nextInt(0, 2) == 1);
    obj.setGrossPremium(GrossPremium.FROM_4_UNTIL_5);
    obj.setHallHeight(RandomUtils.nextDouble(3, 15));
    obj.setIsdn(RandomUtils.nextInt(0, 2) == 1);
    obj.setLastModified(Calendar.getInstance());
    obj.setLiftingPlatform(RandomUtils.nextInt(0, 2) == 1);
    obj.setMaximalFloorLoading(RandomUtils.nextDouble(50, 5000));
    obj.setMiddleHouse(RandomUtils.nextInt(0, 2) == 1);
    obj.setMinEnergyCertified(RandomUtils.nextInt(0, 2) == 1);
    obj.setMinEnergyGeneral(RandomUtils.nextInt(0, 2) == 1);
    obj.setNewBuilding(RandomUtils.nextInt(0, 2) == 1);
    obj.setNumberOfApartments(RandomUtils.nextDouble(1, 10));
    obj.setNumberOfFloors(RandomUtils.nextInt(1, 10));
    obj.setNumberOfRooms(RandomUtils.nextDouble(1, 10));
    obj.setObjectCity("Berlin");
    obj.setObjectCountry(Locale.GERMANY.getCountry());
    obj.setObjectDescription("some description" + SystemUtils.LINE_SEPARATOR + " about the object");
    obj.setObjectSituation("some description about the location");
    obj.setObjectState("BE");
    obj.setObjectStreet("example street 124");
    obj.setObjectTitle("title of object");
    obj.setObjectType(ObjectType.HOUSE_VILLA);
    obj.setObjectZip("12345");
    obj.setOfferType(OfferType.SALE);
    obj.setOldBuilding(RandomUtils.nextInt(0, 2) == 1);
    obj.setOwnObjectUrl("http://test.org/object/123");
    obj.setParking(RandomUtils.nextInt(0, 2) == 1);
    obj.setPowerSupply(RandomUtils.nextInt(0, 2) == 1);
    obj.setPriceUnit(PriceUnit.MONTHLY);
    obj.setRailwayTerminal(RandomUtils.nextInt(0, 2) == 1);
    obj.setRaisedGroundFloor(RandomUtils.nextInt(0, 2) == 1);
    obj.setRamp(RandomUtils.nextInt(0, 2) == 1);
    obj.setRefHouse(RandomStringUtils.randomAlphanumeric(5));
    obj.setRefObject(RandomStringUtils.randomAlphanumeric(5));
    obj.setRefProperty(RandomStringUtils.randomAlphanumeric(5));
    obj.setRentExtra(RandomUtils.nextLong(100, 1000));
    obj.setRentNet(RandomUtils.nextLong(100, 1000));
    obj.setRestrooms(RandomUtils.nextInt(0, 2) == 1);
    obj.setSellingPrice(RandomUtils.nextLong(100, 1000));
    obj.setSenderId("OpenEstate.org");
    obj.setSewageSupply(RandomUtils.nextInt(0, 2) == 1);
    obj.setSparefield1("spare field 1");
    obj.setSparefield2("spare field 2");
    obj.setSparefield3("spare field 3");
    obj.setSparefield4("spare field 4");
    obj.setSurfaceLiving(RandomUtils.nextLong(50, 300));
    obj.setSurfaceProperty(RandomUtils.nextLong(100, 1000));
    obj.setSurfaceUsable(RandomUtils.nextLong(100, 1000));
    obj.setSwimmingpool(RandomUtils.nextInt(0, 2) == 1);
    obj.setUnderBuildingLaws(RandomUtils.nextInt(0, 2) == 1);
    obj.setUnderRoof(RandomUtils.nextInt(0, 2) == 1);
    obj.setUrl("http://test.org/object/123");
    obj.setView(RandomUtils.nextInt(0, 2) == 1);
    obj.setVisitName("Max Mustermann");
    obj.setVisitPhone("030/123456");
    obj.setVisitRemark("notes about the contact person");
    obj.setVolume(RandomUtils.nextLong(50, 500));
    obj.setWaterSupply(RandomUtils.nextInt(0, 2) == 1);
    obj.setWheelcharAccessible(RandomUtils.nextInt(0, 2) == 1);
    obj.setYearBuilt(RandomUtils.nextInt(1900, 1995));
    obj.setYearRenovated(RandomUtils.nextInt(1995, 2010));

    obj.setDocument(new Media("document.pdf", "a document about the object"));
    obj.setMovie(new Media("document.mp4", "a document about the object"));
    obj.setPicture1(new Media("image1.jpg", "title for image 1", "description for image 1"));
    obj.setPicture2(new Media("image2.jpg", "title for image 2", "description for image 2"));
    obj.setPicture3(new Media("image3.jpg", "title for image 3", "description for image 3"));
    obj.setPicture4(new Media("image4.jpg", "title for image 4", "description for image 4"));
    obj.setPicture5(new Media("image5.jpg", "title for image 5", "description for image 5"));
    obj.setPicture6(new Media("image6.jpg", "title for image 6", "description for image 6"));
    obj.setPicture7(new Media("image7.jpg", "title for image 7", "description for image 7"));
    obj.setPicture8(new Media("image8.jpg", "title for image 8", "description for image 8"));
    obj.setPicture9(new Media("image9.jpg", "title for image 9", "description for image 9"));
    obj.setPicture10(new Media("image10.jpg", "title for image 10", "description for image 10"));
    obj.setPicture11(new Media("image11.jpg", "title for image 11", "description for image 11"));
    obj.setPicture12(new Media("image12.jpg", "title for image 12", "description for image 12"));
    obj.setPicture13(new Media("image13.jpg", "title for image 13", "description for image 13"));

    return obj;
}

From source file:org.zalando.jackson.datatype.money.MonetaryAmountSerializerTest.java

@Test
public void shouldSerializeWithFormattedGermanValue() throws JsonProcessingException {
    final ObjectMapper unit = new ObjectMapper()
            .registerModule(new MoneyModule(new DefaultMonetaryAmountFormatFactory()));

    final String expected = "{\"amount\":29.95,\"currency\":\"EUR\",\"formatted\":\"29,95 EUR\"}";

    final ObjectWriter writer = unit.writer().with(Locale.GERMANY);
    final String actual = writer.writeValueAsString(Money.of(29.95, "EUR"));

    assertThat(actual, is(expected));//w w w. j  a v a 2  s . c o  m
}

From source file:com.mobileman.projecth.business.patient.PatientMedicationServiceTest.java

/**
 * //from w w w  .ja  va  2  s  . c om
 * @throws Exception
 */
@Test
public void addConsumedMedication() throws Exception {

    int oldSize = patientMedicationDao.findAll().size();

    Patient patient = (Patient) userService.findUserByLogin("sysuser1");
    assertNotNull(patient);
    Medication medication = medicationService.findByName("Kort 2", Locale.GERMANY).get(0);
    assertNotNull(medication);

    Disease disease = diseaseService.findByCode("M79.0");
    assertNotNull(disease);

    patientMedicationService.addConsumedMedication(patient.getId(), disease.getId(), medication.getId(), 2.0d,
            new Date(), null);
    assertEquals(oldSize + 1, patientMedicationDao.findAll().size());

    patientMedicationService.addConsumedMedication(patient.getId(), disease.getId(), medication.getId(), 2.0d,
            new Date(), "test");
    assertEquals(oldSize + 2, patientMedicationDao.findAll().size());

    List<Medication> result = patientMedicationService.findAllConsumedMedications(patient.getId(),
            disease.getId());
    assertEquals(4, result.size());
    assertFalse(result.get(0).equals(result.get(1)));

    result = patientMedicationService.findAllConsumedMedications(patient.getId(), 0L);
    assertEquals(0, result.size());
}