ZenScript main repository
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

DEmptyView.java 997B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. * To change this license header, choose License Headers in Project Properties.
  3. * To change this template file, choose Tools | Templates
  4. * and open the template in the editor.
  5. */
  6. package org.openzen.drawablegui;
  7. import live.ImmutableLiveObject;
  8. import live.LiveObject;
  9. /**
  10. *
  11. * @author Hoofdgebruiker
  12. */
  13. public class DEmptyView implements DComponent {
  14. public static final DEmptyView INSTANCE = new DEmptyView();
  15. private static final LiveObject<DSizing> DIMENSION = new ImmutableLiveObject(DSizing.EMPTY);
  16. private DEmptyView() {}
  17. @Override
  18. public void mount(DComponentContext parent) {
  19. }
  20. @Override
  21. public void unmount() {
  22. }
  23. @Override
  24. public LiveObject<DSizing> getSizing() {
  25. return DIMENSION;
  26. }
  27. @Override
  28. public DIRectangle getBounds() {
  29. return DIRectangle.EMPTY;
  30. }
  31. @Override
  32. public int getBaselineY() {
  33. return -1;
  34. }
  35. @Override
  36. public void setBounds(DIRectangle bounds) {
  37. }
  38. @Override
  39. public void close() {
  40. // nothing to clean up
  41. }
  42. }