@Test public void test_opacity() { ElementStyle style = new ElementStyle(); assertNull(style.getOpacity()); style.opacity(-1); assertEquals(0, style.getOpacity().intValue()); style.opacity(0); assertEquals(0, style.getOpacity().intValue()); style.opacity(50); assertEquals(50, style.getOpacity().intValue()); style.opacity(100); assertEquals(100, style.getOpacity().intValue()); style.opacity(101); assertEquals(100, style.getOpacity().intValue()); }
styles.addElementStyle("Spring Service").background("#6CB33E").color("#000000"); styles.addElementStyle("Spring Repository").background("#95D46C").color("#000000"); styles.addElementStyle("Failover").opacity(25); styles.addRelationshipStyle("Failover").opacity(25).position(70);
styles.addRelationshipStyle(TAG_ALERT).color("#ff0000"); styles.addElementStyle("Future State").opacity(30).border(Border.Dashed); styles.addRelationshipStyle("Future State").opacity(30).dashed(true);
styles.addElementStyle(MOBILE_APP_TAG).shape(Shape.MobileDeviceLandscape); styles.addElementStyle(DATABASE_TAG).shape(Shape.Cylinder); styles.addElementStyle(FAILOVER_TAG).opacity(25); styles.addRelationshipStyle(FAILOVER_TAG).opacity(25).position(70);