MCPcopy Create free account
hub / github.com/Card-Forge/forge / setVisible

Method setVisible

forge-gui-mobile/src/forge/menu/FDropDown.java:112–139  ·  view source on GitHub ↗
(boolean visible0)

Source from the content-addressed store, hash-verified

110 }
111
112 @Override
113 public void setVisible(boolean visible0) {
114 if (isVisible() == visible0) {
115 return;
116 }
117
118 //add/remove drop down from its container, current screen, or top overlay when its visibility changes
119 FContainer container = getContainer();
120 if (visible0) {
121 updateSizeAndPosition();
122
123 if (autoHide()) { //add invisible backdrop if needed to allow auto-hiding when pressing outside drop down
124 backdrop = new Backdrop();
125 backdrop.setSize(container.getWidth(), container.getHeight());
126 container.add(backdrop);
127 }
128 container.add(this);
129 } else {
130 container.remove(this);
131 if (backdrop != null) {
132 backdrop.setVisible(false);
133 container.remove(backdrop);
134 backdrop = null;
135 }
136 onHidden();
137 }
138 super.setVisible(visible0);
139 }
140
141 protected void onHidden() {
142 }

Callers 2

showMethod · 0.95
hideMethod · 0.95

Calls 11

getContainerMethod · 0.95
updateSizeAndPositionMethod · 0.95
autoHideMethod · 0.95
addMethod · 0.95
removeMethod · 0.95
onHiddenMethod · 0.95
isVisibleMethod · 0.65
getWidthMethod · 0.65
getHeightMethod · 0.65
setVisibleMethod · 0.65
setSizeMethod · 0.45

Tested by

no test coverage detected